/* =========================================================================
   1. VARIABLES Y RESET (Shared Tokens)
   ========================================================================= */
:root {
    --black: #0d0d0d;
    --white: #f5f2ee;
    --cream: #ede9e3;
    --ink: #1c1917;
    --muted: #6b6560;
    --accent: #c8a96e;
    --accent-dark: #9c7e47;
    --green: #3a6b4a;
    --green-light: #edf3ef;
    --red-light: #fdf0ef;
    --border: rgba(0,0,0,0.10);
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* =========================================================================
   2. COMPONENTES GLOBALES (Nav, Footer, Botones)
   ========================================================================= */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--black);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.nav-logo span { color: var(--accent); }

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}

nav a:hover, nav a.activo {
    color: #fff;
    border-bottom-color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--black) !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--accent-dark) !important; color: #fff !important; }

/* BOTONES */
.btn-row, .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--black);
    color: #fff;
    padding: 13px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: #333; transform: translateY(-1px); }

.btn-wsp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 13px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s;
}

.btn-wsp:hover { background: #1da851; transform: translateY(-1px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--ink);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.15s;
}

.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

/* FOOTER */
footer {
    background: #080808;
    color: rgba(255,255,255,0.35);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
}

.footer-logo span { color: var(--accent); }

/* WHATSAPP FLOTANTE */
.wsp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #25d366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wsp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}

.wsp-float svg { width: 28px; height: 28px; fill: #fff; }

/* =========================================================================
   3. SECCIONES ESPECÍFICAS (Index.html)
   ========================================================================= */

/* HERO */
#inicio {
    min-height: 92vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
    gap: 4rem;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.badge {
    font-size: 0.72rem; font-weight: 500; letter-spacing: 1px;
    text-transform: uppercase; padding: 4px 12px; border-radius: 100px;
    border: 1px solid var(--border); color: var(--muted); background: var(--cream);
}
.badge-accent { background: #f0e8d6; color: var(--accent-dark); border-color: var(--accent); }

.hero-h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 1.25rem; }
.hero-h1 em { font-style: italic; color: var(--accent-dark); }
.hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 480px; margin-bottom: 2rem; }

.hero-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-card { background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem 1.25rem; }
.metric-num { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; margin-bottom: 4px; }
.metric-lbl { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }

/* WRAPPERS Y DIVISORES */
.section-divider { border: none; border-top: 1px solid var(--border); max-width: 1200px; margin: 0 auto; }
.section-wrap { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }
.section-label { font-size: 0.72rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; margin-bottom: 0.75rem; }
.section-sub { font-size: 1rem; color: var(--muted); max-width: 560px; margin-bottom: 2.5rem; }

/* PORTAFOLIO */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.portfolio-item { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--cream); border: 1px solid var(--border); transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.portfolio-item:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.portfolio-item:hover img { transform: scale(1.04); }
.portfolio-placeholder { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 3rem; font-size: 0.95rem; }

/* TÉCNICAS */
.tecnicas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.tecnica-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; transition: border-color 0.25s, transform 0.25s; }
.tecnica-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.tecnica-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.tecnica-card h3 { font-family: var(--font-display); font-size: 1.3rem; }
.tecnica-card p { font-size: 0.92rem; color: var(--muted); flex: 1; }
.tecnica-rec { font-size: 0.82rem; color: var(--muted); background: var(--cream); padding: 0.75rem 1rem; border-radius: 6px; border-left: 2px solid var(--accent); }
.minimo { display: inline-block; background: var(--black); color: #fff; font-size: 0.78rem; font-weight: 500; text-transform: uppercase; padding: 6px 14px; border-radius: 4px; align-self: flex-start; }
.minimo-green { background: var(--green); }

/* CONTACTO (FORM) */
#contacto-section { background: var(--black); color: #fff; }
.contacto-inner { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contacto-label { font-size: 0.72rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.contacto-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); color: #fff; line-height: 1.15; }
.contacto-sub { font-size: 0.95rem; color: rgba(255,255,255,0.55); margin-bottom: 2rem; }
.contacto-wsp { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff; padding: 14px 24px; border-radius: 6px; font-size: 0.95rem; font-weight: 500; transition: background 0.2s, transform 0.15s; margin-bottom: 2rem; }
.info-rows { display: flex; flex-direction: column; gap: 1rem; }
.info-row { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: rgba(255,255,255,0.65); }
.info-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

form { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 2rem; display: flex; flex-direction: column; gap: 1rem; }
form label { font-size: 0.78rem; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 4px; display: block; }
form input, form textarea { width: 100%; padding: 0.85rem 1rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: #fff; font-family: var(--font-body); font-size: 0.95rem; transition: border-color 0.2s; }
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); }
#btnEnviar { padding: 0.95rem; background: var(--accent); color: var(--black); border: none; border-radius: 6px; font-weight: 500; cursor: pointer; transition: background 0.2s; }
#btnEnviar:hover { background: var(--accent-dark); color: #fff; }
#mensajeEstado { padding: 0.85rem 1rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; text-align: center; display: none; }

/* TABS Y FAQ */
.tab-btn { background: var(--cream); border: 1px solid var(--border); border-radius: 6px; padding: 9px 18px; font-size: 0.85rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: 0.2s; }
.tab-btn:hover, .tab-btn.tab-active { background: var(--black); color: #fff; border-color: var(--black); }

.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 0; cursor: pointer; font-size: 0.95rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--border); }
.faq-a { font-size: 0.9rem; color: var(--muted); line-height: 1.7; max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 1.1rem; }

/* =========================================================================
   4. SECCIONES ESPECÍFICAS (Protocolo.html)
   ========================================================================= */

