/* ═══════════════════════════════════════════════════════════════
   hipotecaideal.es — Premium Mortgage Broker Website
   Color: Navy #0a1628 + Gold #c9a84c + Cream #faf8f4
   Fonts: DM Serif Display (headings) + Plus Jakarta Sans (body)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --navy: #0a1628;
    --navy-light: #121f3d;
    --navy-mid: #1a2d52;
    --gold: #c9a84c;
    --gold-light: #e2c87a;
    --gold-dark: #a68a3a;
    --cream: #faf8f4;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #6b7280;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(10,22,40,.08);
    --shadow-lg: 0 12px 48px rgba(10,22,40,.12);
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --max-w: 1200px;
    --max-w-narrow: 780px;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* ─── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    color: var(--navy);
    line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: .6em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { margin-bottom: 1em; }
.lead { font-size: 1.15em; color: var(--gray-600); line-height: 1.8; }

/* ─── LAYOUT ────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); }
.section { padding: 80px 0; }

/* ─── HEADER ────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    border-bottom: 1px solid rgba(201,168,76,.15);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    color: var(--white);
    letter-spacing: -0.01em;
}
.logo-dot { color: var(--gold); }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .02em;
}
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.nav-cta {
    background: var(--gold) !important;
    color: var(--navy) !important;
    padding: 8px 20px;
    border-radius: 100px;
    font-weight: 600 !important;
    font-size: .85rem !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }
.header-badge {
    background: rgba(201,168,76,.08);
    text-align: center;
    padding: 6px;
    font-size: .75rem;
    color: var(--gold);
    letter-spacing: .05em;
    font-weight: 500;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
    background: var(--navy);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 40%, rgba(201,168,76,.06) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(201,168,76,.04) 0%, transparent 50%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block;
    background: rgba(201,168,76,.12);
    color: var(--gold);
    padding: 8px 20px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    margin-bottom: 28px;
}
.hero h1 { color: var(--white); max-width: 700px; margin: 0 auto 20px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-sub {
    color: rgba(255,255,255,.65);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-trust {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}
.hero-trust span {
    color: rgba(255,255,255,.5);
    font-size: .85rem;
    font-weight: 500;
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: .01em;
}
.btn-gold {
    background: var(--gold);
    color: var(--navy);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(201,168,76,.3); }
.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(201,168,76,.5);
    color: var(--gold);
}
.btn-outline:hover { border-color: var(--gold); background: rgba(201,168,76,.08); }
.btn-full { width: 100%; }

/* ─── PAGE HERO ─────────────────────────────────────────────── */
.page-hero {
    background: var(--navy);
    padding: 56px 0 48px;
    text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.6); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ─── BREADCRUMB ────────────────────────────────────────────── */
.breadcrumb {
    font-size: .85rem;
    margin-bottom: 16px;
    color: rgba(255,255,255,.4);
}
.breadcrumb a { color: rgba(255,255,255,.55); }
.breadcrumb a:hover { color: var(--gold); }
.article-content .breadcrumb { color: var(--gray-400); }
.article-content .breadcrumb a { color: var(--gray-600); }

/* ─── SERVICES GRID ─────────────────────────────────────────── */
.services-section { padding: 80px 0; background: var(--cream); }
.section-sub { color: var(--gray-600); text-align: center; max-width: 500px; margin: -8px auto 48px; }
.services-section h2 { text-align: center; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.service-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.service-card h3 { font-size: 1rem; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; }

.services-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.service-detail-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.service-detail-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.service-icon-lg { font-size: 2.5rem; display: block; margin-bottom: 16px; }
.service-detail-card h3 { margin-bottom: 8px; }
.service-detail-card p { color: var(--gray-600); font-size: .9rem; }
.card-link { color: var(--gold); font-weight: 600; font-size: .9rem; display: inline-block; margin-top: 12px; }

/* ─── STEPS ─────────────────────────────────────────────────── */
.how-section { padding: 80px 0; background: var(--white); }
.how-section h2 { text-align: center; margin-bottom: 48px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step {
    text-align: center;
    position: relative;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--gray-600); font-size: .9rem; }

/* ─── DIFF SECTION ──────────────────────────────────────────── */
.diff-section { padding: 80px 0; background: var(--navy); }
.diff-section h2 { text-align: center; color: var(--white); margin-bottom: 48px; }
.diff-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.diff-card {
    background: var(--navy-light);
    border-radius: var(--radius);
    padding: 32px 28px;
    border: 1px solid rgba(201,168,76,.12);
}
.diff-card h3 { color: var(--gold); margin-bottom: 8px; font-size: 1.15rem; }
.diff-card p { color: rgba(255,255,255,.6); font-size: .95rem; margin: 0; }

/* ─── BLOG ──────────────────────────────────────────────────── */
.blog-section { padding: 80px 0; background: var(--gray-50); }
.blog-section h2 { text-align: center; margin-bottom: 40px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.blog-card, .blog-card-lg {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: block;
}
.blog-card:hover, .blog-card-lg:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.blog-cat {
    display: inline-block;
    background: rgba(201,168,76,.12);
    color: var(--gold-dark);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
    margin-bottom: 12px;
}
.blog-card h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card-lg h2 { font-size: 1.2rem; margin-bottom: 8px; }
.blog-date { color: var(--gray-400); font-size: .8rem; }
.blog-list { display: flex; flex-direction: column; gap: 20px; }
.section-cta { text-align: center; margin-top: 36px; }
.related-section { padding: 60px 0; background: var(--gray-50); }

/* ─── ARTICLE ───────────────────────────────────────────────── */
.article-content {
    padding: 48px 0 60px;
}
.article-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}
.article-header h1 { margin: 12px 0 8px; }
.article-header time { color: var(--gray-400); font-size: .85rem; }
.article-content h2 {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--gray-100);
    font-size: 1.5rem;
}
.article-content h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.article-content p { color: var(--gray-800); }
.article-content strong { color: var(--navy); }

