/*
Theme Name: Pristino — Astra Child
Theme URI: https://pristino.com.gt
Template: astra
Author: Pristino
Author URI: https://pristino.com.gt
Description: Child theme de Astra personalizado para Pristino — Consultoría Ambiental y Seguridad Ocupacional en Guatemala. Incluye paleta verde corporativa, tipografía Montserrat + Open Sans, botón WhatsApp flotante, header sticky y animaciones sutiles. Diseñado para usarse con Elementor.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pristino-astra-child
*/

/* =========================================================================
   VARIABLES DE MARCA — PRISTINO
   ========================================================================= */
:root {
    --pristino-verde-oscuro: #1B5E20;
    --pristino-verde-medio: #2E7D32;
    --pristino-verde-acento: #4CAF50;
    --pristino-verde-claro: #E8F5E9;
    --pristino-gris-fondo: #F5F7F6;
    --pristino-gris-borde: #E0E4E2;
    --pristino-texto: #1F2A24;
    --pristino-texto-suave: #5A6660;
    --pristino-blanco: #FFFFFF;
    --pristino-whatsapp: #25D366;
    --pristino-whatsapp-hover: #128C7E;

    --pristino-fuente-titulo: 'Montserrat', system-ui, -apple-system, sans-serif;
    --pristino-fuente-cuerpo: 'Open Sans', system-ui, -apple-system, sans-serif;

    --pristino-shadow-card: 0 4px 16px rgba(27, 94, 32, 0.08);
    --pristino-shadow-hover: 0 12px 32px rgba(27, 94, 32, 0.18);
    --pristino-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   TIPOGRAFÍA GLOBAL
   ========================================================================= */
body,
.ast-container,
p, li, td, th, blockquote {
    font-family: var(--pristino-fuente-cuerpo);
    color: var(--pristino-texto);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.elementor-heading-title {
    font-family: var(--pristino-fuente-titulo);
    font-weight: 700;
    color: var(--pristino-verde-oscuro);
    letter-spacing: -0.01em;
}

h1, .elementor-heading-title.elementor-size-xxl { line-height: 1.15; }
h2 { line-height: 1.2; }

/* =========================================================================
   BOTONES — sobrescriben los de Astra y Elementor con la paleta Pristino
   ========================================================================= */
.ast-button,
.wp-block-button__link,
button.menu-toggle,
input[type="submit"],
.elementor-button.elementor-size-md,
.elementor-button.elementor-size-lg {
    background-color: var(--pristino-verde-oscuro);
    color: var(--pristino-blanco);
    border: 2px solid var(--pristino-verde-oscuro);
    border-radius: 6px;
    font-family: var(--pristino-fuente-titulo);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 14px 28px;
    transition: var(--pristino-transicion);
}

.ast-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
.elementor-button:hover {
    background-color: var(--pristino-verde-acento);
    border-color: var(--pristino-verde-acento);
    transform: translateY(-2px);
    box-shadow: var(--pristino-shadow-hover);
}

/* Botón secundario (outline) — cuando lleva la clase .btn-outline */
.btn-outline,
.elementor-button.btn-outline {
    background-color: transparent;
    color: var(--pristino-verde-oscuro);
}

.btn-outline:hover,
.elementor-button.btn-outline:hover {
    background-color: var(--pristino-verde-oscuro);
    color: var(--pristino-blanco);
}

/* =========================================================================
   HEADER STICKY
   ========================================================================= */
.ast-theme-transparent-header #masthead,
.site-header {
    transition: var(--pristino-transicion);
}

.ast-header-break-point .main-header-bar,
.main-header-bar {
    background-color: var(--pristino-blanco);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Sticky behavior cuando se hace scroll (Astra lo aplica solo si está activo) */
.ast-sticky-active .main-header-bar {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Color del enlace del menú */
.main-header-menu .menu-link {
    color: var(--pristino-texto);
    font-family: var(--pristino-fuente-titulo);
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link {
    color: var(--pristino-verde-oscuro);
}

/* =========================================================================
   TARJETAS DE SERVICIOS — animación on-hover
   ========================================================================= */
.elementor-widget-icon-box .elementor-icon-box-wrapper,
.elementor-widget-image-box .elementor-image-box-wrapper,
.pristino-service-card {
    background-color: var(--pristino-blanco);
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: var(--pristino-shadow-card);
    transition: var(--pristino-transicion);
    border: 1px solid var(--pristino-gris-borde);
    height: 100%;
}

.elementor-widget-icon-box:hover .elementor-icon-box-wrapper,
.elementor-widget-image-box:hover .elementor-image-box-wrapper,
.pristino-service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pristino-shadow-hover);
    border-color: var(--pristino-verde-acento);
}

.elementor-icon i,
.elementor-icon svg {
    color: var(--pristino-verde-oscuro);
    fill: var(--pristino-verde-oscuro);
    transition: var(--pristino-transicion);
}

.elementor-widget-icon-box:hover .elementor-icon i,
.elementor-widget-icon-box:hover .elementor-icon svg {
    color: var(--pristino-verde-acento);
    fill: var(--pristino-verde-acento);
    transform: scale(1.1);
}

/* =========================================================================
   SECCIONES — espaciado y fondos uniformes
   ========================================================================= */
.elementor-section.pristino-bg-light {
    background-color: var(--pristino-gris-fondo);
}

.elementor-section.pristino-bg-dark {
    background-color: var(--pristino-verde-oscuro);
    color: var(--pristino-blanco);
}

.elementor-section.pristino-bg-dark h1,
.elementor-section.pristino-bg-dark h2,
.elementor-section.pristino-bg-dark h3,
.elementor-section.pristino-bg-dark h4,
.elementor-section.pristino-bg-dark p,
.elementor-section.pristino-bg-dark .elementor-heading-title {
    color: var(--pristino-blanco);
}

/* =========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================= */
.pristino-whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    background-color: var(--pristino-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 9999;
    transition: var(--pristino-transicion);
    text-decoration: none;
    animation: pristino-pulse 2.4s ease-in-out infinite;
}

.pristino-whatsapp-float:hover {
    background-color: var(--pristino-whatsapp-hover);
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}

.pristino-whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--pristino-blanco);
}

.pristino-whatsapp-float .pristino-whatsapp-tooltip {
    position: absolute;
    right: 72px;
    background-color: var(--pristino-texto);
    color: var(--pristino-blanco);
    padding: 8px 14px;
    border-radius: 6px;
    font-family: var(--pristino-fuente-titulo);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    transition: var(--pristino-transicion);
}

.pristino-whatsapp-float:hover .pristino-whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pristino-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 16px rgba(37, 211, 102, 0); }
}

