/* ============================================
   CABANILLAS ABOGADOS URBANISTAS - HOJA DE ESTILO UNICA
   Mobile-first. Escala de breakpoints UNICA (min-width):
        base (<480) . 480 . 768 . 1024 . 1280 . 1400 (solo ancho de container)
   Todos los valores base son los del telefono; cada corte SUMA.
   El render a 1280 y 1440 esta congelado contra el baseline del plan:
   los unicos cambios deliberados en ese rango son los tokens de contraste (R-12)
   y el piso tipografico de 14px (R-13), documentados en el reporte del Paso 3a.
   ============================================ */

/* ============================================
   1. TOKENS
   ============================================ */
:root {
    /* --- Color: identidad y superficies (sin cambios) --- */
    --bg-color: #F9F9F9;
    --text-color: #333333;
    --primary-color: #1A2B40;
    /* azul marino */
    --accent-color: #ebb174;
    /* dorado */
    --white: #FFFFFF;
    --beige-light: #f7f5f2;
    --beige: #e6d6b0;
    --grey-light: #b0b0b0;

    /* --- Color: texto sobre fondo claro, corregido a AA (R-12) ---
       Los tokens de superficie de arriba NO se tocan: la identidad se conserva.
       Estos son variantes oscuras de la misma familia, solo para texto. */
    --grey-text: #767676;
    /* 4.54:1 sobre blanco (antes #777 = 4.48:1) */
    --accent-text: #864e13;
    /* dorado legible: 6.75:1 sobre blanco / 4.70:1 sobre el hero mas oscuro */
    --beige-text: #8b6f2c;
    /* beige legible: 4.76:1 sobre blanco */

    /* --- Tipografia --- */
    --font-serif: 'minerva-modern', serif;
    --font-sans: 'Lato', sans-serif;

    /* Piso legible: 14px. Reemplaza los 0.8rem / 0.85rem / 12px de R-13
       (botones, breadcrumbs, labels de formulario, copyright, CTAs, service-link). */
    --fs-ui: 0.875rem;
    --fs-body: 1rem;
    --fs-body-lg: 1.1rem;

    /* Escala de titulos. Sube por breakpoint y queda FIJA a >=1280 en el valor
       del baseline de escritorio. */
    --fs-headline: 1.8rem;
    /* .main-headline (home) */
    --fs-page-h1: 2.5rem;
    /* .services-hero h1 / .contact-hero h1 */
    --fs-detail-h1: 2rem;
    /* .service-detail-hero h1 */
    --fs-hero-title: 2.5rem;
    /* .hero-title (nosotros) */
    --fs-section-h2: 1.8rem;
    /* .intro-block h2 */

    /* --- Espaciado --- */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3.75rem;
    --space-7: 5rem;

    /* --- Layout --- */
    --container-pad: 15px;
    --container-max: 1200px;

    /* Altura real del header (padding 30 + caja del logo). El header es
       `position:absolute` y no reserva espacio: los heros la descuentan para no
       colisionar con su contenido (R-3). Medido, no estimado. */
    --header-h: 136px;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* scroll-behavior sale del selector universal: en `*` ademas rompe la medicion
   de scroll horizontal (la asignacion de scrollLeft se anima). */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* --- Guardas estructurales ---
   Ningun medio embebido puede forzar ancho, y ningun item de grid/flex puede
   negarse a encoger por debajo de su min-content. */
img,
svg,
video,
iframe,
embed,
object {
    max-width: 100%;
}

img {
    height: auto;
}

.footer-col,
.area-col,
.form-row .form-group,
.contact-info,
.services-intro,
.services-items,
.team-member,
.hero-text,
.hero-cards,
.intro-block,
.info-text,
.info-image,
.service-item,
.detail-text,
.contact-details-col,
.blog-card,
.card-content,
.static-overlay li,
.breadcrumb-item {
    min-width: 0;
}

/* ============================================
   3. LAYOUT - CONTAINERS
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    position: relative;
}

/* ============================================
   4. LAYOUT - HEADER & NAVIGATION
   ============================================ */
/* La caja del header es transparente, absoluta y de ancho completo, y se apoya sobre el
   hero: sin `pointer-events: none` intercepta los taps de TODO lo que quede debajo. Medido:
   el breadcrumb "Inicio" de servicios.php (768/834/1024) y de contacto.php (1024) era
   directamente inclickeable — elementFromPoint sobre el link devolvia HEADER.main-header.
   Los hijos interactivos se re-habilitan uno por uno; no cambia un solo pixel del render. */
.main-header {
    background-color: transparent;
    padding: 30px 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

/* En el logo se re-habilita la IMAGEN, no el <a>: el <a> es inline y arrastra un fragmento
   de texto de 19px POR DEBAJO de la imagen (medido: img 30-135.5, caja del <a> 119.5-138.5)
   que pisaba el area tactil del breadcrumb de contacto.php a 1024. El click sobre la imagen
   burbujea igual hasta el <a>, asi que el logo sigue navegando. */
.main-header .logo img,
.main-header .header-menu-toggle,
.main-header .main-nav,
.main-header .nav-overlay {
    pointer-events: auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-align: center;
}

.logo img {
    max-width: 130px;
}

/* Menu Toggle.
   R-14: el padding lleva la caja de 87x23 a 87x45 sin mover nada — el alto del
   header lo fija el logo (75px a <768, 112px a >=768), no el toggle.
   Solo existe por debajo de 1024, asi que no toca escritorio. */
/* Es un <button> (antes un <div>): reset de los estilos de UA. Solo existe por debajo de
   1024, asi que este bloque no puede tocar el escritorio. */
.header-menu-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 11px 0;
    background: none;
    border: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

/* R-4: el toggle vive sobre la foto del hero (antes sobre la banda navy, con la que
   compartia color exacto y desaparecia). El halo blanco lo hace legible sobre
   cualquiera de las 4 slides sin agregar una pastilla de UI al header. */
.menu-text {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.9);
}

.hamburger {
    width: 25px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.95);
}

/* Navigation - drawer (patron exclusivo de movil/tablet, < 1024) */
.main-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -90%;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--beige-light);
    z-index: 9998;
    padding: 100px 40px 60px;
    overflow-y: auto;
    box-shadow: -2px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav.active {
    display: block;
    right: 0;
}

/* Bloqueo del scroll de fondo. --sbw lo escribe script.js con el ancho real de la barra de
   scroll antes de ocultarla, asi el bloqueo no produce salto de layout. */
body.menu-open {
    overflow: hidden;
    padding-right: var(--sbw, 0px);
}

/* R-5: salida visible y alcanzable con el drawer abierto. 44x44 reales, dentro del panel
   (z-index 9998), o sea siempre por encima del overlay y del header. */
.nav-close {
    position: absolute;
    top: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.nav-close span {
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    transition: background-color 0.2s ease;
}

.nav-close span:first-child {
    transform: rotate(45deg);
}

.nav-close span:last-child {
    transform: rotate(-45deg);
}

.nav-close:hover span {
    background-color: var(--accent-color);
}

/* Overlay: segunda salida (tap afuera) y senal visual de que el fondo esta inerte.
   Vive dentro del contexto de apilamiento del header, por debajo del panel (9998). */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(26, 43, 64, 0.5);
    z-index: 9990;
}

body.menu-open .nav-overlay {
    display: block;
}

.main-nav.active ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.main-nav.active ul li {
    border-bottom: 1px solid rgba(217, 175, 107, 0.2);
}

.main-nav.active ul li:last-child {
    border-bottom: none;
}

