/* ============================================================
   Below Valuation — Brand Theme CSS with Animations
   Navy #0d2d5e  |  Red #d42027
   ============================================================ */

:root {
    color-scheme: light;
    --navy: #0d2d5e;
    --navy-dark: #081b3a;
    --navy-mid: #123d7b;
    --red: #d42027;
    --red-dark: #a8181e;
    --primary-color: #0d2d5e;
    --secondary-color: #d42027;
    --text-color: #1a2332;
    --muted-color: #5e6b78;
    --light-bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #eef3f8;
    --border-color: #dbe3ee;
    --shadow: 0 4px 24px rgba(13, 45, 94, .10);
    --shadow-md: 0 8px 40px rgba(13, 45, 94, .14);
    --shadow-lg: 0 16px 56px rgba(13, 45, 94, .18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1200px;
}

/* ============================================================
   ANIMATIONS & KEYFRAMES
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes listingKenBurns {
    0% {
        background-size: 112%;
        background-position: center 28%;
        filter: saturate(0.98) brightness(0.98);
    }

    50% {
        background-size: 118%;
        background-position: center 38%;
        filter: saturate(1.02) brightness(1.01);
    }

    100% {
        background-size: 114%;
        background-position: center 34%;
        filter: saturate(1.01) brightness(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .listing-grid .card,
    .listing-media,
    .counter {
        animation: none !important;
    }
}

/* ============================================================
   ANIMATION CLASSES
   ============================================================ */

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.ai-search-group {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 100;
}

.ai-search-input {
    flex: 1;
    position: relative;
}

.ai-search-input input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    color: var(--navy-dark) !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
    z-index: 101;
    position: relative;
}

.ai-search-input input::placeholder {
    color: #8c98a4 !important;
    opacity: 1;
}

.ai-search-input input:focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 4px rgba(212, 32, 39, 0.15) !important;
    outline: none;
    color: var(--navy-dark) !important;
}

/* AI Suggestions dropdown */
.ai-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface, #fff);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    z-index: 999;
    overflow: hidden;
    display: none;
    border: 1px solid var(--border-color);
}

.ai-suggestions.active {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}

.ai-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    font-weight: 500;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(13, 45, 94, 0.05);
}

.ai-suggestion-item:last-child {
    border-bottom: none;
}

.ai-suggestion-item:hover {
    background: var(--surface-soft);
    color: var(--red);
}

.ai-suggestion-item i {
    color: var(--muted-color);
    font-size: 0.9em;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations */
.animate-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-stagger>*:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-stagger>*:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-stagger>*:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-stagger>*:nth-child(4) {
    animation-delay: 0.4s;
}

.animate-stagger>*:nth-child(5) {
    animation-delay: 0.5s;
}

.animate-stagger>*:nth-child(6) {
    animation-delay: 0.6s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-color);
    background: var(--light-bg);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    line-height: 1.15;
}

/* ── Layout ── */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* Responsive container padding */
@media (min-width: 480px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }
}

/* ── Pagination ── */
.pagination-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
}

.pagination-info {
    text-align: center;
}

.pagination-text {
    font-size: 14px;
    color: var(--muted-color);
}

.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    background: var(--surface);
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-item:not(.disabled):not(.active) .pagination-link:hover {
    background: var(--light-bg);
    border-color: var(--navy);
    color: var(--navy);
    transform: translateY(-1px);
}

.pagination-item.active .pagination-link {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
    font-weight: 600;
}

.pagination-item.disabled .pagination-link {
    color: var(--muted-color);
    background: var(--surface-soft);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.pagination-size-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-size-label {
    font-size: 14px;
    color: var(--muted-color);
    font-weight: 500;
}

.pagination-size-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--surface);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.pagination-size-select:focus {
    outline: none;
    border-color: var(--navy);
}

