/*
Theme Name: IHS Ingeniería
Theme URI: https://ihs-ingenieria.cl
Author: IHS Ingeniería Limitada
Description: Tema personalizado para IHS Ingeniería — Consultoría en hidrología e hidrogeología
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
License: Proprietary
Text Domain: ihs-theme
*/

/* =============================================
   VARIABLES — Identidad visual IHS
   ============================================= */
:root {
    --navy:        #1B3A6B;
    --navy-dark:   #0d2347;
    --teal:        #2ECFC0;
    --warm-white:  #F7F6F5;
    --text:        #212222;
    --gray:        #A2A2A2;
    --white:       #ffffff;

    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body:    'Inter', sans-serif;

    --header-h:    72px;
    --max-w:       1200px;
    --pad-section: 96px 24px;
    --radius:      8px;
    --shadow:      0 2px 16px rgba(27,58,107,.08);
    --shadow-up:   0 8px 32px rgba(27,58,107,.16);
    --ease:        0.25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html  { scroll-behavior: smooth; font-size: 16px; scrollbar-gutter: stable; }

body  {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; transition: color var(--ease); }
ul    { list-style: none; }

/* =============================================
   TIPOGRAFÍA
   ============================================= */
h1, h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
}
h3, h4 {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.05rem; }

p  { line-height: 1.75; }

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

.section-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 580px;
    margin-bottom: 48px;
}

/* =============================================
   BOTONES
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--ease);
}

.btn-primary {
    background: var(--teal);
    color: var(--navy-dark);
    border-color: var(--teal);
}
.btn-primary:hover {
    background: transparent;
    color: var(--teal);
}

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

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

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: var(--navy);
    transition: box-shadow var(--ease);
}
.site-header.scrolled {
    box-shadow: 0 2px 24px rgba(0,0,0,.25);
}

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

.site-logo img {
    height: 48px;
    width: auto;
    max-width: 180px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.footer-logo {
    height: 72px;
    width: auto;
    display: block;
    margin-bottom: 18px;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    color: rgba(255,255,255,.78);
    font-size: .82rem;
    font-weight: 400;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: all var(--ease);
}
.site-nav a:hover { color: var(--white); border-bottom-color: var(--teal); }
.site-nav .nav-cta {
    background: var(--teal);
    color: var(--navy-dark) !important;
    padding: 8px 18px;
    border-radius: 4px;
    border-bottom: none !important;
    font-weight: 600;
}
.site-nav .nav-cta:hover { background: rgba(46,207,192,.82); }


.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 130vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
    position: relative;
    overflow: hidden;
    background:
        url('assets/hero-bg.jpg') center/cover no-repeat;
}

/* Overlay: degradado oscuro hacia la izquierda donde está el texto */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(10,30,61,0.90) 0%, rgba(13,35,71,0.78) 45%, rgba(10,30,61,0.55) 100%);
    pointer-events: none;
}

/* Acento teal sutil en zona derecha */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 82% 40%, rgba(46,207,192,.10) 0%, transparent 45%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 24px;
    width: 100%;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 22px;
}
.hero-label::before {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--teal);
    flex-shrink: 0;
}

.hero h1 { color: var(--white); margin-bottom: 24px; max-width: 780px; }
.hero h1 em { font-style: normal; color: var(--teal); }

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,.68);
    font-weight: 300;
    line-height: 1.72;
    max-width: 560px;
    margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.3);
    font-size: .68rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* =============================================
   NOSOTROS — light/blanco
   ============================================= */
.nosotros {
    padding: 40px 24px;
    background:
        url('https://images.unsplash.com/photo-1691595567280-f17e0e5ad11e?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
}
.nosotros::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(247,246,245,.92);
    pointer-events: none;
}

.nosotros .container {
    display: block;
    max-width: 760px;
    margin: 0;
    text-align: left;
    position: relative;
    z-index: 1;
}

