/* ============================================================
   AL-RUHAAB Real Estate & Builders - Main stylesheet
   ============================================================ */

:root {
    --navy:   #0F2147;
    --navy-2: #182B5C;
    --gold:   #B68B4A;
    --gold-2: #C8A26B;
    --light:  #F7F5F1;
    --white:  #ffffff;
    --gray:   #6B7280;
    --gray-2: #9CA3AF;
    --black:  #111111;
    --shadow: 0 6px 24px rgba(15,33,71,.08);
    --shadow-lg: 0 12px 36px rgba(15,33,71,.14);
    --radius: 10px;
    --radius-lg: 16px;
    --font: 'Poppins', 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* -------- reset -------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: #1d2433;
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }
h1,h2,h3,h4,h5 { font-weight: 600; letter-spacing: -.01em; line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.bg-light { background: var(--light); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }

.eyebrow { display: inline-block; padding: 6px 14px; background: rgba(182,139,74,.12); color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border-radius: 999px; margin-bottom: 14px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px;
    font: inherit; font-weight: 600; font-size: .95rem;
    border-radius: var(--radius);
    cursor: pointer; border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    text-decoration: none;
    line-height: 1;
}
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: rgba(15,33,71,.18); }
.btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* -------- header -------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid #ECEEF3;
    backdrop-filter: saturate(180%) blur(8px);
}
.site-header.scrolled { box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.header-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .name { font-weight: 700; color: var(--navy); font-size: 1.05rem; letter-spacing: .02em; }
.brand-text .tag { font-size: .7rem; color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
    padding: 10px 16px;
    color: #2c3243; font-weight: 500; font-size: .95rem;
    border-radius: 8px;
}
.site-nav a.active, .site-nav a:hover { color: var(--navy); background: var(--light); }
.site-nav a.active { color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

.header-cta {
    display: flex; align-items: center; gap: 10px;
}
.header-cta .btn { padding: 10px 18px; font-size: .85rem; }

/* -------- hero -------- */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    padding: 110px 0 90px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; right: -120px; top: -120px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(182,139,74,.22), transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute; left: -80px; bottom: -100px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero-eyebrow { color: var(--gold-2); }
.hero h1 { font-size: clamp(2.3rem,4.5vw,3.6rem); color: #fff; line-height: 1.1; margin-bottom: 20px; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.86); max-width: 620px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 56px; padding-top: 36px;
    border-top: 1px solid rgba(255,255,255,.14);
}
.stat-num { font-size: 2.1rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.stat-lbl { color: rgba(255,255,255,.75); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }

/* -------- page hero / hero --smaller -------- */
.pages-hero {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff; padding: 90px 0 70px;
    position: relative; overflow: hidden;
}
.pages-hero::before {
    content: '';
    position: absolute; right: -150px; top: -100px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(182,139,74,.25), transparent 70%);
    border-radius: 50%;
}
.pages-hero h1 { color: #fff; font-size: clamp(2rem,3.5vw,2.9rem); margin-bottom: 10px; }
.pages-hero p { color: rgba(255,255,255,.82); max-width: 660px; font-size: 1.05rem; }

/* -------- cards / grids -------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1px solid #ECEEF3;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card .body { padding: 22px 24px 26px; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--gray); font-size: .85rem; margin-bottom: 12px; }
.card .meta span:before { content: '•'; margin-right: 8px; color: var(--gold); }
.card .meta span:first-child:before { content: ''; margin-right: 0; }

.badge { display: inline-flex; align-items: center; padding: 4px 10px; background: rgba(15,33,71,.08); color: var(--navy); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; }
.badge.gold { background: rgba(182,139,74,.14); color: var(--gold); }
.badge.green { background: rgba(34,197,94,.14); color: #15803D; }

/* -------- service cards -------- */
.svc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.svc-card {
    background: #fff;
    padding: 32px 26px;
    border-radius: var(--radius-lg);
    border: 1px solid #ECEEF3;
    transition: .2s ease;
}
.svc-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow); }
.svc-icon {
    width: 54px; height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
}
.svc-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.svc-card p { font-size: .92rem; color: var(--gray); margin: 0; }

/* -------- team grid -------- */
.team-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
@media (max-width: 700px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); border: 1px solid #ECEEF3; display: flex; gap: 24px; }
.team-card img { width: 130px; height: 130px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.team-card .body h3 { margin-bottom: 4px; }
.team-card .designation { color: var(--gold); font-weight: 600; font-size: .9rem; letter-spacing: .04em; margin-bottom: 14px; }
.team-card .msg { color: #444; font-size: .95rem; }
.team-card .body { flex: 1; }

/* -------- contact form -------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: .85rem; font-weight: 600; color: #2c3243; margin-bottom: 6px; }
.form-row .required { color: #c14e4e; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; padding: 12px 14px;
    font: inherit; font-size: .95rem;
    background: #fff;
    border: 1px solid #DCDFE7;
    border-radius: 8px;
    transition: border-color .15s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none; border-color: var(--navy);
}
.form-row textarea { min-height: 130px; resize: vertical; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .92rem; font-weight: 500; }
.flash-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.flash-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.flash-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* -------- about -------- */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.about-media img { width: 100%; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.about-feature { display: flex; gap: 14px; }
.about-feature .ic {
    width: 44px; height: 44px;
    background: rgba(182,139,74,.14); color: var(--gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}
.about-feature .ft h4 { font-size: 1rem; margin: 0 0 4px; }
.about-feature .ft p { font-size: .88rem; color: var(--gray); margin: 0; }

/* -------- why us -------- */
.why-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width: 800px) { .why-grid { grid-template-columns: 1fr; } }
.why-item { background: #fff; border-radius: var(--radius-lg); padding: 28px 24px; border: 1px solid #ECEEF3; }
.why-item .n { font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.why-item h4 { font-size: 1.15rem; margin: 8px 0 8px; }
.why-item p { color: var(--gray); font-size: .95rem; margin: 0; }

/* -------- footer -------- */
.site-footer {
    background: #0B1936;
    color: rgba(255,255,255,.78);
    padding: 64px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 56px; }
.footer-brand .name { color: #fff; font-weight: 700; font-size: 1.1rem; }
.site-footer h4 { color: #fff; font-size: 1rem; letter-spacing: .04em; margin-bottom: 18px; text-transform: uppercase; font-weight: 600; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 10px; }
.footer-list a { color: rgba(255,255,255,.78); }
.footer-list a:hover { color: var(--gold); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 12px; margin-bottom: 14px; font-size: .92rem; }
.contact-list .ic {
    flex-shrink: 0; width: 34px; height: 34px;
    background: rgba(182,139,74,.16); color: var(--gold);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
}
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.socials a:hover { background: var(--gold); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; margin-top: 56px; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: rgba(255,255,255,.6); }

/* -------- updates list -------- */
.updates-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width: 900px) { .updates-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .updates-grid { grid-template-columns: 1fr; } }
.update-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #ECEEF3; }
.update-card .cover { aspect-ratio: 16/10; overflow: hidden; }
.update-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.update-card:hover .cover img { transform: scale(1.04); }
.update-card .body { padding: 22px; }
.update-card .date { color: var(--gold); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.update-card .pill { display: inline-block; padding: 3px 10px; background: rgba(15,33,71,.07); color: var(--navy); border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.update-card h3 { font-size: 1.15rem; margin: 10px 0 8px; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2,1fr); } }
.gallery-grid a { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gallery-grid a:hover img { transform: scale(1.05); }

.video-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
@media (max-width: 700px) { .video-grid { grid-template-columns: 1fr; } }
.video-grid video { width: 100%; border-radius: 10px; background: #000; }

/* -------- whatsapp -------- */
.fab-wa {
    position: fixed; right: 20px; bottom: 20px;
    width: 58px; height: 58px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 28px rgba(37,211,102,.4);
    z-index: 200;
    transition: transform .2s ease;
}
.fab-wa:hover { transform: scale(1.08); color: #fff; }
.fab-wa svg { width: 30px; height: 30px; }

/* -------- utility -------- */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-12 { gap: 12px; }
.gap-20 { gap: 20px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--gray); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; background: #F4F6FA; }
.admin-sidebar {
    width: 250px;
    background: var(--navy);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}
.admin-sidebar .logo-row { padding: 0 22px 28px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 16px; display: flex; gap: 12px; align-items: center; }
.admin-sidebar .logo-row img { height: 44px; }
.admin-sidebar .logo-row .name { font-weight: 700; font-size: 1rem; line-height: 1.1; }
.admin-sidebar .logo-row .role { font-size: .7rem; color: var(--gold-2); letter-spacing: .14em; text-transform: uppercase; }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar li a {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 22px;
    color: rgba(255,255,255,.78);
    font-weight: 500; font-size: .92rem;
    border-left: 3px solid transparent;
    transition: background .15s ease;
}
.admin-sidebar li a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar li a.active { background: rgba(182,139,74,.16); color: #fff; border-left-color: var(--gold); }
.admin-sidebar li a .ic { width: 22px; text-align: center; }
.admin-sidebar li.divider { border-top: 1px solid rgba(255,255,255,.08); margin: 14px 0; }

.admin-main { flex: 1; padding: 28px 32px; overflow-x: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.admin-top h1 { font-size: 1.7rem; margin: 0; }
.admin-top .who { color: var(--gray); font-size: .9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
.stat-card { background: #fff; border-radius: 12px; padding: 22px 20px; border: 1px solid #E6EAF2; box-shadow: 0 1px 2px rgba(15,33,71,.04); }
.stat-card .lbl { color: var(--gray); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.stat-card .val { font-size: 2.1rem; font-weight: 700; color: var(--navy); margin-top: 4px; }
.stat-card.gold .val { color: var(--gold); }

.card-panel { background: #fff; border-radius: 12px; padding: 22px 24px; border: 1px solid #E6EAF2; box-shadow: 0 1px 2px rgba(15,33,71,.04); margin-bottom: 24px; }
.card-panel h2 { font-size: 1.25rem; margin-bottom: 16px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; font-size: .9rem; border-bottom: 1px solid #ECEEF3; vertical-align: middle; }
.data-table th { background: #F8FAFC; color: var(--gray); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.data-table tbody tr:hover { background: #F9FBFF; }
.data-table img.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; }
.data-table .actions { display: flex; gap: 6px; }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 6px; }
.btn-danger { background: #DC2626; color: #fff; border: 1px solid #DC2626; }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; }
.btn-secondary { background: #6B7280; color: #fff; border: 1px solid #6B7280; }
.btn-secondary:hover { background: #4B5563; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-2 .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid-2 { grid-template-columns: 1fr; } }

.media-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 600px) { .media-list { grid-template-columns: repeat(2,1fr); } }
.media-item { position: relative; background: #F7F8FB; padding: 8px; border-radius: 8px; border: 1px solid #ECEEF3; }
.media-item img, .media-item video { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }
.media-item .del-btn { position: absolute; top: 6px; right: 6px; padding: 4px 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; border-radius: 6px; border: none; cursor: pointer; }
.media-item .del-btn:hover { background: #DC2626; }

.login-shell { background: var(--navy); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-card { background: #fff; border-radius: 16px; padding: 38px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); text-align: center; }
.login-card img { height: 70px; margin: 0 auto 18px; }
.login-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.login-card .sub { color: var(--gray); font-size: .92rem; margin-bottom: 26px; }
.login-card .form-row { text-align: left; }

/* mobile nav */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid #ECEEF3;
        flex-direction: column; align-items: stretch;
        padding: 8px 16px;
        display: none;
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 12px 0; border-bottom: 1px solid #ECEEF3; border-radius: 0; }
    .site-nav a:last-child { border-bottom: none; }
    .header-cta { display: none; }
}
@media (max-width: 700px) {
    .admin-sidebar { width: 220px; position: fixed; left: -220px; top: 0; bottom: 0; transition: left .2s; z-index: 50; }
    .admin-sidebar.open { left: 0; }
    .admin-main { padding: 18px; }
    .stat-grid { grid-template-columns: repeat(2,1fr); }
}
.admin-burger { display: none; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; border: none; font: inherit; font-weight: 600; cursor: pointer; margin-bottom: 18px; }
@media (max-width: 700px) { .admin-burger { display: inline-block; } }
