/* X-Empire Boutique Hotel - Responsive CSS */

/* Utility */
.no-scroll { overflow: hidden; }

/* Premium mobile overlay (works with JS) */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
    z-index: 900;
}
.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms ease;
}

/* Mobile First Approach */

/* Extra Small Devices (320px - 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 15px;
    }

    /* Header */
    .header {
        padding: 10px 0;
    }

    .header-content {
        gap: 10px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo p {
        font-size: 8px;
        letter-spacing: 2px;
    }

    .nav-cta {
        display: none;
    }

    .hamburger {
        right: 15px;
    }

    .hamburger span {
        width: 24px;
        height: 2px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero .tagline {
        font-size: 18px;
    }

    .hero .intro {
        font-size: 14px;
    }

    .page-header h1 {
        font-size: 28px;
    }
}

/* Small Devices (480px - 768px) - Mobile */
@media (max-width: 768px) {
    .logo p {
        display: none;
    }

    /* Typography */
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 24px;
    }

    h4 {
        font-size: 20px;
    }

    /* Header */
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo p {
        font-size: 8px;
    }

    .nav {
        width: 100%;
    }

    .nav-cta {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 40vw;
        max-width: 520px;
        height: 100vh;
        padding: 96px 14px 18px;

        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;

        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-left: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: -18px 0 45px rgba(0, 0, 0, 0.22);

        z-index: 1600;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: none !important;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(110%, 0, 0);
        transition: transform 280ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease, visibility 0s linear 280ms;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
        transition: transform 280ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 12px 12px;
        border: none;
        background: transparent;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        border-radius: 12px;
        color: #1a1a2e;
        transition: background 180ms ease, transform 180ms ease, color 180ms ease;
    }

    .nav-menu li a::before,
    .nav-menu li a::after {
        display: none !important;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(204, 204, 115, 0.18);
        color: #1a1a2e;
        transform: translateX(2px);
    }

    .nav-menu li.nav-menu-cta {
        border-bottom: none;
        margin-top: 6px;
    }

    .nav-menu li.nav-menu-cta a {
        justify-content: center;
        padding: 14px 16px;
        border-radius: 999px;
        background: linear-gradient(135deg, #cccc73 0%, #e0d577 100%);
        color: #1a1a2e;
        box-shadow: 0 10px 26px rgba(204, 204, 115, 0.35);
    }

    .nav-menu li.nav-menu-cta a:hover {
        background: linear-gradient(135deg, #e0d577 0%, #cccc73 100%);
        transform: translateY(-1px);
    }

    .hamburger {
        display: flex;
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        gap: 6px;
        z-index: 2100; /* ensure clickable above drawer */
    }

    .hamburger span {
        background-color: #cccc73;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
        background-color: #cccc73;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
        background-color: #cccc73;
    }

    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        min-height: 80vh;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero .tagline {
        font-size: 20px;
    }

    .hero .intro {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .hero-cta .btn {
        width: 100%;
    }

    /* Page Header */
    .page-header {
        padding: 100px 0 60px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    /* Grid Layouts */
    .highlights-grid,
    .services-grid,
    .features-grid,
    .rooms-grid,
    .atmosphere-grid,
    .rules-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-grid,
    .restaurant-grid,
    .bar-grid,
    .pool-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .vision-mission {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .btn-large {
        padding: 14px 30px;
        font-size: 16px;
    }

    /* Cards */
    .highlight-card,
    .service-card,
    .feature-card,
    .room-card {
        padding: 30px 20px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section ul {
        list-style: none;
    }

    .social-links {
        justify-content: center;
    }

    /* Floating WhatsApp */
    .floating-whatsapp {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    /* Menu Tabs */
    .menu-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .tab-btn {
        width: 100%;
    }

    /* Gallery */
    .gallery-filters {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Form */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 25px;
    }
}

/* Medium Devices (768px - 1023px) - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {

    /* Typography */
    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 36px;
    }

    h3 {
        font-size: 28px;
    }

    /* Grid Layouts */
    .highlights-grid,
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Devices (1024px - 1439px) - Desktop */
@media (min-width: 1024px) {

    /* Header */
    .hamburger {
        display: none !important;
    }

    .nav-cta {
        display: block !important;
    }

    /* Navigation Menu - Ensure it's visible on desktop */
    .nav-menu {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        flex-direction: row !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow-y: visible !important;
        z-index: auto !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        display: flex !important;
    }

    .nav-overlay { display: none !important; }

    .nav-menu li {
        width: auto !important;
        height: 100% !important;
        border-bottom: none !important;
    }

    .nav-menu li a {
        padding: 15px 20px !important;
        border-left: none !important;
        background: transparent !important;
    }

    .nav-menu li a::before {
        display: block !important;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(204, 204, 115, 0.15) !important;
        color: #cccc73 !important;
        border-left: none !important;
        padding-left: 20px !important;
    }
}

/* Extra Large Devices (1440px+) - Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    h1 {
        font-size: 64px;
    }

    h2 {
        font-size: 48px;
    }

    h3 {
        font-size: 36px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .page-header h1 {
        font-size: 48px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Landscape Orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .page-header {
        padding: 80px 0 40px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch target sizes */
    .btn {
        min-height: 44px;
        padding: 14px 30px;
    }

    .nav-menu:not(.active) li a {
        padding: 12px 0;
        display: block;
    }

    /* Remove hover effects on touch devices */
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
    }

    /* Simplify animations for performance */
    * {
        animation-duration: 0.5s !important;
    }
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .floating-whatsapp,
    .hamburger,
    .nav-cta {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .page-header {
        background: none !important;
        color: #000 !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    /* Use higher quality images if needed */
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .floating-whatsapp {
        animation: none;
    }
}