.nosotros-content .section-title { color: var(--navy); margin-bottom: 20px; }
.nosotros-content p { color: var(--text); margin-bottom: 16px; font-size: .97rem; }
.nosotros-content p:last-of-type { margin-bottom: 32px; }

.nosotros-cards { display: flex; flex-direction: column; gap: 20px; }

.nosotros-card {
    background: var(--white);
    padding: 28px 28px 28px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--teal);
    box-shadow: var(--shadow);
}
.nosotros-card h3 {
    color: var(--navy);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 10px;
}
.nosotros-card p { font-size: .9rem; color: var(--gray); line-height: 1.65; }

/* =============================================
   SERVICIOS — dark/azulado
   ============================================= */
.servicios {
    padding: var(--pad-section);
    background:
        url('https://images.unsplash.com/photo-1570634345576-3510d21d244f?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
}
.servicios::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13,35,71,.84);
    pointer-events: none;
}
.servicios .container { position: relative; z-index: 1; }

.servicios-header { margin-bottom: 52px; }
.servicios-header .section-title { color: var(--white); margin-bottom: 0; }

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.servicio-card-link {
    display: contents;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.servicio-card {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--ease);
}
.servicio-card:hover {
    border-color: rgba(46,207,192,.45);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
}

.servicio-img {
    height: 200px;
    background: linear-gradient(135deg, rgba(46,207,192,.18) 0%, rgba(27,58,107,.4) 100%) center/cover no-repeat;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}
.servicio-card:hover .servicio-img { transform: scale(1.04); }

.servicio-card h3 {
    color: var(--white);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 20px 22px;
    text-align: center;
}

/* =============================================
   PROYECTOS — carrusel horizontal
   ============================================= */
.proyectos {
    padding: var(--pad-section);
    background:
        url('https://images.unsplash.com/photo-1626769262028-cf1fc179f8c5?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
}
.proyectos::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(247,246,245,.93);
    pointer-events: none;
}
.proyectos .container { position: relative; z-index: 1; }

.proyectos-header {
    margin-bottom: 36px;
}
.proyectos .section-title { color: var(--navy); margin-bottom: 0; }

/* Wrapper con flechas laterales */
.carousel-outer {
    position: relative;
    padding: 0 52px;
    margin-bottom: 0;
}

.carousel-btn {
    position: absolute;
    top: 90px;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    box-shadow: 0 2px 12px rgba(27,58,107,.3);
    transition: background var(--ease), color var(--ease);
    flex-shrink: 0;
}
.carousel-btn--prev { left: 0; }
.carousel-btn--next { right: 0; }
.carousel-btn:hover { background: var(--teal); color: var(--navy); }
.carousel-btn:disabled { opacity: .35; cursor: default; }

/* Track del carrusel */
.proyectos-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 2px 20px;
    margin-bottom: 48px;
}
.proyectos-carousel::-webkit-scrollbar { display: none; }

/* Cards */
.proyecto-slide {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform var(--ease), box-shadow var(--ease);
}
.proyecto-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
}

.proyecto-slide-img {
    height: 180px;
    overflow: hidden;
    background: #EEF1F6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.proyecto-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}
.proyecto-slide:hover .proyecto-slide-img img { transform: scale(1.03); }

.proyecto-slide-nombre {
    padding: 14px 16px 16px;
    color: var(--navy);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.proyectos-footer { text-align: center; }
.servicios-footer  { text-align: center; margin-top: 40px; }

/* =============================================
   CTA CONTACTO — dark/azulado
   ============================================= */
.cta-contacto {
    padding: var(--pad-section);
    background:
        url('https://images.unsplash.com/photo-1673199981530-df45b3289d0d?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
    text-align: center;
}
.cta-contacto::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13,35,71,.84);
    pointer-events: none;
}
.cta-contacto .container { position: relative; z-index: 1; }
.cta-contacto .section-label { display: block; text-align: center; }
.cta-contacto .section-title { color: var(--white); margin: 0 auto 14px; max-width: 680px; }
.cta-contacto .section-subtitle { margin: 0 auto 40px; text-align: center; color: rgba(255,255,255,.62); }
.cta-contacto .btn-outline-navy {
    color: var(--white);
    border-color: rgba(255,255,255,.45);
}
.cta-contacto .btn-outline-navy:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
    color: var(--white);
}

