/* =========================================================
  Near To You - Static CSS
   Plain HTML/CSS/JS version of the Next.js app
   ========================================================= */

/* Palette */
:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-50: #eff6ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-50: #f0fdf4;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-50: #fef2f2;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --purple-600: #9333ea;
  --indigo-700: #4338ca;
  --teal-600: #0d9488;
  --orange-500: #f97316;
  --pink-700: #be185d;
  --cyan-700: #0e7490;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Container */
.container {
  width: 100%;
  max-width: 80rem; /* 7xl */
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================== HEADER ===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--gray-200);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  height: 4rem; /* 64px */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  height: 2rem;
  width: 2rem;
  color: var(--blue-600);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--gray-600);
}
.mobile-menu-btn:hover { background: var(--gray-100); }

/* Explore dropdown */
.nav-desktop { display: flex; align-items: center; }
.dropdown { position: relative; }
.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 0.25rem 0.5rem;
}
.dropdown-btn:hover { color: var(--gray-900); }
.dropdown-btn svg { height: 1rem; width: 1rem; transition: transform 0.2s; }
.dropdown:hover .dropdown-btn svg { transform: rotate(180deg); }
.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 16rem;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.dropdown-item:hover { background: var(--gray-50); color: var(--gray-900); }
.dropdown-icon {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

/* Header search */
.header-search {
  flex: 1;
  max-width: 26rem;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box svg {
  position: absolute;
  left: 0.875rem;
  height: 1rem;
  width: 1rem;
  color: var(--gray-500);
}
.search-box input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 9999px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  color: var(--gray-900);
  outline: none;
  background: #fff;
}
.search-box input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}
.header-link:hover { color: var(--gray-900); }
.btn-join {
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  background: #fff;
}
.btn-join:hover { background: var(--gray-50); }

