/**
 * Location Hero Block - Frontend Styles
 */

.wp-block-portal-loc-re-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;

    @media (max-width: 768px) {
        min-height: 70vh;
        background-attachment: scroll;
    }

    .loc-re-hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        transition: background 0.3s ease;
    }

    .loc-re-hero-content {
        position: relative;
        z-index: 2;
        text-align: center;
        color: white;
        max-width: 100%;
        padding: 2rem;

        .loc-re-container {
            max-width: 800px;
            margin: 0 auto;
        }

        .loc-re-hero-text {
            margin-bottom: 2rem;
        }

        .loc-re-hero-title {
            font-size: clamp(2.5rem, 5vw, 4rem);
            font-weight: 700;
            line-height: 1.1;
            margin-bottom: 1.5rem;
            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
            animation: fadeInUp 1s ease-out;

            @media (max-width: 768px) {
                font-size: 2.5rem;
                margin-bottom: 1rem;
            }
        }

        .loc-re-hero-subtitle {
            font-size: clamp(1.125rem, 2.5vw, 1.5rem);
            font-weight: 400;
            line-height: 1.4;
            margin-bottom: 1rem;
            opacity: 0.95;
            text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
            animation: fadeInUp 1s ease-out 0.2s both;

            @media (max-width: 768px) {
                font-size: 1.125rem;
                margin-bottom: 0.75rem;
            }
        }

        .loc-re-hero-location {
            font-size: clamp(0.875rem, 2vw, 1.125rem);
            font-weight: 300;
            line-height: 1.4;
            margin-bottom: 2.5rem;
            opacity: 0.9;
            text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
            animation: fadeInUp 1s ease-out 0.4s both;

            @media (max-width: 768px) {
                font-size: 0.875rem;
                margin-bottom: 2rem;
            }
        }

        .loc-re-hero-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
            animation: fadeInUp 1s ease-out 0.6s both;

            @media (max-width: 480px) {
                flex-direction: column;
                align-items: center;
                gap: 0.75rem;
            }

            .loc-re-btn {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 0.875rem 2rem;
                font-size: 1rem;
                font-weight: 600;
                text-decoration: none;
                border-radius: 0.75rem;
                transition: all 0.3s ease;
                min-width: 160px;
                text-align: center;
                border: 2px solid transparent;
                cursor: pointer;
                position: relative;
                overflow: hidden;

                @media (max-width: 480px) {
                    width: 100%;
                    max-width: 280px;
                    padding: 1rem 2rem;
                }

                &::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: -100%;
                    width: 100%;
                    height: 100%;
                    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
                    transition: left 0.5s ease;
                }

                &:hover::before {
                    left: 100%;
                }

                &.loc-re-btn-primary {
                    background: var(--loc-re-primary, #4F46E5);
                    color: white;
                    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);

                    &:hover {
                        background: var(--loc-re-primary-dark, #3730A3);
                        transform: translateY(-2px);
                        box-shadow: 0 8px 25px 0 rgba(79, 70, 229, 0.6);
                    }

                    &:active {
                        transform: translateY(0);
                    }
                }

                &.loc-re-btn-secondary {
                    background: rgba(255, 255, 255, 0.9);
                    color: var(--loc-re-text-dark, #1f2937);
                    border: 2px solid rgba(255, 255, 255, 0.3);
                    backdrop-filter: blur(10px);
                    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);

                    &:hover {
                        background: rgba(255, 255, 255, 1);
                        border-color: rgba(255, 255, 255, 0.5);
                        transform: translateY(-2px);
                        box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.15);
                    }

                    &:active {
                        transform: translateY(0);
                    }
                }
            }
        }
    }

    // Scroll indicator
    &::after {
        content: '';
        position: absolute;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 30px;
        background: rgba(255, 255, 255, 0.6);
        animation: scrollIndicator 2s ease-in-out infinite;

        @media (max-width: 768px) {
            display: none;
        }
    }
}

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

@keyframes scrollIndicator {
    0%, 100% {
        opacity: 0.6;
        height: 30px;
    }
    50% {
        opacity: 1;
        height: 40px;
    }
}

// Accessibility improvements
@media (prefers-reduced-motion: reduce) {
    .wp-block-portal-loc-re-hero {
        .loc-re-hero-title,
        .loc-re-hero-subtitle,
        .loc-re-hero-location,
        .loc-re-hero-buttons {
            animation: none;
        }

        &::after {
            animation: none;
        }

        .loc-re-btn {
            &::before {
                display: none;
            }
        }
    }
}

// High contrast mode support
@media (prefers-contrast: high) {
    .wp-block-portal-loc-re-hero {
        .loc-re-hero-overlay {
            background: rgba(0, 0, 0, 0.8) !important;
        }

        .loc-re-btn {
            border-width: 3px;
            
            &.loc-re-btn-primary {
                border-color: white;
            }
            
            &.loc-re-btn-secondary {
                border-color: var(--loc-re-primary, #4F46E5);
                background: white;
            }
        }
    }
}

