/* =====================================================
   BANGALORE PROPERTIES — GLOBAL STYLESHEET
   Mobile-first · Flat design · No shadows
   ===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Base Colors */
    --c-primary: #0f172a;
    /* Slate-900 */
    --c-secondary: #475569;
    /* Slate-600 */
    --c-muted: #94a3b8;
    /* Slate-400 */
    --c-bg: #f1f5f9;
    /* Slate-100 - Clearer gray backdrop */
    --c-white: #ffffff;

    /* Functional Colors */
    --c-accent: #0066ff;
    --c-accent-hover: #0052cc;
    --c-success: #00c853;
    --c-border: #cbd5e1;
    /* Slate-300 */
    --c-border-strong: #94a3b8;
    /* Slate-400 */

    /* Layout & Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --max-w: 1200px;
    --nav-h: 56px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --glass: rgba(255, 255, 255, 0.85);

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-primary);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    /* Prevent page shake when scrollbar appears/disappears */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', Georgia, serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Layout containers ── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-inline: 2rem;
    }
}

/* ─────────────────────────────────────────
   NAVIGATION — MOBILE FIRST
───────────────────────────────────────── */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .nav-container {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding-inline: 2rem;
    }
}

/* Logo */
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--c-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--c-primary);
    background: var(--c-bg);
}

.nav-cta {
    color: var(--c-white) !important;
    background: var(--c-primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
    background: #000;
}

/* ── Hamburger button ── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: 1px solid var(--c-border);
    cursor: pointer;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--c-primary);
    transition: transform 0.25s, opacity 0.25s;
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu dropdown ── */
.mobile-menu {
    background: var(--c-white);
    border-top: 1px solid var(--c-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, border-color 0.3s;
}

.mobile-menu.open {
    max-height: 420px;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    max-width: var(--max-w);
    margin-inline: auto;
}

@media (min-width: 640px) {
    .mobile-menu-inner {
        padding-inline: 1.5rem;
    }
}

.mobile-link {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--c-primary);
    border-bottom: 1px solid var(--c-border);
    transition: color 0.15s;
}

.mobile-link:last-child {
    border-bottom: none;
}

.mobile-link:hover {
    color: var(--c-soft);
}

.mobile-link-cta {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--c-primary);
    color: var(--c-white) !important;
    font-weight: 600;
    text-align: center;
    border-bottom: none !important;
    font-size: 0.875rem;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--c-primary);
    color: var(--c-white);
    border: 1px solid var(--c-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    text-align: center;
}

.btn-primary:hover {
    background: #57534e;
    border-color: #57534e;
}

.btn-secondary {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--c-primary);
    border: 1px solid var(--c-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--c-primary);
    color: var(--c-white);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
}

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */
label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--c-primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--c-border-strong);
    background: var(--c-white);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--c-primary);
    outline: none;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--radius-sm);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--c-primary);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2378716c' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

/* ─────────────────────────────────────────
   PROPERTY CARDS - FLAT DESIGN, NO HOVER EFFECTS
───────────────────────────────────────── */
.property-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    overflow: hidden;
    display: block;
    /* No transitions - flat design */
}

.property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* No transitions - flat design */
}

.card-swiper {
    height: 200px;
    width: 100%;
}

@media (min-width: 768px) {
    .card-swiper {
        height: 220px;
    }
}

.swiper-button-next,
.swiper-button-prev {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: var(--c-primary) !important;
    /* Always visible - no hover effect */
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--c-primary) !important;
}

@media (min-width: 768px) {
    .property-card img {
        height: 220px;
    }
}

/* ─────────────────────────────────────────
   TABLES
───────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th,
td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

th {
    background: var(--c-bg);
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
}

tr:hover td {
    background: #fafaf9;
}

/* Responsive table wrapper */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--c-border);
    background: var(--c-white);
    color: var(--c-primary);
    font-size: 0.8125rem;
    transition: all 0.15s;
}

.pagination a:hover {
    background: var(--c-primary);
    color: var(--c-white);
    border-color: var(--c-primary);
}

.pagination span.active {
    background: var(--c-primary);
    color: var(--c-white);
    border-color: var(--c-primary);
}

/* ─────────────────────────────────────────
   FILTER SECTION
───────────────────────────────────────── */
.filter-section {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--c-border);
}

@media (min-width: 768px) {
    .hero-section {
        padding: 5rem 0 4rem;
    }
}

/* ─────────────────────────────────────────
   MESSAGES
───────────────────────────────────────── */
.error-message {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.2rem;
}

.success-message {
    color: #16a34a;
    font-size: 0.8125rem;
    margin-top: 0.2rem;
}

/* ─────────────────────────────────────────
   FOOTER — MOBILE FIRST
───────────────────────────────────────── */
footer {
    background: var(--c-white);
    border-top: 1px solid var(--c-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0 1.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-heading {
    font-family: 'Playfair Display', serif;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
    color: var(--c-primary);
}

.footer-link {
    display: block;
    font-size: 0.8125rem;
    color: var(--c-soft);
    padding: 0.2rem 0;
    transition: color 0.15s;
}

.footer-link:hover {
    color: var(--c-primary);
}

.footer-area-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--c-border);
}

.footer-area-link {
    font-size: 0.75rem;
    color: #a8a29e;
    transition: color 0.15s;
    white-space: nowrap;
}

.footer-area-link:hover {
    color: var(--c-primary);
}

.footer-bottom {
    border-top: 1px solid var(--c-border);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #a8a29e;
    text-align: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ─────────────────────────────────────────
   UTILITY
───────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* details/summary FAQ */
details summary {
    cursor: pointer;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '+ ';
    font-weight: 700;
}

details[open] summary::before {
    content: '− ';
}

/* Admin styles */
.admin-stat-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    padding: 1.25rem;
}

/* Responsive images in gallery */
.img-gallery-thumb {
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--c-border);
}

.img-gallery-thumb img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    transition: opacity 0.2s;
}

.img-gallery-thumb:hover img {
    opacity: 0.8;
}

/* Mobile-only utility */
@media (max-width: 639px) {
    h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
    }

    h2 {
        font-size: clamp(1.2rem, 5vw, 2rem) !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Property Image Fallback UI */
.property-image-fallback {
    background: linear-gradient(135deg, #f9f8f6 0%, #f1efeb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    width: 100%;
    border-bottom: 2px solid #f1efeb;
    transition: all 0.3s ease;
}

.property-image-fallback i {
    color: #e5e7eb;
    margin-bottom: 0.75rem;
}

.property-image-fallback-detail {
    max-width: 90%;
}

.property-image-fallback-detail p:first-child {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.property-image-fallback-detail p:nth-child(2) {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-image-fallback-detail p:last-child {
    font-size: 1.25rem;
    font-weight: 900;
    color: #000;
}