/*
Theme Name: AI Globia Blog
Theme URI: https://aiglobia.com
Author: AI Globia
Author URI: https://aiglobia.com
Description: Custom WordPress theme matching the AI Globia "Violet Intelligence" website. Reuses the exact fonts, header, footer, colours and motion of the main HTML site so the blog looks like a seamless part of aiglobia.com.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aiglobia-blog
*/

/* ============================================================
   This file ONLY contains blog-specific styles.
   The full site design system is loaded from
   /assets/css/site.css (enqueued in functions.php) so the
   blog inherits the exact same look as the main HTML site.
   ============================================================ */

/* ---------- Blog page width + spacing ---------- */
.blog-main { padding: 60px 0 40px; position: relative; }
.blog-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.blog-content { min-width: 0; }

/* small hero strip reused on every blog view */
.blog-hero { padding: 54px 0; text-align: center; }
.blog-hero h1 { font-size: clamp(34px,5vw,56px); margin: 0 0 14px; }
.blog-hero .lead { margin: 0 auto; }
.blog-hero .crumbs { color: var(--muted); font-size: 14px; margin-top: 14px; font-family:'Space Grotesk'; letter-spacing:.02em; }
.blog-hero .crumbs a { color: var(--lavender); }

/* ---------- Post listing cards ---------- */
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; backdrop-filter: blur(10px);
  transition: transform .5s var(--ease), border-color .5s, background .5s, box-shadow .5s;
}
.post-card::after {
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none; opacity:0;
  background: radial-gradient(420px 200px at var(--mx,50%) var(--my,0%), rgba(124,92,252,.13), transparent 65%);
  transition: opacity .5s;
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(167,139,250,.32); background: var(--glass-2); box-shadow: 0 24px 60px -18px rgba(0,0,0,.6); }
.post-card:hover::after { opacity: 1; }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--panel); border-bottom: 1px solid var(--border); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .body { padding: 26px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 7px;
  font-family:'Space Grotesk'; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lavender); padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(167,139,250,.25); background: rgba(124,92,252,.08); margin-bottom: 14px;
}
.post-card h2, .post-card h3 { font-size: 21px; margin: 0 0 10px; line-height: 1.25; }
.post-card h2 a, .post-card h3 a { color: var(--navy); transition: color .25s; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--violet-2); }
.post-card .excerpt { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.post-meta { display: flex; align-items: center; gap: 12px; color: #6F688A; font-size: 13px; margin-top: auto; font-family:'Space Grotesk'; letter-spacing:.02em; }
.post-meta .read-more { margin-left: auto; color: var(--violet-2); font-weight: 600; }
.post-card .read-more:hover { color: var(--lavender); }

/* ---------- Single post ---------- */
.single-post { max-width: 760px; margin: 0 auto; }
.single-post .post-header { text-align: center; margin-bottom: 36px; }
.single-post .post-header h1 { font-size: clamp(32px,4.6vw,52px); margin: 0 0 18px; line-height: 1.12; }
.single-post .post-header .meta-row {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; font-family:'Space Grotesk'; letter-spacing:.02em;
}
.single-post .post-header .cat {
  display:inline-flex; align-items:center; gap:7px; font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--lavender); padding:6px 12px; border-radius:999px;
  border:1px solid rgba(167,139,250,.25); background:rgba(124,92,252,.08);
}
.single-post .featured {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border);
  background: var(--panel); box-shadow: 0 30px 80px -24px rgba(0,0,0,.7); margin-bottom: 42px;
}
.single-post .featured img { width: 100%; display: block; }

