@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;800&display=swap');

:root {
    --primary-color: #4f46e5; /* indigo */
    --secondary-color: #06b6d4; /* cyan */
    --bg-start: #0b1020;
    --bg-end: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-stroke: rgba(255, 255, 255, 0.35);
    --text-primary: #e9ecf1;
    --text-secondary: #b6bdc7;
    --accent-cyan: #22d3ee;
    --accent-violet: #8b5cf6;
    --accent-blue: #3b82f6;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(1200px 800px at 10% -10%, rgba(79, 70, 229, 0.22), transparent 60%),
                radial-gradient(900px 700px at 100% 20%, rgba(6, 182, 212, 0.16), transparent 60%),
                linear-gradient(180deg, var(--bg-start), var(--bg-end));
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 14px 0;
    /* Respect iOS safe areas for sticky header */
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 16, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* anchor mobile dropdown to the nav bar */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.logo img {
    height: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.3s, background 0.3s;
}

nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

main {
    padding: 60px 0;
}

section {
    margin-bottom: 80px;
}

.glass-container {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    border: 1px solid var(--glass-stroke);
    padding: 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.background {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background-image: url('noisy-grid.png');
    background-size: 800px 800px;
    opacity: 0.08;
    z-index: -1;
}

/* Animated colorful blobs for extra depth */
.decor-blobs { pointer-events: none; position: fixed; inset: 0; z-index: -2; }
.blob { position: absolute; width: 40vw; height: 40vw; filter: blur(40px); opacity: 0.22; border-radius: 50%; mix-blend-mode: screen; animation: float 18s ease-in-out infinite; }
.blob.pink { background: radial-gradient(circle at 30% 30%, #8b5cf6, transparent 60%); left: -10vw; top: -10vw; animation-delay: 0s; }
.blob.cyan { background: radial-gradient(circle at 70% 30%, #22d3ee, transparent 60%); right: -10vw; top: -5vw; animation-delay: 3s; }
.blob.purple { background: radial-gradient(circle at 50% 70%, #3b82f6, transparent 60%); left: 10vw; bottom: -10vw; animation-delay: 6s; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-20px) scale(1.05); } }

#hero {
    text-align: center;
    padding: 48px 0 80px;
}

/* Two-column layout for hero: text + media */
#hero .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 20px;
    align-items: center;
}

#hero .hero-media {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.35);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    overflow: hidden;
    min-height: 320px;
}

#hero .hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Overlay the hero media above the card */
#hero .hero-content { position: relative; }
#hero .hero-content .hero-overlay {
    position: absolute;
    top: -6px;
    left: calc(100% + 24px);
    width: 320px;
    max-width: 32vw;
    min-height: 280px;
    z-index: 2;
}
/* Hide any native controls on webkit if present and block pointer interactions */
#hero .hero-content .hero-overlay video { pointer-events: none; }
#hero .hero-content .hero-overlay video::-webkit-media-controls { display: none !important; opacity: 0 !important; }
#hero .hero-content .hero-overlay video::-webkit-media-controls-enclosure { display: none !important; opacity: 0 !important; }
/* When interaction is needed (e.g., autoplay blocked), allow controls */
#hero .hero-content .hero-overlay.interactive video { pointer-events: auto !important; }
#hero .hero-content .hero-overlay.interactive video::-webkit-media-controls { display: initial !important; opacity: 1 !important; }
#hero .hero-content .hero-overlay.interactive video::-webkit-media-controls-enclosure { display: initial !important; opacity: 1 !important; }
/* Make the overlay container fully transparent and borderless */
#hero .hero-content .hero-overlay {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

@media (max-width: 1200px) {
  #hero .hero-content .hero-overlay { width: 300px; max-width: 40vw; left: calc(100% + 16px); }
}

@media (max-width: 900px) {
  #hero .hero-content .hero-overlay { position: static; width: 100%; max-width: 100%; margin-top: 10px; }
}

/* Ensure text column doesn’t exceed grid width */
#hero .hero-content { max-width: 100%; }

#hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    margin-bottom: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #c9cff8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
    color: #ffffff;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, filter 0.25s ease;
    border: 1.5px solid #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
    box-shadow: 0 16px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08), 0 8px 30px rgba(79,70,229,0.15);
    filter: saturate(1.05);
}

/* Neon/glow variant when needed */
.btn.glow {
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10));
    border: 1.5px solid #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 24px rgba(139,92,246,0.25), 0 0 36px rgba(6,182,212,0.2);
    animation: none;
}
.btn.glow:hover { box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 28px rgba(139,92,246,0.3), 0 0 42px rgba(6,182,212,0.25); }
@keyframes flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Secondary glass button for hero */
.btn.btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    color: var(--text-primary);
    border: 1.5px solid #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 26px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn.btn-secondary:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10));
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Info grid for details block */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 16px 18px;
}

.info-item h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #dfe3f7;
}

.info-item p {
    margin: 0;
    color: var(--text-secondary);
}

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

h2 {
    text-align: center;
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-divider { height: 1px; width: 100%; background-color: var(--glass-stroke); border-radius: 999px; opacity: 0.5; margin: 80px 0; }
@keyframes stripe { 0% { background-position: 0 0; } 100% { background-position: 300% 0; } }

.course-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 50px rgba(0,0,0,0.15);
}

