/* ==========================================================================
   دليل الاستقدام — "Sage Editorial" Design System
   - Palette: Deep sage (Oman green) + warm terracotta + cream sand
   - Surface: warm cream, not blue-cool
   - Style: editorial, generous whitespace, sharper rectangles, subtle warmth
   ========================================================================== */

:root {
    /* Brand — sage green */
    --brand-900: #173d31;
    --brand-800: #1f5040;
    --brand-700: #266652;          /* primary */
    --brand-600: #2d7a62;
    --brand-500: #3a9277;
    --brand-400: #62b095;
    --brand-300: #93cdba;
    --brand-100: #d8ece4;
    --brand-50:  #ecf6f1;

    /* Accent — terracotta */
    --accent-700: #8e2c0a;
    --accent-600: #b03a10;
    --accent-500: #c2410c;
    --accent-400: #de6a3a;
    --accent-100: #fbe1d2;
    --accent-50:  #fdf1e8;

    /* Status */
    --success-600: #1f7a4a;
    --success-100: #d6f1df;
    --warning-600: #a36300;
    --warning-100: #fee9bf;
    --danger-600:  #a3271a;
    --danger-100:  #fbded8;

    /* Neutral — warm umber/sand, not cool gray */
    --ink-900: #1c1a14;
    --ink-700: #3a3528;
    --ink-500: #6b624f;
    --ink-400: #8b8270;
    --ink-300: #b0a895;
    --ink-200: #d9d2bf;
    --ink-100: #ebe5d4;
    --ink-50:  #f6f2e6;
    --bg:      #f6f1e8;
    --surface: #fffaf2;
    --surface-alt: #fbf6ec;

    /* Aliases (compat) */
    --brand-primary:       var(--brand-700);
    --brand-primary-light: var(--brand-600);
    --brand-accent:        var(--accent-500);
    --brand-bg:            var(--bg);
    --brand-text:          var(--ink-900);
    --brand-muted:         var(--ink-500);

    /* Geometry — slightly squarer, editorial feel */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    /* Elevation — warmer, softer */
    --shadow-1: 0 1px 2px rgba(28,26,20,.05);
    --shadow-2: 0 4px 14px rgba(28,26,20,.07), 0 2px 4px rgba(28,26,20,.04);
    --shadow-3: 0 14px 32px rgba(28,26,20,.10), 0 4px 10px rgba(28,26,20,.06);
    --shadow-4: 0 28px 56px rgba(28,26,20,.16), 0 10px 18px rgba(28,26,20,.08);
    --shadow-card: var(--shadow-2);

    /* Motion */
    --t-fast: 120ms cubic-bezier(.4,0,.2,1);
    --t-base: 200ms cubic-bezier(.4,0,.2,1);
    --t-slow: 320ms cubic-bezier(.22,1,.36,1);

    /* Layout */
    --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body {
    font-family: 'Cairo', 'Tahoma', system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink-900);
    font-feature-settings: "ss01" on, "tnum" on;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background:
        radial-gradient(900px 480px at 100% -10%, rgba(194,65,12,.06), transparent 60%),
        radial-gradient(800px 420px at -10% 6%, rgba(38,102,82,.06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

a { color: var(--brand-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-600); }

::selection { background: var(--accent-100); color: var(--accent-700); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: var(--radius-pill); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

:focus-visible {
    outline: 2px solid var(--accent-500);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ==========================================================================
   Header / Navbar — clean, solid, editorial
   ========================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--ink-100);
    position: sticky; top: 0; z-index: 30;
    transition: box-shadow var(--t-base);
}
.site-header.is-scrolled { box-shadow: var(--shadow-2); border-bottom-color: var(--ink-200); }
.site-header .navbar { min-height: var(--header-h); padding-top: .5rem; padding-bottom: .5rem; }

.navbar-brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.2rem; color: var(--brand-900) !important; letter-spacing: -.005em; }
.navbar-brand:hover { color: var(--brand-700) !important; }
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 60%, var(--accent-500) 100%);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(38,102,82,.30), inset 0 1px 0 rgba(255,255,255,.18);
    flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-text { line-height: 1.1; }
.brand-text small { display: block; font-size: .68rem; font-weight: 600; color: var(--ink-500); margin-top: 3px; letter-spacing: .03em; }

.nav-link {
    color: var(--ink-700) !important;
    font-weight: 600;
    font-size: .95rem;
    padding: .5rem .85rem !important;
    border-radius: 8px;
    transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover { color: var(--brand-700) !important; background: var(--brand-50); }
.nav-link.active { color: var(--brand-800) !important; background: var(--brand-100); }

/* ==========================================================================
   Buttons — rectangular, solid, editorial
   ========================================================================== */
.btn {
    font-weight: 700;
    border-radius: 9px;
    padding: .55rem 1.15rem;
    transition: transform var(--t-fast), box-shadow var(--t-base), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    border-width: 1px;
    letter-spacing: -.005em;
}
.btn:active { transform: translateY(0) scale(.99); }

.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 11px; }
.btn-sm { padding: .35rem .85rem; font-size: .85rem; border-radius: 7px; }

.btn-primary {
    background: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 10px rgba(38,102,82,.25);
}
.btn-primary:hover { background: var(--brand-800); border-color: var(--brand-800); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 8px 18px rgba(38,102,82,.32); }
.btn-primary:focus, .btn-primary:active { background: var(--brand-900) !important; border-color: var(--brand-900) !important; }

.btn-outline-primary { color: var(--brand-800); border-color: var(--brand-700); background: transparent; }
.btn-outline-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }

