/* OffCamp v2 - Global Stylesheet */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary:      #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light:#EFF6FF;
    --accent:       #F59E0B;
    --accent-dark:  #D97706;
    --success:      #10B981;
    --danger:       #EF4444;
    --warning:      #F59E0B;
    --dark:         #0F172A;
    --dark-2:       #1E293B;
    --mid:          #475569;
    --muted:        #94A3B8;
    --light:        #F1F5F9;
    --white:        #FFFFFF;
    --border:       #E2E8F0;
    --border-focus: #93C5FD;

    --font-display: 'Montserrat', sans-serif;
    --font-body:    'Heebo', sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow:     0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -2px rgba(0,0,0,.06);
    --shadow-md:  0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.06);
    --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.06);
    --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.25);

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full:9999px;

    --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* prevent horizontal scroll */
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* prevent horizontal scroll */
    max-width: 100vw;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-primary  { color: var(--primary) !important; }
.text-accent   { color: var(--accent) !important; }
.text-muted    { color: var(--muted) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.text-center   { text-align: center; }
.text-sm       { font-size: 0.875rem; }
.text-xs       { font-size: 0.75rem; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-display  { font-family: var(--font-display); }

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container-wide {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

/* Flex */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1         { gap: 0.25rem; }
.gap-2         { gap: 0.5rem; }
.gap-3         { gap: 0.75rem; }
.gap-4         { gap: 1rem; }
.gap-6         { gap: 1.5rem; }

/* Spacing */
.mt-1{margin-top:.25rem} .mt-2{margin-top:.5rem} .mt-3{margin-top:.75rem}
.mt-4{margin-top:1rem}   .mt-6{margin-top:1.5rem} .mt-8{margin-top:2rem}
.mb-1{margin-bottom:.25rem} .mb-2{margin-bottom:.5rem} .mb-3{margin-bottom:.75rem}
.mb-4{margin-bottom:1rem}   .mb-6{margin-bottom:1.5rem} .mb-8{margin-bottom:2rem}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.navbar.scrolled { box-shadow: var(--shadow); }

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.navbar-logo .logo-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-bottom: 4px;
}

.navbar-logo span { color: var(--primary); }

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-nav a {
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mid);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.mobile-nav.open { display: block; }

.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--mid);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.mobile-nav a:hover { color: var(--primary); background: var(--primary-light); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--mid);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--light);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 0.5rem; width: 38px; height: 38px; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-3px);
}

.card-body { padding: 1.25rem; }
.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--light);
}

/* ============================================
   ACCOMMODATION CARD
   ============================================ */
.acc-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
}

.acc-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: transparent;
    transform: translateY(-4px);
}

.acc-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--light);
}

.acc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.acc-card:hover .acc-card-image img {
    transform: scale(1.07);
}

.acc-card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-recommended {
    background: var(--accent);
    color: var(--white);
}

.badge-spaces {
    background: var(--success);
    color: var(--white);
}

.badge-full {
    background: var(--danger);
    color: var(--white);
}

.badge-pending {
    background: var(--warning);
    color: var(--white);
}

.badge-primary {
    background: var(--primary);
    color: var(--white);
}

.badge-outline {
    background: var(--white);
    color: var(--mid);
    border: 1px solid var(--border);
}

.acc-card-body { padding: 1.1rem 1.25rem 0.75rem; }

.acc-card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-card-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.acc-card-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.acc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.acc-stat-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}

.acc-stat-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.acc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--light);
    border-top: 1px solid var(--border);
}

.acc-card-institution {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-2);
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-control::placeholder { color: var(--muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-control-file {
    padding: 0.5rem 0.75rem;
    background: var(--light);
}

select.form-control { cursor: pointer; }

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.875rem;
}

.checkbox-item:hover { border-color: var(--primary); background: var(--primary-light); }
.checkbox-item input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; }
.checkbox-item.checked { border-color: var(--primary); background: var(--primary-light); }

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 2.5rem; }
.input-icon-wrap .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.search-bar .form-group { flex: 1; min-width: 180px; }
.search-bar .form-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15,23,42,0.92) 0%,
        rgba(30,41,59,0.75) 50%,
        rgba(37,99,235,0.3) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.875rem;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.4);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #93C5FD;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero h1 .highlight {
    color: var(--accent);
    position: relative;
}

.hero p {
    font-size: 1.125rem;
    color: #CBD5E1;
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-search { margin-top: 2.5rem; }

/* ============================================
   STATS
   ============================================ */
.stats-bar {
    background: var(--dark);
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header { margin-bottom: 3rem; }
.section-header.center { text-align: center; }

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.section-tag::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--dark);
}

.section-desc {
    color: var(--mid);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 560px;
    margin-top: 0.75rem;
}

