/* ============================================================
   ISC Java - Design System
   Colors : #1e3a5f / #2d5a87 / #f58025
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ── CSS Variables ── */
:root {
  --primary:        #1e3a5f;
  --primary-mid:    #2d5a87;
  --primary-light:  #3a6fa0;
  --accent:         #f58025;
  --accent-deep:    #e76f00;
  --bg:             #f0f4f8;
  --bg-card:        #ffffff;
  --text-main:      #1a2332;
  --text-muted:     #6b7a8d;
  --text-light:     #a0aab4;
  --white:          #ffffff;
  --shadow-sm:      0 2px 8px rgba(30,58,95,.08);
  --shadow-md:      0 8px 30px rgba(30,58,95,.12);
  --shadow-lg:      0 20px 60px rgba(30,58,95,.18);
  --shadow-xl:      0 30px 90px rgba(30,58,95,.22);
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --transition:     0.38s cubic-bezier(.4,0,.2,1);
  --neo-shadow:     8px 8px 16px #d4dae2, -8px -8px 16px #ffffff;
  --neo-inset:      inset 4px 4px 8px #d4dae2, inset -4px -4px 8px #ffffff;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; user-select: none; pointer-events: none; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Remove ALL focus outlines and tap highlights ── */
* {
  -webkit-tap-highlight-color: transparent !important;
}

:focus {
  outline: none !important;
}

.page-transition {
  animation: pageIn .45s ease both;
}
@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left  { opacity:0; transform:translateX(-40px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right { opacity:0; transform:translateX(40px);  transition: opacity .7s ease, transform .7s ease; }
.reveal-left.visible, .reveal-right.visible { opacity:1; transform:translateX(0); }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 5%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 58, 95, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(30, 58, 95, 0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,.2);
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-icon-img {
  width: 50px;        /* Adjust to desired size */
  height: 50px;
  margin-right: 8px;  /* Space between image and text */
  object-fit: contain; /* Keeps aspect ratio */
}

.nav-logo .logo-text {
  font-size: 15px; font-weight: 700;
  color: var(--white);
  letter-spacing: .3px;
}
.nav-logo .logo-text span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  letter-spacing: .3px;
  position: relative;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(245,128,37,.35);
  transition: all var(--transition);
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,128,37,.45);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 99999;           /* Above everything */
  background: rgba(30,58,95,.5);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.1);
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(30,58,95,.8); }
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .35s ease;
}
.hamburger.open { background: rgba(30,58,95,.9); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Drawer — full-screen overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 99998;           
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-nav.open {
  display: flex;
  opacity: 1;
}
.mobile-nav .nav-link {
  font-size: 22px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  padding: 4px 0;
  letter-spacing: .3px;
}
.mobile-nav .nav-link:hover { color: var(--white); }

/* YouTube link in mobile nav */
.mobile-nav .yt-mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.12);
  margin-top: 4px;
  transition: all var(--transition);
}
.mobile-nav .yt-mobile-link:hover {
  color: var(--white);
  background: rgba(255,0,0,.12);
  border-color: rgba(255,80,80,.3);
}
.mobile-nav .yt-mobile-link svg { flex-shrink: 0; }

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  padding-top: 72px;
  background: linear-gradient(145deg, #0d2240 0%, #1e3a5f 45%, #2d5a87 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M50 50v-6h-3v6h-6v3h6v6h3v-6h6v-3h-6zm0-44V0h-3v6h-6v3h6v6h3V9h6V6h-6zM6 50v-6H3v6H-3v3h6v6h3v-6h6v-3H6zM6 6V0H3v6H-3v3h6v6h3V9h6V6H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(245,128,37,.15) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(45,90,135,.4) 0%, transparent 70%);
  bottom: -50px; left: 10%;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,128,37,.15);
  border: 1px solid rgba(245,128,37,.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.6); }
}
.hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--accent); }
.hero p.subtitle {
  font-size: 17px;
  color: rgba(255,255,255,.65);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 25px rgba(245,128,37,.4);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(245,128,37,.5);
  background: var(--accent-deep);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid var(--primary);
  transition: all var(--transition);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Hero Visual ── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-code-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: float-card 6s ease-in-out infinite;
}
@keyframes float-card {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-16px) rotate(-1deg); }
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.code-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.code-dot.red   { background: #ff5f57; }
.code-dot.yellow{ background: #febc2e; }
.code-dot.green { background: #28c840; }
.code-file { margin-left: auto; font-size: 11px; color: rgba(255,255,255,.4); font-family: 'Courier New', monospace; }
.code-content { font-family: 'Courier New', monospace; font-size: 13px; line-height: 2; }
.code-line { display: block; }
.c-keyword  { color: #c792ea; }
.c-class    { color: #ffcb6b; }
.c-method   { color: #82aaff; }
.c-string   { color: #c3e88d; }
.c-comment  { color: #546e7a; }
.c-bracket  { color: #89ddff; }
.c-num      { color: #f78c6c; }

/* Floating badges on hero */
.float-badge {
  position: absolute;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
}
.float-badge-1 { top: 20px; left: -50px; animation: float-b 4s ease-in-out infinite; z-index: 1; }
.float-badge-2 { bottom: 40px; right: -20px; animation: float-b 4s ease-in-out infinite .8s; }
@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 16px;
  padding-bottom: 8px;
}
.stats-grid {
  max-width: 1200px;
  margin: 0px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  text-align: center;
}
.stat-item .num {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 0.5;
  margin-bottom: 2px;
}
.stat-item .num span { color: var(--accent); }
.stat-item .label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Section Wrapper ── */
.section {
  padding: 100px 5%;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 56px;
}

/* ── Neomorphic Cards ── */
.neo-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--neo-shadow);
  padding: 32px;
  transition: all var(--transition);
}
.neo-card:hover {
  box-shadow: 12px 12px 24px #c8d0db, -12px -12px 24px #ffffff;
  transform: translateY(-4px);
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ── Class Cards (4‑column grid) ── */
.class-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 80px;
}
.class-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
}
.class-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.class-card-top {
  padding: 28px 20px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  position: relative;
  overflow: hidden;
}
.class-card-top::before {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  top: -60px; right: -40px;
}
.class-card-number {
  font-size: 60px;
  font-weight: 900;
  color: rgba(255,255,255,.08);
  position: absolute;
  top: 5px; right: 10px;
  line-height: 1;
  letter-spacing: -4px;
}
.class-card-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.class-card-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}
.class-card-subtitle { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.class-card-body { padding: 20px 20px; }
.class-card-chapters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.chapter-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  transition: all var(--transition);
}
.chapter-pill:hover { background: rgba(245,128,37,.08); color: var(--accent-deep); }
.chapter-pill-icon {
  width: 24px; height: 24px;
  background: rgba(245,128,37,.12);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chapter-pill-icon svg { width: 12px; height: 12px; color: var(--accent); fill: var(--accent); }
.chapter-pill-name { flex: 1; font-weight: 500; }
.chapter-pill-arrow { color: var(--text-light); font-size: 11px; }
.class-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.class-card-meta { font-size: 11px; color: var(--text-muted); }
.class-card-meta strong { color: var(--primary); }

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(30,58,95,.06);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245,128,37,.2);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}
.feature-icon.blue  { background: rgba(30,58,95,.08); }
.feature-icon.orange{ background: rgba(245,128,37,.1); }
.feature-icon.green { background: rgba(34,197,94,.1); }
.feature-icon.purple{ background: rgba(139,92,246,.1); }
.feature-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.feature-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.neo-card {
  justify-content: center !important;
  text-align: left; /* Keep text left-aligned if needed */
}
.neo-card .lab-manual-btn {
  margin: 0 auto;
}

/* ── Blog Cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(30,58,95,.06);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.blog-thumb-bg {
  position: relative;        
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-thumb-img {
  width: 100%;               
  max-width: 450px;
  height: auto;
  object-fit: contain;
}
.blog-card-thumb {
  height: 180px;
  position: relative;
  overflow: hidden;
}
.blog-thumb-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  transition: transform var(--transition);
}
.blog-card:hover .blog-thumb-bg { transform: scale(1.05); }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245,128,37,.1);
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}
.blog-card-title a { transition: color var(--transition); }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.06);
  font-size: 12px;
  color: var(--text-light);
}
.blog-card-meta .date { font-weight: 600; }
.blog-card-meta .read-time::before { content: '·'; margin-right: 12px; }
.nav-logo {
  display: flex;
  align-items: center;
}
.logo-icon {
  width: 28px;                
  height: 28px;
  margin-right: 10px;         
  object-fit: contain;
  filter: brightness(0) invert(1); 
}

/* ── About Page ── */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-avatar-wrap {
  display: flex;
  justify-content: center;
}

.about-avatar-icon {
  width: 350px;              /* Adjust to desired size */
  height: 400px;
  overflow: hidden;          /* Ensures image stays within circle */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0; /* Fallback background */
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* Fills the circle, crops if needed */
}
.about-avatar-wrap {
  width: 320px;
  height: 380px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-mid) 100%);
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.about-avatar-icon { font-size: 100px; user-select: none; }
.about-avatar-wrap::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  top: -100px; right: -80px;
}
.philosophy-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px; /* Adjust as needed */
}

.philosophy-emoji svg {
  width: 48px;        
  height: 48px;
  color: #e76f00;    
  transition: transform 0.2s ease;
}

/* Optional hover effect */
.philosophy-card:hover .philosophy-emoji svg {
  transform: scale(1.05);
  color: #f58025;      /* Slightly lighter on hover */
}
.about-stat-badge {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

/* Move it slightly on mobile */
@media (max-width: 768px) {
  .about-stat-badge.tl {
    display: none; /* Hide on smaller screens if it overlaps too much */
  }
}

.about-stat-badge.tl { top: 20px; left: -12px; }
.about-stat-badge.br { bottom: 30px; right: -20px; }
.about-stat-badge .n { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.about-stat-badge .n span { color: var(--accent); }
.about-stat-badge .l { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.about-content .tag { display: inline-block; background: rgba(245,128,37,.1); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 14px; border-radius: 50px; margin-bottom: 20px; }
.about-content h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--primary); line-height: 1.15; margin-bottom: 20px; }
.about-content p { font-size: 15.5px; color: var(--text-muted); line-height: 1.8; margin-bottom: 20px; }
.about-skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.skill-tag { background: var(--bg); border: 1.5px solid rgba(30,58,95,.15); color: var(--primary); padding: 8px 18px; border-radius: 50px; font-size: 13px; font-weight: 600; transition: all var(--transition); }
.skill-tag:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.philosophy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.philosophy-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.philosophy-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(245,128,37,.15); }
.philosophy-emoji { font-size: 40px; margin-bottom: 16px; }
.philosophy-card h4 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.philosophy-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }

