/*
Theme Name: Tasacion Profesional
Author: Tasacion Profesional
Description: Theme personalizado para servicios de tasación inmobiliaria
Version: 1.0
Text Domain: tasacion-profesional
*/

:root {
    --color-primary: #1a3a5c;
    --color-secondary: #c9a227;
    --color-accent: #2c6fad;
    --color-dark: #1a1a2e;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-gray: #6c757d;
    --color-border: #dee2e6;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --border-radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    line-height: 1.2;
    color: var(--color-primary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover { color: var(--color-secondary); }

img { max-width: 100%; height: auto; display: block; }

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

.section { padding: 80px 0; }

.section-title {
    font-size: 2.25rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-gray);
    margin-bottom: 48px;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

/* ========================
   BUTTONS
======================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
    line-height: 1;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-dark);
    border-color: var(--color-secondary);
}

.btn-primary:hover {
    background: #b8911e;
    border-color: #b8911e;
    color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

/* ========================
   HEADER
======================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-primary);
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
    text-decoration: none;
}

.site-logo:hover { color: var(--color-secondary); }

.site-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
    font-family: var(--font-serif);
}

.site-logo-text {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-logo-tagline {
    font-size: 0.68rem;
    font-weight: 400;
    font-family: var(--font-sans);
    opacity: 0.7;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.main-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.main-nav a:hover { color: var(--color-secondary); }

.main-nav .btn {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* ========================
   HERO
======================== */
.hero {
    min-height: 100vh;
    background: linear-gradient(140deg, #0d2137 0%, #1a3a5c 55%, #1e4976 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 75% 45%, rgba(201,162,39,0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 15% 75%, rgba(44,111,173,0.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--color-white);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 660px;
    padding: 80px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201,162,39,0.12);
    border: 1px solid rgba(201,162,39,0.35);
    color: var(--color-secondary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    color: var(--color-white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-title span { color: var(--color-secondary); }

.hero-description {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat { text-align: left; }

.hero-stat-number {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin-top: 4px;
    letter-spacing: 0.2px;
}

/* ========================
   POR QUÉ ELEGIRNOS
======================== */
.porque-elegirnos {
    background: var(--color-white);
    padding: 100px 0;
}

.razones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.razon-card {
    padding: 36px 28px;
    border-radius: var(--border-radius);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.razon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.razon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.razon-card:hover::before { transform: scaleX(1); }

.razon-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.razon-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-family: var(--font-sans);
}

.razon-text {
    font-size: 0.9rem;
    color: var(--color-gray);
    line-height: 1.65;
}

/* ========================
   SERVICIOS
======================== */
.servicios {
    background: var(--color-light);
    padding: 100px 0;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.servicio-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.servicio-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.servicio-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-secondary), #e8b830);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.servicio-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-sans);
    line-height: 1.3;
    padding-top: 4px;
}

.servicio-text {
    font-size: 0.88rem;
    color: var(--color-gray);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 20px;
}

.servicio-precio {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.precio-desde {
    font-size: 0.78rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.precio-valor {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-secondary);
    font-family: var(--font-serif);
}

.servicio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent);
    font-size: 0.88rem;
    font-weight: 600;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 2px;
    transition: var(--transition);
    align-self: flex-start;
}

.servicio-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    gap: 10px;
}

/* ========================
   CONTACTO RÁPIDO
======================== */
.contacto-rapido {
    background: linear-gradient(140deg, var(--color-primary) 0%, #0d2137 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.contacto-rapido::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 85% 15%, rgba(201,162,39,0.07) 0%, transparent 55%);
    pointer-events: none;
}

.contacto-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.contacto-info .section-title { color: var(--color-white); }

.contacto-info .section-subtitle { color: rgba(255,255,255,0.65); }

.contacto-detalles {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.contacto-detalle {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contacto-detalle-icon {
    width: 44px;
    height: 44px;
    background: rgba(201,162,39,0.12);
    border: 1px solid rgba(201,162,39,0.28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contacto-detalle-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.contacto-detalle-text {
    color: rgba(255,255,255,0.82);
    font-size: 0.93rem;
}

/* Contact form */
.contact-form-wrapper {
    background: var(--color-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}

.form-title {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 24px;
    font-family: var(--font-sans);
    font-weight: 700;
}

.form-group { margin-bottom: 18px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.93rem;
    font-family: var(--font-sans);
    color: var(--color-dark);
    background: var(--color-white);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(44,111,173,0.1);
}

.form-control::placeholder { color: #b0bac4; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 96px;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.form-submit:hover {
    background: linear-gradient(135deg, #0f2540, #1d5490);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,58,92,0.3);
}

.form-note {
    font-size: 0.76rem;
    color: var(--color-gray);
    margin-top: 12px;
    text-align: center;
    line-height: 1.5;
}

.form-note a { color: var(--color-accent); }

.form-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.form-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ========================
   FOOTER
======================== */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.65);
    padding: 64px 0 28px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand { max-width: 270px; }

.footer-tagline {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-top: 14px;
    opacity: 0.65;
}

.footer-col-title {
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--color-secondary); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.footer-legal { display: flex; gap: 20px; }

.footer-legal a {
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
    transition: var(--transition);
}

.footer-legal a:hover { color: var(--color-secondary); }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
    .contacto-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero-content { padding: 48px 0; }
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 20px; }

    .porque-elegirnos, .servicios, .contacto-rapido { padding: 72px 0; }

    .razones-grid { grid-template-columns: 1fr 1fr; }
    .servicios-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }

    .main-nav { display: none; }

    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

    .section-title { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .razones-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { text-align: center; }
    .contact-form-wrapper { padding: 28px 20px; }
}

/* ========================
   MATERIAL SYMBOLS
======================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* ========================
   TOP BAR
======================== */
.site-topbar {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 0;
    font-size: 12px;
    font-family: var(--font-sans);
}

.site-topbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-topbar-contact { display: flex; align-items: center; gap: 24px; }

.site-topbar-link {
    color: var(--color-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.site-topbar-link:hover { color: #fff; }

.site-topbar-link .material-symbols-outlined { font-size: 16px; }

.site-topbar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-topbar-badge .material-symbols-outlined { font-size: 16px; }

@media (max-width: 768px) {
    .site-topbar { display: none; }
}

/* ========================
   MOBILE MENU BUTTON
======================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-white);
    padding: 4px;
    line-height: 1;
}

.mobile-menu-btn .material-symbols-outlined { font-size: 28px; }

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
}

/* ========================
   CONTACT FORM 7 — BRANDED
======================== */
.cf7-branded .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cf7-branded .cf7-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cf7-branded label {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: #0d2137;
    letter-spacing: 0.01em;
}

.cf7-branded label .req {
    color: #c1f100;
    margin-left: 2px;
}

.cf7-branded input[type="text"],
.cf7-branded input[type="email"],
.cf7-branded input[type="tel"],
.cf7-branded select,
.cf7-branded textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: Manrope, sans-serif;
    font-size: 0.9375rem;
    color: #0d2137;
    background: #f7f9fb;
    border: 1.5px solid rgba(13, 33, 55, 0.18);
    border-radius: 0.625rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.cf7-branded select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230d2137' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.cf7-branded input:focus,
.cf7-branded select:focus,
.cf7-branded textarea:focus {
    border-color: #c1f100;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(193, 241, 0, 0.18);
}

.cf7-branded input.wpcf7-not-valid,
.cf7-branded select.wpcf7-not-valid,
.cf7-branded textarea.wpcf7-not-valid {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.cf7-branded .wpcf7-not-valid-tip {
    font-family: Manrope, sans-serif;
    font-size: 0.8125rem;
    color: #e53935;
    margin-top: 0.25rem;
    display: block;
}

.cf7-branded textarea {
    resize: vertical;
    min-height: 110px;
}

/* GDPR checkbox row */
.cf7-branded .cf7-field-group--check {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
}

.cf7-branded .cf7-field-group--check .wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.cf7-branded .cf7-field-group--check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    padding: 0;
    border: 1.5px solid rgba(13, 33, 55, 0.25);
    border-radius: 4px;
    background: #f7f9fb;
    cursor: pointer;
    accent-color: #0d2137;
    margin-top: 2px;
}

.cf7-branded .cf7-field-group--check .wpcf7-list-item-label,
.cf7-branded .cf7-field-group--check label {
    font-family: Manrope, sans-serif;
    font-size: 0.8125rem;
    color: #4a5568;
    font-weight: 400;
    line-height: 1.5;
}

.cf7-branded .cf7-field-group--check a {
    color: #0d2137;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Submit button */
.cf7-branded input[type="submit"],
.cf7-branded #cf7-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-family: Inter, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0d2137;
    background: #c1f100;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(193, 241, 0, 0.4);
    letter-spacing: 0.01em;
    margin-top: 0.25rem;
}

.cf7-branded input[type="submit"]:hover,
.cf7-branded #cf7-submit:hover {
    background: #aedd00;
    transform: scale(1.02);
}

.cf7-branded input[type="submit"]:active {
    transform: scale(0.98);
}

/* Response messages */
.cf7-branded .wpcf7-response-output {
    font-family: Manrope, sans-serif;
    font-size: 0.9375rem;
    border-radius: 0.625rem;
    padding: 0.875rem 1.125rem;
    margin: 0;
    border: none;
}

.cf7-branded .wpcf7-mail-sent-ok {
    background: rgba(193, 241, 0, 0.15);
    color: #2d5a00;
    border-left: 4px solid #c1f100;
}

.cf7-branded .wpcf7-mail-sent-ng,
.cf7-branded .wpcf7-validation-errors,
.cf7-branded .wpcf7-spam-blocked {
    background: rgba(229, 57, 53, 0.08);
    color: #b71c1c;
    border-left: 4px solid #e53935;
}

/* Loading spinner on submit */
.cf7-branded .wpcf7-spinner {
    display: none !important;
}

/* details/summary FAQ arrow */
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; content: ''; }
details[open] .faq-icon { transform: rotate(180deg); }

/* ========================
   ARTICLE — ToC & READING
======================== */
/* Scroll offset for sticky header when clicking ToC anchors */
.prose-tasacion h2,
.prose-tasacion h3,
[id] { scroll-margin-top: 6.5rem; }

/* Progress bar smoothness */
#reading-progress-bar { transition: width 80ms linear; }

/* ToC desktop active state */
.toc-desktop-link.active,
.toc-desktop-link[data-active="true"] {
    color: var(--color-secondary-container, #c1f100);
    background: rgba(193, 241, 0, 0.1);
    font-weight: 600;
}

/* Floating CTA safe area for iOS */
#floating-cta > div { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }

/* ─── Desktop ToC collapse animation (grid trick — no fixed max-height) ─── */
#toc-desktop-body {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.3s ease, opacity 0.2s ease;
}
#toc-desktop-body > div {
    overflow: hidden;
    min-height: 0;
}
#toc-desktop-body.toc-body-collapsed {
    grid-template-rows: 0fr;
    opacity: 0;
}

/* ─── Article Prose: FAQ / Accordion (details + summary) ─── */
.article-prose details {
    margin-bottom: 6px;
    border: 1px solid rgba(13, 28, 50, 0.13);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-prose details:hover {
    border-color: rgba(13, 28, 50, 0.22);
    box-shadow: 0 2px 12px rgba(13, 28, 50, 0.07);
}
.article-prose details[open] {
    border-color: rgba(13, 28, 50, 0.25);
    box-shadow: 0 4px 20px rgba(13, 28, 50, 0.10);
}
.article-prose details > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    color: #0d1c32;
    background: #f5f7fa;
    user-select: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.article-prose details > summary::-webkit-details-marker,
.article-prose details > summary::marker { display: none; content: ''; }
.article-prose details > summary:hover { background: #edf0f5; }
.article-prose details[open] > summary {
    background: #0d1c32;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* Chevron via pseudo-element (Material Symbols Outlined font) */
.article-prose details > summary::after {
    content: 'expand_more';
    font-family: 'Material Symbols Outlined';
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
    color: #0d1c32;
    transition: transform 0.3s ease, color 0.2s ease;
    display: block;
}
.article-prose details[open] > summary::after {
    transform: rotate(180deg);
    color: #c1f100;
}
/* Content inside the open accordion */
.article-prose details > *:not(summary) {
    padding: 16px 20px 20px;
    font-size: 15px;
    line-height: 1.75;
    color: #44474d;
    background: #ffffff;
}
.article-prose details > p { margin-top: 0; margin-bottom: 0; }

/* ─── Yoast FAQ block: reset default styles, let accordion CSS take over ─── */
.article-prose .schema-faq { display: flex; flex-direction: column; gap: 6px; }
.article-prose .schema-faq-section { border: none !important; padding: 0 !important; margin: 0 !important; background: none !important; }
.article-prose .schema-faq-question { display: none; }
/* answer is moved inside <details> by JS — restore prose styles */
.article-prose .schema-faq-answer { font-size: 15px; line-height: 1.75; color: #44474d; }
.article-prose .schema-faq-answer p { margin: 0; }

/* ─── Article Prose: Responsive tables ─── */

/* JS-injected wrapper: el scroll ocurre aquí, no en la tabla */
.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-radius: 12px;
}
/*
 * Forzar width:auto en la tabla aunque tenga width:100% como inline style.
 * Sin esto la tabla nunca desborda el wrapper y no hay nada que scrollear.
 */
.table-scroll-wrap table {
    width: auto !important;
    min-width: 480px; /* ancho mínimo garantizado para que el scroll sea útil */
}

/* Fallback para figure.wp-block-table nativo de Gutenberg */
.article-prose figure.wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* Tablas sin wrapper JS (edge case) */
.article-prose table { border-collapse: collapse; }

/* ─── Article Prose: Responsive iframes & embeds ─── */
.article-prose iframe,
.article-prose embed,
.article-prose object { max-width: 100%; }
.article-prose .wp-block-embed__wrapper {
    position: relative;
    padding-top: 56.25%;
    height: 0;
    overflow: hidden;
}
.article-prose .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
/* Prevent any custom block from overflowing mobile */
.article-prose .wp-block-group,
.article-prose .wp-block-columns { overflow-x: hidden; }
.article-prose img { max-width: 100%; height: auto; }