/* ─── FAQ ───────────────────────────────────────────────────── */
.faq-section {
    padding: 60px 0;
    max-width: var(--max-w-narrow);
    margin: 0 auto;
}
.faq-section h2 { text-align: center; margin-bottom: 36px; }
.faq-item {
    border-bottom: 1px solid var(--gray-200);
}
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    text-align: left;
    font-family: 'Plus Jakarta Sans', sans-serif;
    gap: 16px;
}
.faq-icon {
    font-size: 1.4rem;
    color: var(--gold);
    flex-shrink: 0;
    transition: var(--transition);
}
.faq-q.open .faq-icon { transform: rotate(45deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.faq-a p { color: var(--gray-600); padding-bottom: 20px; }

/* ─── CTA SECTION ───────────────────────────────────────────── */
.cta-section {
    padding: 80px 0;
    background: var(--navy);
    text-align: center;
}
.cta-section h2 { color: var(--white); margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,.6); max-width: 480px; margin: 0 auto 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── SIMULATOR ─────────────────────────────────────────────── */
.simulator-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.sim-group { margin-bottom: 20px; }
.sim-group label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.sim-group input, .sim-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--gray-50);
}
.sim-group input:focus, .sim-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.sim-result {
    margin: 24px 0;
    padding: 24px;
    background: var(--navy);
    border-radius: var(--radius);
}
.sim-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.sim-result-item + .sim-result-item { border-top: 1px solid rgba(255,255,255,.1); }
.sim-label { color: rgba(255,255,255,.6); font-size: .9rem; }
.sim-value { color: var(--gold); font-family: 'DM Serif Display', serif; font-size: 1.25rem; }
.sim-disclaimer { color: var(--gray-400); font-size: .8rem; text-align: center; margin: 16px 0; }

/* ─── CONTACT ───────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-form-wrap {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--gray-50);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-group textarea { resize: vertical; }
.form-legal { font-size: .8rem; color: var(--gray-400); text-align: center; margin-top: 12px; }
.form-legal a { color: var(--gold-dark); text-decoration: underline; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.contact-card h3 { font-size: 1rem; margin-bottom: 4px; font-family: 'Plus Jakarta Sans', sans-serif; }
.contact-card a { color: var(--gold-dark); font-weight: 600; }
.contact-card.highlight {
    background: var(--navy);
    border-color: transparent;
}
.contact-card.highlight p { color: rgba(255,255,255,.7); margin: 0; font-size: .9rem; }

/* ─── FOOTER ────────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    padding: 60px 0 0;
    color: rgba(255,255,255,.5);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    color: var(--white);
    display: block;
    margin-bottom: 12px;
}
.footer-brand .gold { color: var(--gold); }
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 {
    color: var(--white);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    font-size: .9rem;
    padding: 4px 0;
    color: rgba(255,255,255,.5);
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: .8rem;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: var(--gold); }

/* ─── WHATSAPP FLOAT ────────────────────────────────────────── */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,.4);
    z-index: 90;
    transition: var(--transition);
}
.wa-float:hover { transform: scale(1.1); }

/* ─── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .diff-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    body { font-size: 16px; }
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        transform: translateY(-120%);
        transition: var(--transition);
        border-top: 1px solid rgba(201,168,76,.1);
    }
    .main-nav.open { transform: translateY(0); }
    .hero { padding: 60px 0 48px; }
    .section, .services-section, .how-section, .diff-section, .blog-section { padding: 48px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .steps-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .simulator-card { padding: 28px 20px; }
    .contact-form-wrap { padding: 28px 20px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
}

/* ─── NICHE PAGES EXTRA ─────────────────────────────────────── */
.cat-heading {
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}
.cat-heading:first-of-type { margin-top: 0; }
.niche-callout {
    margin: 36px 0;
    padding: 28px;
    background: var(--navy);
    border-radius: var(--radius);
    text-align: center;
}
.niche-callout p { color: rgba(255,255,255,.7); margin-bottom: 16px; }
.niche-callout .btn { display: inline-flex; }
