/* ==========================================================================
   Hero Video Section Styles
   ========================================================================== */

/* Hero Video Section */
.hero-video-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 100vh;
    overflow: visible; /* allow booking overlay to overlap into next section */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0; /* overlay now sits below the hero */
}

/* Hero Video Container */
.hero-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Hero Video */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
}

/* Video Overlay */
.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

/* Hero Text */
.hero-text {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero Title */
.hero-title {
    font-family: var(--font-playfair-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

/* Hero Subtitle */
.hero-subtitle {
    font-family: var(--font-montserrat);
    font-size: 1.3rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Button Styles */
.hero-buttons .btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    text-align: center;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--copper-primary), var(--copper-dark));
    color: var(--white);
    border: 2px solid var(--copper-primary);
    box-shadow: 0 4px 15px rgba(205, 130, 97, 0.4);
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(205, 130, 97, 0.6);
    color: var(--white);
    text-decoration: none;
}

.hero-buttons .btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-secondary:hover {
    background: var(--white);
    color: var(--copper-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

/* Button Ripple Effect */
.hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.hero-buttons .btn:hover::before {
    width: 200px;
    height: 200px;
}

.hero-buttons .btn span {
    position: relative;
    z-index: 1;
}

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

/* Responsive Design - Comprehensive Breakpoints */

/* Ultra-wide screens (1920px+) */
@media (min-width: 1920px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .hero-text {
        padding: 80px 60px;
        max-width: 900px;
    }
    
    .hero-buttons .btn {
        padding: 20px 40px;
        font-size: 18px;
        min-width: 200px;
    }
}

/* Large Desktop (1400px - 1919px) */
@media (min-width: 1400px) and (max-width: 1919px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-text {
        padding: 70px 50px;
        max-width: 800px;
    }
    
    .hero-buttons .btn {
        padding: 18px 36px;
        font-size: 16px;
        min-width: 180px;
    }
}

/* Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-text {
        padding: 60px 40px;
        max-width: 750px;
    }
    
    .hero-buttons .btn {
        padding: 16px 32px;
        font-size: 16px;
        min-width: 160px;
    }
}

/* Small Desktop (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-text {
        padding: 50px 35px;
        max-width: 700px;
    }
    
    .hero-buttons .btn {
        padding: 15px 30px;
        font-size: 15px;
        min-width: 150px;
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-text {
        padding: 45px 30px;
        max-width: 600px;
        margin: 0 20px;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        padding: 14px 28px;
        font-size: 14px;
        min-width: 140px;
    }
}

/* Tablet Portrait (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-video-section { height: auto; max-height: none; min-height: 0; }
    .hero-video-container { aspect-ratio: 9 / 16; height: auto; background: none; }
    .hero-video { display: block; }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-text {
        padding: 40px 25px;
        margin: 0 15px;
        max-width: 500px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* Mobile Landscape (480px and below) */
@media (max-width: 480px) {
    .hero-video-section { height: auto; max-height: none; min-height: 0; }
    .hero-video-container { aspect-ratio: 9 / 16; height: auto; background: none; }
    .hero-video { display: block; }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .hero-text {
        padding: 30px 20px;
        margin: 0 10px;
        max-width: 400px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 260px;
        padding: 12px 24px;
        font-size: 13px;
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .hero-video-section {
        height: 100vh;
        max-height: 100vh;
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-text {
        padding: 25px 15px;
        margin: 0 5px;
    }
    
    .hero-buttons .btn {
        max-width: 240px;
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Video Loading State */
.hero-video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--copper-primary), var(--copper-dark));
    z-index: 0;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hero-video-container.loaded::before {
    opacity: 0;
}

/* Video Controls (Hidden) */
.hero-video::-webkit-media-controls {
    display: none !important;
}

.hero-video::-webkit-media-controls-panel {
    display: none !important;
}

.hero-video::-webkit-media-controls-play-button {
    display: none !important;
}

.hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Additional consistency fixes */
.hero-video-section * {
    box-sizing: border-box;
}

/* Ensure video covers entire viewport on all devices */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-video-section {
        height: 100vh;
        min-height: 100vh;
    }
    
    .hero-text {
        padding: 20px 30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .hero-video-section {
        display: none;
    }
}

/* Booking Overlay */
.booking-overlay {
    position: relative; /* below hero, overlaps upward */
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 92vw);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    z-index: 100; /* Above video and overlay */
    /* opacity: 0; */
    transform-origin: center bottom;
    transition: opacity 0.45s ease 0.15s, transform 0.45s ease 0.15s;
    margin-top: -40px; /* pull upward to kiss the hero edge */
    box-sizing: border-box; /* ensure padding doesn't cause overflow */
}
.booking-overlay.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.booking-form {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 0.9fr 0.9fr auto;
    gap: 14px;
    padding: 16px;
    align-items: end;
}

.booking-title {
    display: none;
    font-family: var(--font-playfair-display);
    font-weight: 700;
    color: #c67c5a;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 12px 16px 0 16px;
}

.booking-form .form-field { display: flex; flex-direction: column; gap: 8px; }
.booking-form label { font-size: 12px; color: var(--text-dark); opacity: 0.85; }

.booking-form select,
.booking-form input[type="date"],
.booking-form input[type="number"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.8);
    color: var(--text-dark);
    font: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) inset;
    min-height: 44px; /* consistent control height */
}

.booking-form .counter { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.booking-form .counter-btn {
    width: 40px; height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    color: var(--text-dark);
    font-size: 18px; line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.booking-form .counter-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.08); }
.booking-form .counter input[type="number"] { text-align: center; padding: 10px; }

.booking-form .book-btn {
    min-width: 140px;
    padding: 10px 20px;
    height: 44px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--copper-primary), var(--copper-dark));
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 10px 20px rgba(205, 130, 97, 0.25);
    transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.booking-form .book-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(205, 130, 97, 0.35); filter: brightness(0.98); }

