/**
 * SuiteTheme Demo - Front Page Styles
 * Hero section, search widget, features, accommodations carousel, gallery preview
 * @package SuiteTheme_Demo
 */

/* ========================================
   Hero Section Enhancements
   ======================================== */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-bg video {
    filter: brightness(0.85);
}

.hero-text {
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-search-widget {
    animation: fadeInUp 1s ease 0.6s both;
}

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

/* ========================================
   SuiteSync Search Widget – Hero Override
   Dark glassmorphism bar matching reference
   ======================================== */

/* --- Outer wrapper --- */
.hero-search-widget {
    width: 100%;
    max-width: max-content;
    margin: 0 auto;
}

/* Theme-level header */
.hero-search-widget .search-widget-header {
    margin-bottom: 0;
}

.hero-search-widget .search-widget-header h3 {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin: 0;
    padding: 18px 28px 16px;
    background: rgba(20, 48, 36, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-search-widget .search-widget-header h3 i {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* --- Plugin widget: FULL RESET --- */
.hero-search-widget .suitesync-search-widget,
.hero-search-widget .suitesync-search-widget.horizontal {
    background: rgba(20, 48, 36, 0.72) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-top: none !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.30) !important;
    padding: 0 !important;
    margin: 0 !important;
    animation: none !important;
    color: #fff !important;
}

/* Kill decorative pseudo-element */
.hero-search-widget .suitesync-search-widget::before,
.hero-search-widget .suitesync-search-widget::after {
    display: none !important;
    content: none !important;
}

/* Hide plugin title */
.hero-search-widget .search-widget-title {
    display: none !important;
}

/* Reset form & intermediate containers */
.hero-search-widget .suitesync-search-form,
.hero-search-widget .search-widget-body,
.hero-search-widget .search-fields,
.hero-search-widget .search-fields.horizontal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Grid layout --- */
.hero-search-widget .search-fields.horizontal {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr auto !important;
    gap: 0 !important;
    align-items: stretch !important;
}

/* --- Individual fields --- */
.hero-search-widget .search-field {
    padding: 18px 28px 20px !important;
    position: relative !important;
    border-right: 1px solid rgba(255,255,255,0.10) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: transparent !important;
}

.hero-search-widget .search-field:last-child,
.hero-search-widget .search-button-field {
    border-right: none !important;
}

/* Remove plugin's gradient separator */
.hero-search-widget .search-fields.horizontal .search-field:first-child::after {
    display: none !important;
}

/* --- Labels --- */
.hero-search-widget .search-field label {
    color: rgba(255,255,255,0.50) !important;
    font-family: var(--font-body) !important;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 10px !important;
    background: transparent !important;
}

/* --- ALL inputs & selects: fully transparent --- */
.hero-search-widget .search-field input,
.hero-search-widget .search-field select,
.hero-search-widget .search-field input[type="text"],
.hero-search-widget .search-field input[type="number"],
.hero-search-widget .search-field input[type="date"],
.hero-search-widget .flatpickr-date,
.hero-search-widget .search_checkin_field,
.hero-search-widget .search_checkout_field {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-family: var(--font-body) !important;
    font-size: 0.92rem !important;
    font-weight: 400 !important;
    padding: 0 !important;
    min-height: unset !important;
    height: auto !important;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
}

.hero-search-widget .search-field input::placeholder,
.hero-search-widget .flatpickr-date::placeholder {
    color: rgba(255,255,255,0.35) !important;
    font-weight: 300 !important;
}

.hero-search-widget .search-field input:focus,
.hero-search-widget .search-field select:focus {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
}

/* Date wrapper */
.hero-search-widget .search-date-wrapper {
    position: relative !important;
    background: transparent !important;
}

/* Calendar icon */
.hero-search-widget .search-calendar-icon {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: rgba(255,255,255,0.30) !important;
    pointer-events: none !important;
}

.hero-search-widget .search-calendar-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: rgba(255,255,255,0.30) !important;
}

/* --- Guest counter wrapper: FULL RESET --- */
.hero-search-widget .search-nights-wrapper,
.hero-search-widget .search-guest-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
    min-height: unset !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
}

/* +/- buttons – thin circular outline */
.hero-search-widget .search-night-btn,
.hero-search-widget .search-guest-decrement,
.hero-search-widget .search-guest-increment {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255,255,255,0.30) !important;
    background: transparent !important;
    color: rgba(255,255,255,0.65) !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0 !important;
    transform: none !important;
}

.hero-search-widget .search-night-btn:hover,
.hero-search-widget .search-guest-decrement:hover,
.hero-search-widget .search-guest-increment:hover {
    border-color: rgba(255,255,255,0.6) !important;
    color: #fff !important;
    background: rgba(255,255,255,0.06) !important;
    transform: none !important;
}

.hero-search-widget .search-night-btn svg,
.hero-search-widget .search-guest-decrement svg,
.hero-search-widget .search-guest-increment svg {
    width: 12px !important;
    height: 12px !important;
    stroke: currentColor !important;
}

/* Guest number */
.hero-search-widget .search-nights-wrapper input[type="number"],
.hero-search-widget .search-guest-input-wrapper input[type="number"] {
    width: 28px !important;
    flex: 0 0 28px !important;
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    text-shadow: none !important;
    min-height: unset !important;
    height: auto !important;
}

