/* ===== Programs Page ===== */

html:has(.programs-page),
.programs-page {
    height: auto;
    min-height: 100%;
    background: #0E5E9E;
}

/* ===== Floating Background Shapes ===== */
.floating-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
}

.shape--circle {
    background: rgba(234, 95, 92, 0.06);
}

.shape--ring {
    background: transparent;
    border: 2px solid rgba(245, 185, 24, 0.1);
}

.shape--dot {
    background: rgba(255, 255, 255, 0.05);
}

.shape--1 {
    width: 280px; height: 280px;
    top: 10%; left: -80px;
    animation: floatA 14s ease-in-out infinite alternate;
}
.shape--2 {
    width: 200px; height: 200px;
    bottom: 20%; right: -50px;
    animation: floatB 18s ease-in-out infinite alternate;
}
.shape--3 {
    width: 160px; height: 160px;
    top: 40%; right: 5%;
    animation: floatC 16s ease-in-out infinite alternate;
}
.shape--4 {
    width: 120px; height: 120px;
    bottom: 40%; left: 3%;
    animation: floatA 20s ease-in-out infinite alternate-reverse;
}
.shape--5 {
    width: 8px; height: 8px;
    top: 30%; left: 15%;
    animation: floatDot 6s ease-in-out infinite alternate;
}
.shape--6 {
    width: 6px; height: 6px;
    top: 60%; right: 20%;
    animation: floatDot 8s ease-in-out infinite alternate-reverse;
}

@keyframes floatA {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.06; }
    100% { transform: translateY(-50px) rotate(15deg); opacity: 0.1; }
}
@keyframes floatB {
    0%   { transform: translate(0, 0); opacity: 0.05; }
    100% { transform: translate(-30px, -40px); opacity: 0.09; }
}
@keyframes floatC {
    0%   { transform: translateY(0) rotate(0); opacity: 0.08; }
    100% { transform: translateY(-35px) rotate(-10deg); opacity: 0.12; }
}
@keyframes floatDot {
    0%   { transform: translateY(0); opacity: 0.12; }
    100% { transform: translateY(-18px); opacity: 0.35; }
}

/* ===== Scroll Navbar ===== */
.scroll-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: transparent;
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}

.scroll-navbar.visible {
    transform: translateY(0);
}

/* Logo — fixed, hidden by default */
.programs-page .hero-logo {
    position: fixed;
    top: 24px;
    left: 32px;
    z-index: 501;
    width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transform: translateY(-200%);
    transition: transform 0.5s ease;
}

.programs-page .hero-logo.visible {
    transform: translateY(0);
}

/* ===== Programs Hero ===== */
.programs-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #4DB8FF 0%, #A8DEFF 40%, #E0F2FF 70%, #E0F2FF 100%);
    overflow: hidden;
    z-index: 1;
}

/* ===== Animated Scene ===== */
.hero-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* --- Sun (same doodle as home) --- */
.scene-sun {
    position: absolute;
    top: 8%;
    right: 12%;
    width: 110px;
    height: auto;
    z-index: 2;
    animation: sunRotate 20s linear infinite, sunGlow 3s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 12px rgba(245, 185, 24, 0.6));
}

@keyframes sunRotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sunGlow {
    0%   { filter: drop-shadow(0 0 10px rgba(245, 185, 24, 0.4)); }
    100% { filter: drop-shadow(0 0 25px rgba(245, 185, 24, 0.8)); }
}

/* --- Birds --- */
.bird {
    position: absolute;
}

.bird--1 {
    width: 30px;
    top: 16%;
    left: 20%;
    animation: birdFly1 12s linear infinite;
}

.bird--2 {
    width: 22px;
    top: 22%;
    left: 40%;
    animation: birdFly2 16s linear infinite;
}

.bird--3 {
    width: 18px;
    top: 12%;
    left: 65%;
    animation: birdFly3 14s linear infinite;
}

.bird--4 {
    width: 24px;
    top: 26%;
    left: 10%;
    animation: birdFly1 18s linear 3s infinite;
}

