/* ==========================================================================
   PGA QUÍMICOS - HOJA DE ESTILOS PRINCIPAL (style.css)
   ========================================================================== */

:root {
    /* Paleta extraída del Logo de PGA Químicos */
    --pga-blue: #0066b2;
    --pga-blue-dark: #003875;
    --pga-green: #22b14c;
    --pga-green-dark: #0f7536;
    --pga-purple: #6f2c91;
    --pga-purple-dark: #4a1866;
    
    /* Color nativo oficial de WhatsApp */
    --wa-green: #25d366;
    --wa-green-hover: #20ba5a;

    /* Degradados corporativos */
    --gradient-pga: linear-gradient(135deg, var(--pga-blue) 0%, var(--pga-purple) 100%);
    --gradient-green: linear-gradient(135deg, #28d059 0%, var(--pga-green) 100%);
    --gradient-accent: linear-gradient(90deg, var(--pga-green), var(--pga-blue), var(--pga-purple));

    /* Fondos y textos */
    --dark-bg: #07111e;
    --light-bg: #f4f7fa;
    --text-dark: #1e2530;
    --text-light: #5a6578;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Navegación / Header (Barra Blanca inicial -> Transición a Azul)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    background: #ffffff; /* Inicialmente blanca */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-bottom 0.4s ease;
}

.logo-container img {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--text-dark); /* Texto oscuro cuando la barra es blanca */
    text-decoration: none;
    margin-left: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--pga-blue);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--pga-blue);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Estado Activo al hacer Scroll (.scrolled)
   -------------------------------------------------------------------------- */
.navbar.scrolled {
    background: var(--pga-blue-dark); /* Azul oscuro corporativo */
    padding: 12px 8%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid var(--pga-green);
}

.navbar.scrolled .nav-links li a {
    color: #ffffff; /* Texto blanco en fondo azul */
}

.navbar.scrolled .nav-links li a::after {
    background: var(--pga-green);
}

.navbar.scrolled .nav-links li a:hover {
    color: var(--pga-green);
}

/* ==========================================================================
   Sección Hero (Inicio)
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    animation: kenburns 25s infinite alternate ease-in-out;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 178, 0.85) 0%, rgba(111, 44, 145, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 850px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 35px;
    color: #e2e8f0;
    font-weight: 300;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* ==========================================================================
   Estructura General y Secciones
   ========================================================================== */
.section {
    padding: 100px 8%;
}

.bg-light {
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.subtitle {
    color: var(--pga-purple);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    color: var(--text-dark);
    font-size: 2.2rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* ==========================================================================
   Sección Quiénes Somos
   ========================================================================== */
.text-block h2 {
    font-size: 2.2rem;
    color: var(--pga-blue-dark);
    margin-bottom: 20px;
}

.text-block p {
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 1.05rem;
}

.img-wrapper {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #ffffff;
    position: relative;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

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

/* ==========================================================================
   Tarjetas de Productos y Servicios
   ========================================================================== */
.card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--pga-blue);
    transition: var(--transition);
}

.card:hover {
    border-top-color: var(--pga-green);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(111, 44, 145, 0.15);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 12px;
    color: var(--pga-blue-dark);
    font-size: 1.3rem;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gradient-green);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 177, 76, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--gradient-pga);
    box-shadow: 0 6px 20px rgba(0, 102, 178, 0.4);
    transform: translateY(-3px);
}

.btn-card {
    color: var(--pga-blue);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-card:hover {
    color: var(--pga-purple);
    transform: translateX(5px);
}

/* ==========================================================================
   Contacto y Formulario
   ========================================================================== */
.contact-info h2 {
    font-size: 2.2rem;
    color: var(--pga-blue-dark);
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.contact-list i {
    color: var(--pga-blue);
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form input, 
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: var(--pga-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 178, 0.15);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--dark-bg);
    color: #ffffff;
    text-align: center;
    padding: 35px 20px;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Botón Flotante de WhatsApp (Verde Nativo Oficial)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--wa-green); /* Verde nativo #25d366 */
    color: #ffffff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: var(--wa-green-hover);
    box-shadow: 0 6px 20px rgba(32, 186, 90, 0.6);
}

/* ==========================================================================
   Animaciones Reveal (Scroll)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Diseño Responsivo (Móvil / Tablet)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 5%;
    }
    
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 70px 5%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 25px;
    }
}
