/**
 * Hero Search - CTA Variant Styles
 * Discovery-first hero with primary CTA button (no search)
 * Inherits slim variant base styling
 *
 * @package Traveler_Child
 * @since 2.1.0
 */

/* ==========================================================================
   CTA Hero Container
   ========================================================================== */

.pca-hero--cta {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
}

@media (max-width: 767px) {
    .pca-hero--cta {
        height: 420px;  /* Taller to prevent content clipping */
        min-height: 420px;
        max-height: 420px;
    }
}

/* ==========================================================================
   Background Image (<picture> element)
   ========================================================================== */

.pca-hero--cta .pca-hero-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.pca-hero--cta .pca-hero-media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.pca-hero--cta .pca-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%;
}

/* ==========================================================================
   Text Scrim (Dark Gradient Overlay for Contrast)
   ========================================================================== */

.pca-hero--cta .pca-hero-scrim {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 55%;
    z-index: 2;
    pointer-events: none;

    /* Gradient fades to transparent at the edge */
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.50) 0%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

@media (max-width: 767px) {
    .pca-hero--cta .pca-hero-scrim {
        /* Mobile: centered content needs vertical gradient */
        width: 100%;
        top: auto;
        bottom: 0;
        height: 85%;

        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.35) 50%,
            rgba(0, 0, 0, 0) 100%
        );
    }
}

/* ==========================================================================
   Content Layout & Z-Index
   ========================================================================== */

.pca-hero--cta .pca-hero-content {
    position: relative;
    z-index: 3;
    padding: 1.5rem 1rem;
}

.pca-hero--cta .pca-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 600px;
}

/* Left alignment on desktop */
.pca-hero--cta .pca-hero-content[data-alignment="left"] .pca-hero-inner {
    margin: 0;
    text-align: left;
    align-items: flex-start;
}

/* ==========================================================================
   Typography (White text with shadows for readability)
   ========================================================================== */

.pca-hero--cta .pca-hero-headline {
    font-size: clamp(22px, 4.5vw, 30px);
    line-height: 1.2;
    margin-bottom: 0.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pca-hero--cta .pca-hero-subheadline,
.pca-hero--cta .pca-hero-subheadline--responsive {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pca-hero--cta .pca-hero-subheadline__desktop {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.94;
    max-width: 520px;
    margin: 0;
}

/* Mobile Subheadline - hidden by default, shown in Mobile Adjustments section */
.pca-hero--cta .pca-hero-subheadline__mobile {
    display: none;
}

/* Hide desktop subheadline on mobile */
@media (max-width: 767px) {
    .pca-hero--cta .pca-hero-subheadline__desktop {
        display: none;
    }
}

/* Large desktop headline size */
@media (min-width: 992px) {
    .pca-hero--cta .pca-hero-headline {
        font-size: 30px;
    }
}

/* ==========================================================================
   Trust Strip Above Headline (Frosted Glass Pills)
   ========================================================================== */

.pca-hero--cta .pca-trust-strip {
    margin-bottom: 0.75rem;
}

.pca-hero--cta .pca-trust-strip__desktop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    color: #ffffff;
    justify-content: flex-start;  /* Left-aligned to match content */
}

.pca-hero--cta .pca-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 6px 12px;
    /* Frosted glass effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: background 0.2s ease;
}

.pca-hero--cta .pca-trust-pill:hover {
    background: rgba(255, 255, 255, 0.22);
}

.pca-hero--cta .pca-trust-icon {
    font-size: 13px;
}

/* Hide dividers - pills are self-contained */
.pca-hero--cta .pca-trust-divider {
    display: none;
}

/* Hide mobile grid on desktop */
.pca-hero--cta .pca-trust-strip__mobile {
    display: none;
}

/* ==========================================================================
   Primary CTA Button
   ========================================================================== */

.pca-hero--cta .pca-hero-cta-wrapper {
    margin-top: 1rem;
}

.pca-hero--cta .pca-hero-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 16px 32px;
    background: var(--color-primary-orange, #FF6B00);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pca-hero--cta .pca-hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.4);
}

.pca-hero--cta .pca-hero-cta-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.25), 0 6px 24px rgba(255, 107, 0, 0.4);
}

.pca-hero--cta .pca-hero-cta-arrow {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.pca-hero--cta .pca-hero-cta-button:hover .pca-hero-cta-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Secondary Link (Or search by hotel)
   ========================================================================== */

.pca-hero--cta .pca-hero-secondary-link {
    margin-top: 0.875rem;
    margin-bottom: 0;
}

.pca-hero--cta .pca-secondary-search-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 12px 18px;
    min-height: 44px; /* WCAG 2.1 touch target */
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); /* WCAG AA contrast fix */
    transition: background 0.2s ease, transform 0.2s ease;
}

.pca-hero--cta .pca-secondary-search-link:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: underline;
    transform: translateY(-1px);
}