/* Badges / chips */
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-weight: 700; color: #0a0c12; background: linear-gradient(90deg, #06b6d4, #3b82f6); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 6px 16px rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.6); }
.badge.violet { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.badge.cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.badge.blue { background: linear-gradient(90deg, #3b82f6, #93c5fd); }
/* Backward-compat for previous classes */
.badge.pink { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.badge.lime { background: linear-gradient(90deg, #3b82f6, #93c5fd); }

.course-card h3 {
    font-size: 22px;
    margin-top: 0;
    color: #dfe3f7;
}

.course-card ul {
    list-style-position: inside;
    padding-left: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}

th {
    background: rgba(255,255,255,0.06);
}

#how-to-apply ol {
    padding-left: 20px;
    font-size: 18px;
}

.faq-item {
    margin-bottom: 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
}

.faq-item h3 {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    color: var(--text-primary);
}

.faq-item h3::after {
    content: '+';
    font-size: 24px;
    transition: transform 0.3s;
}

.faq-item.active h3::after {
    transform: rotate(45deg);
}

.faq-item p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    color: var(--text-secondary);
}

.faq-item.active p {
    max-height: 1000px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px) scale(0.99); transition: opacity .6s ease, transform .6s ease; }
.reveal-visible { opacity: 1; transform: translateY(0) scale(1); }

.organizers-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 30px;
}

.organizers-logos img {
    height: 60px;
    opacity: 0.85;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.25));
    transition: opacity 0.3s, transform 0.3s;
}

.organizers-logos img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    padding: 40px;
    background: rgba(10, 12, 16, 0.6);
    color: #fff;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

footer a {
    color: #ffffff;
    text-decoration: none;
}

/* Hero glass wrapper without changing HTML structure */
#hero .hero-content {
    margin: 0 auto;
    max-width: 900px;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--glass-stroke);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15), 0 0 0 1px rgba(255,255,255,0.05);
    position: relative;
}

/* Gradient border accent for hero */
#hero .hero-content::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(6,182,212,0.55), rgba(139,92,246,0.55), rgba(59,130,246,0.55));
  z-index: -1;
  filter: blur(16px);
  opacity: 0.35;
}
/* 3D tilt and hero chips */
.tilt { transform-style: preserve-3d; transition: transform .2s ease, box-shadow .2s ease; }
.tilt .tilt-gloss { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(400px 250px at 20% 0%, rgba(255,255,255,0.12), transparent 60%); pointer-events: none; }
.tilt:hover { box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.hero-3d { position: relative; }
.hero-chip { position: absolute; top: -18px; right: -18px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(6,182,212,0.35), rgba(139,92,246,0.35)); border: 1px solid rgba(255,255,255,0.35); box-shadow: 0 12px 30px rgba(0,0,0,0.35); transform: translateZ(30px) rotate(-2deg); }
.hero-chip b { color: #eaf6ff; }

/* Timeline styling for ordered lists inside #enroll */
#enroll ol { counter-reset: step; list-style: none; padding-left: 0; }
#enroll ol li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; }
#enroll ol li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--primary-color); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.media-overlay { position: absolute; z-index: 2; width: 300px; max-width: 320px; min-height: 200px; }
.media-overlay.right { top: -6px; right: -10px; }
.media-overlay.left { top: -6px; left: -10px; }
.media-overlay, .media-overlay * { background: transparent !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.media-overlay video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.media-overlay video::-webkit-media-controls, .media-overlay video::-webkit-media-controls-enclosure { display: none !important; opacity: 0 !important; }

/* Center course cards within courses section */
#courses .course-card { max-width: 900px; margin: 0 auto 16px; }

/* Prevent media overlays from overlapping content by adding padding */
.with-media-right { position: relative; padding-right: 340px; }
.with-media-left { position: relative; padding-left: 340px; }

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 90px;
    height: 90px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') no-repeat center center;
    background-color: rgba(0,0,0,0.5);
    background-size: 45px;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    animation: pulse 1.5s infinite;
}

.play-button:hover {
    transform: scale(1.1);
}

/* Small hint text inside video overlay */
.video-overlay .overlay-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    opacity: 0.95;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Responsive tweaks */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101; /* ensure on top of overlays */
}

.nav-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: transform 0.3s;
}

@media (max-width: 900px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 12, 16, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    nav ul.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .logo img {
        max-height: 30px;
    }

    #hero .hero-layout {
        grid-template-columns: 1fr;
    }

    .with-media-right,
    .with-media-left {
        padding-right: 0;
        padding-left: 0;
    }

    .media-overlay {
        display: none;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .organizers-logos {
        flex-wrap: wrap;
    }

    .organizers-logos img {
        height: 40px;
    }

    .container {
        padding: 0 16px;
    }

    .btn {
        display: block;
        margin: 0 auto;
        padding: 14px 10px;
        font-size: 16px;
    }

    #enroll ol li {
        padding-left: 30px;
    }

    .glass-container {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    #hero {
        padding: 40px 0 50px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Video reel grid */
.video-reel {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.video-reel .hero-media {
    min-height: 240px;
}

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

/* Code-themed decorative overlay */
.code-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.10;
}

.code-char {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: float-code linear infinite;
}

@keyframes float-code {
    from {
        transform: translateY(10px);
        opacity: 0.0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0.0;
    }
}

/* Scrolling code ticker in hero */
.code-ticker {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    margin: 10px auto 0;
}

.code-ticker-inner {
    display: inline-block;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    color: #d9e2ff;
    padding: 10px 14px;
    animation: ticker 28s linear infinite;
}

@keyframes ticker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Course card code icon */
.course-card h3 .code-icon {
    font-family: ui-monospace, monospace;
    font-weight: 800;
    color: #a5b4fc;
    margin-right: 8px;
}

/* Responsive table */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Extra mobile override: hide hero video overlay on small screens */
@media (max-width: 900px) {
  #hero .hero-content .hero-overlay { display: none !important; }
  /* Hide any videos and related overlays to avoid empty frames */
  video { display: none !important; }
  .video-overlay, .play-button { display: none !important; }
  /* Hide the video reel section entirely on mobile */
  .video-reel { display: none !important; }
}

.bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}

.bottom-banner img {
  width: 100%;
  display: block;
}