/* ============================================
   LIGHTBOX / IMAGE FULLSCREEN
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-caption {
    margin-top: 1rem;
    color: #CBD5E1;
    font-size: 0.9rem;
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.25); }

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #94A3B8;
    font-size: 0.875rem;
}

/* ============================================
   MODAL (LOGIN POPUP)
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--light);
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--light);
    text-align: center;
    font-size: 0.875rem;
}

/* Tabs within modal */
.modal-tabs {
    display: flex;
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.modal-tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    color: var(--muted);
    transition: all var(--transition);
}

.modal-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   ALERTS / FLASH MESSAGES
   ============================================ */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
    border-left-color: var(--success);
}

.alert-danger, .alert-error {
    background: #FFF5F5;
    color: #991B1B;
    border-left-color: var(--danger);
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-left-color: var(--warning);
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border-left-color: var(--primary);
}

/* ============================================
   FILTERS
   ============================================ */
.filter-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.filter-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.filter-group { margin-bottom: 1.25rem; }
.filter-group-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-2);
    margin-bottom: 0.5rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    background: var(--white);
    color: var(--mid);
    transition: all var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ============================================
   AMENITY TAGS
   ============================================ */
.amenity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.amenity-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--mid);
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.amenity-tag svg { width: 13px; height: 13px; color: var(--primary); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    margin-top: 3rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mid);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark);
    color: #CBD5E1;
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: #94A3B8; max-width: 280px; }

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    color: #94A3B8;
    transition: all var(--transition);
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a {
    font-size: 0.875rem;
    color: #94A3B8;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 0.8rem;
    color: #64748B;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom a { color: #94A3B8; transition: color var(--transition); }
.footer-bottom a:hover { color: var(--white); }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   PAGE HEADER (inner pages)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.page-header h1 {
    color: var(--white);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
}

.page-header p {
    color: #94A3B8;
    margin-top: 0.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 0.75rem;
}

.breadcrumb a { color: #94A3B8; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { color: #475569; }

/* ============================================
   DASHBOARD (Landlord + Admin)
   ============================================ */
.dash-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.dash-sidebar {
    background: var(--dark);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dash-logo {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-logo a {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
}

.dash-logo a span { color: var(--accent); }

.dash-nav { flex: 1; padding: 1rem 0.75rem; }

.dash-nav-section {
    margin-bottom: 1.5rem;
}

.dash-nav-heading {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.dash-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.65rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94A3B8;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    margin-bottom: 0.125rem;
}

.dash-nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
}

.dash-nav-link.active {
    background: rgba(37,99,235,0.2);
    color: #93C5FD;
}

.dash-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.dash-nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
}

.dash-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.dash-user-name { font-size: 0.875rem; font-weight: 600; color: var(--white); }
.dash-user-role { font-size: 0.75rem; color: #64748B; }

.dash-main { background: #F8FAFC; }

.dash-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-page-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.dash-content { padding: 2rem; }

/* Stats cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon.blue   { background: #EFF6FF; color: var(--primary); }
.stat-card-icon.green  { background: #F0FDF4; color: var(--success); }
.stat-card-icon.orange { background: #FFFBEB; color: var(--accent); }
.stat-card-icon.red    { background: #FFF5F5; color: var(--danger); }

.stat-card-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.stat-card-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* Data table */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: var(--light);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--mid);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--dark);
    vertical-align: middle;
}

.data-table tr:hover td { background: #F8FAFC; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden     { display: none !important; }
.sr-only    { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }
.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full{ border-radius: var(--radius-full); }
.shadow     { box-shadow: var(--shadow); }
.shadow-md  { box-shadow: var(--shadow-md); }
.w-full     { width: 100%; }
.overflow-hidden { overflow: hidden; }
.relative   { position: relative; }
.absolute   { position: absolute; }

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(37,99,235,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Page loader */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

#page-loader.hidden { opacity: 0; pointer-events: none; visibility: hidden; display: none !important; }

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.loader-logo span { color: var(--primary); }

.loader-bar {
    width: 180px;
    height: 3px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    animation: loadBar 1.2s ease-in-out infinite;
}

@keyframes loadBar {
    0%   { width: 0%; margin-left: 0; }
    50%  { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ---- 1024px: tablet landscape ---- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

    /* Dashboard: sidebar becomes slide-in drawer */
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar {
        position: fixed;
        top: 0; left: -280px;
        height: 100vh; width: 260px;
        z-index: 9999;
        transition: left 0.28s ease;
        overflow-y: auto;
    }
    .dash-sidebar.open { left: 0; box-shadow: var(--shadow-xl); }
    /* Overlay when sidebar open */
    .dash-sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 9998;
    }
    .dash-sidebar-overlay.show { display: block; }

    /* Show hamburger toggle in topbar */
    #dashSidebarToggle { display: flex !important; }

    /* Stat cards 2-column */
    .stat-cards { grid-template-columns: repeat(2, 1fr); }

    /* View page 2-col */
    .view-admin-layout { grid-template-columns: 1fr !important; }
}

/* ---- 768px: tablet portrait / large phone ---- */
@media (max-width: 768px) {
    /* Nav */
    .navbar-inner { height: 60px; }
    .navbar-nav { display: none; }
    .navbar-actions { display: none; }
    .hamburger { display: flex; }

    /* Sections */
    .section { padding: 2.5rem 0; }
    .container { padding: 0 1.125rem; }

    /* Grids collapse to 1 col */
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }

    /* Hero */
    .hero { min-height: 100svh; min-height: 100vh; padding: 4rem 0 3rem; }
    .hero-content { padding: 0 1.25rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 0.95rem; }

    /* Search bar stack */
    .search-bar {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
        border-radius: var(--radius-lg);
    }
    .search-bar .form-group { width: 100%; min-width: unset; }
    .search-bar .btn { width: 100%; justify-content: center; }

    /* Stats bar */
    .stats-grid { gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
    .stat-number { font-size: 1.75rem; }
    .stat-item { min-width: 120px; }

    /* Acc cards: single column */
    .acc-grid { grid-template-columns: 1fr; }
    .acc-card-stats { gap: 0.4rem; flex-wrap: wrap; }

    /* Listings page layout: sidebar above results */
    .listings-layout {
        grid-template-columns: 1fr !important;
    }
    .listings-sidebar {
        position: static !important;
        width: 100% !important;
    }

    /* Filters: horizontal scroll row on mobile */
    .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; }
    .filter-chips::-webkit-scrollbar { height: 3px; }

    /* View page: stack gallery and info */
    .view-layout { grid-template-columns: 1fr !important; }
    .view-sticky { position: static !important; top: auto !important; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 0.75rem; }

    /* Dashboard */
    .dash-topbar { padding: 0 1rem; height: 56px; }
    .dash-content { padding: 1rem; }
    .dash-page-title { font-size: 1rem; }

    /* Tables: horizontal scroll */
    .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 600px; }

    /* Stat cards */
    .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
    .stat-card { padding: 1rem; }
    .stat-card-value { font-size: 1.4rem; }
    .stat-card-icon { width: 38px; height: 38px; }

    /* Forms: full width grids */
    .form-grid-2 { grid-template-columns: 1fr !important; }

    /* Lightbox: full screen on mobile */
    .lightbox-img { max-width: 100vw; max-height: 75vh; border-radius: 0; }
    .lightbox-inner { max-width: 100vw; }
    .lightbox-prev,
    .lightbox-next { width: 38px; height: 38px; font-size: 1rem; }

    /* Page header */
    .page-header { padding: 2rem 0; }
    .page-header h1 { font-size: 1.5rem; }

    /* Auth modal */
    .modal { margin: 0 1rem; width: calc(100% - 2rem) !important; max-width: 100% !important; }

    /* Contact layout */
    .contact-layout { grid-template-columns: 1fr !important; }

    /* About intro */
    .about-intro { grid-template-columns: 1fr !important; }

    /* Landlord my-acc row */
    .acc-list-row { grid-template-columns: 1fr !important; }
    .acc-list-row > div:first-child { height: 160px !important; }
}

/* ---- 480px: small phones ---- */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    .container { padding: 0 1rem; }

    /* Hero */
    .hero h1 { font-size: 1.65rem; }
    .hero-badge { font-size: 0.7rem; }

    /* Stat cards: 1 col on very small */
    .stat-cards { grid-template-columns: 1fr 1fr; }

    /* Acc card footer stacks */
    .acc-card-footer { flex-direction: column; gap: 0.5rem; align-items: stretch; }
    .acc-card-footer .btn { width: 100%; justify-content: center; }

    /* Buttons: full width in hero */
    .hero-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    /* Feature cards */
    .features-grid { gap: 1rem; }

    /* Dashboard topbar title overflow */
    .dash-page-title { font-size: 0.9rem; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Tables */
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.625rem 0.75rem; }

    /* Pagination */
    .page-btn { width: 34px; height: 34px; font-size: 0.8rem; }

    /* Footer copyright */
    .footer-copy { font-size: 0.75rem; }

    /* Filters */
    .filter-chip { font-size: 0.75rem; padding: 0.25rem 0.625rem; }

    /* Back to top */
    .back-to-top { right: 1rem; bottom: 1rem; width: 38px; height: 38px; }
}

/* ---- 360px: very small phones ---- */
@media (max-width: 360px) {
    .stat-cards { grid-template-columns: 1fr; }
    .search-bar { padding: 0.875rem; }
}