/* ============================================
   DELTA Academy - Custom Styles & Animations
   ============================================ */

/* Root Variables */
:root {
    --primary-blue: #1E3A8A;
    --secondary-blue: #1e40af;
    --accent-amber: #fbbf24;
    --accent-red: #DC2626;
    --light-gray: #F3F4F6;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
    --duration: 0.8s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* ============================================
   LOADING SCREEN ANIMATION
   ============================================ */

@keyframes loading-bar {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

.loading-bar {
    animation: loading-bar 2s ease-in-out forwards;
}

#loading-screen {
    animation: fadeOut 0.5s ease-in-out 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ============================================
   BLOB ANIMATIONS
   ============================================ */

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ============================================
   FADE & SLIDE ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

/* ============================================
   FLOAT & BOUNCE ANIMATIONS
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

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

/* ============================================
   SCALE ANIMATIONS
   ============================================ */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   HEADER STYLING
   ============================================ */

.header-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
}

.header-sticky {
    animation: slideDown 0.6s ease-out;
}

nav a {
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-amber) 0%, var(--accent-red) 100%);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.cta-btn {
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: -1;
}

.cta-btn:hover::before {
    left: 100%;
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    position: relative;
    min-height: 100vh;
}

.hero-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-card {
    transition: var(--transition);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(30, 58, 138, 0.2);
}

.feature-icon {
    display: inline-block;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    animation: bounce 0.6s ease-in-out;
}

/* ============================================
   COURSE CARDS
   ============================================ */

.course-card {
    transition: var(--transition);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    animation: fadeInUp var(--duration) ease-out backwards;
}

.course-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

.course-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 60px rgba(30, 58, 138, 0.3);
    border-color: currentColor;
}

.course-btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.course-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.course-btn:hover::after {
    left: 100%;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    padding: 20px;
    border-radius: 12px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: scale(1.1);
}

.counter {
    font-size: 2.25rem;
    font-weight: 900;
    animation: fadeInUp 1s ease-out backwards;
}

@keyframes countUp {
    from {
        counter-increment: count 0;
    }
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-input {
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
}

.form-input::placeholder {
    color: #9CA3AF;
    transition: var(--transition);
}

.form-input:focus::placeholder {
    color: #D1D5DB;
}

.form-group {
    animation: fadeInUp 0.6s ease-out backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.course-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
}

.course-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.course-option input[type="radio"]:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.course-option input[type="radio"]:checked {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.2);
}

/* ============================================
   FILE UPLOAD
   ============================================ */

.file-upload {
    position: relative;
    transition: var(--transition);
}

.file-upload:hover {
    background-color: rgba(30, 58, 138, 0.05);
    border-color: var(--secondary-blue);
    transform: translateY(-2px);
}

.file-upload i {
    display: inline-block;
    transition: var(--transition);
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */

.whatsapp-btn {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
    transition: var(--transition);
}

.whatsapp-btn:hover {
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.6);
    animation: float 1.5s ease-in-out infinite;
}

/* ============================================
   MODALS
   ============================================ */

#success-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   SCROLL ANIMATIONS (AOS)
   ============================================ */

[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 1s;
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translate3d(0, 40px, 0);
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="fade-left"] {
    transform: translate3d(-40px, 0, 0);
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="fade-right"] {
    transform: translate3d(40px, 0, 0);
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="zoom-in"] {
    transform: scale3d(0.8, 0.8, 0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale3d(1, 1, 1);
}

/* ============================================
   UTILITY ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .hero-text {
        font-size: 2.25rem;
    }

    .course-card {
        transform: none !important;
    }

    .course-card:hover {
        transform: translateY(-10px) !important;
    }

    .feature-card {
        min-height: auto;
    }

    [data-aos] {
        transition-duration: 0.6s;
    }

    .stat-card:hover {
        transform: scale(1.05);
    }
}

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

    .cta-btn {
        width: 100%;
    }

    .course-card:hover {
        transform: translateY(-8px) !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --light-gray: #1F2937;
        --white: #111827;
    }

    body {
        background-color: var(--white);
        color: #E5E7EB;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .header-sticky,
    .whatsapp-btn,
    #success-modal {
        display: none !important;
    }
}
