/* ==========================================================================
   VARIABLES DE DISEÑO (Consistencia, Performance y Accesibilidad)
   ========================================================================== */
:root {
    --primary-color: #004b76;
    --secondary-color: #007bb6;
    --hover-color: #1e3a8a;
    --text-color: #333333;
    --light-text: #555555;
    --muted-text: #666666;
    --bg-light: #f8fbfd;
    --white: #ffffff;
    --transition-fast: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-premium: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 10px 25px rgba(0, 123, 182, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 75, 118, 0.03);
    --shadow-card-hover: 0 12px 24px rgba(0, 123, 182, 0.08);
}

/* ==========================================================================
   1. ESTRUCTURA GLOBAL Y SECCIONES BASES (Grounding & SEO Core)
   ========================================================================== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.5;
}

.hero-section {
    background: linear-gradient(rgba(15, 32, 67, 0.8), rgba(15, 32, 67, 0.8)), url('https://unsplash.com') no-repeat center center;
    background-size: cover;
    color: var(--white);
    padding: 120px 0;
}

.feature-icon {
    font-size: 3rem;
    color: #0d6efd;
}

.product-card img {
    height: 200px;
    object-fit: contain;
    padding: 20px;
    background-color: #f8f9fa;
}

/* ==========================================================================
   2. SECCIÓN DE SERVICIOS (Optimizado para Centrado Total)
   ========================================================================== */
.servicios-section {
    padding: 80px 20px;
    background-color: var(--white);
    text-align: center;
    width: 100%;
    display: block;
    clear: both;
}

.servicios-section h2, 
main .servicios-section h2, 
#servicios h2 {
    color: var(--primary-color) !important;
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center !important; 
    display: block !important;     
    width: 100% !important;        
    float: none !important;
}

.section-subtitle {
    color: var(--muted-text);
    font-size: 16px;
    margin-bottom: 50px;
    max-width: 600px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.servicio-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid #e1f5fe;
    border-top: 4px solid var(--secondary-color);
    text-align: left;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background-color: var(--white);
}

.servicio-card h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.servicio-card p {
    color: var(--light-text);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   3. SECCIÓN DE MARCAS (Diseño de Tienda Premium Unificado - 700px)
   ========================================================================== */

/* Contenedor Exterior Único y Compactado */
[class*="gama"], 
.gama-seccion,
main [class*="gama"] {
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-light) 100%) !important;
    border-left: 1px solid #d0e8f5 !important;
    border-right: 1px solid #d0e8f5 !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    max-width: 700px !important; 
    margin: 0 auto !important; 
    padding: 10px 45px !important; 
    border-radius: 0 !important;
    text-align: center !important;
    display: block !important; 
    transition: var(--transition-premium) !important;
}

[class*="gama"]:hover,
.gama-seccion:hover {
    background: #ffffff !important;
    border-color: #bce0f2 !important;
}

/* Remate Superior del Bloque Unificado */
[class*="gama"]:first-of-type,
.gama-seccion:first-of-type {
    border-top: 5px solid var(--secondary-color) !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    margin-top: 40px !important;
    padding-top: 35px !important;
}

/* Remate Inferior y Sombra del Bloque Unificado */
[class*="gama"]:last-of-type,
.gama-seccion:last-of-type {
    border-bottom: 1px solid #d0e8f5 !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    margin-bottom: 40px !important;
    padding-bottom: 35px !important;
    box-shadow: 0 10px 30px rgba(0, 75, 118, 0.04) !important;
}

[class*="gama"]:last-of-type:hover,
.gama-seccion:last-of-type:hover {
    box-shadow: 0 20px 40px rgba(0, 123, 182, 0.12) !important;
}

/* Títulos con Línea de Ancho Dinámico */
[class*="gama"] h5,
.gama-seccion h5 {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    margin: 25px auto !important;
    display: inline-block !important; 
    text-align: center !important;
    width: auto !important;
    position: relative !important;
}

[class*="gama"] h5::after,
.gama-seccion h5::after {
    content: '' !important;
    display: block !important;
    width: 100% !important; 
    height: 3px !important;
    background: var(--secondary-color) !important;
    margin: 8px 0 0 0 !important;
    border-radius: 2px !important;
    opacity: 0.6 !important;
    float: none !important;
}

/* Estilos de las Tarjetas de Marcas Flotantes Internas */
.brand-logo-card, 
[class*="gama"] .card,
[class*="gama"] [class*="card"],
[class*="gama"] div[class*="product-card"],
.product-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e1f5fe !important;
    box-shadow: var(--shadow-card) !important;
    border-radius: 12px !important;
    padding: 20px 25px !important; 
    margin: 10px 15px !important; 
    display: inline-block !important;
    vertical-align: top !important;
    float: none !important;
    width: 220px !important; 
    text-align: center !important;
    transition: var(--transition-premium) !important;
}

