/* Variables y reset */
:root {
    --primary-color: #2e7d32;
    --secondary-color: #81c784;
    --accent-color: #ffb74d;
    --text-color: #333;
    --bg-light: #f9fdf9; /* Más limpio */
    --bg-white: #ffffff;
    --shadow: 0 10px 20px rgba(0,0,0,0.08); /* Sombra más moderna */
    --border-radius-circular: 50%; /* Para círculos perfectos */
    --border-radius-pill: 50px; /* Para botones y tarjetas redondeadas */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-circular);
    object-fit: cover;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezado y navegación */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
    font-weight: 300;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li {
    margin-left: 2rem;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1b5e20;
    transform: scale(1.05);
}

/* Secciones */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;      /* alto completo de pantalla */
    height: 100dvh;      /* mejor en móviles (evita el salto por la barra de URL) */
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;   /* recorta sin deformar, cubriendo todo el espacio */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35); /* ajusta la opacidad a tu gusto */
    z-index: 1;
}

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 1.5rem;
    gap: 0.75rem;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
    margin: 0;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin: 0 0 0.5rem;
    max-width: 600px;
}

.hero-content .btn {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Nosotros */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-text p {
    margin-bottom: 1rem;
}

.about-icon {
    font-size: 8rem;
    color: var(--secondary-color);
    text-align: center;
}

/* Plantas destacadas */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.plant-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-align: center;
    padding-bottom: 1.5rem;
}

.plant-card:hover {
    transform: translateY(-10px);
}

.plant-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
}

.plant-card h3 {
    font-size: 1.3rem;
    margin: 1rem 0 0.5rem;
    color: var(--primary-color);
}

.plant-card p {
    padding: 0 1rem;
    margin-bottom: 1rem;
    color: #555;
}

.price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    justify-content: center; /* Centra las columnas en el contenedor */
    justify-items: center;    /* Centra cada tarjeta dentro de su celda */
    max-width: 1200px;
    margin: 0 auto;           /* Centra el grid respecto a la página */
}

/* Ajuste adicional para asegurar que en móvil (2x2) estén centrados */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* Mantiene el 2x2 solicitado */
        gap: 1rem;
    }
}

.service-item {
    background-color: var(--bg-white);
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.service-item:hover {
    transform: scale(1.05);
}

.service-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Contacto */
.contact {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.contact .section-title {
    color: white;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 15px; /* Distancia entre botones */
    cursor: pointer;
    transition: transform 0.1s ease-in-out; /* Transición suave */
}

.contact-item:active {
    transform: scale(0.95); /* Efecto de hundimiento al presionar */
}

.contact-item i {
    font-size: 1.2rem;
}

.contact .btn {
    background-color: white;
    color: var(--primary-color);
}

.contact .btn:hover {
    background-color: var(--bg-light);
}

/* Footer */
.footer {
    background-color: #1b5e20;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-icons a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-list {
        position: absolute;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: var(--shadow);
        transition: left 0.3s;
        z-index: 999;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        margin: 1rem 0;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-icon {
        font-size: 6rem;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }
}

/* Agrega al final de tu style.css */
.circular-card, .service-item {
    border-radius: var(--border-radius-pill);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Los hace circulares si el ancho lo permite */
    border: 2px solid transparent;
}
.circular-card:hover, .service-item:hover {
    border-color: var(--secondary-color);
}
.plant-img {
    border-radius: var(--border-radius-circular);
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem auto;
}

/* Agrega al final de tu style.css */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Carrusel de Galería */
.carousel-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    border-radius: var(--border-radius-pill);
}
.carousel-track {
    display: flex;
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth; 
    -webkit-overflow-scrolling: touch; 
}
.carousel-track::-webkit-scrollbar { 
    display: none; /* Oculta la barra de scroll visualmente */
}
.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: center; /* Enganche magnético */
}
.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: contain; /* Ajusta sin recortar la imagen vertical/horizontal */
    border-radius: 30px;
    background-color: var(--bg-white); /* Evita que el fondo se vea vacío */
}

/* --- ESTILOS DEL SLIDER DE PLANTAS --- */
.slider-container {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 600px;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #f5f5f5;
    box-shadow: 0 30px 50px rgba(0,0,0,0.1);
    border-radius: 0;
    overflow: hidden;
}

.slider-container .slide {
    width: 100%;
    height: 100%;
    position: absolute;
}

.slider-container .slide .item {
    width: 200px;
    height: 250px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    background-position: 50% 50%;
    background-size: cover;
    display: inline-block;
    transition: 0.5s;
}

/* Posicionamiento dinámico de las tarjetas */
.slide .item:nth-child(1),
.slide .item:nth-child(2) {
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 0;
    width: 100%;
    height: 100%;
}

.slide .item:nth-child(3) { left: 50%; }
.slide .item:nth-child(4) { left: calc(50% + 220px); }
.slide .item:nth-child(5) { left: calc(50% + 440px); }
.slide .item:nth-child(n + 6) { left: calc(50% + 660px); opacity: 0; }

.item .content {
    position: absolute;
    top: 50%;
    left: 50px;
    width: 300px;
    text-align: left;
    color: #fff;
    transform: translate(0, -50%);
    background-color: rgba(40, 40, 40, 0.75); /* Fondo gris semitransparente */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: none;
}

.slide .item:nth-child(2) .content {
    display: block;
}

.content .name {
    font-size: 40px;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0;
    animation: animate 1s ease-in-out 1 forwards;
    color: var(--accent-color);
}

.content .des {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0;
    animation: animate 1s ease-in-out 0.3s 1 forwards;
}

@keyframes animate {
    from { opacity: 0; transform: translate(0, 100px); filter: blur(33px); }
    to { opacity: 1; transform: translate(0); filter: blur(0); }
}

.button-slider {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.button-slider button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: 0.3s;
}

.button-slider button:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Ajustes Responsive para la nueva cuadrícula de contacto */
@media (min-width: 769px) {
    .contact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 2rem;
        text-align: left;
    }
}

@media (max-width: 768px) {

    /* Agrega esto para la cuadrícula 2x2 */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .service-item {
        padding: 1.5rem 0.5rem;
    }

    .service-item i {
        font-size: 2rem; /* Ícono más adaptado al tamaño 2x2 */
    }

    .service-item h3 {
        font-size: 0.9rem; /* Texto más pequeño para evitar desbordes */
    }
}

/* Nuevo media query para el slider en móviles/tablets */
@media (max-width: 800px) {
    /* Ocultamos los mini ficheros laterales que estorban */
    .slide .item:nth-child(n + 3) {
        display: none !important;
    }

    /* La imagen principal ocupa todo el ancho */
    .slide .item:nth-child(1),
    .slide .item:nth-child(2) {
        width: 100%;
        left: 0;
        border-radius: 0;
    }

    /* Ajuste de contenido para que no se pierda */
    .item .content {
        left: 20px;
        width: 90%;
        transform: translate(0, -50%);
    }

    /* Servicios en 2x2 centrado */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* --- ESTILOS DEL LOADER --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Fondo blanco */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Por encima de todo */
    transition: opacity 0.8s ease, visibility 0.8s; /* Para el efecto fade out */
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 120px; /* Tamaño del logo en el loader */
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out; /* Efecto sutil de pulso */
}

.loader-content p {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 15px;
}

/* Animación de pulso para el logo */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Clase que aplicaremos con JS para el fade out */
.loader-hidden {
    opacity: 0;
    visibility: hidden;
}