/* ── Blog-page extras ── */
.blog-hero-sm {
  padding: 140px 5% 72px;
  background: linear-gradient(145deg, var(--primary) 0%, #1a4a7a 100%);
  position: relative; overflow: hidden;
}
.blog-hero-sm::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--bg); clip-path: ellipse(55% 100% at 50% 100%);
}
.blog-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 48px;
}
.filter-pill {
  padding: 8px 22px; border-radius: 50px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  background: var(--white); color: var(--text-muted);
  border: 1.5px solid rgba(30,58,95,.12);
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.blog-featured {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  margin-bottom: 64px;
  transition: all var(--transition);
}
.blog-featured:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.blog-featured-thumb {
  min-height: 320px;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-mid) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 80px;
}
/* Make featured image cover the area */
.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-featured-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured-body .blog-tag { margin-bottom: 16px; }
.blog-featured-body h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--primary); line-height: 1.25; margin-bottom: 16px; }
.blog-featured-body p { font-size: 15px; color: var(--text-muted); line-height: 1.75; margin-bottom: 24px; }
.blog-featured-body .blog-card-meta { border: none; padding: 0; margin-bottom: 20px; }

/* Hidden cards for load more */
.blog-card.hidden-card {
  display: none;
}
@media (max-width: 768px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-thumb { min-height: 200px; }
  .blog-featured-body { padding: 28px; }
}
/* ── Blog Detail Page ── */
.blog-hero {
  padding: 160px 5% 80px;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-mid) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.blog-hero-tag { margin-bottom: 20px; }