.btn-outline-secondary { color: var(--ink-700); border-color: var(--ink-200); background: var(--surface); }
.btn-outline-secondary:hover { background: var(--ink-100); border-color: var(--ink-300); color: var(--ink-900); }

.btn-success { background: var(--success-600); border-color: var(--success-600); color: #fff; }
.btn-success:hover { background: #15623c; border-color: #15623c; }

.btn-warning { background: var(--accent-500); border-color: var(--accent-500); color: #fff; }
.btn-warning:hover { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }

.btn-link { color: var(--brand-700); }

.btn-soft { background: var(--brand-50); color: var(--brand-800); border-color: transparent; }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-900); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control, .form-select {
    border: 1px solid var(--ink-200);
    border-radius: 9px;
    padding: .65rem .9rem;
    background: var(--surface);
    color: var(--ink-900);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(38,102,82,.12);
}
.form-control-lg, .form-select-lg { padding: .85rem 1.1rem; font-size: 1rem; border-radius: 11px; }
.form-label { font-weight: 700; color: var(--ink-700); margin-bottom: .35rem; font-size: .92rem; }
.form-check-input:checked { background-color: var(--brand-700); border-color: var(--brand-700); }
.form-check-input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 .2rem rgba(38,102,82,.18); }

/* ==========================================================================
   Hero — light editorial, NOT dark gradient anymore
   ========================================================================== */
.hero {
    background: var(--surface);
    color: var(--ink-900);
    padding: 4.5rem 0 5rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--ink-100);
}
/* Editorial: vertical accent rule on right + soft sage tint blob */
.hero::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    inset-inline-end: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--brand-700) 0%, var(--accent-500) 100%);
    z-index: 1;
}
.hero::after {
    content: "";
    position: absolute;
    width: 640px; height: 640px;
    inset-inline-start: -180px; top: -240px;
    background:
        radial-gradient(closest-side, rgba(38,102,82,.10), transparent 70%);
    z-index: -1;
    pointer-events: none;
}
/* tiny ornamental sand-grain dots */
.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(28,26,20,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    opacity: .55;
}

.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
    color: var(--brand-900);
}
.hero h1 .accent { color: var(--accent-600); font-weight: 800; }
.hero .lead { font-size: 1.12rem; color: var(--ink-500); max-width: 56ch; line-height: 1.7; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--brand-700);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding: .35rem .85rem;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-pill);
}

.hero-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stat {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    min-width: 120px;
    box-shadow: var(--shadow-1);
}
.hero-stat .n { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--brand-800); letter-spacing: -.02em; }
.hero-stat .l { font-size: .8rem; color: var(--ink-500); margin-top: .35rem; font-weight: 600; }

