/* ============================================================
   My Bursaries - Main Stylesheet (Mobile First)
   Primary: #4A9EDB  Secondary: #1E6FBF  Ratio: ~3:1 on white
   ============================================================ */

/* --- CSS Custom Properties --------------------------------- */
:root {
  --primary:       #4A9EDB;
  --secondary:     #1E6FBF;
  --bg:            #FFFFFF;
  --text:          #1A2332;
  --text-muted:    #6B7A90;
  --border:        #D4E8F7;
  --surface:       #F0F7FD;
  --surface-hover: #E2F0FA;
  --shadow:        0 2px 12px rgba(30, 111, 191, 0.08);
  --shadow-md:     0 4px 24px rgba(30, 111, 191, 0.12);
  --radius:        10px;
  --radius-lg:     16px;
  --transition:    0.3s ease;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --font-head:     'Poppins', system-ui, -apple-system, sans-serif;
  --max-width:     1180px;
  --header-h:      70px;
}

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Container --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* --- Header ------------------------------------------------ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 0.5rem;
}
.site-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}
.site-name:hover { color: var(--primary); }

/* Navigation */
.site-nav { width: 100%; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  background: none;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  background: var(--surface);
  color: var(--secondary);
}
.nav-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--secondary);
  color: #fff;
  border-radius: 6px;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.nav-btn:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.nav-btn.active { background: var(--primary); }

/* Dropdown */
.nav-dropdown .dropdown-toggle { display: flex; align-items: center; gap: 0.25rem; }
.caret { font-size: 0.75em; transition: transform var(--transition); }
.nav-dropdown.open .caret { transform: rotate(180deg); }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 200;
  padding: 0.4rem 0;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  transition: background var(--transition);
}
.dropdown-link:hover { background: var(--surface); color: var(--secondary); }

@media (min-width: 768px) {
  .site-header .container { flex-direction: row; flex-wrap: wrap; gap: 0; padding-top: 0; padding-bottom: 0; min-height: var(--header-h); }
  .site-name { font-size: 1.65rem; }
  .site-nav { width: auto; margin-left: auto; }
  .nav-list { gap: 0.1rem; }
  .nav-link { font-size: 0.9rem; }
}

