/* Aarambh Academy — shared styles (see index.html for structure) */

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #facc15;
    /* default yellow */
    opacity: 0.9;
    transform: rotate(0deg);
    border-radius: 50%;
    pointer-events: none;
    animation-name: confetti-fall;
    animation-timing-function: linear;
}

/* Used by createContinuousConfetti in enroll flow (continuous background confetti) */
.confetti-continuous {
    animation-iteration-count: infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(300px) rotate(360deg);
        opacity: 0;
    }
}

#gallery-page {
    margin-top: 80px;
    background: #fef3c7;
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    font-family: inherit;
    overflow: hidden;
}

/* Header */
.gallery-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #111;
}

.gallery-header h1 span {
    color: #fbbf24;
    font: bold;
}

.gallery-header p {
    color: #111;
    margin-bottom: 40px;
}

/* Carousel container */
.carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Track that scrolls */
.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scrollCards 25s linear infinite;
}

/* Gallery card */
.gallery-card {
    flex: 0 0 auto;
    width: 300px;
    height: 300px;
    border-radius: 16px;
    border: 5px solid #facc15;
    background: #111;
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.25);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 204, 0, 0.4);
}

@media (max-width: 768px) {
    .gallery-card {
        width: 180px;
        /* smaller card width for tablets */
    }

    .gallery-card img {
        height: 140px;
        /* reduce height on tablets */
    }
}

@media (max-width: 480px) {
    .gallery-card {
        width: 100%;
        /* smallest cards for mobile */
    }

    .gallery-card img {
        height: 100%;
    }
}

/* Keyframes for infinite scroll */
@keyframes scrollCards {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-card {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .gallery-card {
        width: 150px;
    }
}

@keyframes bounce-enroll {

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

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

.animate-bounce-enroll {
    animation: bounce-enroll 2s infinite ease-in-out;
}

.step-indicator {
    transition: all 0.5s ease;
}

.step-active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.step-completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.course-card {
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-selected {
    border: 3px solid #fbbf24;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.payment-scanner {
    background: linear-gradient(135deg, #1f2937, #111827);
}

.upload-area {
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #fbbf24;
    background-color: #fef3c7;
}

.upload-area.dragover {
    border-color: #f59e0b;
    background-color: #fde68a;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-scanner {
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.success-animation {
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.page {
    display: none;
    min-height: 100vh;
}

/* Home is the landing view — must not stay display:none until JS, or hero videos load late */
#home-page.page {
    display: block;
}

.page.active {
    display: block;
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.whatsapp-float {
    animation: float 3s ease-in-out infinite;
}

.whatsapp-pulse {
    animation: pulse 2s infinite;
}

.whatsapp-bounce {
    animation: bounce 2s infinite;
}

@keyframes float {

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

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        transform: translate3d(0, -30px, 0);
    }

    70% {
        transform: translate3d(0, -15px, 0);
    }

    90% {
        transform: translate3d(0, -4px, 0);
    }
}
