/* ===== VARIABLES ===== */
:root {
    --primary-color: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #f87171;
    --secondary-color: #1e40af;
    --text-color: #374151;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-sm: 8px;
    --header-height: 4rem;
}

/* ===== BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn--whatsapp {
    background-color: #25d366;
    color: white;
}

.btn--whatsapp:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ===== HEADER & NAV ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.nav__logo i {
    color: var(--primary-color);
    font-size: 2rem;
}

.nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-color);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.nav__menu.show-menu {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.nav__link {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.nav__close,
.nav__toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.nav__actions .btn__text {
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    margin-top: var(--header-height);
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.hero__description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero__features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.feature i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.hero__image {
    display: none;
}

/* ===== STATS SECTION ===== */
.stats {
    padding: 3rem 0;
    background-color: var(--primary-color);
    color: white;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat__number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat__text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__subtitle {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section__description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

/* ===== SERVICES ===== */
.services {
    background-color: var(--bg-secondary);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card--featured {
    border: 2px solid var(--primary-color);
}

.service-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.service-card__icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card__icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.service-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.service-card__text {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-card__list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.service-card__list i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.services__additional {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.services__additional-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.services__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

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

.tag i {
    color: var(--primary-color);
}

.tag:hover i {
    color: white;
}

/* ===== WHY US ===== */
.why-us__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.why-us__content .section__subtitle,
.why-us__content .section__title {
    text-align: left;
}

.why-us__text {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.why-us__features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.why-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.why-feature__icon {
    width: 50px;
    height: 50px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.why-feature__icon i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.why-feature__content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.why-feature__content p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.why-us__image {
    display: none;
}

/* ===== CTA SECTION ===== */
.cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.cta__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta__text {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== CONTACT ===== */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact__card:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.contact__card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact__card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.contact__card-content p,
.contact__card-content a {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.contact__card-content a:hover {
    color: var(--primary-color);
}

.contact__map {
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 300px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-light);
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer__logo i {
    color: var(--primary-light);
    font-size: 2rem;
}

.footer__text {
    font-size: 0.9375rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer__social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a {
    font-size: 0.9375rem;
    opacity: 0.9;
    transition: var(--transition);
}

.footer__links a:hover {
    opacity: 1;
    color: var(--primary-light);
    padding-left: 5px;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.footer__contact i {
    color: var(--primary-light);
    width: 20px;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== SCROLL TOP ===== */
.scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.show-scroll {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== MEDIA QUERIES ===== */

/* Tablet */
@media screen and (min-width: 768px) {
    .nav__actions .btn__text {
        display: inline;
    }
    
    .hero {
        padding: 10rem 0 5rem;
    }
    
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero__title {
        font-size: 2.75rem;
    }
    
    .hero__buttons {
        flex-direction: row;
    }
    
    .hero__features {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .hero__image {
        display: block;
    }
    
    .hero__image-wrapper {
        width: 100%;
        max-width: 400px;
        height: 400px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        animation: float 6s ease-in-out infinite;
    }
    
    .hero__image-wrapper i {
        font-size: 12rem;
        color: white;
        opacity: 0.9;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-20px); }
    }
    
    .stats__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-us__grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .why-us__image {
        display: block;
    }
    
    .why-us__image-wrapper {
        width: 100%;
        max-width: 400px;
        height: 400px;
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        border-radius: var(--radius);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
    
    .why-us__image-wrapper i {
        font-size: 10rem;
        color: white;
        opacity: 0.9;
    }
    
    .cta__buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .contact__grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}

/* Desktop */
@media screen and (min-width: 1024px) {
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .nav__list {
        flex-direction: row;
        margin-top: 0;
    }
    
    .nav__close,
    .nav__toggle {
        display: none;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .section__title {
        font-size: 2.5rem;
    }
    
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cta__title {
        font-size: 2.25rem;
    }
}

/* Large Desktop */
@media screen and (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Botón para CTA sobre fondo rojo */
.btn--white {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn--white:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* Mapa de Google Maps */
.map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    border-radius: var(--radius);
}

/* Ajuste para el placeholder del mapa */
.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-light);
    background-color: var(--bg-secondary);
}

@media screen and (min-width: 768px) {
    .map-container iframe {
        min-height: 450px;
    }
}

@media screen and (min-width: 1024px) {
    .map-container iframe {
        min-height: 100%;
        height: 450px;
    }
}