/* Mobile pagination adjustments */
@media (max-width: 768px) {
    .pagination-nav {
        gap: 12px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    .pagination-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .pagination-size {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    box-shadow: 0 8px 24px rgba(13, 45, 94, .28);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px rgba(13, 45, 94, .36);
}

.btn-red {
    color: #fff;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    box-shadow: 0 8px 24px rgba(212, 32, 39, .28);
}

.btn-red:hover {
    box-shadow: 0 12px 32px rgba(212, 32, 39, .36);
}

.btn-outline {
    color: var(--navy);
    background: transparent;
    border-color: var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: #fff;
}

.btn-outline-white {
    color: #fff;
    background: transparent;
    border-color: rgba(255, 255, 255, .5);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
}

/* Desktop buttons */
@media (min-width: 1024px) {
    .btn {
        min-height: 48px;
        padding: 0 26px;
        font-size: 0.95rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* ── Eyebrow badge ── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.eyebrow--light {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .9);
}

.eyebrow--dark {
    background: rgba(13, 45, 94, .08);
    border: 1px solid rgba(13, 45, 94, .12);
    color: var(--navy);
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}

/* ── Header / Navbar ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 45, 94, .08);
    box-shadow: 0 2px 16px rgba(13, 45, 94, .06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    min-height: 110px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 16px;
}

/* Navbar logo */
.site-logo {
    height: 110px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Footer logo */
.site-logo--footer {
    height: 120px;
    width: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.site-nav__link {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--navy);
    font-weight: 600;
    font-size: .92rem;
    transition: background .15s, color .15s;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    background: rgba(13, 45, 94, .07);
    color: var(--red);
}

.site-header__cta {
    margin-left: 10px;
}

@media (min-width: 769px) {
    .site-nav__cta {
        display: none !important;
    }
}

/* Hamburger */
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 48px;
    height: 48px;
    border: 1.5px solid rgba(13, 45, 94, .15);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.nav-toggle:hover {
    border-color: var(--red);
    background: rgba(212, 32, 39, 0.05);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--navy);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Enhanced mobile navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.nav-content {
    display: contents;
}

.nav-icon {
    display: none;
    font-size: 1.2rem;
    margin-right: 8px;
}

.nav-text {
    display: inline;
}

/* Mobile navigation overlay */
@media (max-width: 768px) {
    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        margin-left: 0;
        padding: 20px;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
    }

    .nav-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 24px;
        padding: 32px 24px;
        box-shadow: var(--shadow-lg);
        border: 1px solid rgba(13, 45, 94, .1);
        width: 100%;
        max-width: 400px;
        backdrop-filter: blur(20px);
    }

    .site-nav__link {
        position: relative;
        display: flex;
        align-items: center;
        padding: 16px 20px;
        border-radius: 16px;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--navy);
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .site-nav__link:hover,
    .site-nav__link.is-active {
        background: rgba(13, 45, 94, .08);
        color: var(--red);
        transform: translateX(4px);
    }

    .site-nav__cta {
        margin-top: 12px;
        background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
        color: #fff !important;
        font-weight: 700;
    }

    .site-nav__cta:hover {
        background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(212, 32, 39, 0.3);
    }

    .nav-icon {
        display: inline-block;
        opacity: 0.7;
    }

    .nav-text {
        display: inline;
    }
}

/* ── Hero ── */
.hero {
    position: relative;
    overflow: hidden;
    padding: 60px 0 50px;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(212, 32, 39, .22) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 80%, rgba(255, 255, 255, .06) 0%, transparent 40%);
    pointer-events: none;
}

.hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

.hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(1.8rem, 6vw, 4rem);
    letter-spacing: -.03em;
    line-height: 1.1;
}

.hero__text {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    color: rgba(255, 255, 255, .8);
    max-width: 100%;
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.hero__metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Desktop hero layout */
@media (min-width: 1024px) {
    .hero {
        padding: 80px 0 72px;
    }

    .hero__grid {
        grid-template-columns: 1.1fr .9fr;
        gap: 40px;
        align-items: center;
    }

    .hero__actions {
        flex-direction: row;
        gap: 14px;
        margin-bottom: 36px;
    }

    .hero__metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Tablet hero layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero {
        padding: 70px 0 60px;
    }

    .hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero__metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

.metric {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}

.metric strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.metric span {
    font-size: .88rem;
    color: rgba(255, 255, 255, .7);
}

/* Search panel */
.search-panel {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
    width: 100%;
}

.search-panel h2 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 6px;
    color: var(--navy);
}

.search-panel>p {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--muted-color);
    margin-bottom: 16px;
}

.toggle {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: var(--surface-soft);
    margin-bottom: 18px;
}

.toggle span {
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--muted-color);
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}