.blog-hero h1 {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 800;
  color: var(--white);
  max-width: 1200px;
  margin: 0 auto 20px;
  line-height: 1.15;
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: rgba(255,255,255,.6);
  font-size: 13px;
}
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 5%;
}
.blog-article h2 {
  font-family: 'Lora', serif;
  font-size: 26px;
  color: var(--primary);
  margin: 48px 0 16px;
}
.blog-article h3 {
  font-size: 18px;
  color: var(--primary);
  margin: 32px 0 12px;
  font-weight: 700;
}
.blog-article p {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.85;
  margin-bottom: 20px;
}
.blog-article code {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--accent-deep);
}
.blog-article pre {
  background: #1e1e1e;
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  margin: 24px 0;
}
.blog-article pre code {
  background: none;
  color: #d4d4d4;
  font-size: 13px;
  padding: 0;
}
.blog-article ul, .blog-article ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.blog-article li {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 8px;
  list-style: disc;
}
.blog-article blockquote {
  border-left: 4px solid var(--accent);
  margin: 32px 0;
  padding: 16px 24px;
  background: rgba(245,128,37,.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 17px;
  color: var(--primary);
  font-style: italic;
  font-family: 'Lora', serif;
}
/* ── TOC ── */
.toc-card {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 24px 28px;
  margin: 36px 0;
}
.toc-card h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.toc-card ol { padding-left: 20px; }
.toc-card li { font-size: 14px; color: var(--primary); margin-bottom: 6px; font-weight: 500; }
.toc-card li a { transition: color var(--transition); }
.toc-card li a:hover { color: var(--accent); }

/* ── Author card ── */
.author-card {
  display: flex; gap: 20px; align-items: center;
  background: var(--bg); border-radius: var(--radius-lg);
  padding: 24px 28px; margin: 48px 0;
}
.author-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  overflow: hidden; /* ensures image stays within circle */
  transform: translateY(-10px); /* moves avatar 10px upward */
}
.author-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.author-info h5 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.author-info p  { font-size: 13px; color: var(--text-muted); }