/* --- Hero Section ------------------------------------------ */
.hero {
  background: linear-gradient(135deg, var(--surface) 0%, #daeef9 100%);
  padding: 3rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Layout: Main + Sidebar -------------------------------- */
.page-wrap {
  padding: 2rem 0 3rem;
}
.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 900px) {
  .content-wrap.has-sidebar-right  { grid-template-columns: 1fr 300px; }
  .content-wrap.has-sidebar-left   { grid-template-columns: 300px 1fr; }
  .content-wrap.has-sidebar-left .main-content { order: 2; }
  .content-wrap.has-sidebar-left .sidebar      { order: 1; }
}
@media (min-width: 1024px) {
  .content-wrap.has-sidebar-right  { grid-template-columns: 1fr 320px; }
  .content-wrap.has-sidebar-left   { grid-template-columns: 320px 1fr; }
}

/* --- Post Tiles Grid --------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .posts-grid { grid-template-columns: 1fr; } }
@media (min-width: 1024px) { .posts-grid.wide { grid-template-columns: repeat(2, 1fr); } }

.post-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.post-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.post-tile-img {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 0.25rem;
}
.post-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-tile:hover .post-tile-img img { transform: scale(1.03); }
.post-tile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.post-tile-cat {
  background: var(--surface);
  color: var(--secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  text-decoration: none;
}
.post-tile-cat:hover { background: var(--primary); color: #fff; }
.post-tile h2 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}
.post-tile h2 a { color: inherit; text-decoration: none; }
.post-tile h2 a:hover { color: var(--secondary); }
.post-tile-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}
.tag-chip {
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* No posts */
.no-posts {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.no-posts h2 { font-family: var(--font-head); margin-bottom: 0.5rem; color: var(--text); }

/* --- Pagination -------------------------------------------- */
.pagination { margin-top: 2rem; }
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}
.page-link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: all var(--transition);
  text-decoration: none;
}
.page-link:hover { background: var(--surface); border-color: var(--primary); color: var(--secondary); }
.page-link.active { background: var(--secondary); color: #fff; border-color: var(--secondary); font-weight: 600; }

/* --- Sidebar Widgets --------------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.widget-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
/* Search Widget */
.search-form .search-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-form .search-wrap:focus-within { border-color: var(--primary); }
.search-form input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: none;
  outline: none;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.search-form button {
  padding: 0 0.85rem;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
}
.search-form button:hover { background: var(--secondary); }
/* Popular Posts Widget */
.popular-list { display: flex; flex-direction: column; gap: 0.85rem; }
.popular-list li { display: flex; gap: 0.65rem; align-items: flex-start; }
.pop-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pop-info { display: flex; flex-direction: column; gap: 0.15rem; }
.pop-title { font-size: 0.875rem; font-weight: 500; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pop-title:hover { color: var(--secondary); }
.pop-views { font-size: 0.75rem; color: var(--text-muted); }
/* Categories Widget */
.cat-list { display: flex; flex-direction: column; gap: 0.4rem; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0.6rem; border-radius: 6px; font-size: 0.9rem; color: var(--text); transition: background var(--transition), color var(--transition); text-decoration: none; }
.cat-list a:hover { background: var(--surface); color: var(--secondary); }
.cat-count { font-size: 0.75rem; background: var(--surface); padding: 0.1rem 0.4rem; border-radius: 10px; color: var(--text-muted); }
/* Tags Cloud Widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --- Ad Slots ---------------------------------------------- */
.ad-slot { text-align: center; }
.ad-sticky-top  { position: sticky; top: 0; z-index: 99; background: var(--bg); padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.ad-sticky-bottom { position: sticky; bottom: 0; z-index: 99; background: var(--bg); padding: 0.5rem 0; border-top: 1px solid var(--border); }
.ad-inline { margin: 2rem 0; padding: 1rem 0; }

/* --- Single Post Page -------------------------------------- */
.single-page { padding: 2rem 0 3rem; }
.post-header { margin-bottom: 2rem; }
.post-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.meta-cat { background: var(--surface); color: var(--secondary); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; text-decoration: none; }
.meta-cat:hover { background: var(--primary); color: #fff; }
.meta-dot { color: var(--border); }
.post-feature-image { margin-bottom: 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.post-feature-image img { width: 100%; max-height: 480px; object-fit: cover; }

/* Post Body Content */
.post-body { font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.post-body h2 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; margin: 2rem 0 0.75rem; color: var(--text); }
.post-body h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.6rem; color: var(--text); }
.post-body p  { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote { border-left: 4px solid var(--primary); padding: 0.75rem 1.25rem; margin: 1.5rem 0; background: var(--surface); border-radius: 0 8px 8px 0; font-style: italic; color: var(--text-muted); }
.post-body a { color: var(--secondary); text-decoration: underline; }
.post-body a:hover { color: var(--primary); }
.post-body img { border-radius: 8px; margin: 1rem 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.post-body table th, .post-body table td { border: 1px solid var(--border); padding: 0.6rem 0.85rem; text-align: left; }
.post-body table th { background: var(--surface); font-weight: 600; }
.post-body code { background: var(--surface); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.9em; font-family: 'Courier New', monospace; }
.post-body pre { background: #1A2332; color: #E2F0FA; padding: 1.25rem; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0; }
.post-body pre code { background: none; color: inherit; padding: 0; }

/* Post Tags */
.post-tags-wrap { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.post-tags-wrap h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.6rem; }
.post-tags-wrap .tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* FAQ Section */
.post-faq { margin-top: 2.5rem; }
.post-faq h2 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
  cursor: pointer;
  gap: 0.5rem;
}
.faq-question:hover { background: var(--surface-hover); }
.faq-question .faq-icon { font-size: 1.25rem; font-weight: 300; flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-item.open .faq-answer { padding: 1rem 1.25rem; max-height: 600px; }
.faq-answer p { margin: 0; font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }

/* Author Box */
.author-box {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 2.5rem;
  align-items: flex-start;
}
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--border); }
.author-avatar-placeholder { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; font-weight: 700; flex-shrink: 0; }
.author-info h4 { font-family: var(--font-head); font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.author-info p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.6; }
.author-socials { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.author-socials a { font-size: 0.8rem; color: var(--secondary); border: 1px solid var(--border); padding: 0.15rem 0.5rem; border-radius: 4px; text-decoration: none; transition: all var(--transition); }
.author-socials a:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }

/* --- Static Pages ------------------------------------------ */
.static-page { padding: 3rem 0; max-width: 760px; margin: 0 auto; }
.static-page h1 { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: var(--text); margin-bottom: 1.5rem; }
.static-page .page-content h2 { font-family: var(--font-head); font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--text); }
.static-page .page-content h3 { font-family: var(--font-head); font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--text); }
.static-page .page-content p  { margin-bottom: 1rem; color: var(--text); line-height: 1.8; }
.static-page .page-content ul, .static-page .page-content ol { margin: 1rem 0 1rem 1.5rem; }
.static-page .page-content ul { list-style: disc; }
.static-page .page-content ol { list-style: decimal; }
.static-page .page-content li { margin-bottom: 0.35rem; }
.static-page .page-content a { color: var(--secondary); text-decoration: underline; }

/* Contact Form */
.contact-form { margin-top: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 158, 219, 0.15);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: var(--primary); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,111,191,0.25); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--secondary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error   { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }

/* --- Search / Archive Pages -------------------------------- */
.archive-header { padding: 2rem 0 1rem; }
.archive-header h1 { font-family: var(--font-head); font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; color: var(--text); margin-bottom: 0.35rem; }
.archive-header p { color: var(--text-muted); font-size: 0.95rem; }
.archive-badge { display: inline-block; background: var(--surface); color: var(--secondary); padding: 0.2rem 0.65rem; border-radius: 4px; font-size: 0.85rem; font-weight: 500; margin-right: 0.25rem; }

/* Search bar on search page */
.search-page-form { margin-bottom: 2rem; }
.search-page-form .search-wrap {
  display: flex;
  max-width: 560px;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-page-form .search-wrap:focus-within { border-color: var(--primary); }
.search-page-form input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  min-width: 0;
}
.search-page-form button {
  padding: 0 1.25rem;
  background: var(--secondary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.search-page-form button:hover { background: var(--primary); }

/* --- Profile (Author) Page --------------------------------- */
.profile-page { padding: 3rem 0; }
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.profile-avatar-placeholder { width: 96px; height: 96px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.5rem; font-weight: 700; }
.profile-card h1 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.profile-card .profile-bio { color: var(--text-muted); max-width: 500px; }
@media (min-width: 600px) { .profile-card { flex-direction: row; text-align: left; align-items: flex-start; } }

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { color: #fff; font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; display: inline-block; margin-bottom: 0.5rem; text-decoration: none; }
.footer-logo:hover { color: rgba(255,255,255,0.85); }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.7); line-height: 1.6; }
.footer-links h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.6); margin-bottom: 0.75rem; }
.footer-links ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { color: rgba(255,255,255,0.8); font-size: 0.9rem; text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 1rem 0; }
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.55); text-align: center; }

