/*
Theme Name: Jarochito - Diseño Minimalista
Theme URI: https://jarochito.com.mx
Author: Tu Nombre
Description: Tema sobrio y minimalista con menú vertical para Jarochito, empresa refresquera y embotelladora.
Version: 2.0.0
Text Domain: jarochito-minimal
*/

/* ==============================================
   ==================== SECTION: IMPORTS Y RESET ====================
   ============================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

:root {
    /* Paleta de colores - Azul y blanco minimalista */
    --color-primary: #1886C7;      /* Azul corporativo profundo */
    --color-primary-dark: #063a6b;
    --color-primary-light: #2a7fcf;
    --color-accent: #1886C7;       /* Azul claro para acentos */
    --color-accent-light: #c5e4ff;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;
    --color-white: #ffffff;
    --color-black: #0a0a0a;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
    --header-height-mobile: 70px;
    --container-padding: 2rem;
    --container-max: 1200px;
    
    /* Sombras y bordes */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transiciones */
    --transition: all 0.2s ease;
    
    /* Tipografía */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-gray-50);
    color: var(--color-gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==============================================
   ==================== SECTION: LAYOUT PRINCIPAL (SIDEBAR + CONTENIDO) ====================
   ============================================== */
@media (min-width: 1024px) {
    .mobile-header {
        display: none;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-width);
        height: 100vh;
        background-color: var(--color-white);
        border-right: 1px solid var(--color-gray-200);
        padding: 2rem 1.5rem;
        overflow-y: auto;
        z-index: 999;
        box-shadow: var(--shadow-sm);
    }

    .main-content {
        margin-left: var(--sidebar-width);
        width: auto;
    }

    .container {
        max-width: var(--container-max);
        margin: 0 auto;
        padding: 0 var(--container-padding);
    }

    .site-footer {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .page-hero,
    .section,
    .contact-section,
    .archive-section,
    .blog-section,
    .project-hero-single,
    .project-layout {
        margin-left: 0;
    }

    .project-hero-single {
        width: 100%;
    }
}

/* ==============================================
   ==================== SECTION: HEADER / SIDEBAR (MENÚ VERTICAL) ====================
   ============================================== */
.site-header {
    background-color: var(--color-primary);
    padding: 1rem var(--container-padding);
    align-content: center;
    align-items: center;
}

/* Logo: fondo blanco y forma circular */
.site-logo {
    background-color: var(--color-white);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    margin: 0 auto 1.5rem auto;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.site-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
    margin: auto;   /* elimina márgenes */
    padding: 0;  
}

.site-logo .logo-text {
    font-size: 1.2rem;
    text-align: center;
    color: var(--color-primary);
}

/* Contenedor principal del menú */
.primary-nav {
    background-color: var(--color-primary);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    overflow: hidden;
}

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.primary-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-nav li:last-child {
    border-bottom: none;
}

.primary-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.75rem;
    color: var(--color-white);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    gap: 0;
}

.primary-nav a:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateX(4px);
}

.primary-nav .current-menu-item a,
.primary-nav .current_page_item a {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    border-left: 3px solid var(--color-accent);
}

.primary-nav a svg {
    display: none;
}

/* Header actions (botón hamburguesa) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-gray-800);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile menu overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background-color: var(--color-white);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-gray-100);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
}

.mobile-nav a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-gray-800);
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid var(--color-gray-200);
}

.site-header.is-open .primary-nav {
    background-color: var(--color-primary);
}

/* Botón hamburguesa móvil (símbolo ☰) */
.hamburger {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-primary);
    cursor: pointer;
    line-height: 1;
    width: auto;
    height: auto;
}

/* Ajustes responsive para móvil */
@media (max-width: 1023px) {
    body {
        padding-top: var(--header-height-mobile);
    }
    
    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-gray-200);
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 0.8rem 1rem;
        z-index: 999;
    }
    
    .mobile-header .logo-mobile {
        grid-column: 2 / 3;
        text-align: center;
    }
    
    .mobile-header .hamburger {
        grid-column: 3 / 4;
        justify-self: end;
    }

    .mobile-header .logo-mobile img {
        max-height: 45px;
        width: auto;
        display: block;
    }
    .mobile-header .logo-mobile a {
        display: inline-block;
        text-decoration: none;
    }
    
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: var(--color-white);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 1.5rem;
        overflow-y: auto;
        display: block;
    }
    .site-header.is-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sidebar-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    
    .site-logo {
        margin-bottom: 0;
    }
    
    .site-logo img {
        max-height: 65px;
    }
}