/* ── Share buttons ── */
.share-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 48px 0; padding: 24px 0; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.share-bar span { font-size: 13px; font-weight: 700; color: var(--primary); margin-right: 4px; }
.share-btn { padding: 8px 20px; border-radius: 50px; font-size: 12px; font-weight: 600; border: 1.5px solid rgba(30,58,95,.15); color: var(--primary); transition: all var(--transition); }
.share-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ── Related posts ── */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; } /* reduced from 48px */
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Callout box ── */
.callout {
  background: rgba(245,128,37,.07);
  border: 1px solid rgba(245,128,37,.25);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 24px 0;
  font-size: 14.5px; color: var(--text-main);
}
.callout strong { color: var(--accent); }

/* Wider article content */
.blog-article {
  max-width: 1350px;
  margin: 0 auto;
  padding: 80px 5%;
}

/* Hero style  */
.blog-hero-sm {
  padding: 140px 5% 72px;
  background: linear-gradient(145deg, var(--primary) 0%, #1a4a7a 100%);
  position: relative; overflow: hidden;
  text-align: center;
}
.blog-hero-sm::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--bg); clip-path: ellipse(55% 100% at 50% 100%);
}
.blog-hero-sm h1 {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Related container width */
.related-container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 5% 100px;
}

/* ── Classes Page ── */
.page-hero {
  padding: 140px 5% 80px;
  background: linear-gradient(145deg, var(--primary) 0%, #1a4a7a 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; color: var(--white); margin-bottom: 16px; }
.page-hero p  { font-size: 17px; color: rgba(255,255,255,.65); max-width: 560px; margin: 0 auto; }

/* ── Classes Tabs (scrollable on mobile) ── */
.class-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  background: var(--white);
  padding: 8px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
  flex-wrap: wrap;
}
.class-tab {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.class-tab:hover { color: var(--primary); }
.class-tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(30,58,95,.25);
}

/* Mobile tabs: horizontal scroll */
@media (max-width: 768px) {
  .class-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    border-radius: 40px;
    padding: 8px 4px;
  }
  .class-tabs::-webkit-scrollbar {
    display: none;
  }
  .class-tab {
    flex: 0 0 auto;
    padding: 10px 20px;
  }
}

/* ── Chapter Cards ── */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.chapter-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(30,58,95,0.06);
  display: flex;
  flex-direction: column;      /* Stack content vertically */
  gap: 16px;
  align-items: stretch;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245,128,37,0.2);
}

/* Top row: icon + content */
.chapter-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.chapter-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--white);
  font-weight: 800;
}

.chapter-card-content {
  flex: 1;
}

.chapter-card-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.chapter-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.chapter-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Action buttons */
.chapter-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;           
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.04);
}