.toggle .active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(13, 45, 94, .1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    font-weight: 700;
    color: #3d5166;
}

select,
input,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-soft, #f9fbfd);
    color: var(--text-color);
    font: inherit;
    font-size: clamp(0.9rem, 2.5vw, 0.93rem);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

textarea {
    min-height: 100px;
    padding-top: 12px;
    resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(212, 32, 39, .1);
}

.search-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px;
}

.search-actions .btn {
    width: 100%;
    min-height: 50px;
    justify-content: center;
}

.split-note {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: var(--muted-color);
    text-align: center;
}

/* Desktop search panel */
@media (min-width: 1024px) {
    .search-panel {
        padding: 28px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .search-actions {
        flex-direction: row;
        align-items: center;
        margin-top: 16px;
    }

    .search-actions .btn {
        width: auto;
        min-height: 48px;
    }
}

/* Tablet search panel */
@media (min-width: 768px) and (max-width: 1023px) {
    .search-panel {
        padding: 24px;
    }

    .search-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .search-actions .btn {
        flex: 1;
        min-width: 200px;
    }
}

/* ── Sections ── */
.section {
    padding: 40px 0;
}

.section--soft {
    background: #fff;
    border-top: 1px solid rgba(13, 45, 94, .06);
    border-bottom: 1px solid rgba(13, 45, 94, .06);
}

.section--navy {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: #fff;
}

.section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: clamp(1.4rem, 5vw, 2.6rem);
    letter-spacing: -.03em;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.2;
}

.section-heading p {
    color: var(--muted-color);
    max-width: 100%;
    margin: 0;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
}

.section-heading--center {
    align-items: center;
    text-align: center;
}

.section-heading--center h2 {
    text-align: center;
}

.section-heading--center p {
    text-align: center;
    max-width: 60ch;
}

/* Desktop sections */
@media (min-width: 1024px) {
    .section {
        padding: 64px 0;
    }

    .section-heading {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: 24px;
    }

    .section-heading--center {
        flex-direction: column;
        align-items: center;
    }
}

/* Tablet sections */
@media (min-width: 768px) and (max-width: 1023px) {
    .section {
        padding: 56px 0;
    }

    .section-heading {
        margin-bottom: 24px;
    }
}

/* ── Cards ── */
.card,
.step-card,
.article-card,
.info-card,
.role-card,
.contact-panel,
.detail-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(13, 45, 94, .08);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 32, 39, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.card:hover::before {
    left: 100%;
}

.card:hover,
.article-card:hover,
.info-card:hover,
.role-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--red);
}

/* ── Listing grid ── */
.listing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Steps ── */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Articles ── */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Grid 3 ── */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Why us ── */
.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Testimonials ── */
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Team ── */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ── Values ── */
.values-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Tablet grids (768px+) */
@media (min-width: 768px) {
    .listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large tablet grids (1024px+) */
@media (min-width: 1024px) {
    .listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop grids (1200px+) */
@media (min-width: 1200px) {
    .listing-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Staggered animation for property cards */
.listing-grid .card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.listing-grid .card:nth-child(1) {
    animation-delay: 0.1s;
}

.listing-grid .card:nth-child(2) {
    animation-delay: 0.2s;
}

.listing-grid .card:nth-child(3) {
    animation-delay: 0.3s;
}

.listing-grid .card:nth-child(4) {
    animation-delay: 0.4s;
}

.listing-grid .card:nth-child(5) {
    animation-delay: 0.5s;
}

.listing-grid .card:nth-child(6) {
    animation-delay: 0.6s;
}

.listing-grid .card:nth-child(7) {
    animation-delay: 0.7s;
}

.listing-grid .card:nth-child(8) {
    animation-delay: 0.8s;
}

.listing-media {
    min-height: 200px;
    position: relative;
    /* Zoomed 15% and shifted up to crop out watermarks from imported portals */
    background: linear-gradient(160deg, rgba(8, 27, 57, .2), rgba(8, 27, 57, .55)), var(--image) center 30%/115% no-repeat;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: all 0.4s ease;
    overflow: hidden;
    will-change: transform, background-position, background-size, opacity;
    animation: listingKenBurns 12s ease-in-out infinite alternate;
}

.listing-media:hover {
    transform: scale(1.05);
}

.listing-grid .card:nth-child(3n + 1) .listing-media {
    animation-duration: 13s;
}

.listing-grid .card:nth-child(3n + 2) .listing-media {
    animation-duration: 15s;
    animation-direction: alternate-reverse;
}

.listing-grid .card:nth-child(3n) .listing-media {
    animation-duration: 17s;
}

.listing-grid .card:hover .listing-media {
    animation-play-state: paused;
    transform: scale(1.06);
}

.listing-grid .card.is-visible .listing-media {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

/* Zoom and shift gallery item images to hide portal watermarks */
.gallery-item {
    overflow: hidden;
    display: block;
}

.gallery-item img {
    transform: scale(1.15) !important;
    transform-origin: center 30% !important;
    transition: transform 0.2s !important;
}

.gallery-item:hover img {
    transform: scale(1.20) !important;
}

.listing-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(13, 45, 94, 0.14), rgba(212, 32, 39, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
    transform: translateY(6px);
}

.card:hover .listing-media::after {
    opacity: 1;
    transform: translateY(0);
}

.listing-media--detail {
    min-height: 380px;
    border-radius: var(--radius-lg);
}

.tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(13, 45, 94, .7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .15);
}

.tag.sale {
    background: rgba(212, 32, 39, .9);
}

.tag.rent {
    background: rgba(13, 45, 94, .85);
}

.listing-body {
    padding: 18px;
}

.listing-body h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--navy);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .88rem;
    color: var(--muted-color);
    margin-bottom: 10px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.chips li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: #3d5166;
    font-size: .82rem;
    font-weight: 700;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
}

.agent {
    font-size: .88rem;
    color: var(--muted-color);
}

.listing-summary {
    font-size: .9rem;
    color: var(--muted-color);
    margin-bottom: 12px;
}

/* ── Steps ── */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    padding: 28px;
}

