/* ==========================================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
:root {
    --bg-pure: #FFFFFF;
    --bg-light: #F5F5F5; /* Blanco roto para secciones alternas */
    --text-main: #1E1E1E; /* Negro grafito para máxima legibilidad */
    --text-muted: #666666; /* Gris para descripciones secundarias */
    --border-color: #E5E5E5; /* Líneas divisorias muy finas */
    --accent-tech: #0D3B66; /* Azul profundo sutil para interacciones */
    --accent-tag: #EAEAEA; /* Fondo gris claro para las etiquetas */

    --font-main: 'Manrope', 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-pure);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Reutilización de contenedores y espaciados amplios */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.narrow-container {
    max-width: 750px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0; /* Bloques amplios para respirar */
    border-bottom: 1px solid var(--border-color);
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.margin-top {
    margin-top: 40px;
}

/* Títulos Editoriales */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   2. COMPONENTES (BOTONES Y LINKS)
   ========================================================================== */
a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    display: inline-block;
    background-color: var(--text-main);
    color: var(--bg-pure);
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    .btn-primary:hover {
        background-color: var(--accent-tech);
        transform: translateY(-2px);
    }

/* Badge para pilares/productos en construcción ("Nueva línea") */
.badge-nuevo {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--accent-tag);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 6px;
}

.product-tag-nuevo {
    background-color: var(--accent-tag);
    color: var(--text-muted);
}

/* ==========================================================================
   3. ESTRUCTURA / DISEÑO DE SECCIONES (LAYOUT)
   ========================================================================== */

/* HEADER & NAVBAR */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {
    height: 50px; /* Ajuste óptimo para la imagen circular */
    width: auto;
    display: block;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

    .main-nav a:not(.btn-nav) {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-muted);
    }

        .main-nav a:not(.btn-nav):hover {
            color: var(--text-main);
        }

.btn-nav {
    border: 1px solid var(--text-main);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
}

    .btn-nav:hover {
        background-color: var(--text-main);
        color: var(--bg-pure);
    }

/* HERO / PORTADA */
.hero {
    background-color: var(--bg-pure);
    padding: 140px 0 120px 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-lead {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* QUIÉNES SOMOS */
#quienes-somos p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

    #quienes-somos p strong {
        color: var(--text-main);
    }

/* SECCIÓN "CÓMO TRABAJAMOS" (confianza) */
#confianza p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* GRIDS (Estructuras de columnas) */
.grid-4, .grid-3, .grid-2 {
    display: grid;
    gap: 24px;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 730px;
    margin: 32px auto 0 auto;
}

/* TARJETAS DE PILARES */
.card-pilar {
    background-color: var(--bg-pure);
    padding: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

    .card-pilar .icon {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }

    .card-pilar h3 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .card-pilar p {
        font-size: 0.9rem;
        color: var(--text-muted);
        line-height: 1.5;
    }

/* TARJETAS DE PORTAFOLIO / PRODUCTOS */
.product-card {
    background-color: var(--bg-pure);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-tag {
    align-self: flex-start;
    background-color: var(--bg-light);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.product-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.product-features {
    list-style: none;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

    .product-features li {
        font-size: 0.85rem;
        color: var(--text-main);
        margin-bottom: 10px;
        padding-left: 15px;
        position: relative;
    }

        .product-features li::before {
            content: "—";
            position: absolute;
            left: 0;
            color: var(--text-muted);
        }

/* CONTACTO */
.contacto-links {
    margin: 40px 0;
    font-size: 1.1rem;
}

    .contacto-links p {
        margin-bottom: 12px;
        color: var(--text-muted);
    }

    .contacto-links strong {
        color: var(--text-main);
    }

/* FOOTER */
.main-footer {
    padding: 40px 0;
    background-color: var(--bg-pure);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   4. BOTÓN FLOTANTE DE WHATSAPP 
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Verde original de WhatsApp */
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .whatsapp-float:hover {
        background-color: #20BA56;
        transform: scale(1.08) translateY(-3px);
    }

/* ==========================================================================
   5. RESPONSIVE DESIGN (Para Tablets y Móviles) 
   ========================================================================== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 70px 0;
    }

    .hero {
        padding: 120px 0 80px 0;
    }

        .hero h1 {
            font-size: 2.4rem;
            line-height: 1.25;
        }

    .hero-lead {
        font-size: 1.1rem;
    }


    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }


    .header-flex {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }

    .main-nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}
