/* =========================================================
   Tema visual JH Estructuras de los Altos
   Se carga al final y solo sobrescribe estilos visuales
   (colores, tipografía, espaciado). La estructura HTML y la
   lógica de las páginas no cambian.
   ========================================================= */

:root {
    --navy: #0b2545;
    --navy-2: #13315c;
    --steel: #8da9c4;
    --orange: #d9480f;
    --orange-hover: #b83c0c;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --text: #1b2430;
    --muted: #556070;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 6px 20px rgba(11, 37, 69, 0.08);
    --shadow-hover: 0 12px 28px rgba(11, 37, 69, 0.16);
    --font-head: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Open Sans', system-ui, sans-serif;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.banner-content h2 {
    font-family: var(--font-head);
    color: var(--navy);
    letter-spacing: -0.01em;
}

section p { color: var(--muted); }

a, button, .btn, .custom-button { cursor: pointer; }

:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

/* Títulos de sección: sin líneas negras, con barra naranja */
.company-info h2,
.qualities h2,
.projects h2,
.projects-section h2,
.portfolio-header h2,
.titleServices h2,
.services h2,
.introContacto h2,
.solicitud-div h2 {
    border: none;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--navy);
    padding: 0 0 14px;
    margin: 0 auto 24px;
    position: relative;
    text-transform: none;
}

.company-info h2::after,
.qualities h2::after,
.projects h2::after,
.projects-section h2::after,
.portfolio-header h2::after,
.titleServices h2::after,
.introContacto h2::after,
.solicitud-div h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background: var(--orange);
}

/* ---------- Botones ---------- */
.btn,
.banner-content .btn,
.masProjects .btn,
.custom-button,
.contact-form button {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    padding: 13px 28px;
    min-height: 48px;
    box-sizing: border-box;
    background: var(--orange);
    color: #fff;
    border: 2px solid var(--orange);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(217, 72, 15, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.banner-content .btn:hover,
.masProjects .btn:hover,
.custom-button:hover,
.contact-form button:hover {
    background: var(--orange-hover);
    border-color: var(--orange-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 72, 15, 0.35);
}

.btn-outline,
.banner-content .btn-outline {
    background: transparent;
    border-color: #fff;
    box-shadow: none;
    margin-left: 12px;
}

.btn-outline:hover,
.banner-content .btn-outline:hover {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
}

/* ---------- Encabezado ---------- */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(11, 37, 69, 0.06);
    min-height: 0;
    padding: 8px 0;
    z-index: 1100;
}

.logo { width: 64px; margin-right: 14px; }

.logo-title { text-shadow: none; color: var(--navy); }

header h1,
.title h1 {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
}

.title h2 {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

header a { background: none; }

.main-menu { align-items: center; }

.main-menu a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--navy);
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.main-menu a:hover {
    background: var(--bg);
    color: var(--orange);
}

.main-menu .nav-cta a {
    background: var(--orange);
    color: #fff;
    border-radius: 999px;
    margin-left: 8px;
}

.main-menu .nav-cta a:hover {
    background: var(--orange-hover);
    color: #fff;
}

.menu-toggle {
    color: var(--navy);
    font-size: 28px;
    width: 48px;
    height: 48px;
}

@media (max-width: 767px) {
    header h1, .title h1 { font-size: 20px; }
    .title h2 { font-size: 11px; }
    .logo { width: 48px; }

    nav {
        top: 100%;
        background: var(--surface);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow-hover);
    }

    .main-menu li { border-bottom: 1px solid var(--border); }
    .main-menu li:last-child { border-bottom: none; }
    .main-menu .nav-cta a { margin: 12px 20px; text-align: center; }
}

/* ---------- Banner (Inicio) ---------- */
.banner { height: min(78vh, 620px); z-index: 1; }

.banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 37, 69, 0.35) 0%, rgba(11, 37, 69, 0.75) 100%);
    z-index: 2;
    pointer-events: none;
}

.banner-content {
    z-index: 3;
    width: min(90%, 760px);
}

.banner-content h2 {
    background: none;
    box-shadow: none;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
}

.banner-content p {
    background: none;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 28px;
}

@media (max-width: 480px) {
    .banner-content .btn-outline { margin: 12px 0 0; }
}

/* ---------- Quiénes somos ---------- */
.company-info { background: var(--surface); padding: 72px 0; }

.company-info .container { max-width: 860px; }

.company-info p { text-align: left; font-size: 1.05rem; }

.company-info b { color: var(--navy); }

/* ---------- Visión y alcance ---------- */
.visionSection { background: var(--bg); padding: 72px 0; }

.vision {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    border-radius: 20px;
    max-width: 1200px;
    padding: 56px 0;
}