.hero-search {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: 1.4rem;
    margin-top: 2rem;
    color: var(--ink-900);
    border: 1px solid var(--ink-100);
    position: relative;
    z-index: 2;
}
.hero-search::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 1.4rem; bottom: 1.4rem;
    width: 3px;
    background: var(--accent-500);
    border-radius: var(--radius-pill);
}
.hero-search .form-control, .hero-search .form-select {
    border: 1px solid var(--ink-200);
    background: var(--surface-alt);
}
.hero-search .form-control:focus, .hero-search .form-select:focus { background: #fff; }
.hero-search .form-label { font-size: .75rem; color: var(--ink-500); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.hero-chips { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.hero-chips .label { font-size: .82rem; color: var(--ink-500); margin-inline-end: .35rem; font-weight: 600; }
.hero-chips a {
    display: inline-flex; align-items: center; gap: .35rem;
    background: var(--surface);
    color: var(--brand-800);
    padding: .35rem .9rem;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    font-size: .85rem;
    font-weight: 600;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.hero-chips a:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; transform: translateY(-1px); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 4.5rem 0; }
.section + .section.pt-0 { padding-top: 0; }
.section-title {
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 800;
    color: var(--brand-900);
    letter-spacing: -.015em;
    margin-bottom: .35rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0; bottom: -.6rem;
    width: 44px; height: 3px;
    border-radius: var(--radius-pill);
    background: var(--accent-500);
}
.section-subtitle { color: var(--ink-500); margin-top: 1.1rem; margin-bottom: 2rem; font-size: 1rem; }

/* page-head — solid sage with editorial feel */
.page-head {
    background: var(--brand-800);
    color: #fff;
    padding: 3.5rem 0 5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--accent-500);
}
.page-head::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        radial-gradient(circle at 100% 0%, rgba(194,65,12,.18), transparent 50%);
    background-size: 24px 24px, 100% 100%;
    background-position: 0 0, 0 0;
    background-repeat: repeat, no-repeat;
    mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
    pointer-events: none;
}
.page-head h1 { font-weight: 800; letter-spacing: -.015em; margin-bottom: .5rem; position: relative; }
.page-head .breadcrumb { background: transparent; padding: 0; margin-bottom: 1rem; position: relative; }
.page-head .breadcrumb a { color: rgba(255,255,255,.85); }
.page-head .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* Filter card overlap utility */
.section-overlap { margin-top: -3rem; position: relative; z-index: 5; }
.section-overlap > .agency-section,
.section-overlap > .office-section,
.section-overlap > form.agency-section,
.section-overlap > form.office-section { box-shadow: var(--shadow-3); }

/* ==========================================================================
   Cards (agency / office unified)
   ========================================================================== */
.agency-card,
.office-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ink-100);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
    overflow: hidden;
}
.agency-card::before,
.office-card::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; inset-inline-start: 0;
    width: 3px;
    background: var(--accent-500);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--t-base);
}
.agency-card:hover,
.office-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-3);
    border-color: var(--brand-300);
}
.agency-card:hover::before,
.office-card:hover::before { transform: scaleY(1); }

