/**
 * Hero Section Slider Styles
 * Rotating background image slider with smooth fade transitions
 * Optimized for performance and responsive across all devices
 */

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION CONTAINER STYLES
   ═══════════════════════════════════════════════════════════════ */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Ensure hero section takes full viewport height on desktop */
@media (min-width: 768px) {
    .hero-section {
        min-height: 100vh;
        height: 100vh;
    }
}

/* Adjust for shorter viewports */
@media (max-height: 600px) {
    .hero-section {
        min-height: 50vh;
    }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .hero-section {
        min-height: 60vh;
        padding: 40px 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BACKGROUND SLIDER ANIMATION STYLES
   ═══════════════════════════════════════════════════════════════ */

.hero-background-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Individual slide styling */
.hero-bg-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* First slide is visible by default */
.hero-bg-slide[data-slide="0"] {
    opacity: 1;
}

/* Active slide styling */
.hero-bg-slide.active {
    opacity: 1;
}

/* Image optimization */
.hero-bg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAY STYLES FOR TEXT READABILITY
   ═══════════════════════════════════════════════════════════════ */

/* Dark gradient overlay from left to right */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 10;
    pointer-events: none;
}

/* Dark gradient overlay from top to bottom */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 10;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   HERO CONTENT TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

/* Hero heading styles */
.hero-heading {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* Gradient text effect */
.hero-heading .text-gradient {
    background: linear-gradient(to right, #4ade80, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero description styles */
.hero-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #d1d5db;
    margin-bottom: 2rem;
    max-width: 32rem;
}

/* Mobile typography adjustments */
@media (max-width: 768px) {
    .hero-heading {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

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

    .hero-description {
        font-size: 0.95rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   BUTTON STYLES
   ═══════════════════════════════════════════════════════════════ */

/* CTA button container */
.hero-section a[href="#calculator"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-size: 1rem;
}

/* Primary button - Start Your Journey */
.hero-section a[href="#calculator"]:first-of-type {
    background: linear-gradient(to right, #16a34a, #059669);
    color: white;
    box-shadow: 0 20px 25px -5px rgba(22, 163, 74, 0.3);
}

.hero-section a[href="#calculator"]:first-of-type:hover {
    background: linear-gradient(to right, #15803d, #047857);
    box-shadow: 0 25px 50px -12px rgba(22, 163, 74, 0.4);
    transform: scale(1.05);
}

.hero-section a[href="#calculator"]:first-of-type:focus {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Secondary button - Calculate Your BMI */
.hero-section a[href="#calculator"]:last-of-type {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-section a[href="#calculator"]:last-of-type:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-section a[href="#calculator"]:last-of-type:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Button icon styling */
.hero-section a[href="#calculator"] svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile button stack */
@media (max-width: 640px) {
    .hero-section a[href="#calculator"] {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TRUST INDICATORS / STATS
   ═══════════════════════════════════════════════════════════════ */

.hero-section .trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section .trust-indicators > div {
    flex: 0 1 auto;
}

.hero-section .trust-indicators p:first-child {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
}

.hero-section .trust-indicators p:last-child {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-top: 0.25rem;
}

/* Mobile stats adjustments */
@media (max-width: 640px) {
    .hero-section .trust-indicators {
        gap: 1.5rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .hero-section .trust-indicators p:first-child {
        font-size: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SLIDE INDICATORS (DOTS)
   ═══════════════════════════════════════════════════════════════ */

.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 30;
}

/* Individual indicator button */
.hero-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: white;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

/* Indicator hover state */
.hero-indicator:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

/* Active indicator */
.hero-indicator.active {
    opacity: 1;
    background-color: #22c55e;
    width: 2rem;
    border-radius: 0.375rem;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

/* Focus state for accessibility */
.hero-indicator:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Mobile indicator adjustments */
@media (max-width: 640px) {
    .hero-indicators {
        bottom: 1.5rem;
        gap: 0.5rem;
    }

    .hero-indicator {
        width: 0.625rem;
        height: 0.625rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL INDICATOR (CHEVRON ANIMATION)
   ═══════════════════════════════════════════════════════════════ */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.hero-section .scroll-indicator {
    animation: bounce 2s infinite;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

/* Fade-in up animation for hero content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Staggered animation delays */
.animate-fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */

/* Focus visible for keyboard navigation */
.hero-section *:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .hero-bg-slide,
    .hero-indicator,
    .animate-fade-in-up {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .hero-section::before {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    }

    .hero-section::after {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */

@media print {
    .hero-section {
        min-height: auto;
        page-break-after: avoid;
    }

    .hero-indicators,
    .scroll-indicator {
        display: none;
    }
}
