/* ============================================
   PALETA DE COLORES - GREEN SPRINKLER
   ============================================ */
:root {
    /* Fondo general: Verde claro suave pastel */
    --bg-primary: #E8F5E9;
    --bg-secondary: #C8E6C9;
    --bg-alt: #F1F8E9;
    
    /* Títulos y texto: Verde oscuro profundo */
    --text-primary: #1B5E20;
    --text-secondary: #2E7D32;
    --text-dark: #145A14;
    
    /* Detalles y acentos: Verde lima/clarito brillante */
    --accent-primary: #7CB342;
    --accent-secondary: #8BC34A;
    --accent-bright: #9CCC65;
    --border-color: #AED581;
    
    /* WhatsApp oficial */
    --whatsapp-green: #25D366;
    --whatsapp-dark: #128C7E;
    
    /* Otros colores */
    --white: #FFFFFF;
    --shadow: rgba(27, 94, 32, 0.1);
    --shadow-hover: rgba(27, 94, 32, 0.2);
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* ============================================
   HEADER / NAVEGACIÓN
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.header-cta {
    background-color: var(--whatsapp-green);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.header-cta:hover {
    background-color: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    background-color: var(--text-primary);
}

.hero-slider {
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide:nth-child(1) {
    background-color: var(--text-primary);
    background-image: linear-gradient(rgba(27, 94, 32, 0.6), rgba(27, 94, 32, 0.6)),
                      url('https://images.unsplash.com/photo-1558904541-efa843a96f01?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
}

.hero-slide:nth-child(2) {
    background-color: var(--text-primary);
    background-image: linear-gradient(rgba(27, 94, 32, 0.6), rgba(27, 94, 32, 0.6)),
                      url('https://images.unsplash.com/photo-1416879595882-3373a0480b5b?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
}

.hero-slide:nth-child(3) {
    background-color: var(--text-primary);
    background-image: linear-gradient(rgba(27, 94, 32, 0.6), rgba(27, 94, 32, 0.6)),
                      url('https://images.unsplash.com/photo-1591857177580-dc82b9ac4e1e?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    z-index: 10;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

.hero-cta {
    display: inline-block;
    background-color: var(--whatsapp-green);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    border: none;
    cursor: pointer;
}

.hero-cta:hover {
    background-color: var(--whatsapp-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

/* ============================================
   SECCIONES DE SERVICIOS
   ============================================ */
.service-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.service-section-alt {
    background-color: var(--bg-alt);
}

.service-content {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.service-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.service-description p {
    margin-bottom: 15px;
}

.service-features {
    list-style: none;
    margin: 25px 0;
    text-align: left;
    display: inline-block;
}

.service-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

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

/* ============================================
   CARRUSEL - Sin marcos ni bordes
   ============================================ */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 400px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.carousel-slide:hover img {
    transform: scale(1.1);
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .carousel {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 250px;
    }
}

/* ============================================
   SECCIÓN UBICACIÓN
   ============================================ */
.location-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.location-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.location-info p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.location-details {
    margin-top: 30px;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.location-item:hover {
    transform: translateX(5px);
}

.location-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.location-item h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.location-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.location-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */
.contact-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.contact-form-wrapper {
    max-width: 600px;
    margin: 40px auto 0;
    background-color: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background-color: var(--whatsapp-green);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    margin-top: 10px;
}

.form-submit:hover {
    background-color: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--text-primary);
    color: var(--white);
    padding: 40px 0 20px;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--accent-secondary);
    font-size: 0.95rem;
}

.footer-contact p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.footer-copyright {
    text-align: center;
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--accent-secondary);
    font-size: 0.9rem;
    color: var(--accent-secondary);
}

/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: var(--white);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 6px 35px rgba(37, 211, 102, 0.6);
    }
}

/* ============================================
   ANIMACIONES DE SCROLL (FADE-IN)
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Asegurar visibilidad en desktop si JavaScript falla */
@media (min-width: 1024px) {
    .fade-in {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .location-map {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 10px 0;
    }
    
    .nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: left 0.3s ease;
        box-shadow: 0 4px 10px var(--shadow);
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .header-cta {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-content {
        margin-bottom: 30px;
    }
    
    .service-features {
        font-size: 0.9rem;
    }
    
    .carousel-image {
        height: 250px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-btn-prev {
        left: 10px;
    }
    
    .carousel-btn-next {
        right: 10px;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .service-description {
        font-size: 1rem;
    }
    
    .carousel-image {
        height: 200px;
    }
    
    .location-item {
        padding: 12px;
    }
    
    .contact-form-wrapper {
        padding: 25px 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.95rem;
    }
}

/* ============================================
   OPTIMIZACIÓN DE CARGA
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading nativo */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}