.agency-card .logo,
.office-card .logo {
    width: 60px; height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
    border: 1px solid var(--brand-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.55rem; color: var(--brand-800); font-weight: 800;
    overflow: hidden; flex-shrink: 0;
}
.agency-card .logo img,
.office-card .logo img { width: 100%; height: 100%; object-fit: cover; }

.agency-card h5,
.office-card h5 { font-weight: 800; margin: 0; color: var(--ink-900); font-size: 1.05rem; line-height: 1.35; }
.agency-card .meta,
.office-card .meta { color: var(--ink-500); font-size: .88rem; }

.agency-services-preview .badge,
.office-services-preview .badge {
    background: var(--brand-50);
    color: var(--brand-800);
    font-weight: 600;
    border: 1px solid var(--brand-100);
    padding: .35rem .65rem;
}

/* Badges */
.badge { font-weight: 600; padding: .35em .7em; border-radius: var(--radius-pill); }
.badge-verified {
    background: var(--success-100);
    color: var(--success-600);
    border: 1px solid #b9e6c8;
}
.badge-featured {
    background: var(--accent-50);
    color: var(--accent-700);
    border: 1px solid var(--accent-100);
}
.badge-tier-premium {
    background: linear-gradient(135deg, #2a2418, #3a3023);
    color: var(--accent-400);
    border: 1px solid #3a3023;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.rating-stars { color: var(--accent-500); letter-spacing: 1px; }

/* ==========================================================================
   Agency / Office detail surfaces
   ========================================================================== */
.agency-cover,
.office-cover {
    width: 100%;
    height: 220px;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-2);
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .agency-cover, .office-cover { height: 320px; }
}

.agency-hero,
.office-hero {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-3);
    margin-top: -4rem;
    position: relative;
    z-index: 3;
    border: 1px solid var(--ink-100);
}
.agency-hero h1,
.office-hero h1 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 800; letter-spacing: -.015em; }
.agency-logo,
.office-logo {
    width: 110px; height: 110px; border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(38,102,82,.25);
}
.agency-logo img,
.office-logo img { width: 100%; height: 100%; object-fit: cover; }

.agency-section,
.office-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-2);
    margin-bottom: 1.5rem;
    border: 1px solid var(--ink-100);
    position: relative;
    z-index: 1;
}
.agency-section h3,
.office-section h3 {
    font-weight: 800;
    color: var(--brand-900);
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .65rem;
    font-size: 1.15rem;
}
.agency-section h3 .section-icon,
.office-section h3 .section-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand-800);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--brand-100);
}

/* ==========================================================================
   Service / Category card
   ========================================================================== */
.service-card {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    padding: 1.15rem 1.3rem;
    display: flex; align-items: flex-start; gap: .85rem;
    height: 100%;
    transition: border-color var(--t-fast), transform var(--t-base), box-shadow var(--t-base), background var(--t-base);
    color: var(--ink-900);
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: "→";
    position: absolute;
    inset-inline-end: 1.1rem; top: 50%;
    transform: translateY(-50%) translateX(8px);
    color: var(--brand-700);
    opacity: 0;
    transition: opacity var(--t-fast), transform var(--t-base);
    font-weight: 700;
}
[dir="rtl"] .service-card::after { content: "←"; }
.service-card:hover {
    border-color: var(--brand-400);
    background: linear-gradient(180deg, var(--surface), var(--brand-50));
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    text-decoration: none;
    color: var(--ink-900);
}
.service-card:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.service-card .icon {
    width: 46px; height: 46px;
    border-radius: 11px;
    background: var(--accent-50);
    border: 1px solid var(--accent-100);
    color: var(--accent-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.service-card.highlighted { border-color: var(--accent-500); box-shadow: 0 4px 16px rgba(194,65,12,.16); }

/* ==========================================================================
   Worker / Lawyer card
   ========================================================================== */
.lawyer-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--ink-100);
    transition: transform var(--t-base), box-shadow var(--t-base);
    height: 100%;
}
.lawyer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.lawyer-card .avatar {
    width: 100%; aspect-ratio: 1/1;
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 800;
}
.lawyer-card .body { padding: 1.15rem; }
.lawyer-card .position {
    display: inline-block;
    background: var(--brand-50); color: var(--brand-800);
    padding: .25rem .75rem; border-radius: var(--radius-pill);
    font-size: .78rem; font-weight: 700;
    margin-bottom: .4rem;
    border: 1px solid var(--brand-100);
}
.lawyer-card .lang-chip {
    background: var(--ink-100); color: var(--ink-700);
    font-size: .72rem; padding: .15rem .6rem;
    border-radius: var(--radius-pill); margin-inline-end: .25rem;
}

/* ==========================================================================
   Hours / open-now / contact
   ========================================================================== */
