:root {
    --primary-color: #E94440;
    --secondary-color: #FFD44B;
    --accent-color: #ADADAD;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --dark-gray: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 1);
    padding: 0.5rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

.nav-links a:hover::after {
    visibility: visible;
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Estilos para el menú desplegable de servicios */
.services-dropdown {
    position: relative;
}

.services-dropdown > a {
    display: flex;
    align-items: center;
}

.services-dropdown > a i {
    margin-left: 5px;
    font-size: 0.8em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 10px 0;
    z-index: 1000;
    min-width: 200px;
}

.services-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
}

.dropdown-menu i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../Imagenes/hero-bg.webp') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 1s both;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Services Section */
.services {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: all 0.5s ease;
    z-index: 0;
}

.service-card:hover::before {
    top: 0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.service-card:hover i,
.service-card:hover h3,
.service-card:hover p {
    color: #fff;
    position: relative;
    z-index: 1;
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.service-card p {
    transition: all 0.3s ease;
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background-color: #fff;
}

.testimonial-slider {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.testimonial-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 2rem;
    background-color: var(--light-gray);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.before-after-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.before-after-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.before-after-slider .after-image {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.before-after-slider .slider {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    outline: none;
    margin: 0;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.before-after-slider .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 400px;
    background: white;
    cursor: pointer;
}

.before-after-slider .slider::-moz-range-thumb {
    width: 6px;
    height: 400px;
    background: white;
    cursor: pointer;
}

.testimonial-card q {
    font-style: italic;
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.testimonial-card p {
    font-weight: bold;
    color: var(--primary-color);
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.nav-arrow {
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.nav-arrow:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-arrow.left {
    margin-left: -20px;
}

.nav-arrow.right {
    margin-right: -20px;
}

.testimonial-nav button {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.testimonial-nav button:hover {
    color: var(--secondary-color);
}

.testimonials .container {
    position: relative;
}

/* Stats Section */
.stats {
    background-color: var(--primary-color);
    color: #fff;
    padding: 5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    position: relative;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 50%);
    transition: all 0.5s ease;
}

.stat-item:hover::before {
    top: -75%;
    left: -75%;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: #fff;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Whatsapp Button */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        padding: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .services-dropdown .dropdown-menu {
        position: static;
        display: none;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    .services-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 10px 20px;
    }

    .before-after-slider {
        height: 300px;
    }

    .before-after-slider .slider::-webkit-slider-thumb,
    .before-after-slider .slider::-moz-range-thumb {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .cta-button {
        padding: 0.6rem 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .before-after-slider {
        height: 200px;
    }

    .before-after-slider .slider::-webkit-slider-thumb,
    .before-after-slider .slider::-moz-range-thumb {
        height: 200px;
    }
}