/* Tablet */
@media (max-width: 1024px) {
    .booking-form { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .booking-form .field-adults,
    .booking-form .field-children { grid-column: span 2; }
    .booking-form .field-submit { grid-column: span 4; justify-self: end; }
}

/* Mobile */
@media (max-width: 768px) {
    /* On mobile, place booking bar just below the video with a small gap */
    .hero-video-section { padding-bottom: 0; }
    .booking-overlay {
        position: relative;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 600px;
        margin: 12px auto 0; /* gap below hero */
        padding-left: 18px;
        padding-right: 18px; /* safe side margins on small screens */
        z-index: 3;
        margin-top: 8px; /* remove negative overlap on mobile */
    }
    /* prevent touching screen edges on ultra-small widths */
    .booking-overlay { max-width: calc(100% - 28px); }
    .booking-title { display: block; font-size: 1.2rem; margin-bottom: 8px; font-family: 'TAN - PEARL', var(--font-playfair-display), serif; }
    .booking-form { grid-template-columns: 1fr; gap: 14px; align-items: stretch; }
    .booking-form .field-submit { grid-column: auto; justify-self: stretch; }
    .booking-form .book-btn { width: 100%; height: 48px; border-radius: 26px; }
    /* Ensure visibility state does not shift card left on mobile */
    .booking-overlay.visible { left: auto; transform: none; }
}

/* Small mobile fine-tuning (<=425px) */
@media (max-width: 425px) {
    .booking-overlay {
        left: auto;
        right: auto;
        transform: none;
        max-width: calc(100% - 20px);
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 14px;
        margin-top: 10px;
        z-index: 3;
    }
    .booking-overlay.visible { left: auto; transform: none; }
    .booking-title { font-size: 1.1rem; padding-left: 4px; padding-right: 4px; }
    .booking-form { grid-template-columns: 1fr; gap: 12px; }
    .booking-form label { font-size: 11.5px; }
    .booking-form select,
    .booking-form input[type="date"],
    .booking-form input[type="number"] { min-height: 42px; font-size: 14px; }
    .booking-form .counter { grid-template-columns: 36px 1fr 36px; }
    .booking-form .counter-btn { width: 36px; height: 42px; font-size: 17px; }
    .booking-form .book-btn { height: 46px; border-radius: 24px; }
}
