/* ==========================================================================
   Grupo Sonker — Hoja de estilos compartida
   Variables de marca, tipografía base, navegación y pie de página comunes
   a index.html, atronix.html, tonai.html, categoria.html, contacto.html,
   quienes-somos.html y guia-compatibilidad.html.

   Los NOMBRES de las variables se mantienen igual que en la versión anterior
   a propósito, para que las páginas que no se rediseñaron a fondo (categoria,
   guia-compatibilidad) hereden la paleta nueva automáticamente sin romperse.
   ========================================================================== */

:root {
    /* Paleta corporativa — teal/azul dominante (mundo médico + energía),
       verde salud como acento secundario, ámbar reservado para Tonai. */
    --apple-bg: #f5f9fa;
    --apple-text: #12181b;
    --apple-blue: #0b6e76;
    --apple-blue-dark: #084f55;
    --card-gray: #ffffff;
    --nav-bg: rgba(245, 249, 250, 0.85);
    --btn-turquoise: #067f87;
    --btn-turquoise-dark: #045f65;
    --muted: #55606b;
    --trace: #1c7a45;
    --border-soft: rgba(18, 24, 27, 0.08);

    /* Ámbar — acento exclusivo de Tonai / energía solar */
    --color-amber: #96681e;
    --color-amber-bright: #d9a24b;
    --color-amber-dark: #6f4c15;
    --color-amber-tint: #fff8ec;

    /* Tono profundo para overlays/hero y secciones oscuras */
    --color-navy: #0a2e33;

    /* Tipografía */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;

    --shadow-soft: 0 4px 16px rgba(10, 20, 24, 0.05);
    --shadow-lift: 0 20px 44px rgba(10, 20, 24, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--apple-bg);
    color: var(--apple-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { -webkit-tap-highlight-color: transparent; }

img { max-width: 100%; }

/* --- NAVEGACIÓN --- */
.main-nav {
    position: sticky;
    top: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-soft);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--apple-text);
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.nav-logo-text img { height: 26px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; flex-shrink: 0; }

.nav-links a {
    text-decoration: none;
    color: var(--apple-text);
    font-size: 13px;
    font-weight: 500;
    margin-left: 22px;
    opacity: 0.75;
    transition: opacity 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover { opacity: 1; color: var(--apple-blue); }
.nav-links a.active { opacity: 1; color: var(--apple-blue); font-weight: 700; }

.nav-cta {
    background: var(--apple-blue) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 20px !important;
    opacity: 1 !important;
    transition: background-color 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--apple-blue-dark) !important; transform: translateY(-1px); }

.nav-links a:focus-visible,
button:focus-visible,
.btn-cotizar:focus-visible,
.site-search-btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

/* --- BUSCADOR DEL SITIO (tienda y categorías) --- */
.site-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 460px;
    height: 44px;
    margin: 0 24px;
    padding: 0 6px 0 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d5d7db;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.site-search:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(11, 110, 118, 0.15);
}

.site-search-icon {
    flex-shrink: 0;
    color: #9a9da4;
    margin-right: 10px;
}

.site-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    padding: 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--apple-text);
}

.site-search-input::placeholder { color: #9a9da4; }

.site-search-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    margin-left: 8px;
    border: none;
    border-radius: 50%;
    background: var(--apple-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.site-search-btn:hover { background: var(--apple-blue-dark); }

/* --- BOTÓN DE COTIZACIÓN (compartido en tienda y categorías) --- */
.btn-cotizar {
    display: block;
    background-color: var(--btn-turquoise);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
    padding: 12px 20px;
    border-radius: 30px;
    margin-top: 15px;
    transition: background-color 0.2s, transform 0.2s;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.btn-cotizar:hover {
    background-color: var(--btn-turquoise-dark);
}

/* --- BOTONES COMPARTIDOS DE MARCA (hero, CTAs) --- */
.btn-solid {
    display: inline-block;
    background: var(--apple-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 30px;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}
.btn-solid:hover { background: var(--apple-blue-dark); transform: translateY(-2px); }

.btn-ghost-light {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 25px;
    border-radius: 30px;
    border: 1.5px solid rgba(255,255,255,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color 0.2s, background-color 0.2s;
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.24); }

/* --- PIE DE PÁGINA SIMPLE (subpáginas internas: tienda, categoría, guía) --- */
footer {
    background: var(--card-gray);
    padding: 60px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid #dfe1e6;
    line-height: 1.6;
}

footer strong { color: var(--apple-text); }

/* --- PIE DE PÁGINA ENRIQUECIDO (index, atronix, tonai) --- */
footer.footer-rich {
    text-align: left;
    padding: 80px 20px 30px;
    background: var(--color-navy);
    color: rgba(255,255,255,0.75);
    border-top: none;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 18px;
}

.footer-col p, .footer-col a {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    display: block;
}

.footer-col a:hover { color: #fff; }

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.5);
}

.footer-pending {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-style: italic;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* --- UTILIDAD: revelado suave al hacer scroll (respeta reduced-motion) --- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* --- RESPONSIVO: colapso de nav compartido --- */
@media (max-width: 768px) {
    .nav-content { flex-direction: column; gap: 12px; padding: 15px; align-items: stretch; }
    .nav-logo-text { justify-content: center; }
    .nav-links { justify-content: center; flex-wrap: wrap; gap: 15px; }
    .nav-links a { margin-left: 0; font-size: 12px; }
    .site-search { width: 100%; max-width: none; margin: 0; }
}