.hours-table th { font-weight: 700; color: var(--ink-500); font-size: .85rem; }
.open-now-badge {
    background: var(--success-100);
    color: var(--success-600);
    padding: .4rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .85rem;
    border: 1px solid #b9e6c8;
}
.open-now-badge.closed { background: var(--danger-100); color: var(--danger-600); border-color: #f4c4be; }
.open-now-badge .pulse {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: currentColor; margin-inline-end: .45rem;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.map-container {
    height: 350px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    z-index: 0;
}
.map-container.tall { height: 520px; }

.contact-btn {
    display: flex; align-items: center; gap: .85rem;
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-sm);
    padding: .9rem 1rem;
    margin-bottom: .6rem;
    color: var(--ink-900);
    transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.contact-btn:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-800); text-decoration: none; transform: translateX(-3px); }
.contact-btn .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); display: flex; align-items: center; justify-content: center; color: var(--brand-800); font-size: 1.1rem; border: 1px solid var(--brand-100); }
.contact-btn .icon.whatsapp { background: #d8f3e1; color: #0c6b3a; border-color: #b9e6c8; }
.contact-btn .icon.phone    { background: #e3f0d9; color: #4a6b16; border-color: #c8dba8; }
.contact-btn .icon.mail     { background: var(--accent-50); color: var(--accent-700); border-color: var(--accent-100); }
.contact-btn .icon.web      { background: #ece4fb; color: #4f36a1; border-color: #d6c9f5; }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dashboard { background: var(--bg); min-height: 100vh; }
.dashboard-shell { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; }
@media (max-width: 992px) { .dashboard-shell { grid-template-columns: 1fr; } }
.dashboard-sidebar {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 0;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--ink-100);
    height: fit-content;
    position: sticky; top: calc(var(--header-h) + 16px);
}
.dashboard-sidebar a {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem 1.25rem;
    color: var(--ink-700);
    font-weight: 600;
    border-inline-start: 3px solid transparent;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.dashboard-sidebar a:hover { background: var(--brand-50); color: var(--brand-800); text-decoration: none; }
.dashboard-sidebar a.active {
    color: var(--brand-800);
    border-color: var(--brand-700);
    background: var(--brand-50);
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--ink-100);
    transition: transform var(--t-base), box-shadow var(--t-base);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.stat-card .n { font-size: 2.1rem; font-weight: 800; color: var(--brand-800); letter-spacing: -.02em; line-height: 1; }
.stat-card .l { color: var(--ink-500); font-size: .9rem; margin-top: .35rem; font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--surface);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid var(--ink-100);
    margin-top: 3rem;
    position: relative;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand-700) 0%, var(--brand-500) 50%, var(--accent-500) 100%);
}
.footer-title { font-weight: 800; color: var(--brand-900); font-size: 1.1rem; }
.footer-heading { font-weight: 700; color: var(--ink-900); margin-bottom: .9rem; font-size: .95rem; }
.site-footer ul li { margin-bottom: .35rem; }
.site-footer a { color: var(--ink-500); transition: color var(--t-fast); }
.site-footer a:hover { color: var(--brand-700); }

/* ==========================================================================
   Misc
   ========================================================================== */
