/* Off Plan News — Shared Styles */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap");

/* ── Variables ──────────────────────────────────── */
:root {
    --primary: #003087;
    --primary-dark: #001a4d;
    --primary-mid: #004db3;
    --accent: #c8a951;
    --accent-light: #e0c070;
    --bg: #f7f5f0;
    --bg-card: #ffffff;
    --text: #1c1c2e;
    --text-muted: #5c6478;
    --text-light: #8892a4;
    --success: #0a7c4e;
    --warning: #c05c00;
    --header-height: 64px;
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --shadow-sm: 0 1px 4px rgba(0, 48, 135, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 48, 135, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 48, 135, 0.13), 0 4px 8px rgba(0, 0, 0, 0.06);
    --radius: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --container: 1200px;
}

/* ── Reset ──────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--primary-mid);
}
button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
}
ul {
    list-style: none;
}

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

/* ── Ticker ─────────────────────────────────────── */
.ticker-bar {
    background: var(--primary-dark);
    padding: 7px 0;
    overflow: hidden;
}
.ticker-track {
    display: flex;
    gap: 64px;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}
.ticker-item {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.025em;
    flex-shrink: 0;
}
.ticker-item .val {
    color: var(--accent);
    font-weight: 700;
    margin-left: 6px;
}
.ticker-item .up {
    color: #4ade80;
}
.ticker-item .dn {
    color: #f87171;
}
@keyframes ticker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ── Header ─────────────────────────────────────── */
.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 200;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 32px;
}
.logo {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}
.logo:hover {
    color: white;
}
.logo-accent {
    color: var(--accent);
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0;
}
.main-nav li {
    position: relative;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.15s;
    letter-spacing: 0.01em;
}
.main-nav a:hover {
    color: white;
}
.main-nav li.active > a {
    color: white;
}
.main-nav .nav-tools > a {
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 3px;
    margin-left: 6px;
}
.main-nav .nav-tools > a:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
}

/* Dropdown */
.has-dropdown > a::after {
    content: "▾";
    font-size: 9px;
    margin-left: 4px;
    opacity: 0.5;
}
.dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: #0f1a35;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.16s;
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    padding: 9px 14px;
    border-radius: var(--radius);
    display: block;
    transition:
        color 0.12s,
        background 0.12s;
}
.dropdown li a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
}

/* Mobile */
.mobile-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.mobile-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: 0.2s;
}

/* ── Footer ─────────────────────────────────────── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.65);
    padding: 64px 0 32px;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand .logo {
    font-size: 19px;
    margin-bottom: 14px;
    display: block;
}
.footer-brand p {
    font-size: 13.5px;
    line-height: 1.75;
    max-width: 270px;
}
.footer-col h4 {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.15s;
}
.footer-col a:hover {
    color: white;
}
.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.38);
}
.footer-disclaimer {
    max-width: 640px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 20px;
    padding-top: 20px;
}

/* ── Typography ─────────────────────────────────── */
h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.2;
}
h4,
h5,
h6 {
    font-family: var(--font-body);
}
.section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.page-intro {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 620px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-mid);
    color: white;
}
.btn-accent {
    background: var(--accent);
    color: var(--primary-dark);
}
.btn-accent:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-outline-white {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}
.btn-lg {
    padding: 14px 30px;
    font-size: 15px;
}

/* ── Category Badges ─────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
}
.badge-market {
    background: #e8f0ff;
    color: #003087;
}
.badge-legal {
    background: #fff3e0;
    color: #c05c00;
}
.badge-taxes {
    background: #e8f5e9;
    color: #0a7c4e;
}
.badge-developers {
    background: #f3e8ff;
    color: #5b21b6;
}
.badge-finance {
    background: #e0f7fa;
    color: #006d82;
}
.badge-areas {
    background: #fbe9e7;
    color: #bf360c;
}
.badge-roi {
    background: #f0fdf4;
    color: #166534;
}
.badge-buying {
    background: #e3f2fd;
    color: #0d47a1;
}
.badge-life {
    background: #fff8e1;
    color: #7c5100;
}
.badge-expat {
    background: #fce4ec;
    color: #880e4f;
}

/* ── Article Cards ───────────────────────────────── */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        box-shadow 0.2s,
        transform 0.2s;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.article-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.article-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.article-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11.5px;
    color: var(--text-muted);
}
.article-meta .dot {
    opacity: 0.4;
}
.article-body h3 {
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    color: var(--text);
    flex: 1;
}
.article-body h3 a {
    color: var(--text);
}
.article-body h3 a:hover {
    color: var(--primary);
}
.article-body p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 16px;
}
.read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}
.read-more .arr {
    transition: transform 0.15s;
}
.article-card:hover .arr {
    transform: translateX(4px);
}

