:root {
/* Restored Original Colors (Indigo/Purple) */
  --bg: #f9fafb; /* Original near-white background */
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;
  --accent: #6366f1; /* Original Accent: Indigo */
  --accent-light: #8183f8; /* Lighter shade for hover */
  --accent-muted: #eef2ff; /* Very light shade for secondary btn */
  
  /* New Polish Variables */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  /* Subtle Background Polish: Adding a slight textured background image or pattern */
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* HEADER */
.header {
  padding: 20px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card); 
  box-shadow: var(--shadow-sm); 
}

.header h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: var(--accent); /* Accent color for logo */
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent);
}

/* MOBILE NAV */
.menu-toggle {
  display: none;
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 70px;
    right: 6%;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: 16px;
    padding: 20px;
    flex-direction: column;
    display: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
  }

  nav.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }
}

/* HERO */
.hero {
  padding: 100px 6%;
  max-width: 1200px; /* Increased max-width to give logo space */
  margin: 0 auto;
}
/* Course Hero Layout */
.course-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Left */
.course-hero-left h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 56px;
  line-height: 1.05;
  margin-bottom: 20px;
}

.course-hero-left p {
  font-size: 20px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}

/* Right Preview */
.course-hero-right {
  display: flex;
  justify-content: center;
}

/* PDF Preview Card */
.pdf-preview {
  width: 260px;
  height: 340px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: rotate(-3deg);
  background: #fff;
  position: relative;
}

.pdf-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back stacked page */
.pdf-preview::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 340px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border);
  top: 10px;
  left: 10px;
  z-index: -1;
}

/* Text */
.pdf-preview span {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.pdf-preview small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* Mobile */
@media (max-width: 900px) {
  .course-hero {
    grid-template-columns: 1fr;
  }

  .course-hero-right {
    margin-top: 40px;
  }

  .course-hero-left h2 {
    font-size: 40px;
  }
}


/* NEW: Wrapper for two-column layout */
.hero-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; 
}

.hero-content-wrapper > div:first-child {
    flex: 1; 
}

.hero h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 60px; 
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 32px;
}

/* NEW: LOGO STYLES AND ANIMATION */
.hero-logo {
    flex-shrink: 0; 
    width: 250px;
    height: 250px;
    padding: 20px;
    border-radius: 50%; 
    border: 3px solid var(--accent-light); 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 0 8px var(--accent-muted); 
    overflow: hidden;
    
    /* Apply the circulation and rotation animation */
    animation: circulate-glow 4s ease-in-out infinite alternate;
}

.hero-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%; 
    opacity: 1; 
}

/* Circulation, Glow, and ROTATION Animation Keyframes */
@keyframes circulate-glow {
  0% {
    transform: scale(1) rotate(0deg); /* Start normal size, no rotation */
    box-shadow: 0 0 0 5px var(--accent-muted);
  }
  100% {
    transform: scale(1.03) rotate(5deg); /* Subtle scaling + 5 degree rotation */
    box-shadow: 0 0 0 10px var(--accent-muted);
  }
}

/* BUTTONS */
.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent; 
}

.primary-btn {
    background: var(--accent);
    color: white;
}

.primary-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); 
}

.secondary-btn {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--accent); 
}

.secondary-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

@media (max-width: 500px) {
    .hero h2 {
        font-size: 40px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* MOBILE RESPONSIVENESS for HERO */
@media (max-width: 900px) {
    .hero-content-wrapper {
        flex-direction: column; 
        text-align: center;
    }

    .hero-logo {
        order: -1; 
        margin-bottom: 40px;
        width: 180px;
        height: 180px;
    }
}


/* SECTIONS */
section {
  padding: 80px 6%;
}

h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  margin-bottom: 32px;
}

/* YOUTUBE SLIDER STYLES */
.youtube-section {
    padding-top: 0;
    overflow: hidden; 
}

.youtube-section h3 {
    text-align: center;
    margin-bottom: 40px;
}

.youtube-slider-container {
    width: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    animation: scroll-videos 40s linear infinite; 
    padding-bottom: 20px;
}

.video-card {
    flex: 0 0 auto;
    width: 320px; 
    margin-right: 24px;
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9; 
    display: block;
    object-fit: cover;
}

.video-card h4 {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    margin: 0;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading-message {
    padding: 20px;
    color: var(--muted);
    font-style: italic;
}

.center-link {
    text-align: center;
    margin-top: 40px;
}

/* Animation for endless horizontal scroll */
@keyframes scroll-videos {
    from {
        transform: translateX(0);
    }
    to {
        /* (320px width + 24px margin) * 5 videos = 1720px */
        transform: translateX(calc(-344px * 5)); 
    }
}

@media (max-width: 768px) {
    .video-card {
        width: 280px;
    }
    @keyframes scroll-videos {
        to {
            /* (280px width + 24px margin) * 5 videos = 1520px */
            transform: translateX(calc(-304px * 5)); 
        }
    }
}

/* Logo link */
.logo a {
  text-decoration: none;
  color: var(--accent);
}

.logo a:hover {
  opacity: 0.85;
}


/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* Force CSS handbook to next row, same size */
.css-handbook {
  grid-column: 1;
}

/* Responsive fallback */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08); 
}

/* INSTALL */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.install-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.install-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted); 
}

.install-card span {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.install-card h4 {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
}

/* SCROLL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FOOTER */
footer {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* FREE PAGE STYLES */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.filters button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filters button:hover {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent);
}

.filters button.active-filter {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.resource-grid .card {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    padding: 40px 28px;
    height: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.email-box {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin-top: 20px;
}

.email-box input {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.email-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.email-box button {
    /* Uses primary-btn styles */
    padding: 14px 22px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

@media (max-width: 600px) {
    .email-box {
        flex-direction: column;
    }
}

/* Handbook card layout */
.handbook-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Stack button on next line (CSS handbook only) */
.handbook-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
/* Force item to start on next row */
.break-row {
  grid-column: 1 / -1;
}


/* Left side: icon + title */
.handbook-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.handbook-icon {
  font-size: 18px;
}

.handbook-title {
  font-size: 16px;
  font-weight: 500;
}

/* PDF Download Button */
.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  background: transparent;
  transition: all 0.25s ease;
}

.pdf-btn::before {
  content: "⬇";
  font-size: 13px;
}

.pdf-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Mobile polish */
@media (max-width: 480px) {
  .handbook-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

