/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  /* Main Color Palette - DO NOT CHANGE */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-blue: #e3f2fd;
  --blue-50: #f0f7ff;
  --blue-100: #bbdefb;
  --blue-200: #90caf9;
  --blue-300: #64b5f6;
  --blue-400: #42a5f5;
  --blue-500: #2196f3;
  --blue-600: #1976d2;
  --blue-700: #1565c0;
  --black: #212121;
  --grey-50: #fafafa;
  --grey-100: #f5f5f5;
  --grey-200: #eeeeee;
  --grey-300: #e0e0e0;
  --grey-400: #bdbdbd;
  --grey-500: #9e9e9e;
  --grey-600: #757575;
  --grey-700: #616161;
  --grey-800: #424242;
  --error-red: #ff3333;
  --success-green: #4caf50;
  --warning-orange: #ff9800;
  --accent-teal: #009688;
  --accent-purple: #673ab7;

  /* Functional Tokens */
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--grey-50);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.bg-light {
  background-color: var(--white);
}

.my-2 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.w-100 {
  width: 100%;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue-600);
  color: white;
  padding: 8px;
  z-index: 2000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* =========================================
     2. TYPOGRAPHY
     ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  color: var(--black);
  font-weight: 700;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--grey-600);
  max-width: 600px;
  margin: 0 auto;
}

.title-underline {
  width: 60px;
  height: 4px;
  background: var(--blue-500);
  margin: 1rem auto 2rem;
  border-radius: var(--radius-full);
}

/* =========================================
     3. BUTTONS
     ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--blue-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--blue-700);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--blue-600);
}

.btn-secondary:hover {
  background-color: var(--grey-100);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--blue-600);
  color: var(--blue-600);
}

.btn-outline:hover {
  background-color: var(--blue-50);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-link {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-link:hover {
  text-decoration: underline;
}

/* =========================================
     4. NAVIGATION
     ========================================= */
.header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--grey-200);
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--black);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--grey-700);
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--blue-600);
}

.nav-link i {
  margin-right: 0.25rem;
  color: var(--grey-500);
}

.nav-link:hover i {
  color: var(--blue-500);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--black);
  border-radius: 2px;
  transition: 0.3s;
}

/* =========================================
     5. HERO SECTION
     ========================================= */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  background: linear-gradient(135deg, var(--grey-50) 0%, var(--blue-50) 100%);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--blue-100);
  color: var(--blue-700);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--black);
}

.hero-text {
  font-size: 1.25rem;
  color: var(--grey-600);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-600);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--grey-600);
}

.visual-card-wrapper {
  position: relative;
}

.visual-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  z-index: 2;
}

.visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.visual-card:hover .visual-img {
  transform: scale(1.02);
}

.visual-bg-shape {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  background: var(--blue-200);
  border-radius: var(--radius-lg);
  z-index: 1;
  opacity: 0.5;
}

.floating-badge {
  position: absolute;
  background: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
}

.floating-badge i {
  color: var(--warning-orange);
}

.badge-top-right {
  top: 20px;
  right: -20px;
  animation: float 3s ease-in-out infinite;
}

.badge-bottom-left {
  bottom: 30px;
  left: -30px;
  animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =========================================
     6. SECTIONS
     ========================================= */
.section {
  padding: 5rem 0;
}

/* Syllabus Logos */
.logo-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.logo-item img {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s;
  width: auto;
  height: 50px;
  object-fit: contain;
}

.logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* Subject Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--grey-200);
  transition: var(--transition-base);
}

.subject-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.card-body {
  padding: 2rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  margin: 2rem 0 0 2rem;
  /* Adjusted for visual balance */
  border-radius: var(--radius-md);
}

.icon-blue {
  background-color: var(--blue-500);
}

.icon-teal {
  background-color: var(--accent-teal);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--grey-600);
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--grey-700);
  font-size: 0.9rem;
}

.feature-list li i {
  color: var(--success-green);
  font-size: 0.8rem;
}

/* Ad Containers */
.ad-container {
  background: transparent;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 2rem auto;
}

/* Features Split Section */
.section-row {
  display: flex;
  gap: 4rem;
}

.align-center {
  align-items: center;
}

.col-text {
  flex: 1;
}

.col-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.feature-block {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--light-blue);
  color: var(--blue-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.feature-block h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.feature-block p {
  font-size: 0.95rem;
  color: var(--grey-600);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.pattern-item {
  width: 100px;
  height: 100px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--blue-200);
}

.pattern-item:nth-child(even) {
  transform: translateY(2rem);
}

/* Resources Horizontal Scroll */
.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  height: 8px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--grey-300);
  border-radius: 4px;
}

.paper-preview-card {
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  scroll-snap-align: start;
  position: relative;
  transition: var(--transition-base);
}

.paper-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.paper-board-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--blue-50);
  color: var(--blue-600);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-teal {
  background: #e0f2f1;
  color: var(--accent-teal);
}

.paper-icon {
  font-size: 2rem;
  color: var(--error-red);
  margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
  background: var(--blue-600);
  color: var(--white);
  position: relative;
  padding: 6rem 0;
}

.cta-bg-overlay {
  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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%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/g%3E%3C/svg%3E");
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

/* =========================================
     7. FOOTER
     ========================================= */
.footer {
  background: var(--white);
  border-top: 1px solid var(--grey-200);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-600);
  margin-bottom: 1rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--grey-600);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--blue-600);
}

.footer-bottom {
  border-top: 1px solid var(--grey-200);
  padding-top: 2rem;
  text-align: center;
  color: var(--grey-500);
  font-size: 0.9rem;
}

.fa-heart {
  color: var(--error-red);
}

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--black);
  color: var(--white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  display: none;
  /* JS will toggle */
  z-index: 900;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.scroll-top-btn:hover {
  background: var(--blue-600);
  transform: translateY(-3px);
}

.scroll-top-btn.visible {
  display: flex;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* =========================================
     8. RESPONSIVE DESIGN
     ========================================= */
@media (max-width: 968px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-row {
    flex-direction: column;
    gap: 2rem;
  }

  .col-visual {
    order: -1;
  }

  .pattern-grid {
    gap: 1rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease-in-out;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .visual-card-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .badge-top-right,
  .badge-bottom-left {
    display: none;
  }

  /* Simplify on small screens */
}