/* ==========================================================================
   Hero Carousel Styles - ONDIMP Government Website
   ========================================================================== */

.hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: transparent;
}

/* Parallax Hero Styles */
.hero--parallax {
    height: 600px;
    position: relative;
    overflow: hidden;
}

.hero__parallax-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero__background-wrapper {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    will-change: transform;
}

.hero__parallax-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translateY(0);
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Legacy carousel styles - kept for backward compatibility */
.hero__carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: none; /* Hide carousel by default */
}

.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    z-index: 1;
}

.hero__slide--active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.3) 100%
    );
    z-index: 2;
}

.hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    padding: 40px 0 60px;
}

.hero__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hero__title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--white);
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

.hero__subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 600px;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-blue);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(13, 60, 115, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero__cta:hover {
    background-color: var(--secondary-blue);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 60, 115, 0.4);
}

.hero__cta:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Navigation Arrows */
.hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero__nav:hover {
    background-color: var(--white);
    color: var(--secondary-blue);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.hero__nav:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.hero__nav--prev {
    left: 24px;
}

.hero__nav--next {
    right: 24px;
}

.hero__nav svg {
    width: 24px;
    height: 24px;
}

/* Hide Navigation Elements for Parallax Version */
.hero--parallax .hero__nav,
.hero--parallax .hero__dots {
    display: none !important;
}

/* Dots Indicators */
.hero__dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background-color: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.hero__dot:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.3);
}

.hero__dot--active {
    background-color: var(--white);
    border-color: var(--white);
}

.hero__dot:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        height: 450px;
    }
    
    .hero__title {
        font-size: 1.9rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
    
    .hero__nav {
        width: 44px;
        height: 44px;
    }
    
    .hero__nav svg {
        width: 20px;
        height: 20px;
    }
    
    .hero__nav--prev {
        left: 20px;
    }
    
    .hero__nav--next {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 400px;
    }
    
    .hero__content {
        padding: 30px 0 50px;
    }
    
    .hero__title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    
    .hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .hero__cta {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero__nav {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: 80px;
    }
    
    .hero__nav svg {
        width: 18px;
        height: 18px;
    }
    
    .hero__nav--prev {
        left: 16px;
    }
    
    .hero__nav--next {
        right: 16px;
    }
    
    .hero__dots {
        bottom: 20px;
        gap: 10px;
    }
    
    .hero__dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 350px;
    }
    
    .hero__content {
        padding: 20px 0 40px;
    }
    
    .hero__container {
        padding: 0 60px;
    }
    
    .hero__title {
        font-size: 1.3rem;
        line-height: 1.4;
    }
    
    .hero__subtitle {
        font-size: 0.9rem;
        margin-bottom: 16px;
        display: none;
    }
    
    .hero__nav {
        width: 36px;
        height: 36px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
    
    .hero__nav--prev {
        left: 10px;
    }
    
    .hero__nav--next {
        right: 10px;
    }
    
    .hero__cta {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .hero__nav {
        width: 36px;
        height: 36px;
    }
    
    .hero__nav svg {
        width: 16px;
        height: 16px;
    }
    
    .hero__nav--prev {
        left: 12px;
    }
    
    .hero__nav--next {
        right: 12px;
    }
}

/* Animation for slide transitions */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.hero__slide--enter-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

.hero__slide--enter-left {
    animation: slideInLeft var(--transition-slow) ease-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero__overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            rgba(0, 0, 0, 0.9) 100%
        );
    }
    
    .hero__nav {
        border: 2px solid var(--primary-blue);
    }
    
    .hero__dot {
        border-width: 3px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero__slide,
    .hero__nav,
    .hero__dot,
    .hero__cta {
        transition: none;
    }
    
    .hero__slide--enter-right,
    .hero__slide--enter-left {
        animation: none;
    }
}

/* Loading state */
.hero--loading .hero__slide {
    background-color: var(--medium-gray);
}

.hero--loading .hero__bg-image {
    opacity: 0;
}