/* --- Floating Buttons -------------------------------------- */
.float-btn {
  position: fixed;
  z-index: 900;
  padding: 0.65rem 1.1rem;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}
.float-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); color: #fff; }
.float-top-left   { top: 80px; left: 1rem; }
.float-top-center { top: 80px; left: 50%; transform: translateX(-50%); }
.float-top-right  { top: 80px; right: 1rem; }
.float-mid-left   { top: 50%; left: 1rem; transform: translateY(-50%); }
.float-mid-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.float-mid-right  { top: 50%; right: 1rem; transform: translateY(-50%); }
.float-bottom-left   { bottom: 1.5rem; left: 1rem; }
.float-bottom-center { bottom: 1.5rem; left: 50%; transform: translateX(-50%); }
.float-bottom-right  { bottom: 1.5rem; right: 1rem; }

/* --- 404 Page ---------------------------------------------- */
.error-page { padding: 5rem 0; text-align: center; }
.error-page h1 { font-family: var(--font-head); font-size: clamp(3rem, 10vw, 6rem); font-weight: 700; color: var(--primary); opacity: 0.3; line-height: 1; }
.error-page h2 { font-family: var(--font-head); font-size: 1.5rem; color: var(--text); margin: 0.5rem 0 1rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }

/* --- Utilities --------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span { color: var(--border); }

/* --- Loading spinner --------------------------------------- */
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Transitions (if animation enabled) -------------------- */
.fade-in { animation: fadeIn 0.4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Print ------------------------------------------------- */
@media print {
  .site-header, .site-footer, .sidebar, .ad-slot, .float-btn { display: none !important; }
  .content-wrap { grid-template-columns: 1fr !important; }
}