.pca-hero--cta .pca-secondary-search-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ==========================================================================
   Mobile Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .pca-hero--cta .pca-hero-content {
        padding: 1rem;  /* Tighter padding */
    }

    .pca-hero--cta .pca-hero-inner {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        max-width: 100%;
        gap: 0;  /* Use explicit margins for control */
    }

    /* Headline - explicit order + centered */
    .pca-hero--cta .pca-hero-headline {
        order: 1;
        margin-bottom: 0.375rem;
        text-align: center;
        width: 100%;
    }

    /* Subheadline - explicit order + centered */
    .pca-hero--cta .pca-hero-subheadline--responsive {
        order: 2;
        text-align: center;
        width: 100%;
    }

    .pca-hero--cta .pca-hero-subheadline__desktop {
        text-align: center;
    }

    /* Subheadline container - EXPLICIT CENTERING */
    .pca-hero--cta .pca-hero-subheadline__mobile {
        display: block;
        max-width: 280px;
        margin: 0 auto;
        text-align: center;
    }

    /* Subheadline Line 1 - EXPLICIT CENTERING FIX */
    .pca-hero--cta .pca-hero-subheadline__mobile-line1 {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.5;
        margin: 0 0 0.25rem 0;
        padding: 0;
        text-align: center;
        opacity: 0.92;
    }

    /* Subheadline Line 2 - EXPLICIT CENTERING FIX */
    .pca-hero--cta .pca-hero-subheadline__mobile-line2 {
        font-size: 13px;
        font-weight: 400;
        line-height: 1.5;
        margin: 0;
        padding: 0;
        text-align: center;
        opacity: 0.88;  /* Increased for contrast */
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    }

    /* CTA Button Wrapper - explicit order */
    .pca-hero--cta .pca-hero-cta-wrapper {
        order: 3;
        margin-top: 0.875rem;
        width: 100%;
    }

    .pca-hero--cta .pca-hero-cta-button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 16px;
    }

    /* Trust Strip - MOVED BELOW CTA via order */
    .pca-hero--cta .pca-trust-strip {
        order: 4;
        margin-top: 0.75rem;
        margin-bottom: 0;
    }

    .pca-hero--cta .pca-trust-strip__desktop {
        display: none;
    }

    .pca-hero--cta .pca-trust-strip__mobile {
        display: block;
    }

    .pca-hero--cta .pca-trust-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .pca-hero--cta .pca-trust-grid-item {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 5px 10px;
        /* Frosted glass pill */
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 999px;
        white-space: nowrap;
    }

    .pca-hero--cta .pca-trust-grid-icon {
        font-size: 12px;
        flex-shrink: 0;
    }

    .pca-hero--cta .pca-trust-grid-text {
        font-size: 10px;
        color: #ffffff;
        font-weight: 500;
        line-height: 1;
    }

    /* Secondary Link - AFTER trust strip, proper spacing */
    .pca-hero--cta .pca-hero-secondary-link {
        order: 5;
        display: block;
        text-align: center;
        margin-top: 0.625rem;
        margin-bottom: 0;
        padding-bottom: 0.25rem;  /* Prevent clipping */
    }

    /* Secondary link button - slightly smaller */
    .pca-hero--cta .pca-secondary-search-link {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Hotel Search Fallback Section
   ========================================================================== */

.pca-hotel-search-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    scroll-margin-top: 60px; /* Account for fixed header */
}

.pca-hotel-search-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.pca-hotel-search-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-heading, #1f2937);
    margin: 0 0 0.5rem 0;
}

.pca-hotel-search-subtitle {
    font-size: 14px;
    color: var(--color-muted, #4b5563); /* Improved contrast */
    margin: 0 0 1.25rem 0;
}

.pca-hotel-search-wrapper {
    display: flex;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pca-hotel-search-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 16px;
    outline: none;
}

.pca-hotel-search-input:focus {
    box-shadow: inset 0 0 0 2px var(--color-primary-orange, #FF6B00);
}

.pca-hotel-search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 24px;
    background: var(--color-primary-orange, #FF6B00);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.pca-hotel-search-button:hover {
    background: #e55f00;
}

@media (max-width: 767px) {
    .pca-hotel-search-wrapper {
        flex-direction: column;
    }

    .pca-hotel-search-input {
        border-bottom: 1px solid #e5e7eb;
    }

    .pca-hotel-search-button {
        justify-content: center;
        padding: 16px;
    }
}

/* ==========================================================================
   Backdrop-filter Fallback (older browsers)
   ========================================================================== */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pca-hero--cta .pca-trust-pill,
    .pca-hero--cta .pca-trust-grid-item,
    .pca-hero--cta .pca-secondary-search-link {
        background: rgba(0, 0, 0, 0.28);
        border-color: rgba(255, 255, 255, 0.30);
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .pca-hero--cta .pca-hero-cta-button,
    .pca-hero--cta .pca-hero-cta-arrow,
    .pca-hotel-search-button {
        transition: none;
    }
}