.step-index {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(13, 45, 94, .12), rgba(212, 32, 39, .12));
    color: var(--navy);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.step-card p {
    color: var(--muted-color);
    font-size: .93rem;
}

/* ── Articles ── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    padding: 26px;
}

.article-card .date {
    font-size: .82rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.article-card h3 {
    font-size: 1.05rem;
    color: var(--navy);
    margin: 10px 0 8px;
}

.article-card p {
    font-size: .92rem;
    color: var(--muted-color);
}

/* ── Insight ── */
.insight {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 24px;
    align-items: center;
}

.insight-panel {
    padding: 32px;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, var(--navy-dark), var(--navy), var(--navy-mid));
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.insight-panel h3 {
    font-size: 1.6rem;
    letter-spacing: -.03em;
    margin-bottom: 12px;
}

.insight-panel p {
    color: rgba(255, 255, 255, .78);
}

.insight-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    gap: 12px;
}

.insight-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .78);
    font-size: .95rem;
}

.insight-list li::before {
    content: "✓";
    color: var(--red);
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

.insight-copy {
    color: var(--muted-color);
    line-height: 1.75;
}

/* ── CTA band ── */
.cta-band {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: #fff;
}

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 40px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}

.cta-box h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    margin-bottom: 10px;
}

.cta-box p {
    color: rgba(255, 255, 255, .78);
    max-width: 60ch;
    margin: 0;
}

/* ── Page hero (inner pages) ── */
.page-hero {
    padding: 48px 0 28px;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 85% 30%, rgba(212, 32, 39, .2) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -.03em;
    margin: 12px 0 10px;
}

.page-hero__text {
    color: rgba(255, 255, 255, .8);
    max-width: 60ch;
    font-size: 1.05rem;
}

.page-hero--detail .page-hero__inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
    align-items: center;
}

.detail-price {
    justify-self: end;
    padding: 18px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    text-align: right;
    backdrop-filter: blur(10px);
}

.detail-price strong {
    display: block;
    font-size: 1.85rem;
    margin-bottom: 6px;
}

.detail-price span {
    color: rgba(255, 255, 255, .75);
    font-size: .9rem;
}

/* ── Grid 3 ── */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Info cards ── */
.info-card {
    padding: 28px;
}

.info-card h2 {
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 10px;
}

.info-card p {
    color: var(--muted-color);
    font-size: .93rem;
}

.info-card__accent {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--navy), var(--red));
    margin-bottom: 16px;
}

.info-card--service {
    background: #fff;
}

