/* ============================================================
   SolucionaFacil.es — Brand CSS v3
   Consultora de Transformación Digital con IA
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── BRAND VARIABLES ──────────────────────────────────────── */
:root {
    --sf-blue-dark:    #0D1B3E;
    --sf-blue-mid:     #1A3A6B;
    --sf-blue-accent:  #2D7DD2;
    --sf-blue-light:   #7EB8F7;
    --sf-blue-pale:    #C8DEFF;
    --sf-bg-light:     #F7F8FA;
    --sf-bg-white:     #FFFFFF;
    --sf-text-dark:    #1A1A2E;
    --sf-text-mid:     #444444;
    --sf-border:       #E8EDF5;
    --ghost-accent-color: #2D7DD2 !important;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── BASE ─────────────────────────────────────────────────── */
body {
    font-family: var(--font-sans) !important;
    color: var(--sf-text-dark);
    background: var(--sf-bg-white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    /* No color override here — let inline styles and context decide */
}

/* ── HIDE CASPER HEADER / FOOTER (replaced by custom) ─────── */
.gh-head-brand,
.gh-head-menu,
.gh-head-actions,
.gh-head-inner,
.site-footer {
    display: none !important;
}

/* ── CUSTOM HEADER ────────────────────────────────────────── */
.sf-header {
    background: var(--sf-blue-dark) !important;
    border-bottom: none !important;
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

.sf-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.sf-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* ── MAIN NAV ─────────────────────────────────────────────── */
.sf-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.sf-nav a {
    color: rgba(255,255,255,0.95) !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
    text-decoration: none !important;
    padding: 10px 18px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.sf-nav a:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}

/* ── CTA BUTTON ───────────────────────────────────────────── */
.sf-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sf-cta-btn {
    background: var(--sf-blue-accent) !important;
    color: #fff !important;
    padding: 11px 22px !important;
    border-radius: 7px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    font-family: 'Inter', sans-serif !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
    display: inline-block;
}

.sf-cta-btn:hover {
    background: #2470c4 !important;
    color: #fff !important;
}

/* ── MOBILE BURGER ────────────────────────────────────────── */
.sf-burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* ── MOBILE NAV ───────────────────────────────────────────── */
.sf-mobile-nav {
    display: none;
    flex-direction: column;
    background: #0a1528;
    padding: 16px 40px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sf-mobile-nav a {
    color: rgba(255,255,255,0.88) !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    text-decoration: none !important;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    display: block;
}

.sf-mobile-nav.is-open {
    display: flex !important;
}

/* ── PAGE CONTENT ─────────────────────────────────────────── */
.site-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove ALL Casper auto-spacing on page templates — our sections handle their own */
article.gh-article,
.gh-article,
.gh-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Casper page-template adds max(12vmin,64px) top/bottom margin to first/last child */
.page-template .gh-content > :first-child,
.page-template .gh-content:only-child > :first-child {
    margin-top: 0 !important;
}

.page-template .gh-content > :last-child {
    margin-bottom: 0 !important;
}

/* The kg-html-card itself must not add spacing */
.kg-html-card {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Force Inter on ALL text inside pages */
.gh-content *,
.kg-html-card * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* ── FIX: Hero section first-child padding reduction (70%) ── */
/* Original padding: 80px 40px → reduced to 24px 40px */
.kg-html-card section:first-child {
    padding-top: 24px !important;
    padding-bottom: 28px !important;
}

/* ── FIX: Headings respect inline color (no override) ─────── */
.kg-html-card h1,
.kg-html-card h2,
.kg-html-card h3 {
    /* color intentionally not set — inline styles take effect */
}

/* Ensure headings inside pages are bold */
.kg-html-card h1,
.kg-html-card h2,
.kg-html-card h3 {
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

/* ── FIX: Body text size 2x on service pages ─────────────── */
.kg-html-card p {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
}

/* Card titles */
.kg-html-card div[style*="border:2px solid"] h2,
.kg-html-card div[style*="border: 2px solid"] h2 {
    font-size: 1.15rem !important;
    color: #0D1B3E !important;
}

/* Card body text */
.kg-html-card div[style*="border:2px solid"] p,
.kg-html-card div[style*="border: 2px solid"] p {
    font-size: 1rem !important;
    color: #444 !important;
}

.gh-content {
    padding: 0 !important;
    max-width: 100% !important;
}

.gh-content > * + * {
    margin-top: 0 !important;
}

.kg-html-card {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.article-header,
.gh-article-header {
    display: none !important;
}

/* ── CUSTOM FOOTER ────────────────────────────────────────── */
.sf-footer {
    background: var(--sf-blue-dark);
    color: rgba(255,255,255,0.7);
    padding: 64px 40px 40px;
}

.sf-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}

.sf-footer-tagline {
    color: rgba(255,255,255,0.6);
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 12px 0 16px;
    max-width: 280px;
}

.sf-footer-copy {
    color: rgba(255,255,255,0.35);
    font-size: 1.1rem;
    margin: 0;
}

.sf-footer-nav-title {
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 16px;
}

.sf-footer-nav {
    display: flex;
    flex-direction: column;
}

.sf-footer-nav a {
    color: rgba(255,255,255,0.8) !important;
    font-size: 1.2rem !important;
    font-family: 'Inter', sans-serif !important;
    text-decoration: none !important;
    padding: 9px 0;
    transition: color 0.15s;
}

.sf-footer-nav a:hover {
    color: var(--sf-blue-light) !important;
}

/* ── BLOG CARDS ───────────────────────────────────────────── */
.post-card {
    border: 2px solid var(--sf-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s !important;
}

.post-card:hover {
    box-shadow: 0 8px 32px rgba(13,27,62,0.12) !important;
    transform: translateY(-2px) !important;
}

.post-card-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--sf-blue-dark) !important;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .sf-nav { display: none !important; }
    .sf-burger { display: block !important; }
    .sf-cta-btn { display: none !important; }

    .sf-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .sf-header-inner {
        padding: 0 20px;
    }

    .sf-footer {
        padding: 48px 20px 32px;
    }

    .sf-footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