.main-nav.active ul li a {
    display: block;
    padding: 18px 0;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.main-nav.active ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Dropdown dentro del drawer: siempre desplegado.
   Gana por especificidad (0,3,0) a .dropdown-menu (0,1,0): sin !important. */
.main-nav.active .dropdown-menu {
    display: block;
    padding-left: 20px;
    background-color: transparent;
    margin-top: 8px;
    margin-bottom: 10px;
    opacity: 1;
    visibility: visible;
    position: static;
    box-shadow: none;
    transform: none;
    min-width: auto;
}

.main-nav.active .dropdown-menu li {
    border-bottom: 1px solid rgba(217, 175, 107, 0.15);
}

.main-nav.active .dropdown-menu li:last-child {
    border-bottom: none;
}

.main-nav.active .dropdown-menu li a {
    font-size: 0.95rem;
    font-weight: 400;
    padding: 12px 0;
    color: #666;
    text-transform: none;
    letter-spacing: 0.5px;
}

.main-nav.active .dropdown-menu li a:hover {
    color: var(--accent-color);
}

/* Elegant divider for SERVICIOS */
.main-nav.active .dropdown>a {
    pointer-events: auto;
    position: relative;
}

.main-nav.active .dropdown>a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}


/* Breadcrumbs */
.breadcrumbs-container {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin: 0 0 15px 0;
    padding: 0;
    background: none;
    width: auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* R-12: el breadcrumb vive sobre heros claros (L 0.68-0.93 medido en los 10 heros).
   Blanco 80% daba 1.25:1 y el dorado 1.52:1. Navy da 10:1 en el peor hero. */
.breadcrumb-item {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: var(--primary-color);
    content: '/';
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--accent-text);
}

.breadcrumb-item.active {
    color: var(--accent-text);
    font-weight: 700;
}

/* ============================================
   5. COMPONENTS - BUTTONS (CONSOLIDATED)
   ============================================ */
.btn,
.cta-button,
.btn-outlined,
.btn-gold,
.submit-btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 35px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

/* Primary Button (Gold Fill).
   R-12: el texto pasa de blanco (1.9:1) a navy sobre el mismo dorado (7.57:1).
   La marca no cambia: el boton sigue siendo dorado. */
.btn-gold,
.submit-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: 1px solid var(--accent-color);
}

.btn-gold:hover,
.submit-btn:hover {
    background-color: #bfa14f;
}

/* Outlined Button */
.btn-outlined,
.cta-button {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outlined:hover,
.cta-button:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* ============================================
   6. COMPONENTS - CARDS
   ============================================ */
.blog-card,
.service-item {
    background: var(--white);
    transition: all 0.3s ease;
}

.blog-card:hover,
.service-item:hover {
    transform: translateY(-5px);
}

/* ============================================
   7. COMPONENTS - FORMS (CONSOLIDATED)
   ============================================ */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row .form-group {
    flex: 1;
}

.form-group.full-width {
    width: 100%;
}

/* R-14: `<input>` es elemento reemplazado — no admite pseudo-elementos, asi que la
   unica forma de agrandar su area de toque es agrandar su caja. Los campos median
   40px de alto. El padding sube a 14/10 (=44) y el margen del label baja de 5 a 1:
   la caja crece 4px hacia ARRIBA, o sea el texto del campo, su linea inferior y todo
   lo que sigue quedan exactamente donde estaban. Cero pixeles de diferencia, en todos
   los anchos, incluido el escritorio congelado. */
label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 14px 0 10px;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: #333;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    border-bottom-color: var(--accent-color);
}

.form-privacy {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.form-privacy input {
    margin-right: 10px;
}

/* R-14: el checkbox de privacidad medía 13x13.
   Chrome fuerza `padding: 0` en los controles con `appearance: auto`, asi que la
   superficie de toque NO se puede agrandar sin agrandar la caja: la unica via es
   dibujar el control (`appearance: none`). Se hace por debajo de 1280 —44x44 de area
   con una casilla visible de 20px— y se devuelve el control nativo en escritorio, que
   esta congelado. Los margenes negativos dejan la caja de margen en 20px, o sea el
   renglon no cambia de alto. */
.form-privacy input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin: -12px 0 -12px -12px;
    border: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='0.5' y='0.5' width='19' height='19' fill='%23fff' stroke='%23999'/%3E%3C/svg%3E");
    cursor: pointer;
}

.form-privacy input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='0.5' y='0.5' width='19' height='19' fill='%231A2B40' stroke='%231A2B40'/%3E%3Cpath d='M4.5 10.2l3.6 3.6 7.2-7.2' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
}

.form-privacy input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -10px;
}

.form-privacy label {
    font-weight: 400;
    font-size: var(--fs-ui);
    color: var(--grey-text);
    margin: 0;
}

/* R-14: el link "Politica de Privacidad" es texto en linea dentro del label: su caja
   mide 19.7px por linea. El padding vertical sobre un elemento en linea NO altera el
   alto de linea ni mueve nada — solo agranda su caja de pintado y de toque. */
.form-privacy label a {
    padding: 14px 0;
}

.form-submit {
    text-align: right;
}

/* ============================================
   8. LAYOUT - FOOTER
   ============================================ */
