/* ============================================================
   Piscinas MVP — style.css
   CSS puro, mobile-first, sin frameworks.
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --color-primary: #0d2b4e;
    --color-primary-dark: #071626;
    --color-primary-light: #2f7ab5;
    --color-accent: #f5820a;
    --color-accent-dark: #d96f05;
    --color-whatsapp: #25d366;
    --color-whatsapp-dark: #1ebd5a;
    --color-white: #ffffff;
    --color-bg: #f4f8fb;
    --color-text: #1c2b36;
    --color-text-muted: #5c7080;
    --color-border: #dbe7ef;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(13, 43, 78, 0.16);
    --shadow-sm: 0 4px 12px rgba(13, 43, 78, 0.1);
    --container-width: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.25;
    color: var(--color-primary-dark);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 64px 0; }

/* ---------- Animación de secciones al hacer scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); }

.btn-whatsapp {
    background: var(--color-whatsapp);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-whatsapp:hover { background: var(--color-whatsapp-dark); transform: translateY(-2px); }

.btn-call {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-call:hover { background: var(--color-primary); color: var(--color-white); transform: translateY(-2px); }

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

.btn-outline:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-2px); }

.btn-block { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-primary-dark);
}

.logo img { height: 34px; width: auto; display: block; }
.footer-logo img { height: 30px; }

/* ---------- Animación de entrada del logo ---------- */
#siteLogo {
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#siteLogo.logo-visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-primary-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px 20px 24px;
    box-shadow: var(--shadow-sm);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.site-nav.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.site-nav > ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-nav a {
    display: block;
    padding: 12px 8px;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 8px;
}

.site-nav a.active,
.site-nav a:hover { color: var(--color-primary); background: var(--color-bg); }

.nav-cta { margin-top: 8px; }
.nav-cta:hover { background: var(--color-accent-dark) !important; }

/* Desplegable "Servicios" */
.has-dropdown { position: relative; }

.dropdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 16px;
    border-left: 2px solid var(--color-border);
    margin: 4px 0 4px 12px;
}

.dropdown a { font-size: 0.92rem; padding: 8px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumbs li { display: flex; align-items: center; gap: 8px; }

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover { color: var(--color-primary); }

.breadcrumbs span[aria-current] {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 72px 0;
    text-align: center;
}

.hero h1 {
    color: var(--color-white);
    font-size: clamp(1.9rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 620px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.hero-badges span { display: flex; align-items: center; gap: 6px; }

/* Hero con foto de fondo (home) — texto alineado a la izquierda */
.hero-photo {
    position: relative;
    text-align: left;
    padding: 96px 0 80px;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(7, 22, 38, 0.96) 0%, rgba(7, 22, 38, 0.86) 40%, rgba(7, 22, 38, 0.55) 100%);
    z-index: -1;
}

.hero-photo .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(47, 122, 181, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-photo h1 { max-width: 640px; }
.hero-photo p { margin: 0 0 28px; }
.hero-photo .hero-actions { flex-direction: row; align-items: center; }
.hero-photo .hero-badges { justify-content: flex-start; }

/* ---------- Sección genérica de encabezado ---------- */
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}

.section-head .eyebrow {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: var(--color-text-muted); }

/* Sección sobre fondo oscuro (ej. Proyectos) */
.section-dark { background: var(--color-primary-dark); }
.section-dark .section-head h2,
.section-dark h1 { color: var(--color-white); }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.75); }
.section-dark .section-head .eyebrow { color: var(--color-primary-light); }
.section-dark .hero p { color: rgba(255, 255, 255, 0.9); }

/* ---------- Cards de servicios ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    font-size: 1.6rem;
    margin-bottom: 18px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--color-text-muted); font-size: 0.95rem; }

.card ul { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.card ul li { font-size: 0.9rem; color: var(--color-text-muted); padding-left: 22px; position: relative; }
.card ul li::before { content: "✔"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

/* Card con foto (grid de servicios en home) */
.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; height: 180px; object-fit: cover; }
.card-photo .card-body { padding: 24px; }
.card-photo .card-icon { margin-bottom: 14px; }

