/* includes/style.css — VividTamil site styles (header-compatible) */
/* Replace your existing file with this. Backup original first. */

:root{
  --accent:#b36b18;       /* golden accent */
  --accent-2:#b88639;
  --muted:#6b5848;
  --bg:#fbf5ee;
  --card:#fff;
  --maxw:1180px;
  --text:#2b2b2b;
  --heading-font: 'Georgia', 'Times New Roman', serif;
  --ui-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Reset / base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--ui-font);
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.6;
  font-size:16px;
}

/* Links */
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

/* ---------------- Header & Nav (compatible with includes/header.php) ---------------- */
/* Site header wrapper */
.site-header{
  background:rgba(255,255,255,0.98);
  border-bottom:1px solid rgba(160,140,120,0.10);
  position:sticky;
  top:0;
  z-index:120;
}

/* Header inner container — use max width and flexible layout */
.header-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:10px 18px;
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
  min-height:56px;
}

/* Brand area: left side (logo + hamburger). Keep it compact so nav has room */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto; /* do not grow */
  min-width:0;
}
/* The header.php uses <img class="brand-logo"> — target that specifically */
.brand-logo{
  height:44px;
  width:auto;
  max-width:160px; /* cap logo width to keep nav visible */
  display:block;
  object-fit:contain;
}

/* link around brand (text fallback) */
.brand-link{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }

/* Nav container: flexible, non-wrapping row that can scroll horizontally if items overflow */
#mainNav.main-nav{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex:1 1 0;         /* take remaining space but be allowed to shrink */
  min-width:0;        /* enable flex children to shrink properly */
  overflow-x:auto;    /* allow horizontal scroll when items overflow */
  -webkit-overflow-scrolling:touch;
  padding:6px 0;
}

/* Hide scrollbar visually but keep scrollable (cross-browser) */
#mainNav.main-nav{
  scrollbar-width:none; /* firefox */
}
#mainNav.main-nav::-webkit-scrollbar{ display:none; } /* webkit */

/* Nav links: keep single-line labels, don't grow to fill nav */
#mainNav.main-nav a{
  white-space:nowrap;
  padding:8px 10px;
  border-radius:8px;
  font-weight:600;
  color:#3b2a1d;
  text-decoration:none;
  display:inline-block;
  flex:0 0 auto; /* don't let links grow */
}
#mainNav.main-nav a:hover{ background:#f2ebe2; }

/* Nav toggle (hamburger) for mobile: present in header.php */
.nav-toggle{
  display:none; /* shown on mobile via media query */
  width:44px;
  height:40px;
  border:none;
  background:transparent;
  padding:6px;
  cursor:pointer;
}
.nav-toggle .bar{
  display:block;
  height:2px;
  background:#3b2a1d;
  margin:6px 0;
  border-radius:2px;
  transition:transform .25s,opacity .25s;
}
.nav-toggle.is-open .bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open .bar:nth-child(2){ opacity:0; }
.nav-toggle.is-open .bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* Mobile behavior: nav becomes a drawer when .open is added by JS */
@media (max-width: 860px){
  .nav-toggle{ display:block; }
  .header-inner{ padding:10px 12px; gap:10px; }
  /* nav hidden by default; your JS toggles class .open */
  #mainNav.main-nav{
    position:absolute;
    left:0;
    right:0;
    top:64px;
    background:#fff;
    flex-direction:column;
    display:none;
    gap:0;
    border-top:1px solid #f3efe8;
    box-shadow:0 10px 22px rgba(0,0,0,.06);
    z-index:200;
  }
  #mainNav.main-nav.open{ display:flex; }
  #mainNav.main-nav a{ padding:12px 16px; border-bottom:1px solid #f4efe7; }
  /* smaller logo to help fit controls */
  .brand-logo{ max-width:120px; height:42px; }
}

/* Larger screens: ensure nav doesn't wrap (use horizontal scroll if needed) */
@media (min-width: 861px){
  #mainNav.main-nav{ flex-wrap:nowrap; overflow-x:auto; }
  #mainNav.main-nav a{ padding:6px 10px; }
  .nav-toggle{ display:none; }
}

/* Small-screen safety */
@media (max-width: 480px){
  .brand-link{ font-size:14px; }
  .brand-logo{ height:40px; max-width:110px; }
}

/* ---------------- End Header & Nav ---------------- */


/* ---------------- Base layout & content styles (kept minimal & compatible) ---------------- */
.site-main{max-width:var(--maxw);margin:28px auto;padding:0 20px}

/* Hero styles (some pages include inline or index-specific overrides) */
.hero-large{position:relative;overflow:hidden;border-radius:12px;box-shadow:0 26px 60px rgba(30,20,10,0.08)}
.hero-large img{width:100%;height:560px;object-fit:cover;display:block;filter:contrast(1.03) saturate(1.05)}
.hero-overlay{position:absolute;left:56px;top:72px;color:#fff;max-width:640px;background:linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.32));padding:28px;border-radius:10px}
.hero-overlay h1{font-size:56px;margin:0 0 10px;line-height:1.02;font-family:var(--heading-font)}
.hero-overlay p{margin:0 0 14px;color:rgba(255,255,255,0.95);font-size:18px}

/* Generic card & grid helpers */
.card{background:var(--card);padding:18px;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,0.06);display:flex;gap:16px;align-items:center}
.card img{width:220px;height:140px;object-fit:cover;border-radius:8px}
.columns{display:grid;grid-template-columns:2fr 1fr;gap:28px;margin-top:28px}
.post-card{background:var(--card);padding:18px;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,0.04)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}

/* CTA / Buttons */
.cta-btn{background:var(--accent);color:#fff;padding:10px 14px;border-radius:8px;text-decoration:none;display:inline-block}
.small-muted{color:var(--muted);font-size:13px}

/* Footer */
.site-footer{background:var(--bg);border-top:1px solid rgba(160,140,120,0.08);margin-top:40px;padding:18px 0}
.footer-inner{max-width:var(--maxw);margin:0 auto;padding:28px 20px;display:flex;gap:20px}
.footer-inner .col{flex:1}

/* Utilities */
.small{font-size:13px;color:#666}
.post-card img{width:100%;height:180px;object-fit:cover;border-radius:0 0 0 0}
h1,h2,h3{ font-family: var(--heading-font); color: #3b2a1d; margin-top:0; }

/* End of stylesheet */
