/* --- VARIABLES & RESET --- */
:root {
    --primary: #003366;
    --primary-light: #e6f0ff;
    --secondary: #008080;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --bg-body: #F9FAFB;
    --bg-surface: #FFFFFF;
    --border-color: #f3f4f6;

    /* CAMBIO DE FUENTES */
    --font-main: 'Raleway', sans-serif;
    /* Para texto normal */
    --font-title: 'Bungee', cursive;
    /* Para TÍTULOS */

    --max-width: 1280px;
}

body.dark-mode {
    --text-main: #e2e8f0;
    --text-light: #9ca3af;
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    /* Usamos Raleway para todo el cuerpo */
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* REGLA GENERAL PARA TÍTULOS (Bungee) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    font-weight: 400;
    /* Bungee ya es gruesa, no necesita negrita extra */
    letter-spacing: 1px;
    /* Un poco de espacio para que se lea mejor */
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.icon-sm {
    font-size: 1rem !important;
    vertical-align: middle;
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-family: var(--font-main);
    font-weight: 700;
    /* Botones mantienen Raleway negrita */
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 51, 102, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 90px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

body.dark-mode .navbar {
    background-color: rgba(30, 41, 59, 0.9);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    max-height: 70px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.nav-logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        color: var(--text-main);
    }
}

/* --- PROMOCIONES --- */
.promo-grid-section {
    padding-top: 110px;
    padding-bottom: 0.5rem;
    background-color: var(--bg-body);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1;
    background-color: #f3f4f6;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 1rem;
    overflow: hidden;
}

.hero-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    transition: background-color 0.3s ease;
}

.blob-1 {
    top: -50px;
    right: -50px;
    width: 400px;
    height: 400px;
    background: transparent;
}

.blob-2 {
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: transparent;
}

body.dark-mode .blob-1 {
    background: rgba(0, 51, 102, 0.05);
}

body.dark-mode .blob-2 {
    background: rgba(0, 128, 128, 0.1);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: #eff6ff;
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-family: var(--font-main);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid #dbeafe;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Título Hero con Bungee */
.hero h1 {
    font-size: 2.8rem;
    /* Ajustado ligeramente por el tamaño de Bungee */
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero .highlight {
    color: var(--primary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    font-family: var(--font-main);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.image-card { 
    position: relative; 
    border-radius: 1rem; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2); 
    overflow: hidden; 
    max-width: 450px; /* <--- JUEGA CON ESTE NÚMERO (ej. 300px, 400px, 500px) */
    margin: 0 auto;   /* Esto la centra dentro de su espacio */
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Badge Flotante */
.floating-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #0f172a;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem 0 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    min-width: 220px;
    box-shadow: -5px -5px 20px rgba(0, 0, 0, 0.2);
}

.floating-badge .badge-title {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 2px;
    line-height: 1.2;
    font-family: var(--font-title);
    /* Bungee aquí también */
}

.floating-badge .badge-text {
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0;
    font-family: var(--font-main);
}

.icon-circle {
    background-color: #dcfce7;
    color: #16a34a;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .floating-badge {
        display: none;
    }
}

/* --- MARCAS --- */
.brands-section {
    padding: 1rem 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    font-family: var(--font-main);
    /* Etiqueta pequeña en Raleway */
}

.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.brand-link {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    filter: none;
}

.brand-link:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.brand-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CARRUSEL INFINITO --- */
.infinite-carousel {
    padding: 0.5rem 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.logos {
    display: flex;
    overflow: hidden;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-slide {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    animation: slide 60s linear infinite;
}

.logos-slide img {
    height: 70px;
    margin: 0 40px;
    flex-shrink: 0;
    filter: none;
    opacity: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logos-slide img:hover {
    transform: scale(1.1);
}

@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* --- SOLUCIONES --- */
.solutions-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    /* Hereda Bungee de la regla general */
}

.section-header p {
    color: var(--text-light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.card-icon span {
    font-size: 1.75rem;
}

.bg-blue {
    background-color: #eff6ff;
    color: var(--primary);
}

.card:hover .bg-blue {
    background-color: var(--primary);
    color: white;
}

.bg-red {
    background-color: #fef2f2;
    color: #dc2626;
}

.card:hover .bg-red {
    background-color: #dc2626;
    color: white;
}

.bg-green {
    background-color: #f0fdf4;
    color: #16a34a;
}

.card:hover .bg-green {
    background-color: #16a34a;
    color: white;
}

.bg-yellow {
    background-color: #fefce8;
    color: #ca8a04;
}

.card:hover .bg-yellow {
    background-color: #ca8a04;
    color: white;
}

.bg-indigo {
    background-color: #eef2ff;
    color: #4f46e5;
}

.card:hover .bg-indigo {
    background-color: #4f46e5;
    color: white;
}

.bg-teal {
    background-color: #f0fdfa;
    color: #0d9488;
}

.card:hover .bg-teal {
    background-color: #0d9488;
    color: white;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    /* Hereda Bungee */
}

.card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.link-arrow {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    font-family: var(--font-main);
}

.link-arrow:hover {
    text-decoration: underline;
}

body.dark-mode .link-arrow {
    color: #60a5fa;
}

/* --- FOOTER --- */
.footer {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    transition: background-color 0.3s ease;
}

body.dark-mode .footer {
    background-color: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer h2 {
    font-size: 1.875rem;
    margin-bottom: 2rem;
    /* Hereda Bungee */
}

.footer-desc {
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
}

.contact-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box .material-icons {
    font-size: 1.25rem;
}

.icon-box.bg-gray {
    background: #374151;
}

.contact-list small {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-list div {
    font-weight: 500;
    font-size: 1.125rem;
}

.map-container {
    height: 100%;
    min-height: 400px;
    background: #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

/* --- BOTÓN FLOTANTE --- */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.theme-icon {
    font-size: 1.5rem;
    transition: transform 0.5s ease;
}

body.dark-mode .theme-toggle-btn {
    background-color: #fcd34d;
    color: #1f2937;
}

body.dark-mode .theme-icon {
    transform: rotate(360deg);
}

/* --- MODAL DEFINITIVO (Fondo Transparente y Títulos Bungee) --- */

.modal-overlay {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Tarjeta Principal */
.modal-card {
    display: flex;
    background-color: white;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    /* Altura máxima para imagen grande */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Columna Izquierda (IMAGEN) */
.modal-image-container {
    width: 70%;
    height: 100%;
    background-color: transparent;
    /* Fondo transparente para no ver cuadros negros */
    position: relative;
    padding: 0;
    margin: 0;
    display: block;
}

/* La Imagen */
.modal-content {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    /* Muestra imagen completa */
    object-position: center center;
    border-radius: 0;
    box-shadow: none;
    transform: none !important;
    margin: 0;
    padding: 0;
}

/* Columna Derecha (TEXTO) */
.modal-info {
    width: 30%;
    background-color: #0f172a;
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

#modalTitle {
    font-size: 1.4rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: var(--font-title);
    /* Bungee */
    font-weight: 400;
}

.modal-divider {
    width: 50px;
    height: 4px;
    background-color: var(--secondary);
    margin-bottom: 1.5rem;
}

#modalDescription {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-modal {
    align-self: flex-start;
}

/* Cerrar */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-card {
        flex-direction: column;
        height: auto;
        max-height: 95vh;
    }

    .modal-image-container {
        width: 100%;
        height: 350px;
    }

    .modal-content {
        position: relative !important;
    }

    .modal-info {
        width: 100%;
        padding: 1.5rem;
    }
}