/* VARIABLES CSS MODERNAS */
:root {
    --color-primary: #c82333; /* Rojo vibrante para la acción (antes azul) */
    --color-secondary: #f8f9fa; /* Gris claro para fondos */
    --color-dark: #212529; /* Negro para texto y fondo de footer */
    --color-text: #495057; /* Gris oscuro para cuerpo de texto */
    --font-main: 'Poppins', sans-serif;
    --spacing-unit: 1.5rem; /* 24px */
}

/* RESET Y ESTILOS BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--color-dark);
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    box-sizing: border-box;
}

/* TIPOGRAFÍA Y ENCABEZADOS SEO */
.section-title {
    font-size: 2.5rem;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: calc(3 * var(--spacing-unit));
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

/* Línea decorativa bajo los títulos */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
}

h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.tagline {
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--color-primary);
}

/* BOTONES */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    border: 2px solid transparent;
}

.primary-btn {
    background-color: var(--color-primary);
    color: white;
}

.primary-btn:hover {
    background-color: #da0d1e; /* Tono de rojo más oscuro */
    color: white;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.secondary-btn:hover {
    background-color: var(--color-primary);
    color: white;
}

.large-btn { padding: 1rem 2rem; font-size: 1.1rem; }
.huge-btn { padding: 1.5rem 3rem; font-size: 1.3rem; margin-top: 1rem; }
.small-btn { 
    padding: 0.5rem 1rem; 
    font-size: 0.9rem; 
    background-color: var(--color-primary);
    color: white;
}

.small-btn:hover {
    background-color: #da0d1e;
    color: white;
}


/* NAVEGACIÓN */
.main-header {
    background-color: var(--color-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-unit);
    position: relative;
}

.logo {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary);
    text-align: center;
    z-index: 102;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 102;
}

.nav-links {
    display: none;
    list-style: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-dark);
    padding-top: 5rem;
    text-align: center;
    z-index: 101;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.3s ease-in-out;
}

.nav-links.active {
    display: flex;
}

.nav-links li {
    margin: 1rem 0;
}

.nav-links li a {
    color: white;
    padding: 0.5rem 1rem;
    display: block;
    font-size: 1.2rem;
}

.nav-links .btn-contact {
    background-color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 1rem auto;
    color: white;
    width: 80%;
    max-width: 300px;
}

/* HERO SECTION */
.hero {
    height: 100vh;
    min-height: 400px;
    width: 100%;
    max-width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Overlay para oscurecer la imagen y mejorar la legibilidad del texto */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 900px;
    padding: var(--spacing-unit);
}

.main-title {
    color: white;
    margin-bottom: 2rem;
    line-height: 1.1;
}

/* SECCIONES ESTÁNDAR */
section {
    padding: calc(5 * var(--spacing-unit)) 0;
    margin-bottom: calc(4 * var(--spacing-unit));
    position: relative;
}

/* Separador visual entre secciones */
section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: calc(-2 * var(--spacing-unit));
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

/* SOBRE NOSOTROS */
.about-grid {
    display: grid;
    gap: calc(2 * var(--spacing-unit));
    margin-bottom: calc(2 * var(--spacing-unit));
}

.about-image img {
    border-radius: 8px;
    object-fit: cover;
}

/* SERVICIOS */
.services-grid {
    display: grid;
    gap: calc(2 * var(--spacing-unit));
    width: 100%;
    margin: 0 auto calc(3 * var(--spacing-unit)) auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.service-card {
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.service-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.service-card img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    max-width: 100%;
}

.card-body {
    padding: var(--spacing-unit);
}

/* GALERÍA */
.gallery {
    background-color: var(--color-dark);
    text-align: center;
}

.gallery-grid {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.gallery-grid img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.text-white { color: white !important; }

/* FAQS */
.faqs-grid {
    display: grid;
    gap: calc(2 * var(--spacing-unit));
    border: 1px solid #dee2e6;
    padding: var(--spacing-unit);
    border-radius: 8px;
}

.faqs-block h3 {
    text-align: center;
    color: var(--color-primary);
    text-transform: uppercase;
}

.faqs-block ul {
    list-style: none;
    padding-left: 0;
}

.faqs-block li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e9ecef;
}

.icon-check {
    color: green;
    margin-right: 0.5rem;
}

.faqs-cta {
    text-align: center;
    margin-top: calc(2 * var(--spacing-unit));
}

/* TESTIMONIOS */
.testimonials {
    background-color: var(--color-secondary);
    text-align: center;
    padding: calc(4 * var(--spacing-unit)) 0;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    background-color: white;
    padding: calc(2 * var(--spacing-unit));
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 0 1rem;
    border-left: 5px solid var(--color-primary);
    min-width: 100%;
    box-sizing: border-box;
}

.client-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-primary);
}