/* =========================================================================
   ESTADÍSTICAS — contadores grandes
   ========================================================================= */
.pristino-stat-number,
.elementor-counter-number-wrapper {
    font-family: var(--pristino-fuente-titulo);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--pristino-verde-oscuro);
    line-height: 1;
}

.pristino-stat-label {
    font-family: var(--pristino-fuente-cuerpo);
    font-size: 0.95rem;
    color: var(--pristino-texto-suave);
    margin-top: 8px;
}

/* =========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================= */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    border: 1px solid var(--pristino-gris-borde);
    border-radius: 6px;
    padding: 12px 14px;
    font-family: var(--pristino-fuente-cuerpo);
    font-size: 15px;
    width: 100%;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: var(--pristino-verde-acento);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer,
.ast-footer {
    background-color: var(--pristino-verde-oscuro);
    color: var(--pristino-blanco);
}

.site-footer a,
.ast-footer a {
    color: var(--pristino-verde-claro);
}

.site-footer a:hover {
    color: var(--pristino-blanco);
}

/* =========================================================================
   ANIMACIONES SUTILES — fade-in para elementos al scrollear
   (Elementor ya trae esto, esta clase es backup para uso manual)
   ========================================================================= */
.pristino-fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.pristino-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 768px) {
    .pristino-whatsapp-float {
        width: 54px;
        height: 54px;
        right: 16px;
        bottom: 16px;
    }
    .pristino-whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    .pristino-whatsapp-float .pristino-whatsapp-tooltip {
        display: none;
    }
    .pristino-stat-number,
    .elementor-counter-number-wrapper {
        font-size: 2.4rem;
    }
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.6rem !important; }
}

@media (max-width: 480px) {
    .elementor-section .elementor-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =========================================================================
   UTILIDADES — clases que se pueden usar desde Elementor
   ========================================================================= */
.text-verde-pristino { color: var(--pristino-verde-oscuro) !important; }
.bg-verde-pristino { background-color: var(--pristino-verde-oscuro) !important; }
.bg-verde-claro { background-color: var(--pristino-verde-claro) !important; }
.bg-gris-pristino { background-color: var(--pristino-gris-fondo) !important; }


/* ── Logo size fix ─────────────────────────────────────────────────── */
.custom-logo {
    max-width: 80px !important;
    width: 80px !important;
    height: auto !important;
}
.custom-logo-link {
    max-width: 80px !important;
}