/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8e;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header { position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); transition: transform 0.35s ease; }
.header.header-hidden { transform: translateY(-110%); }
.header-top { background: var(--primary); color: #fff; padding: 6px 0; font-size: 13px; }
.header-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.header-contact { display: flex; gap: 20px; opacity: 0.9; }
.header-contact span { display: flex; align-items: center; gap: 6px; }
.header-social { display: flex; gap: 10px; }
.header-social a { color: #fff; opacity: 0.8; font-size: 16px; transition: var(--transition); }
.header-social a:hover { opacity: 1; transform: scale(1.2); }
.header-auth { display: flex; align-items: center; gap: 10px; }
.btn-login { background: var(--accent); color: var(--primary); border: none; padding: 5px 14px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 13px; transition: var(--transition); }
.btn-login:hover { background: var(--accent-dark); }
.user-menu { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.user-dropdown { display: none; position: absolute; right: 0; top: 100%; background: #fff; border-radius: 8px; box-shadow: var(--shadow); min-width: 160px; padding: 8px; z-index: 100; }
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 14px; transition: var(--transition); }
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }

.header-main { background: #fff; padding: 12px 0; }
.header-main-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo-area { display: flex; align-items: center; gap: 14px; }
.logo-area img { height: 60px; width: auto; }
.logo-text h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  animation: neonPulse var(--neon-cycle, 3s) ease-in-out infinite;
  letter-spacing: 0.5px;
}
.logo-text p { font-size: 13px; color: var(--text-light); }
.logo-text p .tagline-line { display: block; }
.logo-text p .tagline-line:first-child { color: var(--accent); font-weight: 700; font-size: 15px; }
.logo-text p .tagline-line + .tagline-line { font-size: 13px; }

/* ===== NEON PULSE ANIMATION ===== */
@keyframes neonPulse {
  0%, 100% {
    color: var(--primary);
    text-shadow: none;
    filter: brightness(1);
  }
  30% {
    color: #f59e0b;
    text-shadow:
      0 0 6px #f59e0b,
      0 0 14px #f59e0b,
      0 0 28px #fbbf24,
      0 0 48px rgba(245,158,11,0.5);
    filter: brightness(1.25);
  }
  50% {
    color: #ffffff;
    text-shadow:
      0 0 8px #f59e0b,
      0 0 20px #f59e0b,
      0 0 40px #fbbf24,
      0 0 70px rgba(245,158,11,0.6),
      0 0 90px rgba(251,191,36,0.3);
    filter: brightness(1.4);
  }
  70% {
    color: #f59e0b;
    text-shadow:
      0 0 6px #f59e0b,
      0 0 14px #f59e0b,
      0 0 28px #fbbf24,
      0 0 48px rgba(245,158,11,0.5);
    filter: brightness(1.25);
  }
}
.main-nav { display: flex; align-items: center; }
.nav-toggle { display: none; background: none; border: 2px solid var(--primary); color: var(--primary); padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 18px; }
.nav-list { display: flex; list-style: none; gap: 4px; }
.nav-list a { display: block; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); transition: var(--transition); }
.nav-list a:hover { background: var(--primary); color: #fff; }

/* ===== HERO SLIDER ===== */
.hero-slider { position: relative; overflow: hidden; height: clamp(320px, 42vw, 600px); background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.slider-track { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(.25,.46,.45,.94); will-change: transform; }
/* legacy compat */
.slider-container { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(.25,.46,.45,.94); }
.slide { min-width: 100%; height: 100%; position: relative; background-size: cover; background-position: center; flex-shrink: 0; }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(10,25,55,0.78) 0%, rgba(10,25,55,0.35) 55%, rgba(10,25,55,0.05) 100%); }
.slide-content { position: absolute; z-index: 1; left: 8%; right: 45%; top: 50%; transform: translateY(-50%); color: #fff; }
.slide-content h2 { font-size: 16px; opacity: 0.85; margin-bottom: 8px; letter-spacing: 0.5px; }
.slide-content h1 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  animation: neonPulseHero var(--neon-cycle, 3s) ease-in-out infinite;
}
.slide-placeholder .slide-content h1 {
  animation: neonPulseHero var(--neon-cycle, 3s) ease-in-out infinite;
}
@keyframes neonPulseHero {
  0%, 100% {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1);
  }
  35% {
    color: #fde68a;
    text-shadow:
      0 0 8px #f59e0b,
      0 0 20px #f59e0b,
      0 0 40px #fbbf24,
      0 0 70px rgba(245,158,11,0.7),
      0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1.3);
  }
  55% {
    color: #ffffff;
    text-shadow:
      0 0 12px #f59e0b,
      0 0 28px #fbbf24,
      0 0 55px #fde68a,
      0 0 90px rgba(245,158,11,0.6),
      0 0 120px rgba(251,191,36,0.3),
      0 2px 8px rgba(0,0,0,0.2);
    filter: brightness(1.5);
  }
  75% {
    color: #fde68a;
    text-shadow:
      0 0 8px #f59e0b,
      0 0 20px #f59e0b,
      0 0 40px #fbbf24,
      0 0 70px rgba(245,158,11,0.7),
      0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1.3);
  }
}
.slide-content p { font-size: 16px; opacity: 0.85; margin-bottom: 28px; }
.slide-placeholder { min-width: 100%; height: 100%; display: flex; align-items: center; background: linear-gradient(135deg, var(--primary) 0%, #1a4a7a 50%, #0f2d4a 100%); flex-shrink: 0; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary { background: var(--accent); color: var(--primary); padding: 12px 28px; border-radius: 30px; font-weight: 700; font-size: 15px; transition: var(--transition); box-shadow: 0 4px 15px rgba(245,158,11,0.4); }
.btn-hero-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.5); }
.btn-hero-outline { border: 2px solid rgba(255,255,255,0.8); color: #fff; padding: 12px 28px; border-radius: 30px; font-weight: 700; font-size: 15px; transition: var(--transition); }
.btn-hero-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.45); color: #fff; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 20px; z-index: 10; transition: var(--transition); backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; }
.slider-btn:hover { background: rgba(255,255,255,0.35); transform: translateY(-50%) scale(1.08); }
.slider-prev { left: 24px; }
.slider-next { right: 24px; }
.slider-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; align-items: center; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.45); border: none; cursor: pointer; transition: var(--transition); }
.slider-dot.active { background: var(--accent); width: 28px; border-radius: 5px; }
/* Progress bar */
.slider-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent); z-index: 11; transition: width linear; border-radius: 0 2px 2px 0; }