/* ==============================================
   BOTONES SOCIALES EN SIDEBAR
   ============================================== */
.sidebar-social {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    color: var(--color-primary);
}
.social-btn svg {
    stroke: var(--color-primary);
    transition: stroke 0.2s;
}
.social-btn:hover {
    background: var(--color-gray-50);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.social-btn:hover svg {
    stroke: var(--color-primary-dark);
}
/* ==============================================
   ==================== SECTION: TIPOGRAFÍA Y ELEMENTOS COMUNES ====================
   ============================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-gray-600);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--color-gray-900);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--color-gray-500);
    max-width: 600px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-gray-500); }
.mt-4 { margin-top: 2rem; }

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-primary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background-color: var(--color-white);
}

.btn-ghost {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
    background-color: var(--color-white);
}

.btn-ghost-dark {
    background-color: var(--color-primary);
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-ghost-dark:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
    background-color: var(--color-white);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-gray-100);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gray-700);
}

.badge-accent {
    background-color: var(--color-accent-light);
    color: var(--color-primary);
}

/* ==============================================
   ==================== SECTION: HERO CON PARALLAX ====================
   ============================================== */
.hero-section {
    min-height: 100vh;
    background-image: url('assets/img/portfolio-1.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    align-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 6rem var(--container-padding);
}

.hero-badge {
    background-color: var(--color-primary-dark);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badge svg {
    stroke: white;
}

.hero-title {
    background-color: transparent;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-white);
}

.hero-title .highlight {
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: white;
    margin: 0;
    max-width: 600px;
}

.hero-subtitle-wrapper {
    background-color: transparent;   /* Fondo transparente */
    border: 2px solid #ffffff;       /* Borde blanco */
    width: auto;
    min-width: 260px;
    max-width: 90%;
    height: 85px;                    /* Altura fija, ajustable */
    margin: 1rem auto;
    position: relative;
    overflow: hidden;                /* Oculta las frases fuera del área */
    box-sizing: border-box;
}

/* Cada ítem de frase: ocupa todo el contenedor, centrado con flex */
.hero-subtitle-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.125rem;
    color: white;
    padding: 0 1rem;
    box-sizing: border-box;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: translateY(100%);   /* Inicialmente abajo (oculto) */
    opacity: 0;
}

.hero-subtitle-item.active {
    transform: translateY(0);
    opacity: 1;
}

.hero-subtitle-item.prev {
    text-align: center;
    transform: translateY(-100%);
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}
.hero-scroll {
    display: none;
}

/* Estilo base para bloques de texto del hero */
.hero-badge,
.hero-title {
    background-color: transparent;
    border: 2px solid #ffffff;       /* Borde blanco */
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 1rem auto;
    width: fit-content;
    max-width: 100%;
}

.hero-badge {
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ==============================================
   SECCIÓN PARALLAX - POLÍTICAS DE CALIDAD (card derecha)
   ============================================== */
.calidad-parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 5rem 0;
    overflow: hidden;
}

.calidad-parallax-section .container {
    width: 100%;
    padding-right: 0;   /* elimina padding derecho si existe */
}

/* Oscurecer el fondo */
.calidad-parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* Contenedor de la tarjeta (se alinea a la derecha) */
.calidad-content {
    position: relative;
    z-index: 2;
    max-width: 600px;   /* ancho fijo para la tarjeta */
    margin-left: auto;  /* empuja la card hacia la derecha */
    margin-right: 0;
    width: 100%;        /* que ocupe el ancho máximo permitido, pero limitado por max-width */
}

/* Tarjeta blanca */
.calidad-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--color-primary);
    transition: transform 0.3s ease;
}

.calidad-card:hover {
    transform: translateY(-5px);
}

/* Título */
.calidad-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.calidad-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
}

/* Texto */
.calidad-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-gray-700);
    margin-top: 1rem;
}

