/* =============================================================
   MCC IGH - SHARED RESPONSIVE STYLESHEET
   Breakpoints: 375–767px | 768–1279px | 1280–1440px | 1440px+
============================================================= */

/* ── Base Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; font-family: 'Inter', sans-serif; max-width: 100vw; }
main { overflow-x: hidden; }

/* ── HEADER ─────────────────────────────────────────────────── */
header, .main-header, .header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.9rem 2rem !important;
    min-height: 64px !important;
    width: 100% !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.header-left, .header-right { display: flex !important; align-items: center !important; flex: 1; gap: 0.5rem; }
.header-right { justify-content: flex-end !important; gap: 16px !important; }

.hamburger-btn {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: 8px; transition: background 0.2s;
}
.hamburger-btn:hover { background: #f1f5f9; }
.header-center { display: none; position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
.header-title, .header-center h1 { font-size: 1.25rem; font-weight: 700; margin: 0; white-space: nowrap; color: #1e293b; }
.header-logo { height: 48px !important; width: auto !important; object-fit: contain !important; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
    background: var(--primary-color) !important; color: #fff !important; border: none !important;
    padding: 0.75rem 1.4rem !important; font-size: 0.875rem !important; font-weight: 700 !important;
    border-radius: 10px !important; cursor: pointer !important; display: inline-flex !important;
    align-items: center !important; justify-content: center !important; gap: 6px !important;
    text-decoration: none !important; box-shadow: 0 4px 12px rgba(255,122,0,.25) !important;
    text-transform: uppercase !important; letter-spacing: .6px !important;
    transition: all .2s ease !important;
}
.btn:hover { background: var(--primary-color) !important; box-shadow: 0 6px 20px rgba(255,122,0,.35) !important; }
.btn-outline { background: transparent !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color) !important; box-shadow: none !important; }
.btn-outline:hover { background: var(--primary-color) !important; color: #fff !important; }

/* ── HELP BUTTON ── */
.help-btn {
    background: none; border: none; font-family: inherit; font-size: 0.9rem; font-weight: 600;
    color: #475569; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 6px 10px; transition: color 0.2s; white-space: nowrap;
}
.help-btn:hover { color: var(--primary-color); }

/* ── MODALS ── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; z-index: 6000;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { display: flex !important; opacity: 1 !important; visibility: visible !important; }
.modal-card {
    background: white; border-radius: 16px; width: 100%; max-width: 600px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); position: relative;
    padding: 40px; animation: modalSlideUp 0.4s ease; margin: 20px;
}
@keyframes modalSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── HERO SLIDER (SHARED) ── */
.main-image-slider { position: relative; width: 100%; height: 80vh; min-height: 500px; max-height: 850px; overflow: hidden; background: #000; margin-bottom: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; z-index: 1; }
.hero-slide.active-slide { opacity: 1; z-index: 2; }
.hero-slide .slide-title { font-size: 3.2rem; font-weight: 800; color: #fff; margin-bottom: 0.8rem; text-shadow: 0 4px 12px rgba(0,0,0,0.6); transform: translateY(25px); opacity: 0; transition: all 0.8s cubic-bezier(0.2,0.8,0.2,1) 0.3s; }
.hero-slide .slide-subtitle { font-size: 1.15rem; font-weight: 500; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); transform: translateY(20px); opacity: 0; transition: all 0.8s cubic-bezier(0.2,0.8,0.2,1) 0.5s; }
.hero-slide.active-slide .slide-title, .hero-slide.active-slide .slide-subtitle { transform: translateY(0); opacity: 1; }

/* ── EXPLORE ROOMS SLIDER (SHARED) ── */
.explore-rooms-section { padding: 0.5rem 0 2rem 0; overflow: hidden; }
.slider-master-container { max-width: 1400px; margin: 0 auto; position: relative; }
.slider-outer-frame { position: relative; padding: 0 24px; }
.cards-container { display: flex; gap: 24px; overflow-x: auto; padding: 24px 0; scrollbar-width: none; }
.cards-container::-webkit-scrollbar { display: none; }
.slider-card { flex: 0 0 320px; background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: all 0.3s ease; }
.room-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; background: white; border: 1px solid #ddd; border-radius: 50%; font-size: 1.5rem; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.room-nav-btn.left { left: 0; }
.room-nav-btn.right { right: 0; }

/* ── ROOMS GRID (SHARED) ── */
.rooms-grid, .dashboard-rooms-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    align-items: stretch;
}

/* ── BREAKPOINT: < 768px (MOBILE) ── */
@media (max-width: 767px) {
    header, .main-header, .header-container { padding: 0.5rem 1rem !important; min-height: 56px !important; gap: 0.5rem !important; }
    .header-logo { height: 28px !important; max-width: 120px !important; }
    .header-center { display: none !important; }
    .help-btn { font-size: 0.75rem !important; padding: 6px 12px !important; background: #f1f5f9 !important; border: 1px solid #e2e8f0 !important; border-radius: 999px !important; display: flex !important; align-items: center !important; gap: 4px !important; }
    .help-btn span { display: inline !important; }
    .header-right { gap: 6px !important; flex: 1.5 !important; }
    .header-left { flex: 2 !important; gap: 4px !important; }
    .header-right .btn-outline { padding: 0.45rem 0.6rem !important; font-size: 0.7rem !important; border-width: 1.5px !important; }

    .rooms-grid, .dashboard-rooms-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1.25rem !important; 
        padding-bottom: 1rem !important;
        margin-top: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    .slider-card, .room-card { 
        width: 100% !important; 
        max-width: 100% !important; 
        margin: 0 !important;
    }
    .card-content { padding: 1.25rem 1rem !important; }
    .card-content h2 { font-size: 1.25rem !important; margin-bottom: 0.4rem !important; }
    .card-content p { font-size: 0.85rem !important; line-height: 1.5 !important; }
    
    h1, h1 strong { font-size: 1.8rem !important; letter-spacing: -0.8px !important; line-height: 1.15 !important; }
    h2 { font-size: 1.4rem !important; letter-spacing: -0.4px !important; }
    
    .facility-grid, .luxury-features div, .facility-features div {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
    }
    
    .main-image-slider { height: 60vh !important; min-height: 300px !important; }
    .hero-slide .slide-title { font-size: 1.35rem !important; margin-bottom: 0.3rem !important; }
    .hero-slide .slide-subtitle { font-size: 0.75rem !important; }
    .hero-prev, .hero-next, .room-nav-btn { display: none !important; }
    
    .welcome-title { font-size: 1.6rem !important; letter-spacing: -0.5px !important; }
    .welcome-subtitle { font-size: 0.88rem !important; margin-top: 0.5rem !important; line-height: 1.5 !important; }
    
    .slider-outer-frame { padding: 0 !important; }
    .cards-container { padding: 1rem 12px 2rem !important; gap: 16px !important; scroll-snap-type: x mandatory; }
    .slider-card { flex: 0 0 calc(90vw - 24px) !important; scroll-snap-align: center; }
    
    .help-modal-card { padding: 20px 14px !important; margin: 10px !important; }
    .help-modal-title { font-size: 1.4rem !important; margin-bottom: 15px !important; }
    .help-input-group label { font-size: 0.75rem !important; }
    .help-input-group input, .help-input-group select, .help-input-group textarea { padding: 12px !important; font-size: 0.9rem !important; }
    
    .premium-facility-card { padding: 2rem 1.25rem !important; margin: 1.5rem 0 !important; border-radius: 16px !important; }
    .facility-title { font-size: 1.5rem !important; }
    .feature-grid { grid-template-columns: 1fr !important; gap: 0.75rem !important; }
    .feature-item { padding: 1rem !important; border-radius: 12px !important; }
    
    /* Main element padding for mobile */
    main { padding: 0 10px 30px !important; }
    
    /* Breadcrumb mobile */
    .breadcrumb { font-size: 0.75rem !important; margin-bottom: 1rem !important; white-space: nowrap; overflow-x: auto; padding-bottom: 5px; }
    .breadcrumb::-webkit-scrollbar { display: none; }
    
    /* Prevent any section from breaking layout */
    section { overflow-x: hidden !important; width: 100% !important; padding: 0 !important; }
    
    /* Summary banner responsive */
    .summary-banner { flex-direction: column !important; gap: 0.5rem !important; text-align: left !important; align-items: flex-start !important; }
    .summary-banner h3 { font-size: 1rem !important; }
    
    /* Segment spacing optimization for index page */
    .explore-rooms-section { padding: 0.5rem 0 1rem 0 !important; }
    .title-section { margin-bottom: 1.25rem !important; }
    .description-section { margin-top: 0 !important; }
}

/* ── BREAKPOINT: 768px – 1279px (TABLET) ── */
@media (min-width: 768px) and (max-width: 1279px) {
    header, .main-header, .header-container { padding: 0.85rem 1.5rem !important; }
    .header-logo { height: 44px !important; }
    .header-center { display: none !important; }
    .rooms-grid, .dashboard-rooms-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .main-image-slider { height: 75vh !important; min-height: 500px !important; max-height: 750px !important; }
    .hero-slide .slide-title { font-size: 2.2rem !important; }
    .hero-slide .slide-subtitle { font-size: 1rem !important; }
    .welcome-title { font-size: 2.2rem !important; }
    .welcome-subtitle { font-size: 1rem !important; }
    .slider-outer-frame { padding: 0 30px !important; }
    .slider-card { flex: 0 0 270px !important; }
    .premium-facility-card { padding: 2.5rem 1.75rem !important; }
    .facility-title { font-size: 1.9rem !important; }
    
    /* Tablet Spacing Fixes */
    .rooms-grid, .dashboard-rooms-grid { gap: 1.5rem !important; margin-top: 1.5rem !important; }
    .premium-facility-card { padding: 2rem !important; margin: 2rem auto !important; }
    .explore-rooms-section { padding-bottom: 1.5rem !important; }
}

/* ── BREAKPOINT: 1280px – 1440px (DESKTOP) ── */
@media (min-width: 1280px) and (max-width: 1440px) {
    .header-center { display: block !important; }
}

/* ── BREAKPOINT: > 1440px (WIDE) ── */
@media (min-width: 1441px) {
    .header-center { display: block !important; }
}

/* ── ADMIN / SUPERADMIN SHARED LAYOUT ── */
.sidebar { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; z-index: 2000 !important; }
.main-content, .admin-main { transition: margin-left 0.3s ease, width 0.3s ease !important; }


@media (max-width: 1024px) {
    .sidebar { position: fixed !important; top: 0 !important; left: 0 !important; height: 100vh !important; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0) !important; }
    .main-content, .admin-main { margin-left: 0 !important; max-width: none !important; width: 100% !important; }
    body.admin-page { padding-left: 0 !important; }
    
    .topbar, .top-navbar { padding: 0 1rem !important; height: 60px !important; }
    #sidebarToggle, #adminSidebarToggle { display: flex !important; }
    
    .page-body, .admin-body { padding: 1rem !important; }
    .welcome-banner { flex-direction: column !important; text-align: center; gap: 1.5rem; padding: 1.5rem !important; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 0.75rem !important; }
    .row-2, .row-2-equal, .row-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    
    .stat-card { padding: 1rem !important; }
    .stat-value { font-size: 1.3rem !important; }
    .stat-label { font-size: 0.65rem !important; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr !important; }
    .topbar-right span, .nav-right .user-info div { display: none !important; }
}
/* ── GUEST MOBILE NAV OVERLAY ── */
.guest-nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    z-index: 5000; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.guest-nav-overlay.active { opacity: 1; visibility: visible; }

.guest-nav-content {
    position: absolute; top: 0; left: -280px; width: 280px; height: 100%;
    background: white; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; padding: 1.5rem;
}
.guest-nav-overlay.active .guest-nav-content { transform: translateX(280px); }

.guest-nav-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 1.5rem; border-bottom: 1px solid #f1f5f9; margin-bottom: 1rem;
}

.guest-nav-menu { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
    color: #475569; text-decoration: none; border-radius: 8px; font-weight: 500;
    font-size: 0.95rem; transition: all 0.2s;
}
.nav-item:hover, .nav-item.active { background: rgba(255, 122, 0, 0.1); color: var(--primary-color); }

@media (max-width: 1024px) {
    .hamburger-btn { display: flex !important; }
    .header-center { display: none !important; }
}

@media (max-width: 767px) {
    .guest-nav-content { width: 260px; }
    .guest-nav-overlay.active .guest-nav-content { transform: translateX(260px); }
}