/* ── Role cards ── */
.role-card {
    padding: 28px;
}

.role-card__type {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(13, 45, 94, .07);
    color: var(--navy);
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.role-card h2 {
    font-size: 1.15rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.role-card p {
    color: var(--muted-color);
    font-size: .93rem;
    margin-bottom: 18px;
}

/* ── Contact ── */
.contact-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 20px;
}

.contact-panel {
    padding: 28px;
}

.contact-panel h2 {
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 18px;
}

.contact-panel--soft {
    background: var(--surface-soft);
}

.contact-items {
    display: grid;
    gap: 12px;
}

.contact-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid rgba(13, 45, 94, .06);
}

.contact-item span {
    display: block;
    font-size: .82rem;
    color: var(--muted-color);
    margin-bottom: 3px;
}

.contact-item strong {
    color: var(--navy);
    font-size: .98rem;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Detail page ── */
.detail-layout {
    display: grid;
    grid-template-columns: 1.1fr .55fr;
    gap: 24px;
    align-items: start;
}

.detail-card {
    padding: 18px;
}

.detail-card__body {
    padding: 16px 4px 4px;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
}

.related-list {
    display: grid;
    gap: 8px;
}

.related-list a {
    display: block;
    padding: 11px 0;
    border-bottom: 1px solid rgba(13, 45, 94, .08);
    color: var(--navy);
    font-weight: 600;
    font-size: .93rem;
    transition: color .15s;
}

.related-list a:last-child {
    border-bottom: 0;
}

.related-list a:hover {
    color: var(--red);
}

/* ── Stats bar ── */
.stats-bar {
    background: var(--navy);
    color: #fff;
    padding: 24px 0;
}

.stats-bar__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    animation: countUp 0.7s ease-out;
}

.stat-item span {
    font-size: clamp(0.8rem, 2vw, 0.88rem);
    color: rgba(255, 255, 255, .7);
    line-height: 1.4;
}

/* Tablet stats */
@media (min-width: 480px) {
    .stats-bar__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Desktop stats */
@media (min-width: 1024px) {
    .stats-bar {
        padding: 28px 0;
    }

    .stats-bar__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* ── Why us ── */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.why-card {
    padding: 26px 22px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(13, 45, 94, .08);
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}

.why-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.why-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 45, 94, .1), rgba(212, 32, 39, .1));
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 1.6rem;
}

.why-card h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.why-card p {
    font-size: .88rem;
    color: var(--muted-color);
}

/* ── Testimonials ── */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testimonial-card {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(13, 45, 94, .08);
    box-shadow: var(--shadow);
}

.testimonial-card .stars {
    color: #f5a623;
    font-size: 1rem;
    margin-bottom: 12px;
}

.testimonial-card p {
    font-size: .93rem;
    color: var(--muted-color);
    font-style: italic;
    margin-bottom: 16px;
}

.testimonial-author strong {
    display: block;
    color: var(--navy);
    font-size: .93rem;
}

.testimonial-author span {
    font-size: .82rem;
    color: var(--muted-color);
}

/* ── Team ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.team-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid rgba(13, 45, 94, .08);
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}

.team-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--red));
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 800;
}

.team-card h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.team-card span {
    font-size: .85rem;
    color: var(--red);
    font-weight: 600;
}

.team-card p {
    font-size: .88rem;
    color: var(--muted-color);
    margin-top: 8px;
}

/* ── Values ── */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.value-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
}

.value-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.value-card p {
    color: rgba(255, 255, 255, .75);
    font-size: .92rem;
}

.value-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(212, 32, 39, .5);
    line-height: 1;
    margin-bottom: 10px;
}

/* ── Enhanced Footer ── */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, .7);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 32, 39, 0.5), transparent);
}

/* Newsletter Section */
.footer-newsletter {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    padding: 48px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    position: relative;
}

.footer-newsletter::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(212, 32, 39, .15) 0%, transparent 50%);
    pointer-events: none;
}

.footer-newsletter .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.newsletter-content h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.newsletter-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .8);
    margin: 0;
    max-width: 50ch;
}

.newsletter-form {
    display: flex;
    justify-content: flex-end;
}

.newsletter-input-group {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, .1);
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 100%;
}

.newsletter-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

.newsletter-input-group input::placeholder {
    color: rgba(255, 255, 255, .6);
}