/* Button base style */
.chapter-btn {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
  line-height: 1.4;
  cursor: pointer;
}

/* Primary button (View PDF) */
.chapter-btn.primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(245,128,37,0.25);
}

.chapter-btn.primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245,128,37,0.35);
}

/* Outline button (Download) */
.chapter-btn.outline {
  background: transparent;
  border: 1.5px solid rgba(30,58,95,0.25);
  color: var(--primary);
}

.chapter-btn.outline:hover {
  border-color: var(--primary);
  background: rgba(30,58,95,0.04);
  transform: translateY(-1px);
}

/* ── Contact / Doubt ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.contact-info-card:hover { border-color: rgba(245,128,37,.2); transform: translateX(4px); }
.contact-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.contact-info-card h4 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.contact-info-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Form */
.form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}
.form-title { font-size: 26px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.form-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 8px; letter-spacing: .3px; }
.form-label span { color: var(--accent); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(30,58,95,.1);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  background: var(--bg);
  transition: all var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(245,128,37,.08);
}
.form-input.error, .form-select.error, .form-textarea.error { border-color: #ef4444; }
.form-error { font-size: 12px; color: #ef4444; margin-top: 5px; display: none; }
.form-error.show { display: block; }
.form-textarea { resize: vertical; min-height: 130px; }
.form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a8d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.form-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(30,58,95,.3);
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 35px rgba(30,58,95,.4); }
.form-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Success State */
.success-message {
  display: none;
  text-align: center;
  padding: 48px 32px;
}
.success-message.show { display: block; }
.success-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  animation: pop-in .5s cubic-bezier(.175,.885,.32,1.275) both;
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-message h3 { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.success-message p  { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }

/* ── Footer ── */
.footer {
  background: linear-gradient(145deg, #0d2240 0%, var(--primary) 100%);
  padding: 80px 5% 40px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245,128,37,.06) 0%, transparent 70%);
  top: -200px; right: -100px;
  pointer-events: none;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,.5); line-height: 1.75; max-width: 260px; }
.footer-col h5 { font-size: 13px; font-weight: 700; color: var(--white); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13.5px; color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,.35);
}
.footer-bottom a { color: var(--accent); }

/* ── Scroll to Top ── */
.scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(245,128,37,.4);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all var(--transition);
  z-index: 900;
  font-size: 18px;
}
.scroll-top.show { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(245,128,37,.5); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-accent  { color: var(--accent); }
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }
.divider { height: 1px; background: rgba(30,58,95,.08); margin: 60px 0; }