.hero-search-widget .search-nights-wrapper input[type="number"]::-webkit-outer-spin-button,
.hero-search-widget .search-nights-wrapper input[type="number"]::-webkit-inner-spin-button,
.hero-search-widget .search-guest-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.hero-search-widget .search-guest-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* --- Submit button --- */
.hero-search-widget .search-button-field {
    padding: 14px 16px 14px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-right: none !important;
    background: transparent !important;
}

.hero-search-widget .search-submit-btn {
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 34px !important;
    font-family: var(--font-body) !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    min-height: unset !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.hero-search-widget .search-submit-btn:hover {
    background: var(--primary-light, #2a5a3a) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(26, 58, 42, 0.35) !important;
}

.hero-search-widget .search-submit-btn i {
    font-size: 14px !important;
}

/* --- Flatpickr calendar popup fix ---
   Flatpickr sets inline width:2px from input offsetWidth.
   For multiMonth we need room for 2 × 307.875px day grids + 20px gap. */
.flatpickr-calendar.multiMonth {
    width: 636px !important;
}
.flatpickr-calendar.multiMonth .flatpickr-innerContainer {
    display: flex !important;
}
.flatpickr-calendar.multiMonth .flatpickr-rContainer {
    display: inline-block !important;
}
.flatpickr-calendar.multiMonth .flatpickr-days {
    width: 636px !important;
}
.flatpickr-calendar.multiMonth .flatpickr-weekdays {
    width: 100% !important;
    display: flex !important;
}
.flatpickr-calendar.multiMonth .flatpickr-weekdaycontainer {
    flex: 1 !important;
    display: flex !important;
}

/* ========================================
   About Section Enhancements
   ======================================== */
.section-about .about-content {
    position: relative;
}

.about-content .section-label::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    vertical-align: middle;
    margin-right: 12px;
}

.about-features-list {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.about-features-list .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.about-features-list .feature i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.7rem;
}

/* ========================================
   Features Section Enhancements
   ======================================== */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    transition: 0.5s ease;
}

.feature-card:hover::before {
    left: 0;
}

/* ========================================
   Accommodations Carousel Enhancements
   ======================================== */
.accommodation-card .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    z-index: 1;
    opacity: 0;
    transition: var(--transition);
}

.accommodation-card:hover .card-image::before {
    opacity: 1;
}

.suitesync-archive-price {
    margin-bottom: 12px;
}

/* ========================================
   Gallery Preview Enhancements
   ======================================== */
.gallery-preview-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: var(--transition);
    z-index: 2;
    pointer-events: none;
}

.gallery-preview-item:hover::after {
    border-color: rgba(200, 149, 108, 0.5);
}

/* ========================================
   CTA Banner Enhancements
   ======================================== */
.section-cta-banner {
    position: relative;
    overflow: hidden;
}

.section-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.section-cta-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

/* ========================================
   Accommodation Card - SuiteSync Price
   ======================================== */
.accommodation-card .suitesync-price-display,
.room-card .suitesync-price-display {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary);
}

/* ========================================
   Front Page Responsive Overrides
   ======================================== */
@media (max-width: 992px) {
    .hero-section::after {
        height: 120px;
    }

    .about-features-list {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Search widget – 2×2 grid on tablet */
    .hero-search-widget {
        max-width: 100%;
    }

    .hero-search-widget .search-fields.horizontal {
        grid-template-columns: 1fr 1fr !important;
    }

    .hero-search-widget .search-button-field {
        grid-column: 1 / -1 !important;
        padding: 0 16px 16px !important;
    }

    .hero-search-widget .search-submit-btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Remove separator on last column of first row */
    .hero-search-widget .search-field:nth-child(2) {
        border-right: none !important;
    }

    .hero-search-widget .search-field:nth-child(3) {
        border-right: none !important;
    }
}

@media (max-width: 768px) {
    .hero-section::after {
        height: 80px;
    }

    /* Search widget – single column on mobile */
    .hero-search-widget .search-widget-header h3 {
        font-size: 0.75rem;
        padding: 14px 20px 12px;
        letter-spacing: 1.5px;
    }

    .hero-search-widget .search-fields.horizontal {
        grid-template-columns: 1fr !important;
    }

    .hero-search-widget .search-field {
        padding: 12px 20px 14px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    .hero-search-widget .search-field:last-of-type,
    .hero-search-widget .search-button-field {
        border-bottom: none !important;
    }
}

@media (max-width: 576px) {
    .about-features-list {
        flex-direction: column;
        gap: 12px;
    }

    .hero-search-widget .search-widget-header h3 {
        font-size: 0.85rem;
        padding: 12px 16px 10px;
        border-radius: 12px 12px 0 0;
    }

    .hero-search-widget .suitesync-search-widget {
        border-radius: 0 0 12px 12px !important;
    }

    .hero-search-widget .search-field {
        padding: 10px 16px 12px !important;
    }

    .hero-search-widget .search-submit-btn {
        padding: 12px 24px !important;
        font-size: 0.75rem !important;
    }
}