.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.55);
    padding: 64px 24px 32px;
}

.footer-top {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo-text { display: block; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; color: rgba(255,255,255,.45); line-height: 1.7; max-width: 280px; }

.footer-col h4 {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 18px;
    font-family: var(--font-body);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: rgba(255,255,255,.5); font-size: .88rem; }
.footer-col ul a:hover { color: var(--white); }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .88rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 13px;
}
.footer-contact-item i { color: var(--teal); font-size: .88rem; margin-top: 2px; flex-shrink: 0; }

.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 26px;
    font-size: .78rem;
    color: rgba(255,255,255,.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-symbol-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.45;
    transition: opacity var(--ease);
}
.footer-symbol-link:hover { opacity: 0.85; }

.footer-symbol {
    height: 28px;
    width: auto;
    display: block;
}

/* =============================================
   HERO — variante subpágina
   ============================================= */
.hero--page {
    min-height: 92vh;
}
.hero--page .hero-content {
    padding: 80px 24px;
}
.hero--page h1 {
    margin-bottom: 24px;
    max-width: 100%;
}

/* Variante compacta para páginas con poco contenido hero */
.hero--compact {
    min-height: 52vh;
}
.hero--compact .hero-content {
    padding: 64px 24px;
}

/* =============================================
   MISIÓN Y VISIÓN
   ============================================= */
.mision-vision {
    padding: var(--pad-section);
    background:
        url('https://images.unsplash.com/photo-1691595567280-f17e0e5ad11e?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
}

.mision-vision::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(247,246,245,.92);
    pointer-events: none;
}

.mision-vision .container {
    position: relative;
    z-index: 1;
}

.mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.mv-card {
    background: var(--white);
    border-top: 3px solid var(--teal);
    border-radius: var(--radius);
    padding: 44px 36px;
    box-shadow: var(--shadow);
}

.mv-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 20px;
    line-height: 1;
}

.mv-card p {
    color: var(--text);
    font-size: .97rem;
    line-height: 1.78;
}

/* =============================================
   EQUIPO
   ============================================= */
.equipo {
    padding: var(--pad-section);
    background: var(--navy);
}

.equipo .section-title {
    color: var(--white);
    margin-bottom: 52px;
}

.equipo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 860px;
    margin: 0 auto;
}

.socio-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--ease);
}
.socio-card:hover { box-shadow: var(--shadow-up); }

.socio-foto {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #E8EEF6;
}
.socio-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.socio-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(27,58,107,.2);
}

.socio-info { padding: 28px 24px; }

.socio-info h3 {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.socio-cargo {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}

.socio-bio {
    font-size: .9rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.7;
    margin: 0;
}

/* =============================================
   SERVICIOS — página índice (tabs)
   ============================================= */
.servicios-index {
    padding: 24px 24px 96px;
    background:
        url('https://images.unsplash.com/photo-1691595567280-f17e0e5ad11e?w=1920&auto=format&fit=crop&q=80')
        center/cover no-repeat;
    position: relative;
}
.servicios-index::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(247,246,245,.92);
    pointer-events: none;
}
.servicios-index .container { position: relative; z-index: 1; }

/* Dropdown selector en móvil */
.si-mobile-select {
    display: none;
    width: 100%;
    padding: 13px 16px;
    background: var(--white);
    border: 1.5px solid rgba(27,58,107,.2);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    margin-bottom: 16px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B3A6B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* Fila de tabs */
.si-tabs {
    display: flex;
    flex-wrap: nowrap;
    border-bottom: 2px solid rgba(27,58,107,.12);
    margin-bottom: 0;
}

.si-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 18px 14px;
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5a5a5a;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    transition: color var(--ease), border-color var(--ease), font-weight var(--ease);
}
.si-tab:hover { color: var(--navy); }
.si-tab.is-active {
    color: var(--navy);
    border-bottom-color: var(--teal);
    font-weight: 800;
    font-size: 1rem;
}