.protocolo-hero { background: var(--black); padding: 5rem 2rem 4rem; text-align: center; }
.protocolo-hero-inner { max-width: 700px; margin: 0 auto; }
.hero-label { font-size: 0.72rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.2rem); color: #fff; line-height: 1.1; margin-bottom: 1rem; }

.protocolo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.paso-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 2rem 1.75rem; position: relative; overflow: hidden; transition: 0.25s; }
.paso-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.paso-bg-num { font-family: var(--font-display); font-size: 6rem; color: rgba(0,0,0,0.04); position: absolute; top: -12px; right: 8px; pointer-events: none; }
.paso-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--black); color: #fff; font-size: 0.78rem; font-weight: 500; margin-bottom: 1rem; }

.condiciones-block { background: var(--black); border-radius: 14px; padding: 3rem 2.5rem; text-align: center; margin-bottom: 2rem; }
.cond-title { font-family: var(--font-display); font-size: 1.8rem; color: #fff; margin-bottom: 1rem; }
.cond-text { font-size: 0.95rem; color: rgba(255,255,255,0.6); max-width: 600px; margin: 0 auto 2rem; }
.cond-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cond-pill { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 100px; padding: 8px 20px; font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* =========================================================================
   5. ANIMACIONES Y RESPONSIVE
   ========================================================================= */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    #inicio { grid-template-columns: 1fr; min-height: auto; padding: 3rem 1.5rem; }
    .hero-metrics { grid-template-columns: repeat(4, 1fr); }
    .contacto-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
    .nav-inner { padding: 0 1rem; }
    nav ul { gap: 0.75rem; }
    nav a { font-size: 0.7rem; }
    .nav-cta { display: none; }
    .section-wrap { padding: 3.5rem 1.25rem; }
    .hero-metrics { grid-template-columns: repeat(2, 1fr); }
}
/* =========================================================================
   6. CLASES FALTANTES — añadidas al separar el CSS
   ========================================================================= */

/* Hero layout */
.hero-text { animation: fadeUp 0.8s var(--ease) both; }
.hero-visual { animation: fadeUp 0.8s 0.2s var(--ease) both; }

/* Full Package grid (sección servicios) */
.fp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.fp-card {
    background: #fff;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.2s;
}
.fp-card:hover { background: var(--cream); }
.fp-num { font-family: var(--font-display); font-size: 2rem; color: var(--accent); line-height: 1; }
.fp-card h3 { font-size: 1rem; font-weight: 500; color: var(--ink); }
.fp-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0; }
.fp-tag {
    display: inline-block;
    font-size: 0.7rem; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px;
    background: var(--cream); color: var(--accent-dark);
    border: 1px solid rgba(200,169,110,0.3);
    align-self: flex-start;
}

/* Lab cards — dos columnas oscuro/claro */
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lab-card {
    background: var(--black);
    border-radius: 12px; padding: 2rem;
    display: flex; flex-direction: column; gap: 1rem;
}
.lab-card.light { background: var(--cream); }
.lab-label-sm {
    font-size: 0.68rem; font-weight: 500;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent);
}
.lab-card.light .lab-label-sm { color: var(--accent-dark); }
.lab-card h3 { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; color: #fff; }
.lab-card.light h3 { color: var(--ink); }
.lab-card p { font-size: 0.88rem; line-height: 1.65; margin: 0; color: rgba(255,255,255,0.6); }
.lab-card.light p { color: var(--muted); }
.lab-spec-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lab-spec-list li { font-size: 0.82rem; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.6); }
.lab-card.light .lab-spec-list li { color: var(--muted); }
.lab-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* Sustentabilidad */
.sust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.sust-card {
    border: 1px solid var(--border); border-radius: 12px;
    padding: 1.75rem; background: #fff;
    display: flex; flex-direction: column; gap: 0.75rem;
    transition: border-color 0.25s, transform 0.25s;
}
.sust-card:hover { border-color: var(--green); transform: translateY(-3px); }
.sust-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--green-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.sust-card h3 { font-size: 1rem; font-weight: 500; color: var(--ink); }
.sust-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; margin: 0; }
.sust-pill {
    display: inline-block; font-size: 0.7rem; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px;
    background: var(--green-light); color: var(--green);
    border: 1px solid rgba(58,107,74,0.2);
    align-self: flex-start;
}

/* Precios */
.precios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.precio-card {
    background: var(--cream); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
}
.precio-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 1rem; color: var(--ink); }
.precio-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 6px 0; border-bottom: 1px solid var(--border);
}
.precio-row:last-child { border-bottom: none; }
.precio-lbl { font-size: 0.8rem; color: var(--muted); }
.precio-val { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.precios-nota { font-size: 0.8rem; color: var(--muted); margin-top: 0.75rem; }

/* Tab panel */
.tab-panel { animation: fadeUp 0.35s var(--ease) both; }

/* Formulario — field wrapper */
.form-field { display: flex; flex-direction: column; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-icon {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: var(--muted); flex-shrink: 0;
    transition: background 0.2s;
}
.faq-item.open .faq-icon { background: var(--black); color: #fff; border-color: var(--black); }

/* Protocolo */
.cond-label {
    font-size: 0.72rem; font-weight: 500;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 1rem;
}

/* Responsive nuevas secciones */
@media (max-width: 900px) {
    .lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .fp-grid { border-radius: 10px; }
    .fp-card { padding: 1.5rem 1.25rem; }
    .lab-card { padding: 1.5rem; }
}

/* port-tab-btn es visualmente idéntico a tab-btn (selector de agrupación) */
.tab-btn.port-tab-btn { /* hereda de .tab-btn — sin estilos adicionales */ }