/* VARIABLES DE DISEÑO (Fácil personalización de colores) */
:root {
    --primary-color: #418fde;     /* Azul Institucional - Equivalente Exacto Pantone 279C */
    --secondary-color: #00e5ff;   /* Cyan de acento para resaltar elementos clave */
    --dark-color: #162a45;        /* Azul Marino Profundo para textos principales, títulos y footer (Contraste perfecto con 279C) */
    --light-bg: #f4f7fa;          /* Fondo gris-azulino muy suave para secciones secundarias */
    --text-color: #334155;        /* Gris oscuro suave para lectura descansada en párrafos */
    --white: #ffffff;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}


/* SECCIÓN EMBED INSTAGRAM */
.instagram-clean-section { padding: 40px 0; text-align: center; }

.instagram-custom-card {
    max-width: 350px; /* Tamaño compacto que deseabas */
    margin: 0 auto;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.instagram-custom-card:hover { transform: scale(1.03); }

.clean-insta-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Icono de Play elegante encima de la imagen */
.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e1306c;
    font-size: 20px;
    pointer-events: none;
}

.instagram-embed-section {
    background-color: var(--white);
    padding: 60px 0;
}

.instagram-wrapper {
    display: flex;
    justify-content: center;
    /* Ajustamos el margen para que no quede un hueco grande debajo por el escalado */
    margin-top: -20px; 
    margin-bottom: -20px;
}

.instagram-media {
    /* Reducimos el ancho máximo de 540px a 350px para hacerlo más discreto */
    max-width: 35px !important; 
    /* Escalado visual: Esto reduce el tamaño percibido del bloque */
    transform: scale(0.9); 
    transform-origin: center top;
}

/* CONTENEDOR DE LA IMAGEN DEL PRODUCTO */
.product-img-container {
    width: 100%;
    height: 220px;       /* Altura fija estándar para todas las fotos de productos */
    overflow: hidden;    /* Recorta cualquier excedente para mantener la simetría */
    background-color: var(--light-bg); /* Fondo de seguridad mientras carga la foto */
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Ajusta y escala la foto perfectamente sin estirarla ni aplastarla */
    transition: var(--transition);
}

/* Efecto Zoom elegante al pasar el cursor sobre la tarjeta del producto */
.product-card:hover .product-img {
    transform: scale(1.08);
}
/* Estilo para el enlace de correo en la barra superior */
.contact-email-link {
    color: var(--white); /* O el color que desees que tenga el texto */
    text-decoration: none; /* Quita el subrayado aburrido por defecto */
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Separa sutilmente el icono del sobre del texto */
}

/* Efecto al pasar el cursor por encima */
.contact-email-link:hover {
    color: var(--primary-color); /* Cambia a tu Azul Institucional 279C al pasar el mouse */
}


/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* UTILITIES */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

.container-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

/* TOP BAR */
.top-bar {
    background-color: var(--dark-color);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-info span { margin-right: 20px; }
.btn-intranet {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}


/* ESTILOS PARA EL LEMA EN EL HERO */
.brand-slogan {
    margin-bottom: 25px;
    border-left: 4px solid var(--primary-color); /* Línea vertical con tu Pantone 279C */
    padding-left: 15px;
}

.slogan-main {
    display: block;
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color); /* Color cyan vibrante para enganchar la mirada */
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}

.slogan-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-top: 5px;
    opacity: 0.95;
    font-style: italic;
}

/* Ajustes para los títulos que vienen abajo del lema */
.hero-content h1 {
    font-size: 3.2rem; /* Ligero ajuste para balancear el espacio */
    margin-top: 10px;
}

/* Recordatorio del lema en el pie de página */
.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-slogan-recall {
    font-size: 0.8rem;
    font-style: italic;
    color: #64748b; /* Gris suave */
}

/* Ajuste responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .slogan-main {
        font-size: 1.05rem;
    }
    .slogan-sub {
        font-size: 0.95rem;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .footer-grid-mobile {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* HEADER & NAVBAR */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.img-logo {
    height: 50px;       /* Controla la altura del logo en la barra */
    width: auto;        /* Mantiene la proporción original para que no se deforme */
    max-width: 100%;    /* Evita que se salga en pantallas pequeñas */
    object-fit: contain;
    transition: var(--transition);
}

/* Efecto sutil al pasar el cursor sobre el logo */
.logo a:hover .img-logo {
    opacity: 0.9;
    transform: scale(1.02);
}

.img-history {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover; /* Esto hace que la foto se adapte al espacio sin deformarse */
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Ajuste opcional para móviles si el logo necesita verse un poco más compacto */
@media (max-width: 768px) {
    .img-logo {
        height: 40px;   /* Un toque más pequeño en celulares */
    }
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 25px;
    font-weight: 600;
    transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary-color); }