.bird--5 {
    width: 16px;
    top: 19%;
    left: 80%;
    animation: birdFly2 15s linear 5s infinite;
}

@keyframes birdFly1 {
    0%   { transform: translateX(0) translateY(0); }
    25%  { transform: translateX(15vw) translateY(-15px); }
    50%  { transform: translateX(30vw) translateY(5px); }
    75%  { transform: translateX(45vw) translateY(-10px); }
    100% { transform: translateX(60vw) translateY(0); opacity: 0; }
}

@keyframes birdFly2 {
    0%   { transform: translateX(0) translateY(0); }
    25%  { transform: translateX(-10vw) translateY(-12px); }
    50%  { transform: translateX(-20vw) translateY(8px); }
    75%  { transform: translateX(-30vw) translateY(-8px); }
    100% { transform: translateX(-40vw) translateY(0); opacity: 0; }
}

@keyframes birdFly3 {
    0%   { transform: translateX(0) translateY(0); }
    50%  { transform: translateX(20vw) translateY(-20px); }
    100% { transform: translateX(40vw) translateY(5px); opacity: 0; }
}

/* --- Ocean --- */
.ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28%;
}

.ocean-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(180deg, #2E86C1 0%, #1B6FA8 40%, #0E5E9E 100%);
}

.wave {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30'%3E%3Cpath d='M0 15 Q150 0 300 15 T600 15 T900 15 T1200 15 V30 H0 Z' fill='%232E86C1'/%3E%3C/svg%3E") repeat-x;
    background-size: 600px 30px;
}

.wave--1 {
    top: 0;
    animation: waveMove 8s linear infinite;
    opacity: 0.9;
}

.wave--2 {
    top: 8px;
    animation: waveMove 10s linear infinite reverse;
    opacity: 0.7;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30'%3E%3Cpath d='M0 15 Q150 0 300 15 T600 15 T900 15 T1200 15 V30 H0 Z' fill='%23267DAF'/%3E%3C/svg%3E") repeat-x;
    background-size: 500px 30px;
}

.wave--3 {
    top: 14px;
    animation: waveMove 12s linear infinite;
    opacity: 0.5;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30'%3E%3Cpath d='M0 15 Q150 0 300 15 T600 15 T900 15 T1200 15 V30 H0 Z' fill='%231F6F9C'/%3E%3C/svg%3E") repeat-x;
    background-size: 700px 30px;
}

@keyframes waveMove {
    0%   { background-position-x: 0; }
    100% { background-position-x: 600px; }
}

/* Shimmer reflections on water */
.shimmer {
    position: absolute;
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    animation: shimmerGlow 3s ease-in-out infinite;
}

.shimmer--1 { bottom: 50%; left: 15%; animation-delay: 0s; }
.shimmer--2 { bottom: 40%; left: 35%; animation-delay: 0.5s; width: 16px; }
.shimmer--3 { bottom: 55%; left: 55%; animation-delay: 1s; width: 24px; }
.shimmer--4 { bottom: 35%; left: 75%; animation-delay: 1.5s; }
.shimmer--5 { bottom: 60%; left: 25%; animation-delay: 2s; width: 14px; }
.shimmer--6 { bottom: 45%; left: 65%; animation-delay: 0.8s; width: 18px; }
.shimmer--7 { bottom: 30%; left: 45%; animation-delay: 1.3s; width: 22px; }
.shimmer--8  { bottom: 50%; left: 85%; animation-delay: 0.3s; width: 16px; }
.shimmer--9  { bottom: 25%; left: 10%; animation-delay: 1.8s; width: 18px; }
.shimmer--10 { bottom: 65%; left: 50%; animation-delay: 0.6s; width: 14px; }
.shimmer--11 { bottom: 32%; left: 22%; animation-delay: 2.2s; width: 22px; }
.shimmer--12 { bottom: 58%; left: 78%; animation-delay: 1.1s; width: 16px; }
.shimmer--13 { bottom: 42%; left: 5%;  animation-delay: 0.9s; width: 20px; }
.shimmer--14 { bottom: 20%; left: 58%; animation-delay: 1.6s; width: 15px; }
.shimmer--15 { bottom: 48%; left: 92%; animation-delay: 2.5s; width: 18px; }
.shimmer--16 { bottom: 68%; left: 38%; animation-delay: 0.4s; width: 12px; }