/* Panel de contenido */
.si-panels {
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 480px;
}

.si-panel {
    display: none;
}
.si-panel.is-active {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    height: 100%;
}

.si-panel-img {
    overflow: hidden;
    background: #EEF1F6;
}
.si-panel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.si-panel-body {
    padding: 44px 52px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
}

.si-panel-body h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    color: var(--navy);
    margin-bottom: 4px;
}

.si-panel-body p {
    font-size: .97rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.78;
    margin: 0;
}
.si-panel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.si-panel-list li {
    font-size: .97rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
    padding-left: 1.2em;
    position: relative;
}
.si-panel-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
}

/* ============================================================
   PÁGINA PROYECTOS
   ============================================================ */
.proyectos-page {
    padding: var(--pad-section);
    background: #fff;
}

.proyectos-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.proyecto-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform var(--ease), box-shadow var(--ease);
}
.proyecto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-up);
}
.proyecto-card--placeholder {
    opacity: .45;
}

.proyecto-card-img {
    height: 180px;
    overflow: hidden;
    background: #EEF1F6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.proyecto-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}
.proyecto-card:hover .proyecto-card-img img { transform: scale(1.03); }
.proyecto-card-img--placeholder {
    background: #EEF1F6;
}

.proyecto-card-info {
    padding: 14px 16px 16px;
}
.proyecto-card-nombre {
    font-size: .88rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
    margin: 0;
}
.proyecto-card-nombre--pending {
    color: var(--gray);
    font-weight: 500;
    font-style: italic;
}

/* CLIENTES */
.clientes {
    padding: var(--pad-section);
    background: #f0f5fc;
    text-align: center;
}
.clientes .section-title {
    color: var(--navy);
    margin: 0 auto 52px;
    max-width: 680px;
}
.clientes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}
.cliente-logo {
    width: 150px;
    height: 72px;
    background: #fff;
    border: 1px solid rgba(27, 58, 107, .12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    padding: 10px 14px;
}
.cliente-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive proyectos */
@media (max-width: 900px) {
    .proyectos-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 560px) {
    .proyectos-page-grid {
        grid-template-columns: 1fr;
    }
}

/* CTA en página de servicios */
.cta-servicios {
    padding: var(--pad-section);
    background: var(--navy);
    text-align: center;
}
.cta-servicios .section-title { color: var(--white); margin: 0 auto 14px; max-width: 680px; }
.cta-servicios .section-subtitle { margin: 0 auto 40px; text-align: center; color: rgba(255,255,255,.62); }
.cta-servicios .btn-outline {
    color: var(--white);
    border-color: rgba(255,255,255,.45);
}
.cta-servicios .btn-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--white);
}

/* ============================================================
   PÁGINA CONTACTO
   ============================================================ */
.contacto-section {
    padding: var(--pad-section);
    background: var(--white);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.55fr;
    gap: 80px;
    align-items: start;
}

/* Columna izquierda */
.contacto-info-title {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    color: var(--navy);
    margin-bottom: 16px;
}

.contacto-info-desc {
    font-size: .97rem;
    color: var(--text);
    line-height: 1.78;
    margin-bottom: 44px;
}

.contacto-info-items {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contacto-info-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.contacto-info-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(46,207,192,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--teal);
    font-size: 1.05rem;
}

.contacto-info-text h4 {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 5px;
}

.contacto-info-text p,
.contacto-info-text a {
    font-size: .95rem;
    color: var(--text);
    line-height: 1.6;
}

.contacto-info-text a:hover { color: var(--teal); }

/* Columna derecha — caja del formulario */
.contacto-form-wrap {
    background: #EEF3FA;
    border-radius: 12px;
    padding: 48px 44px;
    box-shadow: var(--shadow);
}