.main-footer {
    background-color: #243946;
    color: var(--grey-light);
    padding: var(--space-7) 0 0;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* R-9: el footer se centraba por debajo de 1024 mientras el resto de la pagina iba
   alineada a la izquierda. Queda alineado a la izquierda en todos los anchos. */
.footer-col {
    border-left: none;
    padding: 0;
    margin-bottom: var(--space-5);
    width: 100%;
    text-align: left;
}

.footer-col.logo-col {
    border-left: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.footer-col:last-child {
    padding-right: 0;
}

.footer-col h4 {
    font-family: var(--font-serif);
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 400;
}

.footer-logo {
    max-width: 180px;
    display: block;
    margin: 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

/* R-14: los 12 links de las columnas del footer miden 17px de alto con un paso real de
   35.6px entre centros (medido en el Paso 8; la nota previa decia 27px, estimado). No se
   resuelven con un pseudo-elemento de 44px porque las areas de toque se pisarian entre
   si; hace falta paso real de 45px. Eso alarga la columna 18px por link, asi que se
   aplica solo por debajo de 1280. El escritorio queda con su geometria congelada y
   CUMPLE WCAG 2.5.8 AA (puntero) por la excepcion de separacion: con 35.6px entre
   centros, los circulos de 24px de diametro no se intersecan (verificado en las 22
   celdas de 1280/1440: 0 fallos). */
.footer-col ul li {
    margin-bottom: 0;
}

.footer-col ul li a,
.footer-col .privacy-link a {
    display: inline-block;
    padding: 14px 0;
    min-width: 44px;
}

.footer-col ul li a {
    color: var(--grey-light);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-label {
    color: var(--accent-color);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.footer-phone {
    display: block;
    color: #e0e0e0;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-decoration: none;
}

.footer-email {
    display: block;
    color: var(--grey-light);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-decoration: none;
}

.footer-address {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--grey-light);
    line-height: 1.5;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.social-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s;
}

.social-icon.wapp {
    background-image: url('assets/img/cabanillas-icon-wapp-off.png');
}

.social-icon.wapp:hover {
    background-image: url('assets/img/cabanillas-icon-wapp-on.png');
}

.social-icon.fb {
    background-image: url('assets/img/cabanillas-icon-fb-off.png');
}

.social-icon.fb:hover {
    background-image: url('assets/img/cabanillas-icon-fb-on.png');
}

.social-icon.ig {
    background-image: url('assets/img/cabanillas-icon-ig-off.png');
}

.social-icon.ig:hover {
    background-image: url('assets/img/cabanillas-icon-ig-on.png');
}

.footer-bottom {
    margin-top: var(--space-6);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    background-color: #1e2a36;
}

/* R-12: --grey-text esta calibrado contra fondo CLARO; sobre el navy del footer da 3.21:1.
   El copyright usa --grey-light, que sobre #1e2a36 da 6.73:1. Token existente, sin color nuevo. */
.footer-bottom p {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    color: var(--grey-light);
    margin: 0;
}


/* ============================================
   9. HOME PAGE - HERO & SLIDER
   ============================================ */
/* R-2: el hero pasa a ser columna flex con el contenido pegado abajo. Es lo que le
   da a `.static-overlay` un ancla de layout real (su borde inferior) sin sacarla del
   flujo: antes era el unico hijo en flujo de un contenedor de alto fijo, asi que
   aterrizaba en el TECHO del hero, encima del header.
   R-3: el min-height garantiza que header + contenido del hero entren sin pisarse
   (a 768 el hero medía 300px contra 172 de header + 214 de contenido). */
.slider-container {
    position: relative;
    height: 60vh;
    height: 60dvh;
    min-height: 460px;
    width: 100%;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.slide.active {
    opacity: 1;
}

.hero-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: var(--container-max);
    /* el div lleva tambien la clase .container: sigue el ensanche a 1400 en >=1400 */
    z-index: 10;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
}

/* R-3: el header es `position:absolute` y no reserva altura. El contenido del hero
   de la home se centra en el alto COMPLETO del slider, asi que a <=1024 caia debajo
   del logo/`.location-tag`/h1 en cuatro cajas superpuestas. Con `padding-top` el
   centrado ocurre en el espacio que queda libre bajo el header.
   Se revierte a >=1280, donde el baseline de escritorio esta congelado. */
.slider-container .hero-overlay-content {
    padding-top: var(--header-h);
}

/* Ajuste de espaciado tras revisar el staging (2026-07-31): a <768 el
   boton "CONOCE MAS" quedaba a solo 37-53px de la banda NOSOTROS/SERVICIOS/CONTACTO,
   apinado. Se resuelve con margin-bottom en el propio boton, ultimo hijo en flujo de
   `.hero-overlay-content` (flex column, justify-content:center): al crecer el bloque
   el conjunto se centra mas arriba, alejandolo de la banda sin moverla (su ancla sigue
   siendo el borde inferior del hero via `.slider-container`). Se revierte a 0 en
   >=1280, donde el escritorio esta congelado y el hueco ya es de 121px. */
.slider-container .hero-overlay-content .cta-button {
    margin-bottom: var(--space-7);
}

.location-tag {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 20px;
    display: block;
}

.main-headline {
    font-family: var(--font-serif);
    font-size: var(--fs-headline);
    line-height: 1.1;
    color: var(--primary-color);
    margin-bottom: var(--space-5);
    max-width: 800px;
}

/* Static Overlay (banda NOSOTROS / SERVICIOS / CONTACTO) — R-2.
   Ancla: el BORDE INFERIOR del hero, en todos los anchos, como en `Demo_Home.pdf`
   (a 1280 el comp deja 44px dentro del hero y 51px fuera = 54% afuera).
   Como el hero es ahora columna flex con `justify-content:flex-end`, la banda —unico
   hijo en flujo— cae sola a ese borde; el `margin-bottom` negativo la hace montar
   sobre la seccion siguiente en la misma proporcion que el comp.
   Antes: `margin-top:-60px` sobre un contenedor de alto fijo la mandaba al techo del
   hero (tapando logo, MENU y la primera linea del H1) y a 834-1024 pasaba a
   `position:static`, lo que anulaba su `z-index:20` y la escondia detras de los slides. */
.static-overlay {
    position: relative;
    width: 100%;
    margin: 0 0 -36px;
    background: var(--primary-color);
    z-index: 20;
    display: flex;
}

.static-overlay ul {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.static-overlay li a {
    font-family: var(--font-serif);
    font-size: var(--fs-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.5rem;
}

.static-overlay li:hover a {
    transform: scale(1.05);
    z-index: 5;
}

/* Telefono: los tres items reparten el ancho en tercios iguales (con 1/1/2 el item
   de SERVICIOS queda en 90px a 360 y la palabra no entra). El 1/1/2 del comp vuelve
   a partir de 768, donde la banda ya es angosta y alineada a la derecha. */
.static-overlay li:nth-child(1),
.static-overlay li:nth-child(2) {
    flex: 1 1 0;
    background-color: var(--primary-color);
}

/* El tercer item se pinta sobre una foto (`imgBtnBlog.jpg`): la sombra que ya usaba a
   >=768 se aplica tambien en telefono, donde antes el dorado quedaba sobre la parte
   clara de la imagen. Ya existe identica a >=768, asi que no toca escritorio. */
.static-overlay li:nth-child(3) {
    flex: 1 1 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background-image: url('assets/img/imgBtnBlog.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Defecto pre-existente heredado, corregido en el Paso 8: este velo de oscurecimiento
   declaraba `z-index: -1`. El `li` esta posicionado pero con `z-index:auto`, asi que NO
   crea contexto de apilamiento: el pseudo caia en la capa negativa de `.static-overlay`
   (que si lo crea, con `z-index:20`) y se pintaba DETRAS del propio `background-image`
   del `li`. O sea nunca oscurecio nada desde que existe. Con `z-index:1` se pinta sobre
   la foto y por debajo del texto (`span`/`a`, que ya estan en `z-index:2`).
   Se aplica SOLO por debajo de 1280: a >=1280 el escritorio esta congelado y este velo
   si cambia el render. El caso de escritorio queda declarado como decision confirmada. */
.static-overlay li:nth-child(3)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.static-overlay li:nth-child(3) span,
.static-overlay li:nth-child(3) a {
    position: relative;
    z-index: 2;
}

/* ============================================
   10. HOME PAGE - NOSOTROS SECTION
   ============================================ */
.nosotros-section {
    background-image: url('assets/img/cabanillas-home-bg1.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    padding: var(--space-6) 0;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: var(--space-5);
    align-items: center;
}

.intro-block {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
    padding: 0 20px;
}

.intro-block h2 {
    font-family: var(--font-serif);
    font-size: var(--fs-section-h2);
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 400;
}

.intro-block h2 .highlight-text {
    font-weight: 700;
    display: block;
    margin-top: 10px;
}

.intro-block .intro-text p {
    font-family: var(--font-sans);
    font-size: var(--fs-body-lg);
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 700px;
}

.info-image {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 300px;
    border-radius: 0;
    position: relative;
    margin-bottom: -70px;
    z-index: 10;
}

.info-image img {
    width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.info-text {
    grid-column: 1;
    grid-row: 3;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-text h4 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.2;
}

.experience-text {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: #888;
    margin-top: 10px;
    line-height: 1.5;
}

/* ============================================
   11. HOME PAGE - SERVICES LIST
   ============================================ */
.services-list-section {
    background-image: url('assets/img/cabanillas-home-bg3.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.85);
    background-blend-mode: lighten;
    margin-top: var(--space-6);
    padding: var(--space-6) 0;
    min-height: 600px;
}

.services-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    align-items: flex-start;
}

.services-intro h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--space-5);
    font-weight: 400;
    line-height: 1.2;
}

.services-items ul {
    list-style: none;
    padding: 0;
}

.services-items li {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    color: #666;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    display: flex;
    align-items: flex-start;
}

.services-items li:first-child {
    border-top: 1px solid #e0e0e0;
}

.services-items li::before {
    content: '\203A';
    color: var(--accent-color);
    margin-right: 15px;
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
}

/* ============================================
   12. HOME PAGE - BLOG SECTION
   ============================================ */
.blog-section {
    background-color: var(--beige-light);
    padding: 100px 0;
}

.blog-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.blog-header h3 {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 400;
}

.blog-header p {
    font-family: var(--font-sans);
    color: var(--accent-color);
    font-size: var(--fs-body);
    letter-spacing: 1px;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.card-image {
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 400;
}

.card-content .excerpt {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--grey-text);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-top: auto;
    display: inline-block;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.read-more:hover {
    border-bottom-color: var(--accent-color);
}

.blog-footer {
    text-align: center;
    margin-top: var(--space-6);
}

.view-all {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
}

/* ============================================
   13. CONTACT SECTION (SHARED)
   ============================================ */
.contact-section {
    position: relative;
    padding: var(--space-7) 0 150px;
}

.contact-split-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, var(--beige) 40%, #f5f5f3 40%);
}

.contact-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 50px;
}

.contact-info h3 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    line-height: 1.2;
    font-weight: 400;
}

.method-label {
    font-family: var(--font-sans);
    color: var(--grey-text);
    margin-bottom: 5px;
}

.phone-number {
    font-family: var(--font-sans);
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: block;
}

.contact-separator {
    border: none;
    border-top: 1px solid #aaa;
    margin: 30px 0;
    width: 200px;
}

.contact-note p {
    font-family: var(--font-sans);
    color: var(--grey-text);
    line-height: 1.5;
}

.contact-form-card {
    background: var(--white);
    padding: 30px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
}

/* ============================================
   14. SERVICIOS PAGE
   ============================================ */
.services-hero {
    background-color: var(--beige-light);
    background-image: url('assets/img/cabanillas-servicios-principal-hero.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    height: calc(0.39 * 100vw);
    min-height: 500px;
    padding: 220px 0 100px;
}

.services-hero .hero-overlay-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: left;
    display: flex;
    justify-content: flex-start;
    height: auto;
    width: 100%;
}

.services-hero h1 {
    font-family: var(--font-serif);
    font-size: var(--fs-page-h1);
    color: var(--primary-color);
    line-height: 1;
    font-weight: 400;
    margin-left: 0;
}

.areas-intro-section {
    position: relative;
    z-index: 10;
    background: var(--white);
    padding-top: var(--space-6);
    padding-bottom: var(--space-7);
    margin-top: 0;
    pointer-events: none;
}

.areas-intro-section .container {
    pointer-events: auto;
}

/* R-10: el `max-width: 75%` + `padding-right: 40px` es composicion de escritorio
   (deja ver la foto del hero en el hueco de la derecha). Sobre un container de 360
   con 40px de padding dejaba ~170px de ancho de texto: tres palabras por linea.
   Por debajo de 1024 el panel blanco pasa a ocupar el ancho completo (margen negativo
   que cancela el padding del container) y el texto queda con la sangria de 40px.
   El 75% del comp vuelve a partir de 1024. */
.service-description {
    max-width: none;
    background-color: var(--white);
    margin: 0 calc(-1 * var(--space-5)) var(--space-6);
    padding: var(--space-6) var(--space-5);
    position: relative;
}

.service-description::before {
    content: '';
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    width: 100vw;
    height: 100%;
    background-color: var(--white);
}

.areas-intro-text {
    max-width: 100%;
    background-color: var(--white);
    padding: 0 0 var(--space-5) 0;
    margin-bottom: var(--space-6);
    margin-top: 0;
    position: relative;
}

.areas-intro-text::before {
    content: '';
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    width: 100vw;
    height: 100%;
    background-color: var(--white);
}

.areas-intro-text p {
    font-family: var(--font-sans);
    font-size: var(--fs-body-lg);
    color: #666;
    line-height: 1.6;
    font-weight: 700;
}

.areas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    background-color: var(--white);
}

.area-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.area-number {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.area-col h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 400;
    line-height: 1.1;
}

.area-col p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--grey-text);
    line-height: 1.8;
    margin-bottom: var(--space-5);
}

.area-line {
    width: 60px;
    height: 5px;
    background-color: var(--accent-color);
    margin-top: auto;
    border-radius: 2px;
}

.main-services-list {
    padding: 100px 0;
    background-color: #f1edea;
}

.services-header {
    margin-bottom: var(--space-6);
    position: relative;
}

.services-header h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 400;
}

/* R-9 (la grilla no colapsa a 1024) es del Paso 3b: aca se migra tal cual. */
.services-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.service-item {
    background-color: #f1edea;
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.service-img-wrapper {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 250px;
    z-index: 1;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-item:hover .service-img-wrapper img {
    transform: scale(1.05);
}

.service-content {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    background-color: #f1edea;
    padding: 30px;
    z-index: 2;
    pointer-events: none;
}

.service-content h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.2;
    max-width: 100%;
}

.service-content p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 100%;
}

.service-link {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    font-weight: 700;
    color: #997843;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--accent-color);
    display: inline-block;
    pointer-events: auto;
}

.full-width-item {
    grid-column: 1 / -1;
    margin-top: var(--space-6);
    display: flex;
    flex-direction: column;
}

.full-width-item .service-content {
    order: 2;
}

.full-width-item .service-img-wrapper {
    order: 1;
    width: 100%;
    height: 300px;
}

/* ============================================
   15. NOSOTROS PAGE
   ============================================ */
.nosotros-hero {
    background-color: var(--beige-light);
    background-image: url('assets/img/cabanillas-nosotros-hero.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    padding: 220px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    min-height: 80dvh;
    display: flex;
    align-items: center;
}

.hero-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.hero-text {
    flex: 0 0 100%;
    width: 100%;
    padding-right: 0;
    z-index: 2;
}

.page-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: var(--fs-hero-title);
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: var(--space-5);
    font-weight: 400;
}

.hero-description p {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* R-8 / R-9 — collage del hero de `nosotros` por debajo de 1024.
   El collage del comp (3 tarjetas absolutas superpuestas + sello de 350px detras) esta
   calculado sobre una columna de ~500px. Metido en 330px de ancho se rompia entero: el
   `overflow:hidden` del hero cortaba la tarjeta 2 por la mitad, la 3 no aparecia, y el
   sello (`left:50px` + `width:350px` = borde derecho en x=415) se salia 55px del
   viewport y quedaba recortado, o sea invisible.
   Decision de composicion: en movil/tablet el collage se DESARMA. Las tres tarjetas
   pasan a flujo, apiladas y escalonadas con sangrias crecientes —conserva la diagonal
   del comp sin superposicion—, y el sello va abajo, entero y legible. Nada absoluto,
   nada recortado, cero desborde. El collage vuelve tal cual a partir de 1024. */
.hero-cards {
    flex: 0 0 100%;
    width: 100%;
    padding-right: 0;
    position: relative;
    height: auto;
    margin-top: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
}

/* R-12: el texto de las tarjetas pasa de blanco (1.9-2.21:1) a navy (6.5-7.6:1)
   sobre los mismos fondos dorados. */
.floating-card {
    position: static;
    max-width: 100%;
    background-color: #d5c39e;
    color: var(--primary-color);
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-weight: 400;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
    white-space: nowrap;
}

.card-1 {
    margin-left: 0;
    background-color: #cbb079;
}

.card-2 {
    margin-left: 24px;
    background-color: #ccaa66;
}

.card-3 {
    margin-left: 48px;
    background-color: var(--accent-color);
}

.hero-stamp-img {
    position: static;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin-top: var(--space-3);
    z-index: 1;
    background: #fff;
}

.hero-stamp-img img {
    width: 100%;
    display: block;
}

.team-section {
    padding: 100px 0;
    background-color: #fff;
}

.section-title-wrapper {
    margin-bottom: var(--space-6);
    text-align: left;
    padding-left: 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 400;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

.team-member {
    text-align: left;
}

/* R-9: con la grilla en 1 columna, una ventana de 350px de alto sobre una foto a
   ancho completo recortaba las caras del equipo (a 414-768 el encuadre caia en el
   torso; a uno de los tres le cortaba a la altura de la boca).
   Los assets son cuadrados (281x280), asi que una ventana 1:1 los muestra completos
   sea cual sea el ancho: la relacion de aspecto sustituye al alto fijo por debajo de
   1024. A partir de ahi la grilla es de 3 columnas y el recorte vertical del comp
   (350px) vuelve intacto. */
.member-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 25px;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.team-member:hover .member-image {
    filter: grayscale(0%);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.member-role {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.member-bio {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-icon-circle {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--accent-color);
    background-size: 15px;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 0.3s;
}

.social-icon-circle:hover {
    background-color: var(--primary-color);
}

.icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.icon-linkedin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z'/%3E%3C/svg%3E");
}

/* ============================================
   16. CONTACTO PAGE
   ============================================ */
.contact-page {
    padding-top: 0;
}

.contact-hero {
    background-image: url('assets/img/cabanillas-contacto-hero.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    height: 300px;
    max-height: 700px;
    min-height: 400px;
    margin-top: var(--space-7);
    position: relative;
    display: block;
}

.contact-hero .hero-overlay-content {
    align-items: flex-start;
    text-align: left;
}

.contact-hero h1 {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--fs-page-h1);
    color: var(--primary-color);
    line-height: 1;
    font-weight: 400;
    margin-left: 0;
}

.contact-content-section {
    position: relative;
    z-index: 10;
    background: var(--white);
    padding-bottom: var(--space-7);
    margin-top: 0;
}

.contact-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    align-items: center;
    background-color: var(--white);
}

.contact-tagline {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: var(--space-6);
    font-weight: 400;
    max-width: 100%;
    background-color: var(--white);
    padding: var(--space-5) 0;
    position: relative;
}

.contact-tagline::before {
    content: '';
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    width: 100vw;
    height: 100%;
    background-color: var(--white);
}

.contact-questions-list {
    list-style: none;
    margin-bottom: 30px;
}

.contact-questions-list li {
    font-family: var(--font-sans);
    font-size: var(--fs-body-lg);
    color: #666;
    margin-bottom: 10px;
}

.contact-description {
    font-family: var(--font-sans);
    font-size: var(--fs-body-lg);
    font-weight: 700;
    color: #888;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 90%;
}

.gold-line-sep {
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin-bottom: var(--space-5);
}

.contact-sub-intro h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 400;
}

.reply-note {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #888;
}

.contact-details-col {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.icon-wrap {
    width: 40px;
    flex-shrink: 0;
}

.icon-wrap img {
    width: 100%;
    height: auto;
}

.detail-text {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    color: #999;
    margin-bottom: 5px;
}

.detail-link,
.detail-address {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* `info@cabanillasurbanismo.es` es un token que no parte: a 22.4px mide 283px y a 360
   se salia 13px de su `.container` (llegaba a 1.6px del borde de la pantalla). Con la
   columna de datos ya en 2 columnas desde 768 (R-9) el problema se repetiria ahi.
   Baja un escalon hasta 1024, donde vuelve al tamano del comp. */
.detail-link.email {
    font-size: 1.15rem;
    font-weight: 400;
}

.detail-separator {
    border-top: 1px solid #ddd;
    margin: 30px 0 30px 60px;
}

.contact-form-section-standalone {
    position: relative;
    padding: 100px 0;
    margin-top: 0;
}

.form-bg-layer {
    background-color: var(--beige);
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
}

.form-container-standalone {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
}

.standalone-form {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background: var(--white);
    padding: 30px 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
}

.map-link-container {
    text-align: left;
    margin-top: 20px;
}

.expand-map-link {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.full-map-section {
    width: 100%;
    line-height: 0;
    margin-bottom: -10px;
}

.full-map-section iframe {
    display: block;
    width: 100%;
}

/* ============================================
   17. SERVICE DETAIL PAGES
   ============================================ */
.service-detail-page {
    position: relative;
    background-color: var(--white);
}

.service-detail-hero {
    padding: 280px 0 250px;
    background-image: url('assets/img/cabanillas-servicios-hero-ejecucion.jpg');
    background-size: cover;
    background-position: center center;
    height: calc(0.39 * 100vw);
    min-height: 400px;
    position: relative;
}

.service-detail-hero.asesoramiento {
    background-image: url('assets/img/cabanillas-servicios-hero-asesoramiento.jpg');
}

.service-detail-hero.asesoria {
    background-image: url('assets/img/cabanillas-servicios-hero-asesoria-inmobiliaria.jpg');
}

.service-detail-hero.convenios {
    background-image: url('assets/img/cabanillas-servicios-hero-convenios.jpg');
}

.service-detail-hero.entidades {
    background-image: url('assets/img/cabanillas-servicios-hero-entidades.jpg');
}

.service-detail-hero.disciplina {
    background-image: url('assets/img/cabanillas-servicios-hero-disciplina.jpg');
}

.service-detail-hero.defensa {
    background-image: url('assets/img/cabanillas-servicios-hero-defensa.jpg');
}

.service-hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
    padding-left: 0;
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: var(--fs-ui);
    letter-spacing: 2px;
    color: var(--beige);
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-detail-hero h1 {
    font-family: var(--font-serif);
    font-size: var(--fs-detail-h1);
    line-height: 1;
    color: var(--primary-color);
    font-weight: 400;
    margin-top: 0;
}

.service-detail-content {
    margin-top: -80px;
    background: linear-gradient(to bottom, transparent 0, transparent 150px, var(--white) 150px, var(--white) 100%);
    position: relative;
    z-index: 10;
    padding-bottom: var(--space-7);
    pointer-events: none;
}

.service-detail-content .container {
    pointer-events: auto;
    padding: 0 var(--space-5);
}

.service-description p {
    font-family: var(--font-sans);
    font-size: var(--fs-body-lg);
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
    font-weight: 400;
}

.gold-separator {
    width: 70px;
    height: 4px;
    background-color: var(--beige);
}

/* R-11 (padding-right 300px vivo a 1024) es del Paso 3b: aca se migra tal cual. */
.service-list-container {
    position: relative;
    z-index: 2;
    margin-top: var(--space-6);
    margin-left: 0;
    width: 100%;
    padding-right: 0;
}

/* R-12: el titulo era --beige (#e6d6b0) sobre blanco = 1.44:1.
   Los 3.5rem (56px) del comp sobre una columna de 280px partian palabras como
   "Compensacion" o "administrativos" FUERA de la caja: 29px de scroll horizontal real
   a 360 en 5 de las 7 paginas de servicio, mas un titulo de 6 lineas y 336px de alto.
   Escala por breakpoint; a >=1024 vuelve al valor del comp. */
.service-list-container h2 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    color: var(--beige-text);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.numbered-service-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    max-width: 800px;
}

.numbered-service-list li {
    display: flex;
    align-items: flex-start;
    padding: 25px 0;
    border-bottom: 1px solid #ccc;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: #444;
    font-weight: 600;
}

.numbered-service-list li:first-child {
    border-top: 1px solid #ccc;
}

.numbered-service-list .number {
    font-weight: 700;
    margin-right: 25px;
    min-width: 20px;
    color: var(--primary-color);
}

.numbered-service-list .text {
    flex: 1;
    min-width: 0;
}

/* R-8: `right: -50px` sacaba la marca de agua 50px fuera del viewport y arrastraba
   50px de scroll horizontal REAL en las 7 paginas de servicio a <=834. Se ancla al
   borde derecho del contenido; el desplazamiento decorativo de escritorio
   (`right: 15vw`, 500px de ancho) vuelve a partir de 1280, donde hay lugar. */
.watermark-image {
    position: absolute;
    top: auto;
    bottom: 20px;
    right: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

.watermark-image img {
    max-width: 300px;
    display: block;
}

/* Ajuste de espaciado tras revisar el staging (2026-07-31): el beige
   terminaba exactamente 80px (var(--space-7)) por debajo de `.contact-form-card`,
   igual que el padding-top, pero se percibe corto contra el respiro de arriba. Sube a
   140px (var(--space-7) + var(--space-6)); se revierte a var(--space-7) en >=1280,
   donde el escritorio esta congelado. */
.service-detail-page .contact-section {
    padding-top: var(--space-7);
    padding-bottom: calc(var(--space-7) + var(--space-6));
    position: relative;
    background-color: transparent;
}

/* Defecto pre-existente heredado, corregido en el Paso 8: el `height:50%` +
   `linear-gradient(90deg, beige 50%, blanco 50%)` es composicion de ESCRITORIO — solo
   tiene sentido con el texto en la columna izquierda y la tarjeta del formulario en la
   derecha, que es el layout a partir de 1024. Por debajo, con todo apilado en una
   columna, quedaba un rectangulo beige de media altura y media anchura que cortaba cada
   linea de texto por el medio (mitad izquierda sobre beige, mitad derecha sobre blanco)
   y terminaba a mitad de la seccion.
   No se corrige con otro porcentaje: el bloque de texto termina entre el 43.9% y el
   48.1% de la seccion segun ancho y pagina, y la tarjeta arranca entre el 47.7% y el
   52.3% — los rangos se cruzan, no hay un corte que sirva en los 5 anchos. El panel
   beige pasa a ocupar la seccion entera y la tarjeta blanca flota encima, que es la
   misma composicion del comp de escritorio sin el corte vertical. */
.service-detail-page .contact-split-bg {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--beige);
    z-index: 0;
}

.service-detail-page .contact-container-wrapper {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.service-detail-page .contact-info h3 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

.contact-text-body p {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: var(--primary-color);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 400px;
}

/* ============================================
   18. DROPDOWN MENU
   ============================================ */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 400;
    text-transform: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: #f9f9f9;
    color: var(--accent-color);
}

/* ============================================
   19. AREAS DE TOQUE (R-14)
   ============================================
   Los enlaces de este sitio son texto de 16-28px de alto: agrandar su caja visible
   moveria el layout en escritorio, que esta congelado. La superficie de toque se
   extiende con un pseudo-elemento absoluto sin pintura — no ocupa lugar en el flujo,
   no cambia un solo pixel del render, y el evento sigue resolviendo en el <a> porque
   el pseudo es su hijo.
   Solo se aplica donde el area ampliada NO se pisa con la del target vecino; donde el
   paso entre targets es menor a 44px (columnas de links del footer) hace falta paso
   real y se resuelve con padding por debajo de 1280. */

.breadcrumb-item a,
.footer-phone,
.footer-email,
.detail-link,
.service-link,
.read-more,
.view-all,
.expand-map-link,
.services-items li a,
.main-nav>ul>li>a,
.social-icon,
.social-icon-circle,
.submit-btn {
    position: relative;
}

.breadcrumb-item a::before,
.detail-link::before,
.service-link::before,
.read-more::before,
.view-all::before,
.expand-map-link::before,
.services-items li a::before,
.main-nav>ul>li>a::before,
.submit-btn::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
}

/* Telefono y mail del footer estan a 33px uno de otro: si cada uno se expandiera en
   las dos direcciones se pisarian. Cada uno crece hacia el lado libre. */
.footer-phone::before,
.footer-email::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.footer-phone::before {
    top: -16px;
    bottom: 0;
}

.footer-email::before {
    top: 0;
    bottom: -21px;
}

/* Iconos sociales: 35x35 (footer) y 30x30 (equipo), separados por un gap de 15px.
   La expansion simetrica llega a 44 y deja 6px / 1px de aire entre areas vecinas. */
.social-icon::before {
    content: '';
    position: absolute;
    left: -4.5px;
    right: -4.5px;
    top: -4.5px;
    bottom: -4.5px;
}

.social-icon-circle::before {
    content: '';
    position: absolute;
    left: -7px;
    right: -7px;
    top: -7px;
    bottom: -7px;
}

/* Telefono y mail del footer: el pseudo de 44px de la capa de arriba crece hacia un solo
   lado (estaban a 33px uno de otro), asi que el area NO queda centrada en el target — un
   tap a 21px por debajo del centro del telefono cae en el mail. Por debajo de 1280 se
   resuelve con paso REAL: padding propio hasta 44px y separacion suficiente para que las
   dos areas no se pisen. Centros a 44.5px = exactamente el minimo. En >=1280 vuelve la
   geometria congelada (ver el bloque de 1280). */
.footer-phone {
    padding: 8px 0;
    margin-bottom: 0;
}

.footer-email {
    padding: 11px 0;
    margin-bottom: 4px;
}

.footer-phone::before,
.footer-email::before {
    content: none;
}

/* El link de la politica de privacidad ya trae padding vertical del Paso 3b, pero a 390 y
   414 el texto PARTE en dos lineas y el area tactil deja de ser contigua: la caja union de
   los dos fragmentos mide 271x65 y su centro cae en el hueco donde no hay ninguno de los
   dos (medido: elementFromPoint devuelve el LABEL en los 4 puntos de sonda). Con el link
   en una sola linea el area vuelve a ser un bloque continuo de 47px. Solo por debajo de
   1280: en escritorio no parte y la caja congelada no se toca. */
.form-privacy label a {
    white-space: nowrap;
}

/* ============================================
   19b. FOCO VISIBLE (teclado)
   ============================================
   `:focus-visible` y no `:focus`: el anillo aparece en recorrido por teclado y no al
   hacer click con el mouse, asi que el render de escritorio queda intacto. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 2px;
}

.main-nav a:focus-visible,
.header-menu-toggle:focus-visible,
.nav-close:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

/* Sobre el navy del footer el dorado de marca no destaca lo suficiente: anillo blanco. */
.main-footer a:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 2px;
}

/* ============================================
   20. BREAKPOINTS
   base (<480) . 480 . 768 . 1024 . 1280 . 1400
   ============================================ */

/* ---------------- >= 480px : telefono grande ---------------- */
@media (min-width: 480px) {
    :root {
        --container-pad: 20px;
        --fs-headline: 2.2rem;
        --fs-page-h1: 3rem;
        --fs-detail-h1: 2.4rem;
        --fs-hero-title: 2.8rem;
        --fs-section-h2: 2rem;
        /* el logo sube a 150px -> el header crece */
        --header-h: 146px;
    }

    .logo img {
        max-width: 150px;
    }

    .contact-form-card,
    .standalone-form {
        padding: 30px;
    }

    .service-list-container h2 {
        font-size: 2.2rem;
    }
}

/* ---------------- >= 768px : tablet ---------------- */
@media (min-width: 768px) {
    :root {
        --container-pad: 30px;
        --fs-headline: 2.5rem;
        --fs-page-h1: 3.5rem;
        --fs-detail-h1: 3.2rem;
        --fs-hero-title: 3.5rem;
        /* el logo sube a 200px -> el header crece y ya no cambia mas */
        --header-h: 172px;
    }

    .logo img {
        max-width: 200px;
    }

    /* Hero / slider.
       R-3: `min-height: 0` dejaba el hero en 300px a 768 y 325 a 834, contra 172px de
       header + 214 de contenido. 480 es el piso que hace entrar a los dos con aire;
       es inerte a >=1280, donde `calc(0.39*100vw)` ya da 499. */
    .slider-container {
        height: calc(0.39 * 100vw);
        min-height: 480px;
    }

    /* El respiro del header baja de 72.5 a 42.9px en este breakpoint (--header-h sube a
       172), asi que el mismo margen de la capa base no cabe sin arriesgar la colision
       que R-3 ya resolvio. Se reduce a la mitad: sigue llevando el hueco de 12.6px de
       este rango a ~28.6px (2.3x) dejando 26.9px de aire contra el header. */
    .slider-container .hero-overlay-content .cta-button {
        margin-bottom: var(--space-4);
    }

    /* R-2: a partir de tablet la banda se angosta y se alinea a la derecha, como en el
       comp. Sigue anclada al borde inferior del hero (es el ultimo hijo en flujo de un
       contenedor con `justify-content:flex-end`). */
    .static-overlay {
        width: min(60vw, 620px);
        align-self: flex-end;
        margin-bottom: -40px;
        background: none;
    }

    .static-overlay li:nth-child(3) {
        flex: 2 1 0;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }

    /* Home - nosotros */
    .nosotros-section {
        grid-template-columns: 20px 1fr 1fr 20px;
        padding: 150px 0 0;
        row-gap: var(--space-7);
    }

    .intro-block {
        grid-column: 2 / 4;
        padding: 0 var(--space-5) 0 0;
    }

    .info-image {
        grid-column: 1 / 3;
        height: 100%;
    }

    .info-text {
        grid-column: 3 / 5;
        grid-row: 2;
        padding: var(--space-5) 0 var(--space-5) var(--space-5);
    }

    /* Home - servicios */
    .services-list-section {
        background-size: 100% auto;
        margin-top: 200px;
        padding: 0 0 500px;
    }

    .services-list-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Formularios */
    .form-row {
        flex-direction: row;
        gap: 30px;
    }

    /* Contacto */
    .detail-link {
        font-size: 1.8rem;
    }

    /* Nosotros */
    .floating-card {
        padding: 15px 30px;
        font-size: 1.2rem;
    }

    .card-1 {
        top: 50px;
        right: 150px;
    }

    .card-2 {
        top: 130px;
        right: 280px;
    }

    .card-3 {
        top: 210px;
        right: 50px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* R-9: grillas que se quedaban en 1 columna hasta 1024/1280.
       768 es el corte donde `.team-grid`, `.services-list-grid` y `.form-row` ya
       cambian de regimen: las tres que faltaban se suman al mismo corte en vez de
       inventar uno nuevo. A 834 `.areas-grid` daba una columna de 794px y
       `.services-grid-layout` mantenia 7 cards de 964x450 con la mitad vacia. */
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-layout-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* R-9: el footer vuelve a ser grilla en tablet (2x2) en vez de una columna
       centrada. La alineacion a la izquierda ya viene de la base. */
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5) 30px;
        align-items: flex-start;
    }

    .footer-col {
        margin-bottom: 0;
    }

    /* Detalle de servicio */
    .service-detail-hero {
        min-height: 600px;
    }

    .service-list-container h2 {
        font-size: 2.8rem;
    }
}

/* ---------------- >= 1024px : escritorio (nav horizontal) ---------------- */
@media (min-width: 1024px) {
    :root {
        --fs-page-h1: 4rem;
        --fs-detail-h1: 4rem;
        --fs-section-h2: 2.2rem;
    }

    /* El corte de la nav se mueve de 992 a 1024 (decision de UX: drawer para tablet).
       Se incluye `.main-nav.active` para que un drawer abierto al redimensionar no
       tape el escritorio: por eso los !important del bloque viejo ya no hacen falta. */
    .main-nav,
    .main-nav.active {
        display: block;
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        right: auto;
        background: transparent;
        padding: 0;
        overflow: visible;
        box-shadow: none;
        margin-top: 0;
    }

    .header-menu-toggle,
    .nav-close,
    .nav-overlay,
    body.menu-open .nav-overlay {
        display: none;
    }

    body.menu-open {
        overflow: visible;
        padding-right: 0;
    }

    /* Combinador HIJO: `.main-nav ul` matcheaba tambien al ul.dropdown-menu anidado
       y lo dejaba desplegado en fila fuera de pantalla -> 781-811px de scroll
       horizontal real en las 11 paginas (R-1). */
    .main-nav>ul,
    .main-nav.active>ul {
        display: flex;
        flex-direction: row;
        gap: 30px;
        align-items: center;
        width: auto;
    }

    .main-nav>ul>li {
        border-bottom: none;
    }

    .main-nav.active .dropdown-menu {
        display: none;
        position: absolute;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        min-width: 250px;
        padding: 15px 0;
        margin: 0;
    }

    .main-nav a {
        font-family: var(--font-sans);
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--primary-color);
        letter-spacing: 1px;
        position: relative;
        padding-bottom: 5px;
    }

    .main-nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--accent-color);
        transition: width 0.3s;
    }

    .main-nav a:hover::after,
    .main-nav a.active::after {
        width: 100%;
    }

    /* R-7: el submenu de Servicios era hover-only por encima del corte de la nav, asi que
       en una tablet tactil de 1024 el tap sobre SERVICIOS navegaba a servicios.php y las 7
       paginas internas quedaban sin acceso desde la navegacion.
       `.nav-open` la agrega script.js SOLO cuando matchMedia('(hover:none),(pointer:coarse)')
       da true: en un escritorio con mouse la clase no aparece nunca y la nav queda
       exactamente igual que hoy. `:focus-within` hace lo propio para el teclado (tampoco
       cambia nada sin foco). */
    .main-nav ul li.dropdown.nav-open>.dropdown-menu,
    .main-nav ul li.dropdown:focus-within>.dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* El panel de 250px cuelga de `left: 0` del <li>, que a 1024 arranca en x=795: el borde
       derecho caia en 1045 y desplegarlo metia 21px de scroll horizontal real. Entre 1024 y
       1279 se ancla al borde DERECHO del item; a partir de 1280 vuelve el anclaje izquierdo
       del comp (medido: a 1280 el panel va de 1021 a 1271, o sea ya entra sin tocarlo). */
    .main-nav ul li.dropdown>.dropdown-menu {
        left: auto;
        right: 0;
    }

    /* Grids */
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* R-9: el recorte vertical del comp (350px) vuelve con la grilla de 3 columnas. */
    .member-image {
        height: 350px;
        aspect-ratio: auto;
    }

    .contact-layout-grid {
        gap: var(--space-6);
    }

    .detail-link.email {
        font-size: 1.4rem;
    }

    /* Footer: 4 columnas del comp */
    .footer-grid {
        grid-template-columns: 1fr 1fr 0.8fr 1fr;
        gap: 30px;
    }

    .footer-col {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0 30px;
        width: auto;
    }

    .footer-col.logo-col {
        margin-bottom: 0;
    }

    /* Bloque de contacto compartido */
    .contact-split-bg {
        background: linear-gradient(90deg, var(--beige) 50%, #f5f5f3 50%);
    }

    .contact-container-wrapper {
        flex-direction: row;
        align-items: center;
    }

    .contact-info {
        max-width: 45%;
        padding-right: var(--space-5);
        margin-bottom: 0;
    }

    .contact-form-card {
        width: 550px;
        padding: 50px;
    }

    /* Servicios */
    .services-hero {
        padding: 220px 0 0;
    }

    .areas-intro-section {
        background: linear-gradient(to bottom, transparent 0, transparent 150px, var(--white) 150px, var(--white) 100%);
        margin-top: -150px;
        padding-top: 0;
    }

    .areas-intro-text {
        max-width: 75%;
        padding: var(--space-6) var(--space-5) var(--space-6) 0;
    }

    .areas-intro-text::before {
        display: block;
    }

    /* R-10: vuelve la composicion de escritorio — panel blanco al 75% con la foto del
       hero asomando en el hueco derecho, y sangrado a la izquierda por el ::before. */
    .service-description {
        max-width: 75%;
        margin: 0 0 var(--space-6);
        padding: var(--space-6) var(--space-5) var(--space-6) 0;
    }

    .service-description::before {
        display: block;
    }

    .service-item {
        height: 450px;
        display: block;
    }

    .service-img-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        width: 70%;
        height: 80%;
    }

    .service-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 65%;
        max-width: none;
        padding: 25px 30px 25px 25px;
    }

    .service-content h3 {
        font-size: 1.6rem;
        max-width: 75%;
    }

    .service-content p {
        max-width: 70%;
    }

    .full-width-item {
        display: block;
    }

    .full-width-item .service-img-wrapper {
        width: 70%;
        height: 80%;
    }

    /* Nosotros — vuelve el collage del comp (ver R-8/R-9 en la base) */
    .hero-content-wrapper {
        flex-direction: row;
    }

    .hero-text {
        flex: 0 0 50%;
        width: auto;
        padding-right: 50px;
    }

    .hero-cards {
        flex: 0 0 50%;
        width: auto;
        height: 500px;
        margin-top: 0;
        display: block;
    }

    .floating-card {
        position: absolute;
        max-width: none;
        margin-left: 0;
    }

    .hero-stamp-img {
        position: absolute;
        top: 150px;
        left: 50px;
        width: 350px;
        max-width: none;
        margin-top: 0;
    }

    /* Contacto */
    .contact-hero {
        height: calc(0.39 * 100vw);
        margin-top: 0;
    }

    .contact-content-section {
        background: linear-gradient(to bottom, transparent 0, transparent 150px, var(--white) 150px, var(--white) 100%);
        margin-top: -150px;
    }

    .contact-tagline {
        max-width: 75%;
        font-size: 2.8rem;
        padding: var(--space-6) var(--space-5) var(--space-6) 0;
    }

    .contact-tagline::before {
        display: block;
    }

    .form-bg-layer {
        width: 40%;
    }

    .standalone-form {
        width: 70%;
        padding: var(--space-6);
    }

    /* Detalle de servicio */
    .service-detail-content {
        margin-top: -150px;
    }

    /* vuelve el titular del comp */
    .service-list-container h2 {
        font-size: 3.5rem;
        line-height: 1;
    }

    /* Vuelve el corte vertical 50/50 del comp: a partir de aca la tarjeta del
       formulario ocupa la mitad derecha y el beige solo la izquierda. */
    .service-detail-page .contact-split-bg {
        height: 100%;
        background: linear-gradient(90deg, var(--beige) 50%, #ffffff 50%);
    }
}