.card-tag {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-top: 10px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Card numerada ("Por qué elegirnos") */
.card-number {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    margin-bottom: 12px;
}

/* Card de proyecto (foto con overlay oscuro) */
.project-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
}

.project-card img { width: 100%; height: 100%; object-fit: cover; }

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 22, 38, 0) 40%, rgba(7, 22, 38, 0.9) 100%);
}

.project-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    color: var(--color-white);
    z-index: 1;
}

.project-card .card-tag {
    background: rgba(47, 122, 181, 0.35);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-card h3 { color: var(--color-white); font-size: 1.05rem; margin: 10px 0 4px; }
.project-card .location { font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }

/* ---------- CTA banda ---------- */
.cta-band {
    background: var(--color-primary-dark);
    color: var(--color-white);
    text-align: center;
    border-radius: var(--radius);
    padding: 48px 24px;
}

.cta-band h2 { color: var(--color-white); margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }

/* ---------- Formulario de contacto ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--color-white);
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.contact-info-item .icon { font-size: 1.4rem; }
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item p, .contact-info-item a { color: var(--color-text-muted); font-size: 0.9rem; }

.contact-form {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--color-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-error {
    display: block;
    min-height: 1.1em;
    margin-top: 6px;
    color: #b3261e;
    font-size: 0.85rem;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #b3261e;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 108, 176, 0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* Honeypot: oculto para humanos, visible para bots */
.form-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

.form-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.form-message.show { display: block; }
.form-message.success { background: #e3f8ec; color: #146c43; border: 1px solid #b6ecc9; }
.form-message.error { background: #fdecec; color: #b3261e; border: 1px solid #f6c4c1; }

.form-disclaimer {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 14px;
}

.form-disclaimer a { color: var(--color-primary); text-decoration: underline; }

/* ---------- Legal ---------- */
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h2 { margin: 28px 0 12px; font-size: 1.25rem; }
.legal-content p, .legal-content li { color: var(--color-text-muted); margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; list-style: disc; }
.legal-content ul li { list-style: disc; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding-top: 56px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 40px;
}

.footer-logo { color: var(--color-white); margin-bottom: 12px; }
.footer-col h3 { color: var(--color-white); font-size: 1rem; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a:hover { color: var(--color-white); }
.footer-contact li { display: flex; gap: 6px; align-items: flex-start; }

.footer-social {
    flex-direction: row !important;
    gap: 12px !important;
    margin-top: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    transition: background 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-bottom-links a:hover { color: var(--color-white); text-decoration: underline; }

.footer-credit {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.footer-credit:hover { opacity: 0.85; }
.footer-credit img { height: 15px; width: auto; display: block; }

@media (min-width: 720px) {
    .footer-bottom-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 58px;
    height: 58px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    z-index: 200;
    transition: transform 0.15s ease;
}

.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Bot de preguntas frecuentes ---------- */
.chatbot-widget {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 200;
}

.chatbot-toggle {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chatbot-toggle:hover { transform: scale(1.08); }

.chatbot-panel {
    position: absolute;
    bottom: 72px;
    left: 0;
    width: min(340px, calc(100vw - 44px));
    max-height: min(480px, calc(100vh - 140px));
    background: var(--color-white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom left;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.chatbot-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chatbot-panel[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .chatbot-panel { transition: none; }
}

.chatbot-header {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-text { flex: 1; min-width: 0; }
.chatbot-header-text strong { display: block; font-size: 0.95rem; }

.chatbot-header-text span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
}

.chatbot-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 rgba(74, 222, 128, 0.6);
    animation: chatbotPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes chatbotPulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-status-dot { animation: none; }
}

.chatbot-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.chatbot-messages::-webkit-scrollbar { width: 6px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }
.chatbot-messages::-webkit-scrollbar-thumb:hover { background: var(--color-primary-light); }

.chatbot-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.chatbot-message.bot {
    align-self: flex-start;
    background: var(--color-bg);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    align-self: flex-end;
    background: var(--color-primary);
    color: var(--color-white);
    border-bottom-right-radius: 4px;
}

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 14px;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-text-muted);
    animation: chatbotTyping 1s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatbotTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-typing span { animation: none; opacity: 0.7; }
}

.chatbot-suggestions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 16px 14px;
    max-height: 168px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.chatbot-suggestions::-webkit-scrollbar { width: 6px; }
.chatbot-suggestions::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; }

.chatbot-chip {
    border: 1px solid rgba(11, 108, 176, 0.25);
    background: rgba(11, 108, 176, 0.08);
    color: var(--color-primary-dark);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.76rem;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-chip:hover { background: rgba(11, 108, 176, 0.14); border-color: var(--color-primary-light); }

.chatbot-chip:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 108, 176, 0.2);
}

.chatbot-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
}

.chatbot-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    background: var(--color-bg);
}

.chatbot-input-row input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11, 108, 176, 0.15);
}