.intro-title {
    border: none;
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.intro-description { color: rgba(255, 255, 255, 0.85); max-width: 760px; margin: 12px auto 0; }

.stats-container { background: transparent; gap: 20px; padding: 24px 0 0; }

.stat {
    background: var(--surface);
    border-top: 4px solid var(--orange);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0;
    padding: 28px 24px;
    text-align: left;
    overflow: hidden;
}

.stat h2 {
    font-size: 1.3rem;
    color: var(--navy);
    margin: 0 0 12px;
}

.stat p, .stat ul { color: var(--muted); }

.stat ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.stat ul li {
    background: var(--bg);
    color: var(--navy);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-image { opacity: 0.08; }

/* ---------- Cualidades ---------- */
.qualities { background: var(--surface); padding: 72px 0; }

.intro-description-quality { color: var(--muted); max-width: 760px; margin: 0 auto; }

.qualities-list { gap: 24px; margin-top: 16px; }

.qualities .container { width: 90%; max-width: 1200px; }

.quality-item {
    width: auto;
    flex: 1 1 220px;
    max-width: 270px;
    padding: 0 0 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quality-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.quality-item img {
    border-radius: 0;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    margin-bottom: 16px;
}

.quality-item h3 { color: var(--navy); font-size: 1.1rem; padding: 0 16px; }

.quality-item p { padding: 0 16px; }

/* ---------- Galería (Inicio) ---------- */
.projects { background: var(--bg); padding: 72px 0 0; }

section.gallery { background: var(--bg); max-width: 1200px; padding: 8px 20px 72px; }

.image-wrapper {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

.image-wrapper img { height: 100%; object-fit: cover; }

.image-wrapper:hover img { transform: scale(1.06); }

.masProjects { margin-top: 16px; }

/* ---------- Servicios ---------- */
.services, .marginSection { background: var(--bg); }

.titleServices p { max-width: 860px; margin: 0 auto; }

.service-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 560px;
}

.service-image img { border-radius: 0; display: block; }

.service-text i { color: var(--orange); }

.service-text h3 { color: var(--navy); }

.service-text p { color: var(--muted); }

.solicitudes-section { background: transparent; gap: 20px; padding-bottom: 48px; }

.solicitudes-info,
.solicitud-div {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    border-radius: 20px;
}

.solicitud-div { max-width: 900px; margin: 0 auto; padding: 40px 32px; text-align: left; box-sizing: border-box; }

.solicitudes-info .solicitud-div h2 { color: #fff; }

.solicitudes-info p { color: rgba(255, 255, 255, 0.85); }

.servicios-lista li { margin-bottom: 12px; color: rgba(255, 255, 255, 0.85); }

.servicios-lista li b { color: #ffb38a; }

/* Tarjetas de servicio: foto vertical a un lado y texto al otro */
.service-item { align-items: stretch; }

.service-content { align-items: stretch; height: 100%; min-height: 340px; }

.service-image { flex: 0 0 42%; position: relative; }

.service-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-text {
    flex: 1;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .service-content { flex-direction: column; min-height: 0; }
    .service-image { order: -1; flex: none; aspect-ratio: 4 / 3; }
}

.column {
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--orange);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px 24px;
}

.solicitudes-section { align-items: stretch; }

.column { display: flex; flex-direction: column; align-items: center; }

.column .custom-button { margin-top: auto; }

.column:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.column h2 { color: var(--navy); font-size: 1.1rem; }

.column p { color: var(--muted); }

.custom-button { font-size: 14px; padding: 12px 20px; }

/* ---------- Proyectos ---------- */
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

.project-card { border-radius: var(--radius); box-shadow: var(--shadow); }

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

.project-image > img,
.project-image > video { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; display: block; }

.project-image .watermark { right: 12px; bottom: 12px; }

.project-image .watermark img {
    width: 52px !important;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 4px;
}

.project-content h3 { color: var(--navy); font-size: 1.2rem; }

.project-content p { color: var(--muted); }

.containerPortafolio::before { background-color: rgba(11, 37, 69, 0.7); }

.arrow { min-width: 48px; min-height: 48px; border-radius: 50%; }

/* ---------- Contacto ---------- */
.mainContact { background: var(--bg); box-shadow: none; padding: 48px 20px; }

.contact-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mainContact .company-info {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    margin: 0;
    padding: 40px 32px;
    max-width: none;
    width: 100%;
    text-align: left;
    align-self: stretch;
}

.mainContact .company-info h3 { color: #fff; font-size: 1.4rem; }

.mainContact .company-info h4 { color: var(--steel); letter-spacing: 0.08em; margin-top: 16px; }

.mainContact .company-info p { color: rgba(255, 255, 255, 0.85); padding: 0; }

.mainContact .company-info a { color: #fff; padding: 4px 0; display: block; }

.mainContact .company-info a:hover { color: #ffb38a; }

.contact-form { padding: 32px; margin: 0; text-align: left; }

.contact-form label { display: block; }

.contact-form label { color: var(--navy); font-weight: 600; font-size: 0.95rem; }

.contact-form input,
.contact-form textarea,
.contact-form select {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(217, 72, 15, 0.15);
    background: #fff;
}

.contact-form .privacy-consent { display: block; font-weight: 400; color: var(--text); }

.contact-form .privacy-consent input[type="checkbox"] { margin: 0 6px 0 0; vertical-align: middle; accent-color: var(--orange); }

.contact-form .privacy-consent a { color: var(--orange); }

@media (max-width: 767px) {
    .mainContact { padding: 32px 12px; }
    .contact-container { width: 100%; }
    .contact-form { padding: 24px 20px; }
    .mainContact .company-info { padding: 32px 20px; }
}

.contact-form button { width: 100%; }

.aviso-legal { background: var(--surface); }

.aviso-legal h2, .aviso-legal h3 { color: var(--navy); }

/* ---------- Pie de página ---------- */
footer { background: var(--navy); }

.footer-section h3 { color: #fff; font-size: 1.05rem; }

.footer-section p { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; overflow-wrap: anywhere; }

.footer-section a,
.footer-section ul li a { color: rgba(255, 255, 255, 0.85); }

.footer-section ul li a:hover,
.social-media a:hover { color: #ffb38a; }

.footer-logo { background: #fff; border-radius: 12px; padding: 8px; }

.bottom-bar { background: #071a31; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

.bottom-bar p { margin: 0; }

/* ---------- Botones flotantes ----------
   Solo queda WhatsApp (Facebook, correo y YouTube siguen en el pie de página). */
.fixed-facebook-icon,
.fixed-email-icon,
.fixed-youtube-icon { display: none; }

.fixed-whatsapp-icon {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    transform: none;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.fixed-whatsapp-icon a { font-size: 30px; }

.fixed-icon:hover { transform: scale(1.08); }

@media (max-width: 768px) {
    .fixed-whatsapp-icon { width: 56px; height: 56px; bottom: 16px; right: 16px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Carrusel del banner: una sola foto visible a la vez ---------- */
.banner-images img { opacity: 0; }
.banner-images img:first-child { opacity: 1; }

/* ---------- Obras realizadas (Proyectos) ---------- */
.obras-titulo {
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    color: var(--navy);
    text-align: left;
    margin: 40px 0 20px;
}

.obras-grid { margin-bottom: 16px; }

.obra-abrir {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
}

.obra-abrir .project-image { display: block; overflow: hidden; }

.obra-abrir .project-image > img { transition: transform 0.3s ease; }

.obra-abrir:hover .project-image > img { transform: scale(1.04); }

.obra-contador {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(11, 37, 69, 0.85);
    color: #fff;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Visor de fotos ---------- */
.visor {
    width: min(94vw, 1100px);
    max-height: 94vh;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-hover);
}

.visor::backdrop { background: rgba(7, 26, 49, 0.88); }

.visor-contenido { display: flex; flex-direction: column; max-height: 94vh; }

.visor-barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
}

.visor-barra h3 { margin: 0; font-size: 1.05rem; }

.visor-foto {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    background: #071a31;
}

#visor-imagen { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }

.visor-cerrar,
.visor-anterior,
.visor-siguiente {
    width: 44px;
    height: 44px;
    flex: none;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    transition: background-color 0.2s ease;
}

.visor-cerrar { background: var(--bg); color: var(--navy); }

.visor-cerrar:hover { background: var(--border); }

.visor-anterior,
.visor-siguiente {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
}

.visor-anterior { left: 12px; }

.visor-siguiente { right: 12px; }

.visor-anterior:hover,
.visor-siguiente:hover { background: #fff; }

.visor-anterior[hidden],
.visor-siguiente[hidden] { display: none; }

.visor-pie {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 12px 20px;
    color: var(--text);
    font-size: 0.95rem;
}

.visor-contador { flex: none; color: var(--muted); }

#visor-imagen { transition: opacity 0.15s ease; }

#visor-imagen.cargando { opacity: 0; }

/* Galería del inicio: 4 columnas sin depender del tamaño de las fotos */
section.gallery { display: block; margin: 0 auto; }

section.gallery > .gallery {
    width: 100%;
    padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    justify-items: stretch;
}

section.gallery .image-wrapper img { width: 100%; margin: 0; padding: 0; border-radius: 0; }

section.gallery > .gallery { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    section.gallery > .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Video en el visor ---------- */
#visor-video { max-width: 100%; max-height: 72vh; display: block; background: #000; }

#visor-video[hidden], #visor-imagen[hidden] { display: none; }

/* ---------- Así trabajamos (Inicio) ---------- */
.trabajo { background: var(--bg); padding: 72px 20px 0; }

.trabajo-contenido {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
}

.trabajo-texto { flex: 1; }

.trabajo-texto h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 16px;
}

.trabajo-texto p { font-size: 1.05rem; margin-bottom: 28px; }

.trabajo-video { flex: 0 0 320px; }

.trabajo-video video {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    background: #000;
}

@media (max-width: 768px) {
    .trabajo-contenido { flex-direction: column; gap: 32px; text-align: center; }
    .trabajo-video { flex: none; width: min(100%, 300px); }
}
