/* Hero Section Styles */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    gap: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
}

/* Floating Shapes */
.floating-shapes {
    display: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: float-shapes 8s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 20px;
    height: 20px;
    background: var(--melon);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 16px;
    height: 16px;
    background: var(--jasmine);
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.floating-shape:nth-child(3) {
    width: 24px;
    height: 24px;
    background: var(--air-superiority-blue);
    bottom: 25%;
    left: 20%;
    animation-delay: 4s;
}

.floating-shape:nth-child(4) {
    width: 18px;
    height: 18px;
    background: var(--olivine);
    bottom: 30%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float-shapes {
    0%, 100% { 
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    33% { 
        transform: translateY(-30px) scale(1.1) rotate(120deg);
    }
    66% { 
        transform: translateY(-15px) scale(0.9) rotate(240deg);
    }
}

/* Typing Animation */
.type-animation {
    overflow: hidden;
    border-right: 3px solid white;
    white-space: nowrap;
    animation: typing 4s steps(20, end), blink-caret 0.75s step-end infinite;
}

.type-animation-second {
    overflow: hidden;
    border-right: 3px solid white;
    white-space: nowrap;
    animation: typing-second 3s steps(15, end) 5s forwards, blink-caret 0.75s step-end infinite 5s;
    width: 0;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes typing-second {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Mobile/Tablet responsive grid adjustments - keep working behavior */
@media (max-width: 1023px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        height: 100vh;
        width: 100vw;
        /* Keep existing mobile/tablet behavior that works */
    }
    
    .hero-grid-image {
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 768px) {
    .hero-grid-image {
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 480px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

/* Ensure images maintain aspect ratio without distortion */
@media (orientation: landscape) {
    .hero-grid-image {
        object-fit: cover;
        object-position: center;
    }
}

@media (orientation: portrait) {
    .hero-grid-image {
        object-fit: cover;
        object-position: center;
    }
}

/* Desktop-specific fixes for larger viewports */
@media (min-width: 1024px) {
    .hero-grid {
        height: 100vh;
        min-height: 900px;
        /* Force grid to use viewport dimensions properly on desktop */
        width: 100vw;
        /* Use CSS Grid to ensure equal distribution */
        grid-template-rows: 50vh 50vh;
        grid-template-columns: 50vw 50vw;
    }
    
    #hero {
        height: 100vh !important;
        min-height: 900px !important;
    }
    
    /* Ensure images fill their grid cells completely on desktop */
    .hero-grid-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
    }
    
    /* Specific positioning for the holding image to show more of upper portion */
    .hero-grid-image[src*="lmathold"] {
        object-position: center 20% !important;
    }
}

/* Responsive text sizing for overlay */
@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 3rem !important;
    }
    .hero-overlay h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 2.5rem !important;
    }
    .hero-overlay h2 {
        font-size: 1.5rem !important;
    }
}