.cf-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

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

.cf-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cf-group label {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy);
}

.cf-group label .optional {
    color: var(--gray);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.cf-input,
.cf-select,
.cf-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    border: 1.5px solid rgba(27,58,107,.15);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text);
    transition: border-color var(--ease), box-shadow var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.cf-input:focus,
.cf-select:focus,
.cf-textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,207,192,.12);
}

.cf-input::placeholder,
.cf-textarea::placeholder { color: var(--gray); font-weight: 300; }

.cf-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B3A6B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.cf-select option[value=""] { color: var(--gray); }

.cf-textarea { resize: vertical; min-height: 130px; }

.cf-submit { align-self: flex-start; }

.cf-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.55;
    margin-bottom: 8px;
}

.cf-notice--success {
    background: rgba(46,207,192,.1);
    color: #0a6b5c;
    border: 1px solid rgba(46,207,192,.28);
}

.cf-notice--error {
    background: rgba(220,53,69,.07);
    color: #9a2231;
    border: 1px solid rgba(220,53,69,.2);
}

.cf-notice a { color: inherit; text-decoration: underline; }
.cf-notice i { flex-shrink: 0; margin-top: 2px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .servicios-grid { grid-template-columns: repeat(2, 1fr); }
    .nosotros .container { grid-template-columns: 1fr; gap: 48px; }
    .mv-grid { grid-template-columns: 1fr; }
    .equipo-grid { grid-template-columns: 1fr; max-width: 480px; }
    .si-panels { height: auto; }
    .si-panel.is-active { grid-template-columns: 1fr; height: auto; }
    .si-panel-img { height: 280px; }
    .footer-top     { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-brand   { grid-column: 1 / -1; }
    .contacto-grid  { grid-template-columns: 1fr; gap: 52px; }
}

@media (max-width: 768px) {
    :root { --pad-section: 48px 20px; }

    .hero         { min-height: 85vh; }
    .hero--page   { min-height: 50vh; }
    .hero--compact{ min-height: 36vh; }

    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--navy);
        padding: 28px 24px;
        border-top: 1px solid rgba(255,255,255,.1);
        z-index: 999;
    }
    .site-nav.open { display: flex; flex-direction: column; }
    .site-nav ul   { flex-direction: column; gap: 22px; align-items: flex-start; width: 100%; }
    .site-nav a    { font-size: .95rem; }

    .hero-content { padding: 56px 20px 80px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-scroll  { display: none; }

    .servicios-grid { grid-template-columns: 1fr; }
    .si-tabs { display: none; }
    .si-mobile-select { display: block; }
    .si-panel-body { padding: 36px 28px; }
    .si-panel-img { min-height: 240px; }

    /* Carrusel en móvil: flechas en los laterales del contenedor */
    .carousel-outer { padding: 0 28px; }
    .proyectos-carousel { padding-left: 0; padding-right: 0; }
    .carousel-btn {
        width: 28px;
        height: 100%;
        border-radius: 0;
        top: 0;
        transform: none;
        font-size: .7rem;
        background: rgba(27,58,107,0.35);
        box-shadow: none;
        z-index: 4;
    }
    .carousel-btn--prev { left: 0; }
    .carousel-btn--next { right: 0; }
    .proyecto-slide { flex: 0 0 240px; }
    .proyecto-slide-img { height: 140px; }

    /* Clientes: 2 por fila en móvil */
    .clientes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .cliente-logo { width: 100%; }

    .footer-top { grid-template-columns: 1fr; gap: 36px; }
    .footer-brand { grid-column: 1; }
}

@media (max-width: 560px) {
    .contacto-form-wrap { padding: 32px 22px; }
    .cf-row { grid-template-columns: 1fr; }
    .cf-submit { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .cta-actions { flex-direction: column; }
    .cta-actions .btn { width: 100%; justify-content: center; }
}
