/* ==========================================================================
   BAM PROPERTY NIG. LIMITED — DESIGN SYSTEM
   Signature idea: the logo's rooftop/keyhole silhouette becomes a recurring
   "arch" motif (arched image frames, arched section dividers) that echoes
   the tagline "Unlocking the Door to Your Dream".
   ========================================================================== */

:root {
    /* Brand colors */
    --wine: #4A0F12;
    --wine-dark: #300a0c;
    --wine-tint: #6d1a1f;
    --gold: #F68A1F;
    --gold-light: #FFB35C;
    --white: #FFFFFF;
    --dark-bg: #111111;
    --gray-light: #F7F7F7;
    --text: #333333;
    --text-muted: #6b6b6b;
    --border: #ececec;

    /* Type */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', 'Segoe UI', sans-serif;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-arch: 200px 200px 0 0;
    --shadow-card: 0 12px 40px -12px rgba(74, 15, 18, 0.18);
    --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.06);
    --container: 1240px;
    --transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    color: var(--wine);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }

p { color: var(--text); }
a { color: var(--wine); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--dark { background: var(--dark-bg); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--gray { background: var(--gray-light); }

/* Eyebrow label above section headings */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}
.eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--gold);
    display: inline-block;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 34px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--wine); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--wine); }
.btn-wine { background: var(--wine); color: var(--white); }
.btn-wine:hover { background: var(--gold); }
.btn-sm { padding: 10px 22px; font-size: 0.82rem; }

/* --------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
    transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled {
    background: var(--dark-bg);
    padding: 10px 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; transition: height var(--transition); }
.is-scrolled .brand img { height: 40px; }
.brand-text { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--white); }
.brand-text span { color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 6px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    color: var(--white);
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--gold); }

/* Mega menu */
.has-mega { position: static; }
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    box-shadow: var(--shadow-card);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 40px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}
.has-mega:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.mega-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.mega-col ul li { margin-bottom: 10px; }
.mega-col ul li a { color: var(--text); font-size: 0.95rem; }
.mega-col ul li a:hover { color: var(--wine); padding-left: 4px; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 992px) {
    .main-nav { position: fixed; inset: 0 0 0 30%; background: var(--dark-bg); flex-direction: column; align-items: stretch; padding: 100px 28px 40px; transform: translateX(100%); transition: transform var(--transition); overflow-y: auto; }
    .main-nav.is-open { transform: translateX(0); }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav > ul > li > a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .mega-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 12px 0; background: transparent; display: none; }
    .has-mega.open .mega-menu { display: block; }
    .mega-grid { grid-template-columns: 1fr; padding: 0; }
    .mega-col h4 { color: var(--gold-light); }
    .mega-col ul li a { color: rgba(255,255,255,0.85); }
    .nav-toggle { display: block; }
}

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--dark-bg);
    overflow: hidden;
}
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(17,17,17,0.55) 0%, rgba(74,15,18,0.75) 100%);
}
.hero-content { position: relative; z-index: 2; color: var(--white); max-width: 720px; }
.hero-content h1 { color: var(--white); margin-bottom: 22px; }
.hero-content h1 em { color: var(--gold-light); font-style: normal; }
.hero-content p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 560px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.is-active { background: var(--gold); border-color: var(--gold); }

/* Property search bar overlapping hero */
.search-bar {
    position: relative;
    z-index: 5;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 28px;
    margin-top: -70px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 16px;
    align-items: end;
}
.search-bar .field { display: flex; flex-direction: column; gap: 8px; }
.search-bar label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
.search-bar select, .search-bar input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--gray-light);
}
.search-bar select:focus, .search-bar input:focus { outline: none; border-color: var(--gold); background: var(--white); }
@media (max-width: 992px) {
    .search-bar { grid-template-columns: 1fr 1fr; margin-top: 24px; }
}

/* --------------------------------------------------------------------
   Arch motif — signature element
   -------------------------------------------------------------------- */
.arch-frame {
    border-radius: var(--radius-arch);
    overflow: hidden;
    position: relative;
}
.arch-divider {
    display: flex;
    justify-content: center;
    margin: 12px 0 28px;
}
.arch-divider svg { width: 46px; height: 26px; }

/* --------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------- */
.grid { display: grid; gap: 32px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.property-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.property-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-card); }
.property-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.property-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.property-card:hover .thumb img { transform: scale(1.08); }
.badge {
    position: absolute; top: 16px; left: 16px;
    background: var(--gold); color: var(--white);
    padding: 6px 14px; border-radius: 50px;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
}
.badge.sold { background: var(--wine); }
.property-card .body { padding: 24px; }
.property-card .price { color: var(--gold); font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.property-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.property-card .loc { color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.property-meta { display: flex; gap: 18px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 0.85rem; color: var(--text-muted); }
.property-meta span { display: flex; align-items: center; gap: 6px; }

.service-card { text-align: center; padding: 44px 28px; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); transition: all var(--transition); }
.service-card:hover { box-shadow: var(--shadow-card); transform: translateY(-6px); }
.service-icon { width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%; background: var(--gray-light); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.8rem; }

/* --------------------------------------------------------------------
   Stats counter
   -------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.4rem); color: var(--gold); font-weight: 700; }
.stat-label { text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8rem; color: rgba(255,255,255,0.75); margin-top: 8px; }
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------- */
.testimonial-card { background: var(--white); border-radius: var(--radius-md); padding: 36px; box-shadow: var(--shadow-soft); }
.testimonial-card .quote { font-family: var(--font-display); font-size: 1.15rem; font-style: italic; color: var(--text); margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.testimonial-author strong { display: block; color: var(--wine); }
.testimonial-author span { font-size: 0.85rem; color: var(--text-muted); }
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }

/* --------------------------------------------------------------------
   Blog / news cards
   -------------------------------------------------------------------- */
.news-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); }
.news-card img { aspect-ratio: 16/10; object-fit: cover; }
.news-card .body { padding: 24px; }
.news-date { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 700; margin-bottom: 10px; display: block; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.news-card a.readmore { font-weight: 600; font-size: 0.9rem; }

/* --------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------- */
.newsletter { background: var(--wine); border-radius: var(--radius-md); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: var(--white); }
.newsletter h3 { color: var(--white); margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,0.8); }
.newsletter-form { display: flex; gap: 12px; flex: 1; min-width: 320px; max-width: 480px; }
.newsletter-form input { flex: 1; padding: 15px 20px; border-radius: 50px; border: none; font-family: var(--font-body); }
.newsletter-form input:focus { outline: 2px solid var(--gold); }