/* ── YouTube icon button in navbar ── */
.nav-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.nav-yt-btn svg { flex-shrink: 0; transition: fill var(--transition); }
.nav-yt-btn:hover {
  background: rgba(255,0,0,.18);
  border-color: rgba(255,80,80,.4);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,0,0,.2);
}
.nav-yt-btn:hover svg { fill: #ff4444; }

/* ── Floating YouTube pill ── */
.yt-float {
  position: fixed;
  bottom: 32px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 11px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 4px 20px rgba(30,58,95,.35);
  text-decoration: none;
  transition: all var(--transition);
  z-index: 900;
  border: 1px solid rgba(255,255,255,.1);
  white-space: nowrap;
}
.yt-float svg { flex-shrink: 0; transition: all var(--transition); }
.yt-float:hover {
  background: #cc0000;
  box-shadow: 0 8px 28px rgba(204,0,0,.4);
  transform: translateY(-3px);
}
.yt-float:hover svg { fill: #fff; }

@media (max-width: 1024px) {
  .hero-content        { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-actions        { justify-content: center; }
  .hero p.subtitle     { margin-left: auto; margin-right: auto; }
  .hero-visual         { max-width: 420px; margin: 0 auto; }
  .stats-grid          { grid-template-columns: repeat(1, 1fr); }
  .class-cards-grid    { grid-template-columns: repeat(2, 1fr); }
  .features-grid       { grid-template-columns: repeat(2, 1fr); }
  .blog-grid           { grid-template-columns: repeat(2, 1fr); }
  .about-story         { grid-template-columns: 1fr; }
  .about-visual        { max-width: 360px; margin: 0 auto; }
  .contact-grid        { grid-template-columns: 1fr; }
  .philosophy-grid     { grid-template-columns: 1fr 1fr; }
  .footer-grid         { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links           { display: none; }
  .hamburger           { display: flex; }      /* Show hamburger on tablet/mobile */
  .nav-yt-btn          { display: none; }      /* Hide navbar YouTube; shown in mobile-nav */
}
@media (max-width: 768px) {
  .section             { padding: 72px 5%; }
  .class-cards-grid    { grid-template-columns: 1fr; }
  .features-grid       { grid-template-columns: 1fr; }
  .blog-grid           { grid-template-columns: 1fr; }
  .chapters-grid       { grid-template-columns: 1fr; }
  .form-row            { grid-template-columns: 1fr; }
  .form-card           { padding: 32px 24px; }
  .philosophy-grid     { grid-template-columns: 1fr; }
  .footer-grid         { grid-template-columns: 1fr; }
  .footer-bottom       { flex-direction: column; gap: 8px; text-align: center; }
  .stats-grid          { grid-template-columns: repeat(1, 1fr); }
  .about-avatar-wrap   { width: 260px; height: 320px; }
  .about-stat-badge.tl { left: 0; }
  .about-stat-badge.br { right: 0; }
}
@media (max-width: 480px) {
  .hero h1             { font-size: 32px; }
  .hero-code-card      { padding: 20px; }
  .stats-grid          { grid-template-columns: 1fr 1fr; }
  .navbar              { padding: 0 20px; }
  /* Compact floating YouTube label on small phones */
  .yt-float .yt-label  { display: none; }
  .yt-float            { padding: 11px 14px; }
}

/* Hide floating YouTube button on desktop, since we have the navbar button there */
@media (min-width: 1025px) {
  .yt-float {
    display: none !important;
  }
}

/* ============================================
   Preloader Styles
   ============================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0d2240; /* matches primary dark */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-card {
  --bg-color: #0d2240;
  background-color: var(--bg-color);
  padding: 1rem 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.loader {
  color: #e76f00;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 25px;
  box-sizing: content-box;
  height: 40px;
  padding: 10px 10px;
  display: flex;
  border-radius: 8px;
}

.words {
  overflow: hidden;
  position: relative;
}

.words::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--bg-color) 10%,
    transparent 30%,
    transparent 70%,
    var(--bg-color) 90%
  );
  z-index: 20;
}

.word {
  display: block;
  height: 100%;
  padding-left: 6px;
  color: #f1f1f1;
  animation: spin_4991 4s infinite;
}

@keyframes spin_4991 {
  10% { transform: translateY(-102%); }
  25% { transform: translateY(-100%); }
  35% { transform: translateY(-202%); }
  50% { transform: translateY(-200%); }
  60% { transform: translateY(-302%); }
  75% { transform: translateY(-300%); }
  85% { transform: translateY(-402%); }
  100% { transform: translateY(-400%); }
}

/* Prevent scroll during preloader */
body.preloader-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ── 404 Page Styles ── */
.page_404 {
  padding: 80px 0;
  background: #fff;
  font-family: 'Poppins', sans-serif;
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.four_zero_four_bg {
  background-image: url(https://cdn.dribbble.com/users/285475/screenshots/2083086/dribbble_1.gif);
  height: 400px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.four_zero_four_bg h1 {
  font-size: 80px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0;
}
.link_404 {
  color: #fff !important;
  padding: 12px 28px;
  background: #1e3a5f;
  margin: 20px 0;
  display: inline-block;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s ease;
}
.link_404:hover {
  background: #0f2a44;
}
.contant_box_404 {
  margin-top: -60px;
}
.contant_box_404 h3 {
  font-size: 32px;
  font-weight: 700;
  display: inline-block;
  color: #1e3a5f;
  margin-bottom: 16px;
}
.contant_box_404 p {
  font-size: 18px;
  color: #555;
  margin-bottom: 24px;
}
/* Ensure navbar stays on top */
.navbar {
  z-index: 1000;
}
/* Mobile adjustments */
@media (max-width: 768px) {
  .four_zero_four_bg {
      height: 300px;
  }
  .four_zero_four_bg h1 {
      font-size: 60px;
  }
  .contant_box_404 {
      margin-top: -30px;
  }
  .contant_box_404 h3 {
      font-size: 26px;
  }
  .contant_box_404 p {
      font-size: 16px;
  }
}