.client-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.author {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1.2rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
    z-index: 2;
}

.carousel-btn:hover {
    opacity: 1;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-dark);
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.3s;
}

.dot.active {
    opacity: 1;
    background: var(--color-primary);
}

    .partners {
        background-color: white;
        padding: calc(3 * var(--spacing-unit)) 0;
    }

    .partners-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: calc(2 * var(--spacing-unit));
        align-items: center;
        justify-items: center;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-unit);
    }

    .partner-logo {
        max-width: 150px;
        height: 80px;
        object-fit: contain;
        filter: grayscale(100%);
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    .partner-logo:hover {
        filter: grayscale(0%);
        opacity: 1;
    }

/* CONTACTO CTA */
.contact {
    background-color: var(--color-primary);
    padding: calc(4 * var(--spacing-unit)) 0;
    text-align: center;
}

.contact-content {
    color: white;
}

.contact-details {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.contact-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-details p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-details .huge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(200, 35, 51, 0.3);
    border: 2px solid white;
}

.contact-details .huge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 35, 51, 0.4);
}

/* FOOTER */
.main-footer {
    background-color: var(--color-dark);
    color: white;
    padding-top: calc(2 * var(--spacing-unit));
}

.footer-grid {
    display: grid;
    gap: calc(2 * var(--spacing-unit));
    padding-bottom: calc(2 * var(--spacing-unit));
}

.footer-info h4, .footer-links h4, .footer-contact h4 {
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a, .footer-contact p {
    color: #ced4da;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-contact i {
    margin-right: 0.5rem;
    color: var(--color-primary);
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: var(--spacing-unit) 0;
    font-size: 0.9rem;
    color: #ced4da;
}

.footer-bottom a {
    color: var(--color-primary);
}

/* BOTONES FLOTANTES (Sticky) */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-buttons a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#whatsapp-button {
    background-color: #25d366; /* Verde WhatsApp */
}

#phone-button {
    background-color: var(--color-primary);
}

/* Estilos base para móvil */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
        width: 100%;
    }
    
    .main-title {
        font-size: 2rem;
        padding: 0 0.5rem;
    }
    
    .about-grid, .services-grid, .gallery-grid {
        padding: 0 0.5rem;
    }
}

/* MEDIA QUERIES PARA DESKTOP (Moderno con Grid/Flexbox) */
@media (min-width: 768px) {
    /* Navbar en Desktop */
    .nav-toggle {
        display: none;
    }
    .nav-links {
        display: flex !important;
        position: static;
        padding: 0;
        background: none;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }
    .nav-links li {
        margin: 0 0 0 1rem;
    }
    .nav-links .btn-contact {
        margin: 0 0 0 1rem;
        width: auto;
    }

    /* Grid Layouts */
    .about-grid {
        grid-template-columns: 1fr 1.5fr;
        align-items: center;
        text-align: left;
    }
    .about-image {
        order: -1; /* Mover la imagen a la izquierda */
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .faqs-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .faqs-block h3 {
        text-align: left;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* MODAL GENERICO */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2200;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal[aria-hidden="false"] {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.modal-dialog {
    position: relative;
    background: white;
    width: 100%;
    max-width: 800px;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 2201;
}

.modal-content {
    padding: 2rem;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 2202;
}

.modal-close:hover {
    background-color: #da0d1e;
}

.modal-title {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
}

.modal-body {
    color: var(--color-text);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1.25rem;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    position: relative;
}

.modal-body a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.modal-body a:hover {
    color: #da0d1e;
}

/* Responsive del modal */
@media (min-width: 768px) {
    .modal {
        padding: 30px;
    }
    
    .modal-dialog {
        padding: 0;
        max-height: 85vh;
    }
    
    .modal-content {
        padding: 2.5rem;
    }
    
    .modal-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .modal {
        padding: 15px;
    }
    
    .modal-dialog {
        border-radius: 8px;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .modal-body {
        font-size: 0.95rem;
    }
}