.brand-logo-card:hover,
[class*="gama"] .card:hover,
[class*="gama"] [class*="card"]:hover,
.product-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-card-hover) !important;
    border-color: #bce0f2 !important;
    background-color: #ffffff !important;
}

/* Logotipos e Imágenes */
.brand-img, 
.product-card img,
[class*="gama"] img {
    max-height: 45px !important; 
    object-fit: contain !important;
    background-color: transparent !important;
    padding: 0 !important;
    filter: grayscale(100%) opacity(0.6) !important; 
    display: block !important;
    margin: 0 auto 12px auto !important;
    transition: var(--transition-fast) !important;
}

.brand-logo-card:hover .brand-img,
[class*="gama"] .card:hover img,
[class*="gama"] [class*="card"]:hover img,
.product-card:hover img {
    filter: grayscale(0%) opacity(1) !important;
}

/* Textos Descriptivos de las Marcas */
[class*="gama"] p,
[class*="gama"] span,
.product-card p,
.brand-logo-card p,
[class*="gama"] div[class*="card"] p {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--light-text) !important;
}

/* Animar Iconos (Corona, Termómetro) al pasar por la Gama */
[class*="gama"] h5 i,
.gama-seccion h5 i,
[class*="gama"] h5 svg,
.gama-seccion h5 svg,
[class*="gama"] h5 img,
.gama-seccion h5 img {
    font-size: 1.35rem !important;
    margin-right: 10px !important;
    vertical-align: middle !important;
    display: inline-block !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

[class*="gama"]:hover h5 i,
.gama-seccion:hover h5 i,
[class*="gama"]:hover h5 svg,
.gama-seccion:hover h5 svg {
    transform: scale(1.2) rotate(5deg) !important;
}

/* ==========================================================================
   4. FORMULARIO DE CONTACTO / PRESUPUESTOS (Estilización Premium)
   ========================================================================== */
.contacto-section {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.contacto-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--white);
    padding: 45px;
    border-radius: 16px;
    border: 1px solid #eef5f9;
    box-shadow: 0 15px 35px rgba(0, 75, 118, 0.04);
}

.contacto-container h2 {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.contacto-container .subtitle {
    color: var(--muted-text);
    text-align: center;
    margin-bottom: 35px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    padding: 14px;
    border: 1px solid #d4e3eb;
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-color);
    background-color: var(--white);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 182, 0.08);
}

.file-help {
    font-size: 12px;
    color: var(--muted-text);
    margin-bottom: 6px;
}

.form-group-checkbox {
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-group-checkbox label {
    font-size: 13px;
    color: var(--light-text);
    line-height: 1.5;
    cursor: pointer;
}

.form-group-checkbox input[type="checkbox"] {
    margin-top: 3px;
    transform: scale(1.15);
    accent-color: var(--secondary-color);
}

.btn-submit {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 123, 182, 0.2);
    transition: var(--transition-fast);
}

.btn-submit:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 75, 118, 0.25);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ==========================================================================
   5. COMPONENTES FLOTANTES Y BOTONES (Notificaciones y WhatsApp)
   ========================================================================== */
.aviso-exito {
    position: fixed;
    top: -100px;
    right: 20px;
    background-color: #2e7d32;
    color: var(--white);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
    z-index: 9999;
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aviso-exito.mostrar {
    top: 20px;
}

.aviso-exito .icono {
    font-size: 20px;
}

.aviso-exito .cerrar-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    padding: 0;
}

.aviso-exito .cerrar-btn:hover {
    color: var(--white);
}

.whatsapp-flotante {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.whatsapp-flotante:hover {
    transform: scale(1.1) translateY(-3px);
    background-color: #1ebe57;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   6. RESPONSIVE / ADAPTACIÓN MÓVIL (Mobile First Validation)
   ========================================================================== */
@media (max-width: 768px) {
    .servicios-section {
        padding: 50px 15px;
    }
    
    .servicios-section h2,
    main .servicios-section h2,
    #servicios h2 {
        font-size: 26px !important;
    }
    
    .servicio-card {
        padding: 30px 20px;
    }
    
    [class*="gama"], 
    .gama-seccion,
    main [class*="gama"] {
        padding: 10px 15px !important;
    }
    
    .contacto-container {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .aviso-exito {
        left: 20px;
        right: 20px;
        text-align: center;
        justify-content: center;
    }
    
    .brand-logo-card, 
    [class*="gama"] .card,
    .product-card {
        width: 100% !important;
        max-width: 260px !important;
        margin: 10px 0 !important;
    }
}