/* ---------------- >= 1280px : escritorio pleno (render congelado) ---------------- */
@media (min-width: 1280px) {
    /* Ajuste de espaciado (2026-07-31): se revierte el padding-bottom a var(--space-7)
       porque el escritorio esta congelado y este ancho ya tenia 80px generosos. */
    .service-detail-page .contact-section {
        padding-bottom: var(--space-7);
    }

    :root {
        --container-pad: 20px;
        --fs-headline: 2.8rem;
        --fs-section-h2: 2.5rem;
    }

    .services-list-section {
        background-color: transparent;
        background-blend-mode: normal;
    }

    /* R-3: el escritorio esta congelado — el hero de 499/561px ya deja libre el header
       sin reservar altura, asi que el `padding-top` de la capa movil se revierte. */
    .slider-container .hero-overlay-content {
        padding-top: 0;
    }

    .slider-container .hero-overlay-content .cta-button {
        margin-bottom: 0;
    }

    /* R-2: a partir de aca manda el comp — banda al 45vw, a la derecha, montada 51px
       por debajo del borde inferior del hero. */
    .static-overlay {
        position: absolute;
        bottom: -51px;
        right: 0;
        left: auto;
        width: 45vw;
        margin: 0;
        align-self: auto;
    }

    .static-overlay li a {
        font-size: 1.2rem;
        letter-spacing: 2px;
        padding: 2rem 0;
    }

    /* El velo del tercer item vuelve a su `z-index:-1` original: es inerte (se pinta
       detras del fondo del propio `li`), y activarlo oscureceria la foto de CONTACTO,
       o sea moveria el escritorio congelado. Corregirlo tambien aca es decision confirmada. */
    .static-overlay li:nth-child(3)::before {
        z-index: -1;
    }

    .nosotros-section {
        grid-template-columns: 1fr minmax(auto, 500px) minmax(auto, 500px) 1fr;
    }

    .intro-block {
        grid-column: 2 / 3;
    }

    .info-text {
        grid-column: 3 / 4;
    }

    .areas-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }

    .services-grid-layout {
        gap: var(--space-7) var(--space-6);
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* R-11: el `padding-right: 300px` vivia desde 1024 y a ese ancho dejaba 300px de
       columna muerta con la marca de agua pintada encima del h2. Es composicion de
       escritorio pleno: baja de 1024 a 1280, junto con el desplazamiento decorativo
       de la marca de agua que la acompana. */
    .service-list-container {
        padding-right: 300px;
    }

    .watermark-image {
        top: 300px;
        bottom: auto;
        right: 15vw;
        opacity: 0.6;
    }

    .watermark-image img {
        max-width: 500px;
    }

    /* El escritorio congelado recupera el anclaje izquierdo del submenu (a >=1280 entra
       entero en el viewport, medido: 1021-1271 sobre 1280). */
    .main-nav ul li.dropdown>.dropdown-menu {
        left: 0;
        right: auto;
    }

    /* R-14: el escritorio congelado recupera su geometria de formulario y de columnas
       de links. Ver la nota de cada bloque en la capa base. */
    .footer-col ul li {
        margin-bottom: 10px;
    }

    .footer-col ul li a,
    .footer-col .privacy-link a {
        display: inline;
        padding: 0;
        min-width: 0;
    }

    /* Telefono/mail del footer y link de privacidad: vuelve la geometria congelada del
       escritorio y con ella el pseudo asimetrico de 44px de la capa base. */
    .footer-phone {
        padding: 0;
        margin-bottom: 5px;
    }

    .footer-email {
        padding: 0;
        margin-bottom: 15px;
    }

    .footer-phone::before,
    .footer-email::before {
        content: '';
    }

    .form-privacy label a {
        white-space: normal;
    }

    .form-privacy input[type="checkbox"] {
        appearance: auto;
        -webkit-appearance: auto;
        width: auto;
        height: auto;
        margin: 0 10px 0 0;
        background-image: none;
        cursor: default;
    }

    .form-privacy input[type="checkbox"]:checked {
        background-image: none;
    }
}

