/* =========================================================
   FILENAME: hi-Style-2.css
   PURPOSE : Full replace stylesheet with stable mobile side-nav
   AUTHOR  : Invictaa
   NOTE    : Remove/avoid duplicate inline <style> to prevent overrides
========================================================= */

/* ------------------------------
   CSS Reset + Base
------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: #f8f9fa;
  color: #343a40;
  line-height: 1.7;
}

/* Root palette (Invictaa) */
:root{
  --brand:#3A308E;
  --brand-2:#4B0FC5;
  --accent:#FF9800;
  --text:#212529;
  --muted:#6c757d;
  --card:#ffffff;
  --shadow: 0 4px 25px rgba(0,0,0,0.07);
  --radius: 8px;
}

/* Utilities */
.container { width: 70%; max-width: 1400px; margin: 0 auto; }
.hidden { display: none !important; }

/* ------------------------------
   Header
------------------------------ */
header{
  background: var(--brand);
  padding:10px 4%;
  display:flex; justify-content:space-between; align-items:center;
  position:fixed; top:0; left:0; right:0;
  z-index:1000;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.logo-container img{ height:40px; display:block; }

.main-nav{ display:flex; gap:30px; justify-content:center; align-items:center; }
.main-nav a{
  color:#fff; text-decoration:none; font-weight:600; font-size:16px;
}
.main-nav a:hover{ color: var(--accent); }

.header-right{ display:flex; align-items:center; gap:25px; }

.language-switcher{
  display:flex; border:1.5px solid rgba(255,255,255,.7);
  border-radius:20px; overflow:hidden; background:rgba(255,255,255,.1);
}
.lang-btn{
  color:#fff; text-decoration:none; padding:5px 15px; font-size:14px; transition:.3s ease;
}
.lang-btn.active{ background:#fff; color:var(--brand); font-weight:600; border-radius:20px; }
.lang-btn:not(.active):hover{ color:var(--accent); }

.hamburger{ display:none; flex-direction:column; gap:5px; cursor:pointer; }
.hamburger span{ width:25px; height:3px; background:#fff; border-radius:2px; }

/* ------------------------------
   Page Layout
------------------------------ */
.page-wrapper{
  width:70%;
  max-width:1400px;
  margin:0 auto;
  padding-top:80px; /* fixed header spacer */
  display:flex; align-items:flex-start; gap:40px;
}

/* Side Navigation (Desktop) */
.side-nav{
  flex:0 0 25%;
  max-width:240px;
  position:sticky; top:90px;
  height:calc(100vh - 100px);
  overflow-y:auto;
  background: var(--card);
  border-radius:6px;
  box-shadow: var(--shadow);
}
.side-nav button{
  display:block; width:100%; text-align:left; cursor:pointer;
  background:transparent; color:#495057; border:none; border-left:4px solid transparent;
  padding:14px 20px; font-size:15px; transition:.25s;
}
.side-nav button:hover{ background:#e9ecef; border-left-color:#adb5bd; }
.side-nav button.active{ background:#ffffff; color:var(--brand); font-weight:700; border-left-color:var(--brand); }

/* Main Content */
.main-content{ flex:1; padding-left:0; }
h1{ color:#212529; text-align:center; font-size:2.2em; margin:20px 0 40px; }
h2{
  color:#2c3e50; font-size:1.8em; font-weight:600; margin-bottom:25px; position:relative; padding-left:20px;
}
h2::before{
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:6px; height:65%; background:var(--brand); border-radius:3px;
}
section h3{ font-size:1.3em; color:var(--brand); margin-top:30px; border-bottom:2px solid #f0f0f0; padding-bottom:10px; }
section{
  background:#fff; padding:30px; border-radius:8px; box-shadow:var(--shadow);
  margin-bottom:30px; scroll-margin-top:90px;
}

/* Notification Box */
.notification-box{
  background:#e3e3fa; border:1px solid #5e35b1; padding:20px; border-radius:8px;
  text-align:center; margin:20px 0;
}
.notification-box-title{ margin:0 0 10px; color:#5e35b1; font-size:1.2em; }
.notification-box-text{ color:#555; margin-bottom:20px; }
.notification-box-button{
  background:#5e35b1; color:#fff; padding:12px 25px; text-decoration:none; border-radius:5px; font-weight:bold; display:inline-block; transition:.3s;
}
.notification-box-button:hover{ background:#4a2aa5; }

/* Images */
.content-image{
  max-width:100%; height:auto; display:block; margin:25px auto;
  border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,.1);
}

/* Tables */
.table-container{ overflow-x:auto; width:100%; margin:20px 0; }
table{ width:100%; border-collapse:collapse; margin:0; font-size:16px; background:#fff; }
th{ background:#f8f9fa; font-weight:600; }
th, td{ border:1px solid #dee2e6; padding:12px; text-align:left; }
tbody tr:nth-child(even){ background:#f8f9fa; }

/* FAQ */
.faq-container details{ border-bottom:1px solid #e0e0e0; padding:20px 0; }
.faq-container details:last-child{ border-bottom:none; }
.faq-container summary{
  font-weight:600; color:var(--brand); cursor:pointer; font-size:18px; list-style:none; position:relative;
  padding:12px 30px 12px 12px; background:#f0f4ff; border-radius:4px;
}
.faq-container summary::-webkit-details-marker{ display:none; }
.faq-container summary::after{
  content:'+'; position:absolute; right:10px; top:50%; transform:translateY(-50%);
  font-size:28px; font-weight:300; color:var(--accent); transition: transform .2s ease-out;
}
.faq-container details[open] summary::after{ transform:translateY(-50%) rotate(45deg); }
.faq-container .faq-answer{ padding:15px 0 5px; margin-top:10px; }

/* Next Reads (Cards) */
.next-reads-section{ margin-top:0; padding-top:0; border-top:2px solid #f0f0f0; }
.next-reads-section h2{ text-align:center; padding-left:0; margin-bottom:5px; font-size:1.8em; color:#2c3e50; }
.next-reads-section h2::before{ display:none; }
.next-reads-grid{ display:flex; gap:25px; justify-content:center; flex-wrap:wrap; }
.next-read-card-link{ text-decoration:none; color:inherit; flex:1; min-width:280px; max-width:400px; }
.next-read-card{
  background:#ffffff; border:1px solid #e9ecef; border-radius:12px; overflow:hidden; height:100%;
  box-shadow:0 4px 15px rgba(0,0,0,0.05); transition: transform .3s ease, box-shadow .3s ease; display:flex; flex-direction:column;
}
.next-read-card:hover{ transform:translateY(-8px); box-shadow:0 8px 25px rgba(58,48,142,.1); }
.next-read-card .card-image{ width:100%; height:180px; object-fit:cover; aspect-ratio:16/9; }
.next-read-card .card-content{ padding:25px; display:flex; flex-direction:column; flex-grow:1; }
.next-read-card .card-title{ font-size:1.25em; font-weight:600; color:var(--brand); margin:0 0 6px 0; }
.next-read-card .card-description{ font-size:.95em; color:var(--muted); line-height:1.6; margin:0 0 10px 0; flex-grow:1; }
.next-read-card .read-more-btn{ font-weight:bold; color:var(--brand); display:inline-block; margin-top:auto; }
.next-read-card .read-more-btn i{ margin-left:5px; transition: margin-left .3s ease; }
.next-read-card:hover .read-more-btn i{ margin-left:10px; }

/* ------------------------------
   Footer
------------------------------ */
.site-footer{
  background: var(--brand-2); color:#fff; padding:50px 8%; margin-top:40px;
}
.footer-grid{ display:flex; flex-wrap:wrap; gap:30px; justify-content:space-between; }
.footer-col{ flex:1; min-width:200px; text-align:left; }
.site-footer h3{ font-weight:bold; color:#fff; margin:0 0 20px 0; font-size:1.1em; border:none; }
.site-footer p, .site-footer div{ font-size:14px; line-height:1.6; margin-bottom:15px; }
.site-footer a{ display:block; color:#fff; text-decoration:none; font-size:14px; margin-bottom:10px; }
.site-footer a:hover{ color:#FFB74D; }
.site-footer .footer-social a{ display:inline-block; margin-right:15px; }

/* ------------------------------
   Bottom Mobile Nav
------------------------------ */
.bottom-mobile-nav{
  display:none;
  position:fixed; bottom:0; left:0; width:100%;
  background:#ffffff; box-shadow:0 -2px 5px rgba(0,0,0,.1); z-index:998; padding:5px 0;
}
.bottom-mobile-nav .nav-item{
  display:flex; flex-direction:column; align-items:center; text-decoration:none; color:var(--brand);
  font-size:12px; padding:2px 5px; flex-grow:1; text-align:center;
}
.bottom-mobile-nav .nav-item i{ font-size:20px; margin-bottom:4px; }
.bottom-mobile-nav .nav-item .google-play-badge{ height:38px; width:auto; position:relative; top:2px; }

/* =========================================================
   Responsive (<= 992px)
   - Side nav becomes off-canvas
   - Hamburger appears
   - Bottom mobile nav visible
========================================================= */
@media (max-width: 992px){
  .page-wrapper{ display:block; width:auto; padding:80px 0 0; margin:0; }

  /* Hide top nav, show hamburger */
  .main-nav{ display:none; }
  .hamburger{ display:flex; }

  /* Off-canvas Side Nav (important: keep display:block to allow transform) */
  .side-nav{
    position:fixed; left:0; top:0;
    width: 82vw; max-width: 300px; height:100vh;
    background:#fff; overflow-y:auto; padding-top:20px; border-radius:0;
    box-shadow: 2px 0 10px rgba(0,0,0,.15);
    z-index: 1100;                           /* above header */
    transform: translateX(-105%);            /* fully hidden */
    will-change: transform;
    transition: transform .3s ease;
    display:block;                            /* ✅ DO NOT use display:none */
  }
  .side-nav.show{
    transform: translateX(0);                 /* slide in */
  }

  /* Main content full width */
  .main-content{ padding: 0 5%; }

  /* Sections soften radius on mobile for edge-to-edge feel */
  section{ border-radius:0; padding:25px 20px; }

  /* Footer layout stack */
  .footer-grid{ flex-direction:column; }

  /* Bottom mobile navbar visible */
  .bottom-mobile-nav{ display:flex; justify-content:space-around; align-items:center; }
  body{ padding-bottom:60px; } /* space for bottom nav */
}

/* Small screens fine-tuning */
@media (max-width: 520px){
  h1{ font-size:1.6rem; }
  h2{ font-size:1.35rem; }
  section{ padding:22px 16px; }
  .next-read-card .card-image{ height:160px; }
}

/* ------------------------------
   Misc/Helpers
------------------------------ */
.author-byline{
  text-align:center; margin-bottom:30px; color:#555; font-size:.9em;
}