/* ── Stat Cards ──────────────────────────────────── */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    border-top: 2px solid var(--accent);
}
.stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}
.stat-change {
    font-size: 12.5px;
    font-weight: 600;
}
.stat-change.up {
    color: var(--success);
}
.stat-change.dn {
    color: var(--warning);
}

/* ── Forms ───────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 13px;
    border: none;
    border-radius: var(--radius);
    font-size: 14.5px;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    transition:
        box-shadow 0.15s,
        background 0.15s;
    appearance: none;
}
.form-control:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.12);
}
.form-control::placeholder {
    color: var(--text-light);
}
.input-wrap {
    position: relative;
}
.input-prefix {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}
.has-prefix {
    padding-left: 56px;
}

/* ── Tool Cards ──────────────────────────────────── */
.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}
.tool-card-header {
    margin-bottom: 24px;
}
.tool-card-header h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}
.tool-card-header p {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* Result box inside tools */
.result-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    color: white;
    margin-top: 20px;
}
.result-box .res-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
}
.result-box .res-total {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 16px;
}
.result-box .res-rows {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 14px;
}
.res-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 0;
}
.res-row.bold {
    color: white;
    font-weight: 700;
    font-size: 14.5px;
}

/* ── Page Header ─────────────────────────────────── */
.page-header {
    background: #111827;
    padding: 52px 0 48px;
    color: white;
    position: relative;
    overflow: hidden;
}
.page-header .section-label {
    color: var(--accent);
    position: relative;
}
.page-header h1 {
    color: white;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    position: relative;
    margin-bottom: 12px;
}
.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    max-width: 600px;
    position: relative;
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary);
}
.breadcrumb .sep {
    opacity: 0.4;
    font-size: 11px;
}

/* ── Section divider ────────────────────────────── */
.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 48px 0;
}

/* ── Grid helpers ───────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Utility ─────────────────────────────────────── */
.text-accent {
    color: var(--accent);
}
.text-primary {
    color: var(--primary);
}
.text-muted {
    color: var(--text-muted);
}
.text-center {
    text-align: center;
}
.font-display {
    font-family: var(--font-display);
}
.mt-2 {
    margin-top: 8px;
}
.mt-4 {
    margin-top: 16px;
}
.mt-6 {
    margin-top: 24px;
}
.mt-8 {
    margin-top: 32px;
}
.mt-12 {
    margin-top: 48px;
}
.mb-4 {
    margin-bottom: 16px;
}
.mb-6 {
    margin-bottom: 24px;
}
.mb-8 {
    margin-bottom: 32px;
}

/* ── Animations ──────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes growBar {
    from {
        width: 0;
    }
}

.anim-up {
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}
.d1 {
    animation-delay: 0.1s;
}
.d2 {
    animation-delay: 0.2s;
}
.d3 {
    animation-delay: 0.3s;
}
.d4 {
    animation-delay: 0.4s;
}
.d5 {
    animation-delay: 0.5s;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--primary-dark);
        padding: 16px;
        z-index: 199;
        max-height: 80vh;
        overflow-y: auto;
    }
    .main-nav.open ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav.open li {
        width: 100%;
    }
    .main-nav.open a {
        padding: 12px 16px;
    }
    .has-dropdown > a::after {
        float: right;
    }
    .dropdown {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border-left: 3px solid var(--accent);
        background: rgba(255, 255, 255, 0.04);
        margin-top: 4px;
        margin: 4px 0 8px 16px;
        min-width: 0;
    }
    .dropdown li a {
        color: rgba(255, 255, 255, 0.7);
    }
    .mobile-btn {
        display: flex;
    }
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