.btn-cta-nav {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 4px;
}
.btn-cta-nav:hover { background-color: var(--dark-color); }
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* HERO SECTION */
.hero-section {
background: linear-gradient(135deg, rgba(22, 42, 69, 0.9), rgba(65, 143, 222, 0.75)), 
    url('/img/coex.webp') no-repeat center center/cover;
    color: var(--white);
    padding: 100px 0;
    min-height: 75vh;
    display: flex;
    align-items: center;
}
.hero-content { max-width: 700px; }
.hero-subtitle { color: var(--secondary-color); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.hero-content h1 { font-family: var(--font-title); font-size: 3.5rem; margin: 15px 0; line-height: 1.2; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* SECCIÓN PROMO INSTAGRAM */
.instagram-promo-section {
    background-color: var(--light-bg);
    padding: 60px 0;
    border-top: 1px solid #e2e8f0;
}

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

.social-badge {
    background: #e1306c; /* Color oficial de Instagram */
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.instagram-cta-text h2 {
    font-family: var(--font-title);
    font-size: 2.3rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.instagram-cta-text p {
    color: var(--text-color);
    font-size: 1.05rem;
    margin-bottom: 30px;
    text-align: justify;
}

/* Botón Premium para Instagram */
.btn-instagram-premium {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white) !important;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 35px;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
    border-radius: 6px;
    transition: var(--transition);
}

.btn-instagram-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 39, 67, 0.5);
}

/* Simulación visual de Feed */
.instagram-mock-feed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.feed-box {
    height: 240px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
}

/* Aquí puedes enlazar fotos reales de tus máquinas */
.feed-box.box-1 {
    background: url('../img/extrusora-feed.jpg') no-repeat center center/cover;
    background-color: #ced4da; /* Placeholder por si no hay imagen */
}

.feed-box.box-2 {
    background: url('../img/bobinas-feed.jpg') no-repeat center center/cover;
    background-color: #b0bec5; /* Placeholder por si no hay imagen */
}

.feed-box:hover {
    transform: scale(1.03);
}

.feed-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(22, 42, 69, 0.4);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    transition: var(--transition);
}

.feed-box:hover .feed-overlay {
    background: rgba(226, 48, 108, 0.6); /* Tinte de Instagram al pasar el mouse */
}

.feed-overlay span {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-title);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .grid-2-equal {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .instagram-cta-text {
        text-align: center;
    }
    .instagram-cta-text p {
        text-align: center;
    }
}
    
/* SECCIÓN HISTORIA */
.history-section {
    background-color: var(--white);
    padding: 40px 0;
}
.section-subtitle-dark {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}
.history-text h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 20px;
}
.history-text p {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.05rem;
    text-align: justify;
}
.highlight-text {
    font-size: 1.15rem !important;
    color: var(--text-color) !important;
    line-height: 1.6;
}

/* Contenedor gráfico para la historia */
.placeholder-history-img {
    background: linear-gradient(135deg, #e0e6ed, #b0bec5);
    height: 100%;
    min-height: 350px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}
.placeholder-history-img span {
    font-family: var(--font-title);
    font-weight: 700;
    margin-top: 15px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ajuste responsive para la historia */
@media (max-width: 992px) {
    .placeholder-history-img {
        min-height: 250px;
        margin-bottom: 30px;
    }
}
/* BOTONES */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-right: 15px;
}
.btn-primary { background-color: var(--secondary-color); color: var(--dark-color); }
.btn-primary:hover { background-color: var(--white); color: var(--primary-color); }
.btn-secondary { border: 2px solid var(--white); color: var(--white); }
.btn-secondary:hover { background-color: var(--white); color: var(--dark-color); }
.btn-block { width: 100%; display: block; border: none; cursor: pointer; }

/* STATS */
.stats-section { background-color: var(--light-bg); text-align: center; margin-top: -50px; position: relative; z-index: 10; padding: 0;}
.stat-card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.stat-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }
.stat-card h3 { font-family: var(--font-title); font-size: 2.2rem; color: var(--dark-color); }

/* PRODUCTOS */
.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.placeholder-img { background: #e0e0e0; height: 200px; display: flex; align-items: center; justify-content: center; color: #999; }
.product-info { padding: 25px; }
.product-info h3 { font-family: var(--font-title); margin-bottom: 10px; color: var(--dark-color); }
.product-info p { font-size: 0.95rem; color: #666; margin-bottom: 15px; }
.badge { background: var(--light-bg); color: var(--primary-color); font-size: 0.8rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; }

/* FORMULARIO DE CONTACTO */
.contact-section { background-color: var(--dark-color); color: var(--white); }
.contact-text h2 { font-family: var(--font-title); font-size: 2.5rem; margin-bottom: 20px; }
.contact-details { margin-top: 30px; }
.contact-details p { margin-bottom: 15px; font-size: 1.1rem; }
.contact-details i { margin-right: 10px; color: var(--secondary-color); }

.contact-form-container { background: var(--white); padding: 40px; border-radius: 8px; color: var(--text-color); }
.contact-form-container h3 { font-family: var(--font-title); margin-bottom: 20px; color: var(--dark-color); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit;
}

/* FOOTER & WHATSAPP */
.main-footer { background: #111; color: #888; padding: 20px 0; font-size: 0.9rem; }
.footer-socials a { color: #888; margin-left: 15px; font-size: 1.2rem; transition: var(--transition); }
.footer-socials a:hover { color: var(--secondary-color); }

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px;
    background-color: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 100;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .main-header .container { padding: 0 5%; }
    .menu-toggle { display: block; }
    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--white); direction: column; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .nav-menu.active { display: flex; flex-direction: column; }
    .nav-menu a { margin: 10px 0; }
    .hero-content h1 { font-size: 2.5rem; }
}
@media (min-width: 576px) { .grid-2-sm { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; } }