/* ===== STATS BAR ===== */
.stats-bar { background: var(--primary); padding: 20px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { display: flex; flex-direction: column; align-items: center; color: #fff; gap: 4px; }
.stat-item i { font-size: 26px; color: var(--accent); margin-bottom: 4px; }
.stat-num { font-size: 30px; font-weight: 800; }
.stat-item span:last-child { font-size: 13px; opacity: 0.8; }

/* ===== SECTIONS ===== */
section { padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 16px; }
.section-footer { text-align: center; margin-top: 40px; }

/* ===== RESOURCE GRID ===== */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.resource-card { background: #fff; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; border-left: 4px solid var(--primary); position: relative; overflow: hidden; }
.resource-card::before { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; background: var(--card-color, var(--primary)); opacity: 0.06; border-radius: 0 0 0 80px; }
.resource-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.resource-card-icon { font-size: 36px; margin-bottom: 14px; display: block; }
.resource-card h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.resource-card p { font-size: 13px; color: var(--text-light); }
.resource-card .access-badge { position: absolute; top: 14px; right: 14px; font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.badge-public { background: #d1fae5; color: #065f46; }
.badge-student { background: #dbeafe; color: #1e40af; }
.badge-teacher { background: #fef3c7; color: #92400e; }
.badge-admin { background: #fee2e2; color: #991b1b; }

/* ===== NAV BUTTONS ===== */
.nav-buttons-section { background: #f1f5f9; }
.nav-buttons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.nav-btn-card { display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fff; border-radius: var(--radius); padding: 24px 16px; box-shadow: var(--shadow); transition: var(--transition); text-align: center; border-top: 4px solid var(--btn-color, var(--primary)); }
.nav-btn-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.nav-btn-card i { font-size: 30px; color: var(--btn-color, var(--primary)); }
.nav-btn-card span { font-size: 14px; font-weight: 600; color: var(--text); }

/* ===== GALLERY ===== */
.gallery-section { background: #fff; }
.album-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.album-tab { padding: 8px 18px; border-radius: 20px; border: 2px solid var(--primary); color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); background: transparent; }
.album-tab.active, .album-tab:hover { background: var(--primary); color: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.photo-item { border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; aspect-ratio: 4/3; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: var(--transition); }
.photo-item:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.2); z-index: 1; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%); opacity: 0; transition: var(--transition); display: flex; align-items: flex-end; padding: 14px; }
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay span { color: #fff; font-size: 13px; font-weight: 500; }
.btn-load-more { background: var(--primary); color: #fff; border: none; padding: 12px 28px; border-radius: 30px; font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-load-more:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ===== VIDEOS ===== */
.video-section { background: #f8fafc; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.video-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #0f0f0f; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.video-play-btn i { font-size: 52px; color: rgba(255,255,255,0.9); filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); transition: var(--transition); }
.video-card:hover .video-play-btn i { transform: scale(1.15); color: #fff; }
.video-info { padding: 18px; }
.video-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--primary); line-height: 1.4; }
.video-info p { font-size: 13px; color: var(--text-light); }

/* ===== TEACHERS ===== */
.teachers-section { background: #fff; }
.teachers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.teacher-card { background: #fff; border-radius: var(--radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); border-top: 4px solid var(--primary); }
.teacher-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.teacher-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; border: 4px solid var(--accent); display: block; }
.teacher-card h3 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.teacher-card .teacher-title { font-size: 13px; color: var(--accent-dark); font-weight: 600; margin-bottom: 4px; }
.teacher-card .teacher-subject { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.teacher-card p { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.teacher-contact { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.teacher-contact a { color: var(--primary); font-size: 16px; opacity: 0.7; transition: var(--transition); }
.teacher-contact a:hover { opacity: 1; transform: scale(1.2); }

/* ===== CHATBOX ===== */
.chatbox-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.chatbox-section .section-header h2, .chatbox-section .section-header p { color: #fff; }
.chatbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.chatbox-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius); padding: 24px; color: #fff; transition: var(--transition); display: flex; align-items: center; gap: 16px; }
.chatbox-card:hover { background: rgba(255,255,255,0.2); transform: translateY(-3px); }
.chatbox-card i { font-size: 36px; color: var(--accent); flex-shrink: 0; }
.chatbox-card-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.chatbox-card-info p { font-size: 13px; opacity: 0.8; }
.chatbox-card-btn { margin-top: 12px; display: inline-block; background: var(--accent); color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; transition: var(--transition); }
.chatbox-card-btn:hover { background: var(--accent-dark); }

/* ===== NEWS ===== */
.news-section { background: #f8fafc; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-img { aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 48px; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px; }
.news-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: #dbeafe; color: #1e40af; margin-bottom: 10px; }
.news-card-body h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 8px; line-height: 1.4; }
.news-card-body p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.news-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-light); }
.pinned-badge { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }

/* ===== FOOTER ===== */
.footer { background: #0f1f3a; color: #e2e8f0; }
.footer-main { padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h3 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #cbd5e1; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col p { font-size: 14px; opacity: 0.8; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.footer-col a { color: #94a3b8; transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14px; color: #94a3b8; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { color: #94a3b8; font-size: 20px; transition: var(--transition); }
.footer-social a:hover { color: var(--accent); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 13px; opacity: 0.6; }

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--primary); color: #fff; border: none; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 18px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: var(--transition); z-index: 999; }
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ===== MODALS ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 20px; padding: 40px; width: 90%; max-width: 440px; position: relative; animation: modalIn 0.3s ease; }
.modal-video { max-width: 800px; background: #000; padding: 0; }
.video-wrapper { aspect-ratio: 16/9; }
.video-wrapper iframe { width: 100%; height: 100%; border: none; }
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 14px; background: #f1f5f9; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--text); transition: var(--transition); }
.modal-close:hover { background: #e2e8f0; }
.modal-logo { font-size: 48px; text-align: center; margin-bottom: 12px; }
.modal-box h2 { text-align: center; color: var(--primary); font-size: 22px; margin-bottom: 6px; }
.modal-box > p { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 14px; transition: var(--transition); font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-error { color: #dc2626; font-size: 13px; padding: 8px 12px; background: #fee2e2; border-radius: 8px; margin-bottom: 14px; }
.btn-submit { width: 100%; background: var(--primary); color: #fff; border: none; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-submit:hover { background: var(--primary-light); }

/* ===== LIGHTBOX ===== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 3000; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 22px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; transition: var(--transition); }
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 22px; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; transition: var(--transition); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-caption { position: absolute; bottom: 20px; color: rgba(255,255,255,0.8); font-size: 14px; text-align: center; width: 100%; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state i { font-size: 48px; opacity: 0.3; margin-bottom: 14px; display: block; }
.empty-state p { font-size: 15px; }

/* ===== LOADING ===== */
.loading { text-align: center; padding: 40px; color: var(--text-light); }
.loading i { font-size: 30px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  .header-contact { display: none; }
  .nav-toggle { display: block; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px; box-shadow: var(--shadow); }
  .nav-list.open { display: flex; }
  .header-main { position: relative; }
  .hero-slider { height: clamp(260px, 56vw, 420px); }
  .slide-content { left: 5%; right: 5%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 50px 0; }
  .section-header h2 { font-size: 24px; }
}
@media (max-width: 480px) {
  .hero-slider { height: 360px; }
  .hero-btns { flex-direction: column; }
  .btn-hero-primary, .btn-hero-outline { text-align: center; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== HERO TEXT BLOCK ABOVE PHOTO SLIDER (v2) ===== */
.hero-welcome { height: auto; }
.hero-welcome .slider-track { height: auto; }
.hero-welcome .slide-placeholder { height: auto; padding: 64px 20px 56px; display: block; }
.hero-welcome .slide-content { position: static; transform: none; left: auto; right: auto; max-width: 920px; margin: 0 auto; text-align: center; }
.hero-welcome .hero-btns { justify-content: center; }

/* Slogan: 2 lines, one idea per line */
#hero-tagline { margin-bottom: 28px; }
#hero-tagline .tagline-line { display: block; }
#hero-tagline .tagline-line:first-child { font-size: clamp(17px, 2.2vw, 22px); font-weight: 600; color: #fde68a; opacity: 1; margin-bottom: 6px; }
#hero-tagline .tagline-line + .tagline-line { font-size: clamp(14px, 1.6vw, 17px); opacity: 0.92; letter-spacing: 0.4px; }

/* Photo slider: clean images, no dark text overlay — just a subtle bottom fade for the dots */
.photo-slider .slide::after { background: linear-gradient(to top, rgba(10,25,55,0.35) 0%, rgba(10,25,55,0) 25%); z-index: 2; pointer-events: none; }

/* Full-image slides: show 100% of each photo, blurred photo fills the sides */
.photo-slider .slide { width: 100%; min-width: 100%; max-width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-slider .slide .slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(20px) brightness(0.55); transform: scale(1.15); }
.photo-slider .slide .slide-img { position: relative; z-index: 1; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; margin: 0 auto; }
.photo-slider .slider-track { width: 100%; }

@media (max-width: 768px) {
  .logo-text h1 { font-size: 26px; }
}

@media (max-width: 768px) {
  .hero-welcome { height: auto; }
  .hero-welcome .slide-placeholder { padding: 44px 16px 40px; }
}
@media (max-width: 480px) {
  .hero-welcome { height: auto; }
}

/* ===== AUTH MODULE (Đăng nhập / Đăng ký hiện đại) ===== */
.auth-box { max-width: 600px; width: calc(100% - 32px); max-height: 92vh; overflow-y: auto; }
.auth-tabs { display: flex; gap: 8px; margin: 16px 0 22px; background: #f1f5f9; border-radius: 12px; padding: 5px; }
.auth-tab { flex: 1; padding: 10px 16px; border: none; background: transparent; border-radius: 9px; font-weight: 700; font-size: 15px; color: var(--text-light); cursor: pointer; transition: var(--transition); }
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; text-align: left; }
.form-grid .full-row { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-img { display: inline-flex; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.captcha-img svg { display: block; }
.captcha-refresh { border: 1px solid #e2e8f0; background: #f8fafc; color: var(--primary); width: 38px; height: 38px; border-radius: 8px; cursor: pointer; flex-shrink: 0; transition: var(--transition); }
.captcha-refresh:hover { background: var(--accent); color: #fff; }
.captcha-row input { flex: 1; min-width: 90px; }

.radio-row { display: flex; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.radio-opt { display: flex; align-items: center; gap: 8px; border: 1.5px solid #e2e8f0; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.radio-opt:hover { border-color: var(--accent); }
.radio-opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.radio-opt:has(input:checked) { border-color: var(--accent); background: #fffbeb; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text-light); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

.google-btn-wrap { display: flex; justify-content: center; min-height: 44px; }
.auth-hint { font-size: 13px; color: var(--text-light); text-align: center; }
.webview-breakout { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.webview-breakout .auth-hint { line-height: 1.5; }
.webview-breakout .btn-open-external { display: flex; align-items: center; justify-content: center; gap: 8px; }
.webview-breakout .btn-copy-link { width: 100%; background: #fff; color: var(--primary); border: 1px solid #e2e8f0; padding: 10px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition); }
.webview-breakout .btn-copy-link:hover { background: #f8fafc; }
.webview-breakout .webview-manual { font-size: 12px; margin-top: 2px; }
.form-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }

/* ===== SMART SEARCH ===== */
.search-bar-area { flex: 1 1 320px; max-width: 460px; position: relative; }
.search-input-wrap { display: flex; align-items: center; background: var(--bg); border: 1.5px solid #e2e8f0; border-radius: 24px; padding: 0 6px 0 16px; transition: var(--transition); }
.search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.search-icon { color: var(--text-light); font-size: 14px; }
.search-input { flex: 1; border: none; background: none; padding: 10px 10px; font-size: 14px; outline: none; color: var(--text); min-width: 0; }
.search-ai-toggle { display: flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border: none; padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.search-ai-toggle:hover, .search-ai-toggle.active { background: var(--accent); color: var(--primary); }
.search-ai-toggle i { font-size: 14px; }

.search-dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-hover); max-height: 70vh; overflow-y: auto; z-index: 1195; }
.search-dropdown.open { display: block; }
.search-dropdown-section { padding: 8px; }
.search-dropdown-label { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; padding: 8px 12px 4px; letter-spacing: 0.5px; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: var(--transition); }
.search-result-item:hover { background: var(--bg); }
.search-result-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 16px; flex-shrink: 0; overflow: hidden; }
.search-result-icon img { width: 100%; height: 100%; object-fit: cover; }
.search-result-text { flex: 1; min-width: 0; }
.search-result-title { font-size: 14px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-snippet { font-size: 12px; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-type { font-size: 11px; color: var(--accent-dark); font-weight: 600; }
.search-empty, .search-loading { padding: 24px 16px; text-align: center; color: var(--text-light); font-size: 14px; }
.search-empty .btn-ask-ai { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: var(--accent); color: var(--primary); border: none; padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 13px; cursor: pointer; }

.search-skeleton { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.search-skeleton-box { background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: skeletonShine 1.2s ease-in-out infinite; border-radius: 8px; }
@keyframes skeletonShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.search-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 1190; }
.search-overlay.open { display: block; }

.search-ai-panel { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, 92vw); max-height: 80vh; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-hover); z-index: 1200; flex-direction: column; overflow: hidden; }
.search-ai-panel.open { display: flex; }
.search-ai-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--primary); color: #fff; font-weight: 700; }
.search-ai-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: 0.8; }
.search-ai-close:hover { opacity: 1; }
.search-ai-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.ai-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.ai-msg.assistant { align-self: flex-start; background: var(--bg); color: var(--text); border-radius: 14px 14px 14px 4px; }
.ai-msg.hint { align-self: center; color: var(--text-light); font-size: 12px; }
.ai-msg-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ai-spinner { align-self: flex-start; display: flex; align-items: center; gap: 8px; color: var(--text-light); font-size: 13px; padding: 4px 14px; }
.ai-spinner i { animation: spin 0.8s linear infinite; }
.search-ai-input-row { display: flex; border-top: 1px solid #e2e8f0; }
.search-ai-input-row input { flex: 1; border: none; padding: 14px 16px; font-size: 14px; outline: none; }
.search-ai-input-row button { background: var(--accent); color: var(--primary); border: none; width: 52px; font-size: 16px; cursor: pointer; }
.search-ai-input-row button:hover { background: var(--accent-dark); }

@media (max-width: 768px) {
  .header-main-inner { flex-wrap: wrap; }
  .search-bar-area { order: 3; flex-basis: 100%; max-width: 100%; }
  .search-ai-label { display: none; }
}

/* ===== Hoạt động của tôi (activity modal) ===== */
.activity-tabs { display: flex; gap: 8px; border-bottom: 2px solid #f1f5f9; }
.activity-tab { background: none; border: none; padding: 10px 14px; font-size: 14px; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.activity-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.fav-btn.on { animation: favpop .3s ease; }
@keyframes favpop { 0%{transform:scale(1)} 50%{transform:scale(1.35)} 100%{transform:scale(1)} }