.chatbot-input-row button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding-left: 2px;
    transition: transform 0.15s ease;
}

.chatbot-input-row button:hover { transform: scale(1.06); }

.chatbot-branding {
    text-align: center;
    font-size: 0.72rem;
    color: var(--color-primary-light);
    margin: 0;
    padding: 6px 16px 2px;
}

.chatbot-contact {
    display: flex;
    gap: 8px;
    padding: 8px 16px 14px;
}

.chatbot-contact a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: background 0.15s ease;
}

.chatbot-contact-call { color: var(--color-primary); border-color: var(--color-primary-light); }
.chatbot-contact-call:hover { background: var(--color-primary); color: var(--color-white); }

.chatbot-contact-whatsapp { color: var(--color-whatsapp-dark); border-color: var(--color-whatsapp); }
.chatbot-contact-whatsapp:hover { background: var(--color-whatsapp); color: var(--color-white); }

.chatbot-toggle:focus-visible,
.chatbot-close:focus-visible,
.chatbot-input-row button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .whatsapp-float, .chatbot-toggle { width: 50px; height: 50px; }
    .chatbot-widget { bottom: 16px; left: 16px; }
}

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Video destacado (lightbox) ---------- */
.video-trigger {
    position: relative;
    display: block;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    border: none;
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    background: none;
}

.video-trigger img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-trigger:hover img { transform: scale(1.03); }

.video-trigger-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(13, 43, 78, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.video-trigger:hover .video-trigger-play {
    background: var(--color-accent);
    transform: translate(-50%, -50%) scale(1.08);
}

.video-trigger:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-lightbox[hidden] { display: none; }

.video-lightbox.open { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .video-lightbox { transition: none; }
}

.video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 22, 38, 0.9);
}

.video-lightbox-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    z-index: 1;
}

.video-lightbox-content video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
    display: block;
}

.video-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    font-size: 1.1rem;
    cursor: pointer;
}

.video-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

.video-lightbox-close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .video-lightbox-close { top: -40px; }
}

/* ============================================================
   Breakpoints — mobile-first
   ============================================================ */
@media (min-width: 720px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
    .hero-actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 960px) {
    .nav-toggle { display: none; }

    .site-nav {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 28px;
        padding: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        width: auto;
    }

    .site-nav > ul { flex-direction: row; gap: 4px; }
    .nav-cta { margin-top: 0; }

    .cards-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 0.8fr 1.2fr; }
    .footer-inner { grid-template-columns: repeat(4, 1fr); }

    .dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 260px;
        background: var(--color-white);
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 8px;
        padding-top: 16px;
        margin: 0;
        z-index: 50;
    }

    .has-dropdown:hover .dropdown,
    .has-dropdown:focus-within .dropdown { display: flex; }

    .dropdown a { color: var(--color-text); border-radius: 8px; }
    .dropdown a:hover { background: var(--color-bg); color: var(--color-primary); }
}
section#proyectos-ejecutados {
    background: var(--color-primary-dark);
}
.span-proyectos{
    color: var(--color-white) !important;
}
.titulo-proyectos{
    color: var(--color-white) !important;
}