/* Responsive móvil: la card se centra y ocupa todo el ancho */
@media (max-width: 768px) {
    .calidad-parallax-section {
        background-attachment: scroll;
        text-align: center;
    }
    .calidad-content {
        margin: 0 auto;
        max-width: 90%;
    }
    .calidad-card {
        padding: 1.5rem;
    }
    .calidad-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .calidad-title {
        display: block;
        text-align: center;
    }
}

/* ==============================================
   SECCIÓN MAQUILAS - CATÁLOGO DE ENVASES
   ============================================== */
.maquilas-section {
    background: var(--color-gray-50);
    padding: 5rem 0;
}
.envases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.envase-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--color-gray-200);
    cursor: pointer;
}
.envase-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}
.envase-imagen {
    background: #f9f9f9;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
}
.envase-imagen img {
    max-height: 150px;
    width: auto;
    display: inline-block;
    transition: transform 0.3s;
    mix-blend-mode: multiply;
}
.envase-card:hover .envase-imagen img {
    transform: scale(1.05);
}
.envase-info {
    padding: 1.5rem;
    text-align: center;
}
.envase-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.envase-titulo span {
    font-weight: 400;
    color: var(--color-primary);
    font-size: 0.9rem;
}
.envase-desc {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin-bottom: 1rem;
}
.btn-ver-mas {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ver-mas:hover {
    background: var(--color-primary);
    color: white;
}

/* Modal */
.modal-envase {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}
.modal-envase-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: fadeIn 0.3s;
}
.modal-envase-close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-gray-500);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .envases-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

/* ==============================================
   ==================== SECTION: SERVICIOS (CARDS) ====================
   ============================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 16px -6px rgba(10, 75, 140, 0.2);
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-white);
    fill: none;
    stroke-width: 2;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-gray-900);
}

.service-desc {
    color: var(--color-gray-600);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ==============================================
   ==================== SECTION: PORTFOLIO / PROYECTOS ====================
   ============================================== */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--color-gray-700);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.portfolio-card img,
.portfolio-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background-color: var(--color-gray-200);
}

.portfolio-overlay {
    padding: 1rem;
    background: var(--color-white);
}

.portfolio-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.portfolio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-900);
}

/* Modal de portfolio */
.portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.portfolio-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-inner {
    position: relative;
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--color-gray-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
}

.modal-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.modal-body {
    padding: 1.5rem;
}

.modal-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-description {
    color: var(--color-gray-600);
    line-height: 1.7;
}

/* ==============================================
   ==================== SECCIÓN NOSOTROS (EMPRESA) ESTILOS MODERNOS ====================
   ============================================== */

/* Grid principal */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

/* Contenedores internos usan toda la altura */
.about-content, .about-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* Base común para TODOS los bloques (mismo diseño horizontal) */
.company-block.with-image,
.mission-card.card-blue,
.vision-card.card-blue,
.values-block {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-200);
    transition: all 0.3s ease;
    flex-direction: row;        /* Fuerza layout horizontal */
    text-align: left;
}

/* Efecto hover igual para todos */
.company-block.with-image:hover,
.mission-card.card-blue:hover,
.vision-card.card-blue:hover,
.values-block:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

/* Contenedor de la imagen (columna izquierda) */
.company-image,
.card-icon,
.values-header-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: rgba(24, 134, 199, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Imagen interior */
.company-image img,
.card-icon-img,
.values-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Efecto zoom en la imagen al hover del bloque completo */
.company-block.with-image:hover .company-image img,
.mission-card.card-blue:hover .card-icon-img,
.vision-card.card-blue:hover .card-icon-img,
.values-block:hover .values-icon-img {
    transform: scale(1.1);
}

/* Columna de texto (derecha) */
.company-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Títulos y subtítulos (para todos los bloques) */
.company-subtitle,
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-800);
    margin: 0 0 0.5rem 0;
    position: relative;
    display: inline-block;
}

/* Línea decorativa debajo del título (solo en desktop, se centra en móvil) */
.company-subtitle::after,
.card-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Textos descriptivos */
.company-text p,
.mission-card.card-blue p,
.vision-card.card-blue p,
.valores-intro {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-gray-600);
    margin: 0;
}