/* Popup */
.popup-overlay { position: fixed; inset: 0; background: rgba(17,17,17,0.7); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.popup-overlay.is-open { display: flex; }
.popup-box { background: var(--white); border-radius: var(--radius-md); max-width: 460px; width: 100%; padding: 44px; position: relative; text-align: center; }
.popup-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); }

/* --------------------------------------------------------------------
   Partners strip
   -------------------------------------------------------------------- */
.partners-strip { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 40px; opacity: 0.75; }
.partners-strip img { max-height: 42px; filter: grayscale(1); transition: all var(--transition); }
.partners-strip img:hover { filter: grayscale(0); opacity: 1; }

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer { background: var(--dark-bg); color: rgba(255,255,255,0.7); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 22px; }
.footer-grid ul li { margin-bottom: 12px; }
.footer-grid ul li a { color: rgba(255,255,255,0.7); }
.footer-grid ul li a:hover { color: var(--gold); }
.footer-brand img { height: 56px; margin-bottom: 18px; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: var(--white); }
.footer-social a:hover { background: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------
   Floating buttons / back to top
   -------------------------------------------------------------------- */
.floating-actions { position: fixed; right: 24px; bottom: 24px; z-index: 900; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.fab { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.4rem; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: transform var(--transition); }
.fab:hover { transform: scale(1.08); color: var(--white); }
.fab-whatsapp { background: #25D366; }
.fab-call { background: var(--wine); }
.fab-top { background: var(--gold); opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* --------------------------------------------------------------------
   Breadcrumb / page header (interior pages)
   -------------------------------------------------------------------- */
.page-header {
    background: var(--dark-bg);
    padding: 180px 0 64px;
    position: relative;
    text-align: center;
}
.page-header::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--wine) 0%, var(--dark-bg) 100%);
    opacity: 0.9;
}
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { color: var(--white); margin-bottom: 12px; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: var(--gold); }

/* --------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------- */
.pagination ul { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); color: var(--text); }
.pagination li.active a { background: var(--wine); color: var(--white); border-color: var(--wine); }
.pagination a:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* --------------------------------------------------------------------
   Forms (contact, inspection, appointment)
   -------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--wine); }
.form-group input, .form-group select, .form-group textarea {
    padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 0.95rem; background: var(--gray-light);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); background: var(--white); }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.alert { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: 0.95rem; }
.alert-success { background: #e6f6ec; color: #1c7a3d; border: 1px solid #b7e6c6; }
.alert-error { background: #fdeaea; color: #a12727; border: 1px solid #f5c2c2; }
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }

/* Loading screen */
#page-loader { position: fixed; inset: 0; background: var(--dark-bg); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease, visibility 0.5s ease; }
#page-loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-ring { width: 52px; height: 52px; border: 3px solid rgba(246,138,31,0.25); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* AOS-lite reveal-on-scroll (no external library) */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------
   Small-phone tuning (≤480px) — covers gaps the section-level breakpoints
   above don't reach on narrow devices.
   -------------------------------------------------------------------- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section { padding: 56px 0; }
    .section--tight { padding: 40px 0; }

    /* Header: hide the secondary CTA so the logo + hamburger never wrap/crowd. */
    .nav-actions .btn-primary.btn-sm { display: none; }
    .brand img { height: 40px; }

    /* Hero */
    .hero { min-height: 88vh; }
    .hero-content p { font-size: 1rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; justify-content: center; }

    /* Search bar: one field per row, full-width submit button. */
    .search-bar { grid-template-columns: 1fr; padding: 20px; margin-top: 20px; }
    .search-bar button { width: 100%; justify-content: center; }

    /* Page header on interior pages needs less top padding on small screens. */
    .page-header { padding: 140px 0 48px; }

    /* Stats */
    .stats { grid-template-columns: 1fr 1fr; gap: 20px; }

    /* Newsletter block stacks cleanly. */
    .newsletter { padding: 32px 24px; flex-direction: column; align-items: stretch; text-align: center; }
    .newsletter-form { flex-direction: column; min-width: 0; max-width: none; }
    .newsletter-form input, .newsletter-form button { width: 100%; justify-content: center; }

    /* Property/testimonial meta rows wrap instead of overflowing. */
    .property-meta { flex-wrap: wrap; gap: 10px; }
    .testimonial-author { flex-wrap: wrap; }

    /* Footer bottom row stacks instead of squeezing side by side. */
    .footer-bottom { flex-direction: column; text-align: center; }

    /* Floating action buttons shrink slightly so they don't crowd small screens. */
    .fab { width: 48px; height: 48px; font-size: 1.2rem; }
    .floating-actions { right: 16px; bottom: 16px; gap: 10px; }
}
