/* ==========================================================================
   VARIABLES Y RESET
   ========================================================================== */
:root {
    --primary: #E30613;
    --primary-hover: #B5040F;
    --secondary: #0B1F3A;
    --secondary-hover: #071426;

    --bg-dark: #121212;
    --bg-darker: #0B1F3A;
    --bg-light: #f4f6f8;
    --white: #ffffff;

    --text-dark: #333333;
    --text-muted: #6c757d;
    --text-light: #f8f9fa;

    --font-main: 'Poppins', sans-serif;
    --transition: all 0.3s ease-in-out;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--primary);
    margin-bottom: 20px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-white {
    color: var(--white);
}

.text-dark {
    color: var(--text-dark);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-darker);
    color: var(--white);
}

.bg-primary {
    background-color: var(--primary);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-main);
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--secondary);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-success {
    background-color: #25D366;
    color: var(--white);
}

.btn-success:hover {
    background-color: #128C7E;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN
   ========================================================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(11, 31, 58, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#header.scrolled {
    padding: 10px 0;
    background-color: var(--secondary);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--white);
}

.logo-img {
    height: 40px;
    object-fit: contain;
}

#logo-text {
    font-size: 1.5rem;
}

#logo-text strong {
    color: var(--primary);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1558002038-1055907df827?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    /* Placeholder image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px;
    /* offset header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.9) 0%, rgba(11, 31, 58, 0.6) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-benefits {
    display: flex;
    gap: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.benefit-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--primary);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(227, 6, 19, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* ==========================================================================
   PROPUESTA DE VALOR
   ========================================================================== */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.value-item i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.value-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.value-item p {
    color: #aaaaaa;
    font-size: 0.95rem;
}

/* ==========================================================================
   CÓMO FUNCIONA (TIMELINE)
   ========================================================================== */
.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(11, 31, 58, 0.1);
    z-index: 1;
}

.timeline-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    border: 5px solid var(--bg-light);
    transition: var(--transition);
}

.timeline-item:hover .timeline-icon {
    background-color: var(--primary);
    transform: scale(1.1);
}

.timeline-content h4 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   GALERÍA
   ========================================================================== */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 31, 58, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-weight: 600;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

.gallery-item.hide {
    display: none;
}

/* ==========================================================================
   TESTIMONIOS
   ========================================================================== */
.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 30px;
    text-align: center;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stars {
    color: #FFB800;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.testimonial-author {
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 700;
}

.testimonial-source {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--primary);
    width: 25px;
    border-radius: 5px;
}

/* ==========================================================================
   GARANTÍA
   ========================================================================== */
.guarantee-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    justify-content: center;
}

.guarantee-badge {
    font-size: 6rem;
    opacity: 0.9;
}

.guarantee-content h2 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.check-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.check-list i {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 2px;
}

/* ==========================================================================
   COBERTURA
   ========================================================================== */
.coverage-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.coverage-text {
    flex: 1;
}

.coverage-text p {
    margin-bottom: 20px;
    color: #aaaaaa;
}

.coverage-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.coverage-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coverage-map {
    flex: 1;
    width: 100%;
}

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-container {
    display: flex;
    gap: 50px;
}

.contact-form-wrapper {
    flex: 1.5;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-form-wrapper h2 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.contact-form-wrapper p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.contact-info-wrapper {
    flex: 1;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.cm-icon {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.cm-text h4 {
    color: var(--secondary);
    margin-bottom: 5px;
}

.cm-text p {
    color: var(--text-muted);
}

.mt-2 {
    margin-top: 10px;
}

.form-message {
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-message.success {
    color: #25D366;
    display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: #05101E;
    color: var(--white);
    padding: 40px 0;
    border-top: 4px solid var(--primary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo img {
    height: 40px;
}

.footer-rights {
    color: #aaaaaa;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ==========================================================================
   WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 992px) {
    .hero {
        background-attachment: scroll;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .guarantee-wrapper,
    .coverage-container,
    .contact-container {
        flex-direction: column;
    }

    .check-list {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .header-contact {
        display: none;
        /* Ocultar en móvil para dar espacio al menú */
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--secondary);
        transition: 0.4s ease-in-out;
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-benefits {
        flex-direction: column;
        gap: 15px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   VIDEO MODAL & DOME BUTTON ANIMATION
   ========================================================================== */
.btn-dome {
    position: relative;
    overflow: hidden;
    animation: pulse-dome 2s infinite;
}

@keyframes pulse-dome {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(227, 6, 19, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 6, 19, 0); }
}

.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    background-color: transparent;
    margin: 5% auto;
    padding: 0;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

.close-video {
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: -40px;
    top: -40px;
    transition: 0.3s;
}

.close-video:hover,
.close-video:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.video-modal-content video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background-color: #000;
}

/* Modal responsive adjustment */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        margin: 15% auto;
    }
    .close-video {
        right: 0px;
        top: -40px;
    }
}