.newsletter-input-group .btn {
    margin: 0;
    padding: 12px 24px;
    min-height: auto;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Main Footer Grid */
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.site-footer__brand {
    max-width: 350px;
}

.site-footer__brand p {
    font-size: .95rem;
    margin: 20px 0 24px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .75);
}

.footer-logo-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-decoration: none;
    margin-bottom: 4px;
}

.footer-brand-name {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.footer-column h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
}

.footer-column h4::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--red);
    border-radius: 1px;
}

.site-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.site-footer__links li {
    line-height: 1.5;
}

.site-footer__links a {
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
    transition: all .2s ease;
    display: inline-block;
}

.site-footer__links a:hover {
    color: var(--red);
    transform: translateX(4px);
}

.site-footer__links strong {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

/* Social Media Links */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    display: grid;
    place-items: center;
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
    transition: all .3s ease;
}

.footer-social a:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    transform: translateY(-2px);
}

/* Footer Bottom */
.site-footer__bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px 0;
    font-size: .88rem;
    color: rgba(255, 255, 255, .5);
}

.footer-bottom-left,
.footer-bottom-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom-right {
    align-items: flex-end;
    text-align: right;
}

.footer-legal-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, .6);
    font-size: .8rem;
    transition: color .2s ease;
}

.footer-legal-links a:hover {
    color: var(--red);
}

