:root {
    --primary-color: #0F4C81; 
    --primary-dark: #0A3356;
    --accent-color: #FF6B35;  
    --text-main: #2D3748;
    --text-muted: #718096;
    --bg-light: #F7FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Barra de Urgencia */
.top-emergency-bar {
    background: linear-gradient(90deg, #D32F2F 0%, #E65100 100%);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-emergency-bar p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-emergency-call {
    background: white;
    color: #D32F2F;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.btn-emergency-call:hover {
    background: var(--primary-dark);
    color: white;
}

.blink {
    animation: pulse-effect 1.5s infinite;
}

@keyframes pulse-effect {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 45px; 
    z-index: 999;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    background: var(--primary-color);
    color: white;
    font-weight: 800;
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary-color);
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-btn-cta {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.nav-btn-cta:hover {
    background: var(--primary-dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero */
.hero-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 140px 0 90px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.96) 0%, rgba(10, 51, 86, 0.85) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.hero-content {
    max-width: 750px;
}

.badge {
    background: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 22px;
}

.hero-content h2 {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #e0531f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    background: rgba(255, 255, 255, 0.06);
    padding: 35px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: -70px;
}

.stat-card {
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card p {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Secciones Comunes */
.services-section, .clients-section, .brands-section, .contact-section {
    padding: 130px 0 90px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 65px;
}

.section-header h2 {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    color: var(--primary-dark);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Clientes */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.client-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
}

.client-img {
    height: 220px;
    background-size: cover;
    background-position: center;
}

.client-info {
    padding: 30px;
}

.client-info h3 {
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.client-info ul {
    list-style: none;
    margin-bottom: 24px;
}

.client-info ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.client-info ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.btn-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.btn-text:hover {
    color: var(--accent-color);
    gap: 14px;
}

/* MARCAS (Alineación perfecta y efecto Hover) */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.brand-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 35px 30px; 
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    transition: var(--transition-smooth);
}

.brand-item img {
    max-width: 90%;
    max-height: 85px; 
    width: auto;
    height: auto;
    object-fit: contain; 
    filter: grayscale(100%);
    opacity: 0.55;
    transition: var(--transition-smooth);
}

.brand-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 14px 35px rgba(15, 76, 129, 0.1);
    transform: translateY(-4px);
}

.brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.04);
}

.brands-footer-text {
    text-align: center;
    margin-top: 45px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Formulario de Contacto */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 0;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contact-info-panel {
    background: var(--primary-color);
    color: white;
    padding: 60px;
}

.contact-info-panel h2 {
    font-size: 2.2rem;
    margin-bottom: 22px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.info-details {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.info-item {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.6rem;
    color: var(--accent-color);
}

.info-item h4 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.info-item a {
    color: white;
    text-decoration: none;
}

.highlight-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.contact-form-panel {
    padding: 60px;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.08);
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.95rem;
}

.alert-success { background: #E6F4EA; color: #137333; border: 1px solid #CEEAD6; }
.alert-danger { background: #FCE8E6; color: #C5221F; border: 1px solid #FAD2CF; }

/* Footer */
.main-footer {
    background: #141B26;
    color: #A0AEC0;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 60px;
}

.footer-brand h3 { color: white; margin-bottom: 18px; font-size: 1.5rem; }
.footer-links h4, .footer-services-list h4 { color: white; margin-bottom: 24px; font-size: 1.05rem; }

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { color: #A0AEC0; text-decoration: none; transition: var(--transition-smooth); }
.footer-links ul li a:hover { color: white; padding-left: 6px; }

.footer-bottom {
    border-top: 1px solid #232E3E;
    padding: 30px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Adaptabilidad Responsiva */
@media (max-width: 992px) {
    .contact-container { grid-template-columns: 1fr; }
    .hero-container { grid-template-columns: 1fr; }
    .hero-stats { margin-bottom: 40px; position: relative; }
    .footer-grid { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 125px; left: -100%; width: 100%; height: calc(100vh - 125px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 45px 20px;
        gap: 30px;
        transition: var(--transition-smooth);
        box-shadow: 0 15px 25px rgba(0,0,0,0.08);
    }
    
    .nav-menu.open { left: 0; }
    .mobile-toggle { display: block; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .hero-content h2 { font-size: 2.2rem; }
}

@media (max-width: 576px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    .brand-item {
        height: 100px;
        padding: 20px;
    }
    .brand-item img {
        max-height: 55px;
    }
    .contact-info-panel, .contact-form-panel { padding: 35px 20px; }
    .hero-stats { grid-template-columns: 1fr; gap: 16px; }
}