/* ---------------- >= 1400px : solo ancho de container ----------------
   Excepcion justificada por la auditoria: el baseline congelado a 1440 tiene
   el container en 1400px. Ninguna otra regla vive en este corte. */
@media (min-width: 1400px) {
    :root {
        --container-max: 1400px;
    }
}

/* Politica de Privacidad y avisos de formulario (Paso 3) */
.legal-page { max-width: 800px; margin: 0 auto; padding: 0 20px 80px; }
.legal-content { max-width: 800px; margin: 0 auto; line-height: 1.7; }
.legal-content h1 { margin: 30px 0 20px; }
.legal-content h2 { margin: 32px 0 12px; }
.legal-content ul { padding-left: 1.4em; }
.legal-content a { overflow-wrap: anywhere; }
.form-notice { margin: 0 0 20px; padding: 12px 16px; font-size: 0.95rem; border-left: 3px solid var(--accent-color); background: rgba(0, 0, 0, 0.04); }
.form-notice--error { border-left-color: #b3261e; }
.form-legal { margin: 16px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--grey-text); }
.form-legal a { text-decoration: underline; }

.legal-table-wrap { overflow-x: auto; margin: 16px 0; }
.legal-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.legal-table th, .legal-table td { padding: 10px 12px; border: 1px solid rgba(0, 0, 0, 0.15); text-align: left; vertical-align: top; }
.legal-table th { background: rgba(0, 0, 0, 0.05); }
.contact-content-section.legal-section { margin-top: 0; background: var(--white); padding-top: var(--space-6); }

.footer-funding { background-color: #1e2a36; padding: 16px 20px; }
.footer-funding img { display: block; width: 100%; max-width: 1000px; height: auto; margin: 0 auto; }
