/* Hero Section 4 - Falling Letters Animation Styles */

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

body {
    font-family: 'Arial', sans-serif;
    background: url('public/images/newbg.png') center/cover no-repeat fixed;
    background-color: #f5f3f0;
    color: #2c2c2c;
    overflow-x: hidden;
}

.hero-test-section {
    min-height: 100vh;
    background: transparent;
}

.hero-section {
    position: relative;
    height: 60vh;
    height: 60dvh; /* Dynamic viewport height for better mobile support */
    min-height: 500px;
    background: transparent;
    margin-top: 50px;
    overflow: hidden;
    padding: 20px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    gap: 60px;
}

.hero-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-right: 40px;
}

.hero-right {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-animation-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 800px;
    max-width: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 650px;
    background: linear-gradient(to bottom, #b4975d 80%, #ceb99a 100%); /* Gradient starts at 80% from top */
    border-radius: 160px 160px 0px 0px; /* Arch shape - curved top, straight bottom */
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    margin-top: 20px;
}

.rotating-image {
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 800px;
    object-fit: contain;
    animation: scaleIn 2s ease-out forwards;
    transform: scale(0);
    opacity: 0;
}

.rotating-image.rotating {
    animation: rotate360 20s linear infinite;
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotate360 {
    0% { 
        transform: scale(1) rotate(0deg); 
    }
    100% { 
        transform: scale(1) rotate(360deg); 
    }
}

/* Image sequence container */
.image-sequence-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sequence-image {
    max-width: 250px;
    max-height: 120px;
    opacity: 0;
    animation: imageSequence 8s ease-in-out forwards;
    margin-bottom: 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#bismillah-img {
    animation-delay: 0s;
    z-index: 2;
}

#allahakbar-img {
    animation-delay: 3s;
    z-index: 1;
    animation-duration: 5s;
}

@keyframes imageSequence {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    60% {
        opacity: 1;
        transform: scale(1);
    }
    70% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* lightSweep animation removed - was causing black text artifact */

/* Falling Letters Animation */
.falling-letters {
    font-family: 'Bebas Neue Bold', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: #ffc801;
    text-align: center;
    margin: 0;
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.15em;
    text-shadow: 2px 2px 0 #000000;
}

/* Light sweep effect removed - was causing black text artifact */

.falling-letter {
    display: inline-block;
    opacity: 0;
    /* No background - let parent handle everything */
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    animation: none !important;
    /* Animation handled by GSAP JavaScript */
}

/* Animation delays handled by GSAP JavaScript */

/* All animations now handled by GSAP JavaScript for smoother physics-based movement */

/* Hero title line */
.hero-title-line {
    width: 0;
    height: 6px;
    background: #8B4513;
    z-index: 3;
    margin: -3px auto 0 auto;
    display: block;
    min-width: 0;
    /* Animation handled by GSAP JavaScript */
}

/* Hero subtitle and description */
.hero-subtitle {
    font-family: 'Galano Classic', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 12px 0 6px 0;
    opacity: 0;
    /* Animation handled by GSAP JavaScript */
    text-align: center;
}

.hero-description {
    font-family: 'Galano Classic', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 4px 0 0 0;
    opacity: 0;
    /* Animation handled by GSAP JavaScript */
    text-align: center;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 70vh;
        min-height: 70dvh; /* Dynamic viewport height for better mobile support */
        padding: 15px;
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-top: max(15px, env(safe-area-inset-top));
        margin-top: 40px;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        min-height: 60vh;
    }
    
    .hero-left {
        align-items: center;
        padding-right: 0;
        order: 2; /* Text content comes second on mobile */
    }
    
    .hero-right {
        order: 1; /* Zodiac wheel comes first on mobile */
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-image {
        height: 300px;
        max-width: 300px;
        margin-top: 40px; /* Move wheel down in mobile */
    }
    
    .hero-image::before {
        width: 200px;
        height: 350px;
        border-radius: 100px 100px 0px 0px; /* Arch shape for mobile */
        background: linear-gradient(to bottom, #b4975d 80%, #ceb99a 100%); /* Gradient starts at 80% from top for mobile */
        top: 50%;
    }
    .falling-letters {
        font-size: 3rem;
        color: #ffc801;
        text-shadow: 1.5px 1.5px 0 #000000;
    }
    
    .falling-letter {
        background: none !important;
        background-clip: initial !important;
        -webkit-background-clip: initial !important;
        -webkit-text-fill-color: initial !important;
        animation: none !important;
    }
    
    /* Mobile light sweep removed - was causing black text artifact */
    
    .hero-subtitle {
        font-size: 1.2rem;
        font-weight: 400;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .hero-title-line {
        max-width: 95%;
        animation: expandLineMobile 1s ease-out 15.5s forwards;
    }
    
    @keyframes expandLineMobile {
        0% { width: 0; }
        100% { width: 95%; }
    }
    
    /* Reduce image sequence size on mobile */
    .sequence-image {
        max-width: 300px;
        max-height: 150px;
        margin-bottom: 15px;
    }
    
    .image-sequence-container {
        padding-top: 0;
        justify-content: center;
        align-items: center;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: auto;
        min-height: 80vh;
        min-height: 80dvh; /* Dynamic viewport height for better mobile support */
        padding: 10px;
        margin-top: 30px;
    }
    
    .hero-container {
        min-height: 70vh;
        gap: 20px;
    }
    
    .falling-letters {
        font-size: 2.5rem;
        color: #ffc801;
        text-shadow: 1px 1px 0 #000000;
    }
    
    .falling-letter {
        background: none !important;
        background-clip: initial !important;
        -webkit-background-clip: initial !important;
        -webkit-text-fill-color: initial !important;
        animation: none !important;
    }
    
    /* Small mobile light sweep removed - was causing black text artifact */
    
    .hero-subtitle {
        font-size: 1.1rem;
        font-weight: 400;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    .hero-title-line {
        max-width: 95%;
        animation: expandLineMobile 1s ease-out 15.5s forwards;
    }
    
    @keyframes expandLineMobile {
        0% { width: 0; }
        100% { width: 95%; }
    }
    
    /* Further reduce image sequence size on small mobile */
    .sequence-image {
        max-width: 250px;
        max-height: 125px;
        margin-bottom: 10px;
    }
    
    .image-sequence-container {
        padding-top: 0;
        justify-content: center;
        align-items: center;
        height: 100%;
    }
}