/* Ajustes específicos para Valores (píldoras y footer) */
.values-pills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0 0 0;
}

.value-pill-blue {
    background: rgba(24, 134, 199, 0.1);
    color: var(--color-primary);    /* Texto azul */
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-block;
}

.value-pill-blue:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.valores-footer {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-gray-200);
    text-align: left;
}

/* Ajuste responsive: en móvil, apilar verticalmente */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .company-block.with-image,
    .mission-card.card-blue,
    .vision-card.card-blue,
    .values-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .company-image,
    .card-icon,
    .values-header-img {
        margin-bottom: 0.5rem;
    }
    
    .company-text {
        align-items: center;
    }
    
    .company-subtitle::after,
    .card-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .company-subtitle,
    .card-title {
        display: block;
        text-align: center;
    }
    
    .valores-footer {
        text-align: center;
    }
    
    .values-pills-grid {
        justify-content: center;
    }
}

/* Para que la columna derecha tenga el mismo gap entre bloques */
.about-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/**************************************************************/





/* ==============================================
   ==================== SECTION: TESTIMONIALS ====================
   ============================================== */
.testimonials-carousel {
    position: relative;
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    gap: 1rem;
}

.testimonial-card {
    min-width: calc(33.333% - 0.667rem);
}

@media (max-width: 768px) {
    .testimonial-card {
        min-width: calc(100% - 0rem);
    }
}

.testimonial-inner {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.star {
    color: #fbbf24;
}

.star.empty {
    color: var(--color-gray-300);
}

.testimonial-text {
    color: var(--color-gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.testimonial-name {
    font-weight: 600;
}

.testimonial-role {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-gray-200);
    background: var(--color-white);
    cursor: pointer;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gray-300);
    cursor: pointer;
    border: none;
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 20px;
    border-radius: 4px;
}

/* ==============================================
   ==================== SECTION: CTA BANNER ====================
   ============================================== */
.cta-banner {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: slowRotate 20s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-banner h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.cta-banner p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.cta-banner .btn-accent {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.cta-banner .btn-accent:hover {
    background-color: var(--color-gray-100);
}

/* ==============================================
   CONTACTO - DISEÑO MODERNO Y MINIMALISTA
   ============================================== */
.contact-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Tarjetas de información */
.contact-info-modern {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.contact-intro h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-gray-800);
    position: relative;
    display: inline-block;
}
.contact-intro h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
}

.contact-cards-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-card-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.contact-card-modern:hover {
    background: var(--color-gray-50);
    transform: translateX(5px);
}
.card-icon-modern {
    width: 44px;
    height: 44px;
    background: rgba(24, 134, 199, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-icon-modern svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-primary);
}
.contact-label-modern {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray-500);
    margin-bottom: 0.2rem;
}
.contact-value-modern {
    font-weight: 600;
    color: var(--color-gray-800);
}
.contact-value-modern a {
    color: var(--color-primary);
    text-decoration: none;
}
.contact-value-modern a:hover {
    text-decoration: underline;
}

/* Mapa o placeholder */
.contact-map-modern,
.map-placeholder-modern {
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
}
.map-placeholder-modern {
    background: var(--color-gray-100);
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-500);
}