.star-rating i { color: var(--accent-500); }
.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--ink-500); }
.empty-state .icon { font-size: 3.5rem; opacity: .35; margin-bottom: .5rem; }
.empty-state h4 { color: var(--ink-700); font-weight: 700; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

.field-validation-error { color: var(--danger-600); font-size: .85rem; display: block; margin-top: .25rem; }
.input-validation-error { border-color: var(--danger-600) !important; box-shadow: 0 0 0 4px rgba(163,39,26,.10) !important; }

.consultation-form label { font-weight: 600; font-size: .95rem; }
@media (min-width: 992px) {
    .sticky-form { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
}
.review-card {
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    border: 1px solid var(--ink-100);
}
.review-card .reply {
    background: var(--surface);
    border-inline-start: 3px solid var(--brand-700);
    padding: .65rem .9rem;
    border-radius: 8px;
    margin-top: .6rem;
    font-size: .9rem;
}

/* Pagination */
.pagination .page-link {
    border: 1px solid var(--ink-200);
    color: var(--ink-700);
    background: var(--surface);
    margin: 0 2px;
    border-radius: 8px;
    font-weight: 600;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.pagination .page-link:hover { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-300); }
.pagination .page-item.active .page-link { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* Tables */
.table { color: var(--ink-900); }
.table thead th { color: var(--ink-500); font-weight: 700; font-size: .85rem; letter-spacing: .02em; border-bottom: 1px solid var(--ink-200); }
.table > :not(caption) > * > * { padding: .85rem .75rem; }

/* Animations */
[data-aos] { will-change: transform, opacity; }
@keyframes counterPulse { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.hero .hero-stat .n { animation: counterPulse .6s ease-out both; }

.text-gradient {
    background: linear-gradient(90deg, var(--brand-700), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Animated success modal
   ========================================================================== */
.success-modal .modal-dialog { display: flex; align-items: center; min-height: calc(100vh - 3.5rem); }
.success-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 30px 70px rgba(28,26,20,.4);
    text-align: center;
}
.success-modal .modal-content .top-band {
    height: 6px;
    background: linear-gradient(90deg, var(--brand-700), var(--brand-500), var(--accent-500));
    background-size: 200% 100%;
    animation: bandSlide 1.6s linear infinite;
}
@keyframes bandSlide { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.success-checkmark {
    width: 110px; height: 110px;
    border-radius: 50%;
    margin: 1.75rem auto 1rem;
    background: var(--brand-100);
    position: relative;
    animation: bouncePop .6s cubic-bezier(.22,1.61,.36,1) both;
}
.success-checkmark::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: var(--brand-700);
    transform: scale(0);
    animation: fillCircle .35s ease-out .15s forwards;
}
.success-checkmark svg {
    position: absolute; inset: 0; margin: auto;
    width: 60px; height: 60px;
    z-index: 2;
    stroke: #fff;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drawCheck .4s ease-out .55s forwards;
}
@keyframes bouncePop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.15); }
    80%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
@keyframes fillCircle { to { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.success-modal h3 {
    color: var(--brand-800);
    font-weight: 800;
    margin-top: .5rem;
    animation: fadeUp .5s ease-out .8s both;
}
.success-modal .modal-body p {
    color: var(--ink-500);
    animation: fadeUp .5s ease-out 1s both;
}
.success-modal .modal-footer {
    border: 0;
    justify-content: center;
    padding-bottom: 1.5rem;
    animation: fadeUp .5s ease-out 1.2s both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-modal .confetti {
    position: absolute; top: 0; left: 0; right: 0; height: 100%;
    pointer-events: none; overflow: hidden;
}
.success-modal .confetti span {
    position: absolute; top: -10px; width: 8px; height: 8px;
    border-radius: 2px;
    animation: confettiFall 2.4s ease-out forwards;
}
.success-modal .confetti span:nth-child(1)  { left: 8%;  background: var(--brand-700); animation-delay: .2s; }
.success-modal .confetti span:nth-child(2)  { left: 18%; background: var(--accent-500); animation-delay: .35s; transform: rotate(15deg); }
.success-modal .confetti span:nth-child(3)  { left: 28%; background: var(--brand-500); animation-delay: .15s; }
.success-modal .confetti span:nth-child(4)  { left: 38%; background: var(--accent-400); animation-delay: .5s; transform: rotate(45deg); }
.success-modal .confetti span:nth-child(5)  { left: 48%; background: var(--brand-700); animation-delay: .25s; }
.success-modal .confetti span:nth-child(6)  { left: 58%; background: var(--accent-500); animation-delay: .4s; transform: rotate(60deg); }
.success-modal .confetti span:nth-child(7)  { left: 68%; background: var(--brand-500); animation-delay: .1s; }
.success-modal .confetti span:nth-child(8)  { left: 78%; background: var(--accent-400); animation-delay: .55s; transform: rotate(30deg); }
.success-modal .confetti span:nth-child(9)  { left: 88%; background: var(--brand-700); animation-delay: .3s; }
.success-modal .confetti span:nth-child(10) { left: 92%; background: var(--accent-400); animation-delay: .45s; transform: rotate(75deg); }
@keyframes confettiFall {
    0%   { top: -10px; opacity: 1; }
    100% { top: 100%; opacity: 0; transform: translateY(0) rotate(720deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    [data-aos] { opacity: 1 !important; transform: none !important; }
}