/* Ripple circles on water */
.ripple {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rippleExpand 4s ease-out infinite;
}

.ripple--1 { width: 20px; height: 10px; bottom: 45%; left: 20%; animation-delay: 0s; }
.ripple--2 { width: 24px; height: 12px; bottom: 55%; left: 50%; animation-delay: 1s; }
.ripple--3 { width: 18px; height: 9px;  bottom: 35%; left: 70%; animation-delay: 2s; }
.ripple--4 { width: 22px; height: 11px; bottom: 60%; left: 35%; animation-delay: 0.5s; }
.ripple--5 { width: 16px; height: 8px;  bottom: 28%; left: 82%; animation-delay: 1.5s; }

@keyframes rippleExpand {
    0%   { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes shimmerGlow {
    0%, 100% { opacity: 0; transform: scaleX(0.5); }
    50%      { opacity: 0.6; transform: scaleX(1); }
}

/* --- Sailboat --- */
.sailboat {
    position: absolute;
    bottom: 20%;
    right: 15%;
    width: 70px;
    height: auto;
    z-index: 2;
    animation: boatRock 5s ease-in-out infinite, boatDrift 30s ease-in-out infinite alternate;
}

@keyframes boatRock {
    0%, 100% { transform: rotate(-3deg); }
    50%      { transform: rotate(3deg); }
}

@keyframes boatDrift {
    0%   { right: 15%; }
    100% { right: 22%; }
}

.programs-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

.programs-heading {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 120px;
    margin-bottom: 24px;
    width: 100%;
    overflow: visible;
}

.programs-heading svg {
    display: block;
    overflow: visible;
}

.programs-tagline {
    font-family: 'Zen Dots', cursive;
    font-size: 0.9rem;
    font-weight: 400;
    color: #193A65;
    line-height: 1.8;
}

.tagline-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
}

/* ===== Section Header ===== */
.programs-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px 120px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Zen Dots', cursive;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.section-title-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #EA5F5C, #F5B918);
    border-radius: 4px;
    margin: 0 auto;
}

/* ===== Programs Grid ===== */
.programs-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ===== Program Card ===== */
.program-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.5s ease;
    cursor: default;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 5;
}

.program-card:hover::before {
    left: 100%;
}

.program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(234, 95, 92, 0.1);
}

/* Card image */
.card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2.5;
    overflow: hidden;
}

.card-image,
.card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.program-card:hover .card-image,
.program-card:hover .card-video {
    transform: scale(1.08);
}

/* Gradient overlay at bottom of image */
.card-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
}

/* Card body */
.card-body {
    padding: 28px 32px 32px;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #193A65;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #EA5F5C, #F5B918);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.program-card:hover .card-title::after {
    width: 100%;
}

.card-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #444;
    line-height: 1.75;
    margin-bottom: 0;
}

.card-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #EA5F5C;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease, color 0.3s ease;
}

.card-btn:hover {
    color: #d94845;
    gap: 12px;
}

.card-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.card-btn:hover .card-arrow {
    transform: translateX(4px);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
    .programs-heading { min-height: 80px; }
    .programs-tagline { font-size: 0.85rem; }
    .programs-section { padding: 60px 24px 80px; }
    .section-title { font-size: clamp(1.6rem, 5vw, 2.5rem); }
    .programs-page .hero-logo { width: 140px; }
    .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 580px) {
    .scroll-navbar { padding: 10px 16px; }
    .programs-hero { min-height: 85vh; }
    .programs-page .hero-logo { width: 120px; top: 14px; left: 14px; }
    .programs-heading { min-height: 60px; }
    .programs-tagline { font-size: 0.78rem; }
    .programs-section { padding: 40px 16px 60px; }
    .section-header { margin-bottom: 40px; }
    .programs-grid { grid-template-columns: 1fr; gap: 20px; max-width: 400px; }
    .card-body { padding: 20px 22px 24px; }
    .floating-shapes { display: none; }
}