/* Formulario moderno */
.contact-form-wrapper-modern {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
}
.form-row-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group-modern {
    margin-bottom: 0;
}
.form-group-modern.full-width {
    grid-column: span 2;
}
.form-label-modern {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-gray-700);
}
.form-control-modern {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: var(--color-white);
}
.form-control-modern:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(24, 134, 199, 0.1);
}
textarea.form-control-modern {
    resize: vertical;
}
.btn-submit-modern {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-submit-modern:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
/* Responsive */
@media (max-width: 768px) {
    .contact-grid-modern {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .form-row-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .form-group-modern.full-width {
        grid-column: span 1;
    }
}


/* Contenedor de correo dividido */
.email-split {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.email-local, .email-dominio {
    flex: 1;
}
.email-at {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-primary);
    background: var(--color-gray-100);
    width: 44px;
    text-align: center;
    border-radius: var(--radius-md);
    padding: 0.6rem 0;
    flex-shrink: 0;
    line-height: 1;
}

/* Contenedor de teléfono (ya existente) */
.phone-split {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.area-code {
    width: auto;
    min-width: 130px;
}
.phone-number {
    flex: 1;
}

/* Responsive: en móvil se apilan */
@media (max-width: 600px) {
    .email-split, .phone-split {
        flex-direction: column;
        align-items: stretch;
    }
    .email-at {
        width: 100%;
        text-align: center;
        padding: 0.3rem;
    }
    .area-code {
        width: 100%;
    }
}
/* ==============================================
   ==================== SECTION: PÁGINAS INTERNAS ====================
   ============================================== */
.page-hero {
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
    padding: 5rem 0 3rem;
    text-align: center;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--color-primary);
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.mv-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.mv-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.mv-card h3 {
    margin-bottom: 0.5rem;
}

.mv-card p {
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
}

.process-number {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.faq-item {
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-white);
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.faq-icon {
    font-size: 1.25rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    background: var(--color-gray-50);
    padding: 0 1rem;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 1rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-gray-200);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
}

.timeline-content {
    width: calc(50% - 2rem);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.timeline-year {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

/* ==============================================
   ==================== SECTION: SINGLE PROYECTO ====================
   ============================================== */
.project-hero-single {
    position: relative;
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, var(--color-gray-50), var(--color-white));
}

.project-hero-single .project-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.project-hero-single .project-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
}

.project-hero-single .container {
    position: relative;
    z-index: 1;
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .project-layout {
        grid-template-columns: 1fr;
    }
}

.project-sidebar {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.project-meta-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.project-meta-label {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    text-transform: uppercase;
}

.project-meta-value {
    font-weight: 600;
}

.project-content {
    color: var(--color-gray-700);
    line-height: 1.7;
}

/* ==============================================
   ==================== SECTION: ARCHIVE Y BLOG ====================
   ============================================== */
.archive-section {
    padding: 3rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 1rem;
}

.blog-card-date {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.blog-card-title {
    font-size: 1.125rem;
    margin: 0.5rem 0;
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    color: var(--color-gray-700);
}

.pagination .current,
.pagination a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ==============================================
   ==================== SECTION: CHAT Y WHATSAPP FLOAT ====================
   ============================================== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 90;
    background-color: #25D366;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.05);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.chat-re-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
}

.chat-re-button {
    background-color: var(--color-primary);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    color: white;
    font-size: 1.5rem;
}

.chat-re-button:hover {
    transform: scale(1.05);
    background-color: var(--color-primary-dark);
}

.chat-re-box {
    position: fixed;
    bottom: calc(2rem + 56px + 10px);
    right: 2rem;
    width: 360px;
    height: 500px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.chat-re-header {
    background: var(--color-primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-re-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--color-gray-50);
}

.chat-re-message {
    display: flex;
}

.chat-re-message.user {
    justify-content: flex-end;
}

.chat-re-message.ai,
.chat-re-message.human {
    justify-content: flex-start;
}

.bubble {
    max-width: 80%;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.chat-re-message.user .bubble {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-re-message.ai .bubble,
.chat-re-message.human .bubble {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-800);
    border-bottom-left-radius: 0.25rem;
}

.chat-re-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--color-gray-200);
    background: white;
}

.chat-re-input-area input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 2rem;
    font-size: 0.875rem;
}

.chat-re-input-area button {
    background: var(--color-primary);
    border: none;
    padding: 0 1rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* ==============================================
   ==================== SECTION: FOOTER ====================
   ============================================== */
.site-footer {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-gray-200);
    padding-top: 3rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.site-footer .footer-brand img {
    align-content: center;
    max-height: 60px;
    width: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    display: inline-block;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.footer-tagline {
    color: var(--color-gray-500);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: var(--color-gray-100);
    border-radius: 50%;
    transition: all 0.25s ease;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: var(--color-gray-600);
    transition: fill 0.25s ease;
}

.social-link:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(10, 75, 140, 0.15);
}

.social-link:hover svg {
    fill: var(--color-white);
}

.footer-heading {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    color: var(--color-gray-800);
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav li {
    margin-bottom: 0.65rem;
}

.footer-nav a {
    color: var(--color-gray-500);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-nav a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.footer-nav a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.footer-nav a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--color-gray-600);
    transition: transform 0.2s ease;
}

.footer-contact-item:hover {
    transform: translateX(3px);
}

.footer-contact-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-primary);
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
    transition: stroke 0.2s;
}

.footer-contact-item a {
    color: var(--color-gray-600);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-item a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-gray-200);
    font-size: 0.75rem;
    color: var(--color-gray-400);
}

/* ==============================================
   ==================== SECTION: MEJORAS VISUALES GENERALES ====================
   ============================================== */
.service-card,
.portfolio-card,
.testimonial-inner,
.contact-info-card,
.contact-form {
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.service-card:hover,
.portfolio-card:hover,
.testimonial-inner:hover {
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.btn-primary,
.btn-accent {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.btn-accent::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn-primary:active::after,
.btn-accent:active::after {
    width: 100%;
    height: 100%;
}

.section-header {
    position: relative;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 1.5rem auto 0;
    border-radius: 3px;
    opacity: 0.6;
}

/* ==============================================
   ==================== SECTION: RESPONSIVE AJUSTES ADICIONALES ====================
   ============================================== */
@media (max-width: 1023px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .services-grid,
    .portfolio-grid,
    .blog-grid {
        gap: 1rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .whatsapp-float,
    .chat-re-button {
        width: 48px;
        height: 48px;
    }
    
    .chat-re-box {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: calc(1rem + 48px + 10px);
    }
}

/* ==============================================
   ==================== SECTION: UTILIDADES Y ANIMACIONES ====================
   ============================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================================
   ANIMACIÓN SCROLL PARA SUBTÍTULO DEL HERO
   ============================================== */
.hero-subtitle-wrapper {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, height, padding;
}

/* Estado cuando se hace scroll (se activa con JS) */
.hero-subtitle-wrapper.scroll-animate {
    transform: translateY(20px);        /* Desplazamiento hacia abajo */
    padding: 1rem 2rem;                /* Se hace más amplio */
    height: auto;                      /* Permite que crezca sin cortar */
    overflow: visible;                 /* Evita que el texto se recorte */
    background-color: var(--color-primary);
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
}

/* Opcional: si quieres que los textos internos también tengan una pequeña transición */
.hero-subtitle-item {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Ajuste para que el contenedor no tenga cortes bruscos al volver */
.hero-subtitle-wrapper.scroll-animate .hero-subtitle-item {
    transform: translateY(0) !important; /* Forzamos que se vea la frase activa normal */
    opacity: 1 !important;
}

/*"=====================================================================
////////////////////SIDE BAR //////////////////////////////////////////
======================================================================*/
/*"=====================================================================
////////////////////SIDE BAR //////////////////////////////////////////
======================================================================*/
/* Botella flotante */
.scroll-bottle {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 9999;
    width: 70px;
    height: 70px;
    cursor: pointer;
}
.bottle-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Líquido: Fijo al 100% para evitar distorsión, se llena usando el degradado */
.bottle-liquid {
    position: absolute;
    top: 0;        /* Cambiado de bottom a top para abarcar toda la botella */
    left: 0;
    width: 100%;
    height: 100%;  /* SIEMPRE al 100% para mantener la máscara estática */
    
    /* Declaramos una variable CSS que modificaremos con JavaScript */
    --fill-level: 0%;

    /* El truco: Un degradado de abajo hacia arriba con corte horizontal seco */
    background: linear-gradient(to top, 
        #9E212A 0%, 
        #D11F2C var(--fill-level), 
        transparent var(--fill-level), 
        transparent 100%
    );
    
    /* Transición suave del corte del líquido */
    transition: background 0.15s ease-out;
    
    /* Máscara con la forma SÓLIDA de la botella */
     mask-image: url('https://clientes.agenciare.com.mx/wp-content/themes/agencia-re-theme/assets/img/botellasilueta.svg');
    -webkit-mask-image: url('https://clientes.agenciare.com.mx/wp-content/themes/agencia-re-theme/assets/img/botellasilueta.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: bottom center;
    -webkit-mask-position: bottom center;
    z-index: 1;
}

/* Capa visible de la botella (solo el borde, sin relleno interior) */
.bottle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://clientes.agenciare.com.mx/wp-content/themes/agencia-re-theme/assets/img/botellavacia.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}