.footer-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-badges .badge {
    padding: 4px 10px;
    background: rgba(212, 32, 39, .2);
    border: 1px solid rgba(212, 32, 39, .3);
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    color: rgba(212, 32, 39, .9);
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* ============================================================
   ENHANCED RESPONSIVE DESIGN
   Mobile-First Approach with Proper Breakpoints
   ============================================================ */

/* ── Enhanced Mobile Optimizations ── */
@media (max-width: 320px) {
    .container {
        width: calc(100% - 16px);
    }

    .btn {
        min-height: 44px;
        padding: 0 20px;
        font-size: 0.9rem;
    }

    .site-header__inner {
        min-height: 90px;
        padding: 8px 0;
    }

    .site-logo {
        height: 70px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 40px 0;
    }
}

/* ── Small Mobile (480px) ── */
@media (max-width: 480px) {
    .container {
        width: calc(100% - 20px);
    }

    .btn {
        min-height: 48px;
        padding: 0 24px;
    }

    .site-header__inner {
        min-height: 100px;
        padding: 10px 0;
    }

    .site-logo {
        height: 75px;
    }

    .hero {
        padding: 48px 0 40px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero__text {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .search-panel {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-actions {
        flex-direction: column;
        gap: 12px;
    }

    .search-actions .btn {
        width: 100%;
    }

    .section {
        padding: 48px 0;
    }

    .page-hero {
        padding: 40px 0 28px;
    }

    .listing-grid {
        gap: 16px;
    }

    .card,
    .step-card,
    .article-card,
    .info-card,
    .role-card {
        margin-bottom: 0;
    }

    .listing-body {
        padding: 16px;
    }

    .chips {
        gap: 4px;
    }

    .chips li {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .price {
        font-size: 1.1rem;
    }

    .stats-bar {
        padding: 24px 0;
    }

    .stats-bar__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-item strong {
        font-size: 1.5rem;
    }

    .site-footer {
        padding: 40px 0 0;
    }

    .site-footer__grid {
        gap: 24px;
        padding-bottom: 32px;
    }

    .site-footer__brand p {
        font-size: 0.9rem;
    }

    .site-footer h4 {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .site-footer__links {
        gap: 8px;
    }

    .site-footer__links a {
        font-size: 0.85rem;
    }

    .site-footer__bottom {
        padding: 16px 0;
        font-size: 0.8rem;
        text-align: center;
    }
}

/* ── Mobile Portrait (768px) ── */
@media (max-width: 768px) {
    .container {
        width: calc(100% - 24px);
    }

    /* Header & Navigation */
    .site-header__inner {
        min-height: 110px;
        padding: 12px 0;
    }

    .site-logo {
        height: 80px;
    }

    .site-logo--footer {
        height: 110px;
    }

    .site-header__cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .nav-toggle span {
        width: 20px;
        height: 2.5px;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 12px;
        right: 12px;
        display: grid;
        gap: 6px;
        padding: 16px;
        border-radius: 20px;
        background: rgba(255, 255, 255, .98);
        border: 1px solid rgba(13, 45, 94, .1);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
        margin-left: 0;
        z-index: 1000;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav__link {
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 600;
        transition: all 0.2s ease;
    }

    .site-nav__link:hover,
    .site-nav__link.is-active {
        background: rgba(13, 45, 94, .08);
        color: var(--red);
        transform: translateX(4px);
    }

    /* Hero Section */
    .hero {
        padding: 56px 0 48px;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero__metrics {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .metric {
        padding: 20px;
        text-align: center;
    }

    .metric strong {
        font-size: 1.6rem;
    }

    /* Search Panel */
    .search-panel {
        padding: 24px;
        border-radius: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    .search-actions .btn {
        width: 100%;
        min-height: 52px;
    }

    /* Sections */
    .section {
        padding: 56px 0;
    }

    .page-hero {
        padding: 48px 0 32px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 28px;
    }

    .section-heading h2 {
        margin-bottom: 12px;
    }

    /* Grids */
    .listing-grid,
    .steps,
    .article-grid,
    .grid-3,
    .why-grid,
    .team-grid,
    .values-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-bar__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Cards */
    .card,
    .step-card,
    .article-card,
    .info-card,
    .role-card,
    .why-card,
    .team-card,
    .testimonial-card {
        transition: all 0.3s ease;
    }

    .card:hover,
    .step-card:hover,
    .article-card:hover,
    .info-card:hover,
    .role-card:hover,
    .why-card:hover,
    .team-card:hover,
    .testimonial-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    /* Property Cards */
    .listing-body {
        padding: 20px;
    }

    .listing-media {
        min-height: 220px;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .price {
        font-size: 1.3rem;
    }

    /* CTA */
    .cta-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px;
        gap: 20px;
    }

    .cta-box .btn {
        width: 100%;
        min-height: 52px;
    }

    /* Enhanced Footer Responsive */
    .footer-newsletter .container {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .newsletter-content h3 {
        font-size: 1.5rem;
    }

    .newsletter-form {
        justify-content: center;
    }

    .newsletter-input-group {
        flex-direction: column;
        gap: 12px;
        padding: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
    }

    .newsletter-input-group input {
        background: rgba(255, 255, 255, .1);
        border: 1px solid rgba(255, 255, 255, .15);
        border-radius: 999px;
        text-align: center;
        padding: 14px 20px;
        width: 100%;
    }

    .newsletter-input-group .btn {
        width: 100%;
        padding: 14px 24px;
    }

    /* Footer */
    .site-footer {
        padding: 40px 0 0;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 32px;
    }

    .site-footer__brand {
        text-align: center;
        max-width: none;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h4 {
        text-align: center;
        margin-bottom: 16px;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .site-footer__links {
        text-align: center;
        gap: 12px;
    }

    .footer-social {
        justify-content: center;
        margin-top: 16px;
    }

    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
        padding: 20px 0;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        align-items: center;
        text-align: center;
    }

    .footer-legal-links {
        justify-content: center;
    }

    .footer-badges {
        justify-content: center;
    }

    /* Layout Pages */
    .contact-layout,
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .insight {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .page-hero--detail .page-hero__inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-price {
        justify-self: start;
        text-align: left;
        padding: 20px 24px;
    }

    .detail-price strong {
        font-size: 1.8rem;
    }
}

/* ── Tablet Portrait (1024px) ── */
@media (max-width: 1024px) {
    .container {
        width: calc(100% - 32px);
    }

    /* Grids - 2 columns for tablets */
    .listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-grid,
    .steps,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Newsletter responsive for tablets */
    .footer-newsletter .container {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .newsletter-input-group {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Footer responsive for tablets */
    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
        text-align: center;
        max-width: none;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        align-items: center;
        text-align: center;
    }

    /* Layout adjustments */
    .hero__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .insight,
    .detail-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-price {
        justify-self: start;
        text-align: left;
    }

    .grid-3,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-hero--detail .page-hero__inner {
        grid-template-columns: 1fr;
    }

    /* Enhanced touch targets for tablets */
    .btn {
        min-height: 50px;
        padding: 0 28px;
    }

    .site-nav__link {
        padding: 12px 16px;
    }

    /* Form improvements */
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    select,
    input,
    textarea {
        min-height: 50px;
        padding: 0 16px;
    }
}

/* ── Large Tablet/Small Desktop (1440px) ── */
@media (max-width: 1440px) {
    .container {
        width: min(var(--container), calc(100% - 40px));
    }

    .listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .why-grid,
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-grid,
    .steps,
    .testimonial-grid,
    .grid-3,
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Enhanced Animations for Mobile ── */
@media (max-width: 768px) {

    /* Reduce motion for mobile performance */
    .card,
    .step-card,
    .article-card,
    .info-card,
    .role-card,
    .why-card,
    .team-card,
    .testimonial-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    /* Simplified hover effects for touch devices */
    @media (hover: none) {

        .card:hover,
        .step-card:hover,
        .article-card:hover,
        .info-card:hover,
        .role-card:hover,
        .why-card:hover,
        .team-card:hover,
        .testimonial-card:hover {
            transform: none;
        }

        .btn:hover {
            transform: none;
        }

        .listing-media:hover {
            transform: none;
        }
    }

    /* Touch-friendly active states */
    .btn:active {
        transform: scale(0.98);
    }

    .card:active,
    .step-card:active,
    .article-card:active {
        transform: scale(0.98);
    }
}

/* ── Accessibility Improvements ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ── High DPI Displays ── */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .site-logo,
    .site-logo--footer {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ── Insight list on light bg ── */
.insight-list--light li {
    color: var(--muted-color);
}

.insight-list--light li::before {
    color: var(--red);
}

/* ── Enhanced Mobile Optimizations ── */

/* Prevent horizontal scroll on all devices */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced touch targets */
@media (max-width: 768px) {

    /* Better form inputs */
    input,
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Better card spacing */
    .card,
    .step-card,
    .article-card,
    .info-card,
    .role-card,
    .why-card,
    .team-card,
    .testimonial-card {
        padding: 20px;
    }

    /* Improved typography */
    h1 {
        line-height: 1.1;
    }

    h2 {
        line-height: 1.2;
    }

    h3 {
        line-height: 1.3;
    }

    /* Improved grid gaps */
    .listing-grid,
    .steps,
    .article-grid,
    .grid-3,
    .why-grid,
    .team-grid,
    .values-grid,
    .testimonial-grid {
        gap: 16px;
    }
}

/* Enhanced loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Smooth scrolling with offset for fixed header */
html {
    scroll-padding-top: 120px;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default focus outline */
*:focus {
    outline: none;
}

/* Enhanced image loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Better table responsiveness */
@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px 4px;
    }
}

/* Enhanced print styles */
@media print {

    .site-header,
    .site-footer,
    .floating-whatsapp,
    .nav-toggle {
        display: none !important;
    }

    .section {
        padding: 20px 0;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
        font-weight: 700;
    }

    .card {
        border-width: 2px;
    }

    .site-nav__link:hover,
    .site-nav__link.is-active {
        background: var(--navy);
        color: #fff;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-whatsapp {
        animation: none;
    }
}

/* Prevent automatic browser dark mode styling and force the light theme globally */
html,
body {
    background: #ffffff !important;
    color: #111827 !important;
}

img,
video,
iframe,
.card,
.property-card,
.section,
.container,
.navbar,
.footer {
    filter: none !important;
}

* {
    forced-color-adjust: none !important;
}

.property-card {
    background: #ffffff !important;
    opacity: 1 !important;
}

img {
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

/* Enhanced viewport units for mobile browsers */
:root {
    --vh: 1vh;
}

.full-height {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
}

/* Better safe area handling for notched devices */
@supports (padding: max(0px)) {

    .site-header__inner,
    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .floating-whatsapp {
        right: max(30px, env(safe-area-inset-right) + 10px);
        bottom: max(30px, env(safe-area-inset-bottom) + 10px);
    }
}

/* Enhanced form validation styles */
.field.error input,
.field.error textarea,
.field.error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.field.success input,
.field.success textarea,
.field.success select {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}

.success-message {
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}

/* Better skeleton loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Enhanced sticky elements */
.sticky {
    position: sticky;
    top: 120px;
    /* Account for header height */
}

/* Better modal/overlay handling */
.modal-open {
    overflow: hidden;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Enhanced notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.warning {
    border-left: 4px solid #ffc107;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}