/* Profile menu */
.profile-wrap { position: relative; }
.avatar {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 9999px;
  object-fit: cover;
}
.avatar-fallback {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}
.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 14rem;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.profile-wrap.open .profile-menu { display: block; }
.profile-head {
  border-bottom: 1px solid var(--gray-100);
  padding: 0.75rem 1rem;
}
.profile-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); }
.profile-email { font-size: 0.75rem; color: var(--gray-500); }
.profile-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  text-align: left;
}
.profile-item:hover { background: var(--gray-50); }
.profile-item.danger { color: var(--red-600); }

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--gray-200);
  background: #fff;
}
.mobile-menu.open { display: block; }
.mobile-menu nav { padding: 1rem 0; }
.mobile-nav-link {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}
.mobile-section {
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.mobile-label {
  padding: 0 0.5rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}
.mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.mobile-grid-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.mobile-grid-item:hover { background: var(--gray-50); }

/* App-style mobile navigation */
.mobile-bottom-nav { display: none; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-white { background: #fff; color: var(--blue-600); border-radius: 9999px; padding: 0.75rem 2rem; }
.btn-white:hover { background: var(--blue-50); }
.btn-outline {
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
}
.btn-outline:hover { background: var(--gray-50); }

/* ===================== HERO ===================== */
.hero { position: relative; width: 100%; overflow: hidden; }
.hero-track { display: flex; transition: transform 0.6s ease; }
.hero-slide {
  min-width: 100%;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.bg-blue { background: linear-gradient(to right, var(--blue-600), var(--blue-800)); }
.bg-indigo { background: linear-gradient(to right, var(--blue-800), var(--indigo-700)); }
.bg-purple { background: linear-gradient(to right, var(--purple-600), #581c87); }
.hero-content {
  display: flex;
  max-width: 80rem;
  margin: 0 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1.5rem;
  gap: 1.5rem;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
}
@media (min-width: 768px) {
  .hero-content { flex-direction: row; align-items: center; padding: 8rem 1.5rem; }
  .hero-inner { flex-direction: row; align-items: center; }
}
.hero-text { flex: 1; }
.hero-title { font-size: 2.25rem; font-weight: 700; line-height: 1.1; }
.hero-subtitle { margin-top: 1rem; font-size: 1.125rem; color: #dbeafe; }
.hero-cta { margin-top: 1.5rem; }
.hero-visual { flex: 1; margin-top: 2rem; }
.hero-placeholder {
  height: 12rem;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.1);
}
@media (min-width: 768px) {
  .hero-title { font-size: 3.75rem; }
  .hero-visual { margin-top: 0; }
  .hero-placeholder { height: 16rem; }
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255,255,255,0.9);
  color: var(--gray-700);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.hero-arrow:hover { background: #fff; }
.hero-arrow svg { height: 1.25rem; width: 1.25rem; }
.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }
.hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.hero-dot { height: 0.625rem; border-radius: 9999px; background: rgba(255,255,255,0.5); transition: width 0.3s; }
.hero-dot.active { width: 2rem; background: #fff; }

/* ===================== SECTION ===================== */
.section { padding: 4rem 0; }
.section-gray { background: var(--gray-50); }
.section-title { margin-bottom: 1.5rem; font-size: 1.875rem; font-weight: 700; color: var(--gray-900); }
.section-subtitle { margin-bottom: 2rem; color: var(--gray-600); }
.section-center { text-align: center; }
.section-center .section-title { margin-bottom: 2.5rem; }

/* ===================== TABS ===================== */
.tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 2rem; }
.tab {
  white-space: nowrap;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #fff;
  color: var(--gray-700);
  transition: background 0.2s;
}
.tab:hover { background: var(--gray-100); }
.tab.active { background: var(--blue-600); color: #fff; }

/* ===================== COURSE CAROUSEL ===================== */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; }
.carousel-slide { flex: 0 0 100%; padding-left: 1rem; min-width: 0; }
@media (min-width: 640px) { .carousel-slide { flex: 0 0 50%; } }
@media (min-width: 768px) { .carousel-slide { flex: 0 0 33.333%; } }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #fff;
  color: var(--gray-700);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  border: 1px solid var(--gray-200);
}
.carousel-btn:hover { background: var(--gray-50); }
.carousel-btn svg { height: 1.25rem; width: 1.25rem; }
.carousel-prev { left: -1.25rem; }
.carousel-next { right: -1.25rem; }

/* ===================== COURSE CARD ===================== */
.course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.course-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
  overflow: hidden;
}
.course-thumb img { height: 100%; width: 100%; object-fit: cover; }
.course-thumb-empty { height: 100%; width: 100%; background: var(--gray-200); }
.wishlist-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255,255,255,0.9);
  color: var(--gray-500);
}
.wishlist-btn:hover { color: var(--red-500); }
.wishlist-btn svg { height: 1rem; width: 1rem; }
.wishlist-btn.active { color: var(--red-500); }
.course-body { display: flex; flex-direction: column; padding: 1rem; flex: 1; }
.course-org { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.course-org img { height: 1rem; width: 1rem; object-fit: contain; }
.course-org span { font-size: 0.75rem; color: var(--gray-600); }
.course-title {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-instructor { margin-bottom: 0.5rem; font-size: 0.75rem; color: var(--gray-500); }
.course-reviews { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.course-reviews .rating-num { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); }
.course-reviews .reviews-count { font-size: 0.75rem; color: var(--gray-500); }
.course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.course-meta .dot { color: var(--gray-300); }
.course-meta svg { height: 0.75rem; width: 0.75rem; }
.course-skill {
  display: inline-block;
  border-radius: 0.25rem;
  background: var(--gray-100);
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}
.course-skills { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem; }
.course-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.5rem; }
.course-footer { margin-top: auto; padding-top: 0.5rem; }
.course-price { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); }
.course-price.free { color: var(--green-600); }

/* Badge */
.badge {
  display: inline-block;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
}
.badge-yellow { background: #fef08a; color: var(--amber-500); }
.badge-green { background: var(--green-50); color: var(--green-700); }
.badge-orange { background: #fff7ed; color: var(--orange-500); }
.badge-blue { background: var(--blue-50); color: var(--blue-600); }

/* Star rating */
.stars { display: flex; gap: 0.125rem; }
.star { height: 0.875rem; width: 0.875rem; color: var(--gray-200); }
.star.filled { color: var(--amber-400); }
.star svg { height: 100%; width: 100%; }

/* ===================== CAREER PROGRAMS ===================== */
.career {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.career-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (min-width: 1024px) {
  .career { flex-direction: row; }
  .career-tabs { flex-direction: column; gap: 0.25rem; }
}
.career-tab {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  color: var(--gray-600);
  transition: background 0.2s;
}
.career-tab:hover { background: var(--gray-50); }
.career-tab.active { background: var(--blue-50); color: var(--blue-600); }
.career-panel {
  flex: 1;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 2rem;
}
.career-panel h3 { margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 700; }
.career-meta { margin-bottom: 1rem; font-size: 0.875rem; color: var(--gray-500); }
.career-skills-label { margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.skill-pill {
  display: inline-block;
  border-radius: 9999px;
  background: var(--gray-100);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}
.career-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

/* ===================== PARTNER LOGOS ===================== */
.partner-strip { overflow: hidden; position: relative; }
.partner-track {
  display: flex;
  width: max-content;
  gap: 3rem;
  animation: scroll-left 30s linear infinite;
}
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.partner-logo {
  display: flex;
  height: 4rem;
  width: 10rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.partner-logo span { font-size: 1.25rem; font-weight: 700; color: var(--gray-400); transition: color 0.2s; }
.partner-logo:hover span { color: var(--gray-600); }

/* ===================== CATEGORIES ===================== */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
.category-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.category-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.category-icon {
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  flex-shrink: 0;
}
.category-icon svg { height: 1.5rem; width: 1.5rem; }
.category-name { font-weight: 600; color: var(--gray-900); }
.category-card:hover .category-name { color: var(--blue-600); }
.category-count { font-size: 0.875rem; color: var(--gray-500); }

/* ===================== TESTIMONIALS ===================== */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card {
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.testimonial-stars { display: flex; gap: 0.125rem; margin-bottom: 1rem; }
.testimonial-stars svg { height: 1rem; width: 1rem; }
.testimonial-quote { margin-bottom: 1.5rem; color: var(--gray-600); }
.testimonial-name { font-weight: 600; color: var(--gray-900); }
.testimonial-role { font-size: 0.875rem; color: var(--gray-500); }

/* ===================== SUBSCRIPTION BANNER ===================== */
.sub-banner { background: linear-gradient(to right, var(--blue-600), var(--blue-800)); padding: 4rem 0; }
.sub-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sub-title { margin-bottom: 1rem; font-size: 1.875rem; font-weight: 700; color: #fff; }
@media (min-width: 768px) { .sub-title { font-size: 2.25rem; } }
.sub-desc { margin-bottom: 2rem; max-width: 42rem; font-size: 1.125rem; color: #dbeafe; }
.sub-toggle { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.sub-toggle-label { font-size: 0.875rem; font-weight: 500; }
.sub-toggle-label.active { color: #fff; }
.sub-toggle-label.inactive { color: #bfdbfe; }
.switch {
  position: relative;
  height: 1.5rem;
  width: 3rem;
  border-radius: 9999px;
  transition: background 0.2s;
}
.switch.monthly { background: #93c5fd; } /* blue-400 */
.switch.yearly { background: #fff; }
.switch-knob {
  position: absolute;
  top: 0.125rem;
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 9999px;
  background: var(--blue-600);
  transition: left 0.2s;
}
.switch.monthly .switch-knob { left: 0.125rem; }
.switch.yearly .switch-knob { left: 1.5rem; }
.sub-features {
  display: grid;
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .sub-features { grid-template-columns: 1fr 1fr; } }
.sub-feature { display: flex; align-items: center; gap: 0.5rem; color: #dbeafe; font-size: 0.875rem; }
.sub-feature svg { height: 1rem; width: 1rem; color: #fff; }

/* ===================== FAQ ===================== */
.faq-wrap { max-width: 48rem; margin: 0 auto; }
.faq-item { border-radius: 0.5rem; border: 1px solid var(--gray-200); background: #fff; margin-bottom: 0.75rem; }
.faq-item:last-child { margin-bottom: 0; }
.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  text-align: left;
  font-weight: 500;
  color: var(--gray-900);
}
.faq-question svg { height: 1.25rem; width: 1.25rem; flex-shrink: 0; color: var(--gray-500); transition: transform 0.2s; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  display: none;
  border-top: 1px solid var(--gray-100);
  padding: 1rem 1.25rem 1.25rem;
  color: var(--gray-600);
}
.faq-item.open .faq-answer { display: block; }

/* ===================== FOOTER ===================== */
.footer { border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.footer-inner { padding: 3rem 0; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }
.footer-brand { grid-column: span 2; }
.footer-about { margin-top: 1rem; max-width: 24rem; font-size: 0.875rem; line-height: 1.6; color: var(--gray-500); }
.footer-social { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.footer-social a {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
}
.footer-social a:hover { border-color: var(--gray-300); color: var(--gray-900); }
.footer-social svg { height: 1.125rem; width: 1.125rem; }
.footer-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); }
.footer-list { list-style: none; margin-top: 1rem; }
.footer-list li { margin-bottom: 0.75rem; }
.footer-link { font-size: 0.875rem; color: var(--gray-500); }
.footer-link:hover { color: var(--gray-900); }
.footer-bottom { border-top: 1px solid var(--gray-200); padding-top: 2rem; margin-top: 3rem; text-align: center; }
.footer-copy { font-size: 0.875rem; color: var(--gray-500); }

/* ===================== PAGE (non-home) ===================== */
.page-main { flex: 1; }
.page-hero { border-bottom: 1px solid var(--gray-200); background: var(--gray-50); padding: 3rem 0; }
.page-hero h1 { font-size: 2rem; font-weight: 700; }
.page-hero p { margin-top: 0.5rem; color: var(--gray-600); }

/* Auth pages */
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: 100%; max-width: 26rem; }
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-sub { color: var(--gray-500); margin-bottom: 1.5rem; font-size: 0.875rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; }
.form-input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}
.form-input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; margin-bottom: 1rem; }
.auth-link { color: var(--blue-600); }
.auth-link:hover { text-decoration: underline; }
.auth-alt { margin-top: 1.25rem; text-align: center; font-size: 0.875rem; color: var(--gray-600); }
.btn-block { width: 100%; }

/* Utility for JS re-render */
#site-header, #site-footer { flex-shrink: 0; }
main.page { flex: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .nav-desktop, .header-right { display: none; }
  .mobile-menu-btn { display: block; }
  .header-search { max-width: none; order: 3; flex-basis: 100%; margin-bottom: 0.75rem; }
  .header { position: static; }
}

@media (max-width: 640px) {
  body { padding-bottom: 4.5rem; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .header { position: sticky; background: rgba(255, 255, 255, 0.98); }
  .header-inner { height: auto; min-height: 4rem; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0 0.75rem; }
  .header-left { flex: 1; min-width: 0; gap: 0.5rem; }
  .mobile-menu-btn { padding: 0.625rem; }
  .mobile-menu-btn svg { width: 1.25rem; height: 1.25rem; }
  .logo { min-width: 0; }
  .logo-icon { width: 1.75rem; height: 1.75rem; }
  .logo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
  .header-search { flex-basis: 100%; margin: 0; }
  .search-box input { min-height: 2.75rem; padding-top: 0.65rem; padding-bottom: 0.65rem; }
  .mobile-menu { max-height: calc(100vh - 4rem); overflow-y: auto; }
  .mobile-menu nav { padding-top: 0.75rem; padding-bottom: 1rem; }
  .mobile-nav-link { min-height: 2.75rem; padding: 0.75rem 0.5rem; }
  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 4.25rem;
    padding: 0.35rem 0.4rem max(0.35rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(12px);
  }
  .mobile-bottom-link {
    display: flex;
    min-width: 0;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    border-radius: 0.65rem;
    color: var(--gray-500);
    font-size: 0.65rem;
    font-weight: 600;
  }
  .mobile-bottom-link svg { width: 1.25rem; height: 1.25rem; }
  .mobile-bottom-link.active, .mobile-bottom-link:active { color: var(--blue-600); background: var(--blue-50); }
  .section { padding: 2.75rem 0; }
  .section-title { margin-bottom: 1rem; font-size: 1.5rem; line-height: 1.2; }
  .hero-title { font-size: 2rem; }
  .hero-content { padding: 4.5rem 1rem 5rem; }
  .hero-subtitle { margin-top: 0.75rem; font-size: 1rem; }
  .hero-visual { display: none; }
  .hero-arrow { display: none; }
  .carousel-btn { display: none; }
  .carousel-viewport { margin: 0 -1rem; padding: 0 0.5rem; overflow-x: auto; scrollbar-width: none; }
  .carousel-viewport::-webkit-scrollbar { display: none; }
  .carousel-slide { flex-basis: 88%; padding-left: 0.5rem; }
  .career-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
  .career-tabs::-webkit-scrollbar { display: none; }
  .career-tab { flex: 0 0 auto; min-height: 2.75rem; }
  .category-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 2.5rem 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .footer-brand { grid-column: 1 / -1; }
}