/* ---------- Long-form content typography ---------- */
.entry-content { color: var(--dark); font-size: 17.5px; line-height: 1.8; }
.entry-content > * { margin: 0 0 1.3em; }
.entry-content h2 { font-size: clamp(26px,3.4vw,34px); margin: 1.8em 0 .6em; color: var(--navy); }
.entry-content h3 { font-size: clamp(21px,2.6vw,26px); margin: 1.6em 0 .5em; color: var(--navy); }
.entry-content h4 { font-size: 19px; margin: 1.4em 0 .4em; color: #E7E2F6; font-family:'Space Grotesk'; }
.entry-content a { color: var(--violet-2); text-decoration: underline; text-decoration-color: rgba(167,139,250,.4); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--lavender); text-decoration-color: var(--lavender); }
.entry-content strong, .entry-content b { color: #E7E2F6; }
.entry-content em { color: var(--lavender); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin: .5em 0; }
.entry-content li::marker { color: var(--violet-2); }
.entry-content img { border-radius: var(--r-md); border: 1px solid var(--border); margin: 1.6em 0; box-shadow: 0 20px 60px -22px rgba(0,0,0,.7); }
.entry-content blockquote {
  margin: 1.8em 0; padding: 22px 26px; border-left: 3px solid var(--violet-2);
  background: rgba(124,92,252,.07); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: #D7D2E9; font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display:block; margin-top:10px; font-size:14px; color:var(--muted); font-style:normal; }
.entry-content code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 7px; color: var(--lavender);
}
.entry-content pre {
  background: #0B0915; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 22px; overflow-x: auto; font-size: 14.5px; line-height: 1.65;
}
.entry-content pre code { background: none; border: 0; padding: 0; color: #D7D2E9; }
.entry-content hr { border: 0; height: 1px; background: linear-gradient(90deg,transparent,rgba(167,139,250,.35),transparent); margin: 2.4em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.6em 0; }
.entry-content th, .entry-content td { padding: 13px 16px; border: 1px solid var(--border); text-align: left; }
.entry-content th { background: rgba(124,92,252,.1); color: #E7E2F6; font-family:'Space Grotesk'; font-weight: 600; }
.entry-content td { color: var(--muted); }

/* WordPress core alignment + caption helpers */
.entry-content .aligncenter { margin-left: auto; margin-right: auto; display: block; }
.entry-content .alignleft { float: left; margin: .5em 1.6em 1.2em 0; }
.entry-content .alignright { float: right; margin: .5em 0 1.2em 1.6em; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text, .entry-content figcaption { color: var(--muted); font-size: 13.5px; text-align: center; margin-top: 10px; font-style: italic; }
.entry-content .wp-block-image figcaption { margin-top: -1em; }
.entry-content .wp-block-button__link { background: linear-gradient(135deg,#6D4DF0,#9F7BFF); color:#fff; border-radius:999px; padding:14px 28px; text-decoration:none; font-family:'Space Grotesk'; font-weight:600; }

/* post tags + share footer */
.post-footer { margin-top: 44px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.07); }
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.post-tags .tag {
  font-size: 13px; color: var(--muted); padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03); transition: .3s;
}
.post-tags .tag:hover { color: #fff; border-color: var(--border-2); background: rgba(124,92,252,.14); }

/* author box */
.author-box {
  display: flex; gap: 18px; align-items: center; margin-top: 32px; padding: 24px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border-2); flex: none; }
.author-box .name { font-family:'Space Grotesk'; font-weight:600; color:#fff; font-size:17px; margin:0 0 4px; }
.author-box .bio { color: var(--muted); font-size: 14.5px; margin: 0; }

/* prev / next post nav */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.post-nav a {
  display: block; padding: 20px 22px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--glass); transition: .4s var(--ease);
}
.post-nav a:hover { border-color: rgba(167,139,250,.32); background: var(--glass-2); transform: translateY(-3px); }
.post-nav .dir { font-size: 12px; letter-spacing:.12em; text-transform:uppercase; color: var(--violet-2); font-family:'Space Grotesk'; margin-bottom: 6px; }
.post-nav .ttl { color: #E7E2F6; font-weight: 600; font-size: 15.5px; }
.post-nav .next { text-align: right; }

/* ---------- Sidebar / widgets ---------- */
.blog-sidebar { position: sticky; top: 100px; }
.widget {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px 24px; margin-bottom: 24px; backdrop-filter: blur(10px);
}
.widget-title { font-family:'Space Grotesk'; font-size: 13px; letter-spacing:.14em; text-transform:uppercase; color:#EDE9FE; margin: 0 0 16px; font-weight:600; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--muted); font-size: 14.5px; transition: color .25s, transform .25s; display: inline-block; }
.widget a:hover { color: var(--lavender); transform: translateX(3px); }
.widget .search-form { display: flex; gap: 8px; }
.widget .search-form input[type=search] {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 12px;
  color: #fff; padding: 12px 14px; font-size: 14px; outline: none;
}
.widget .search-form button {
  border: 0; border-radius: 12px; padding: 0 16px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg,#6D4DF0,#9F7BFF); font-family:'Space Grotesk'; font-weight:600;
}
.widget-cta { background: linear-gradient(180deg,rgba(124,92,252,.13),rgba(124,92,252,.04)); border-color: rgba(167,139,250,.4); text-align: center; }
.widget-cta p { color: #D7D2E9; font-size: 14.5px; margin: 0 0 16px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 48px 0 10px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--glass);
  color: var(--muted); font-family:'Space Grotesk'; font-weight: 600; font-size: 15px; transition: .3s;
}
.pagination .page-numbers:hover { color: #fff; border-color: var(--border-2); background: rgba(124,92,252,.14); }
.pagination .page-numbers.current { background: linear-gradient(135deg,#6D4DF0,#9F7BFF); color: #fff; border-color: transparent; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 56px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,.07); }
.comments-title { font-size: 24px; margin: 0 0 28px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list li { margin-bottom: 18px; }
.comment-body {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 22px;
}
.comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-author img { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); }
.comment-author .fn { font-family:'Space Grotesk'; font-weight: 600; color: #fff; font-style: normal; }
.comment-meta { color: #6F688A; font-size: 13px; }
.comment-content { color: var(--muted); font-size: 15px; line-height: 1.7; }
.comment-content p { margin: .4em 0; }
.comment-reply-link { font-size: 13px; color: var(--violet-2); font-weight: 600; }
.children { list-style: none; margin: 16px 0 0; padding-left: 28px; border-left: 1px solid rgba(255,255,255,.07); }
.comment-respond { background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.comment-respond .comment-reply-title { font-size: 20px; margin: 0 0 18px; }
.comment-form label { display:block; color:#D7D2E9; font-weight:500; font-size:14px; margin-bottom:8px; font-family:'Space Grotesk'; }
.comment-form p { margin-bottom: 16px; }
.comment-form input, .comment-form textarea {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px;
  color: #fff; padding: 14px 16px; font-size: 15px; font-family:'Inter'; outline: none; transition: .3s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--violet-2); box-shadow: 0 0 0 4px rgba(124,92,252,.15); }
.comment-form .submit {
  width: auto; background: linear-gradient(135deg,#6D4DF0,#9F7BFF); border: 0; cursor: pointer;
  border-radius: 999px; padding: 14px 30px; color: #fff; font-family:'Space Grotesk'; font-weight: 600;
}

/* ---------- Empty / no posts state ---------- */
.no-posts { max-width: 640px; margin: 0 auto; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .post-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .entry-content .alignleft, .entry-content .alignright { float: none; margin: 1.2em auto; }
}
