/* ---- VARIABLES Y ESTILOS GLOBALES ---- */
:root {
    --primary-color: #8BC34A;   /* Verde claro y fresco */
    --secondary-color: #FFD54F; /* Amarillo soleado */
    --dark-color: #333;
    --light-color: #FFFFFF;
    --grey-color: #757575;
    --background-color: #F1F8E9; /* Un verde muy pálido para fondos */
    --header-height: 65px; /* Altura del header en escritorio */
    --border-radius: 12px;
    --shadow: 0 8px 25px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--light-color);
    padding-top: 65px; /* Espacio para el header fijo */
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: var(--primary-color); font-weight: 600; }

/* ---- HEADER ---- */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}
.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}
.logo span {
    color: var(--secondary-color);
}
.logo-img {
    height: 1.2em;
    margin-right: 0.5em;
}
.nav-links a {
    margin-left: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--primary-color);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.nav-links a.active::after, .nav-links a:hover::after {
    width: 100%;
}
.nav-toggle {
    display: none;
}

/* ---- HERO SECTION ---- */
.hero { height: 100vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.pexels.com/photos/2252584/pexels-photo-2252584.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'); background-size: cover; background-position: center; background-attachment: fixed; display: flex; justify-content: center; align-items: center; text-align: center; color: #fff; padding: 0 20px; }
.hero-content h1 { font-size: 4rem; font-weight: 700; margin-bottom: 1rem; }
.hero-content p { font-size: 1.3rem; max-width: 700px; margin: 0 auto 2rem; font-weight: 300; }

/* ---- BOTONES ---- */
.btn { padding: 12px 30px; border-radius: 50px; font-weight: 600; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-primary { background-color: var(--secondary-color); color: var(--dark-color); }
.btn-primary:hover { background-color: #FFCA28; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* ---- SECCIONES GENERALES ---- */
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title h1, .section-title h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.section-title p { color: var(--grey-color); max-width: 600px; margin: 0 auto; }
.guarantee-section { padding: 80px 0; background: var(--background-color); }
.guarantee-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card { background: var(--light-color); padding: 40px 30px; text-align: center; border-radius: var(--border-radius); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #eee; }
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }
.card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.testimonials { background: linear-gradient(to right, var(--primary-color), #AED581); color: #fff; padding: 80px 0; text-align: center; }
.testimonial-quote p { font-size: 1.5rem; font-style: italic; max-width: 800px; margin: 0 auto 1rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.testimonial-quote cite { font-weight: 600; }

/* ---- PÁGINAS DE PRODUCTOS Y CONTACTO ---- */
.page-content { padding-top: 30px; padding-bottom: 80px; background: linear-gradient(to right, #DCEDC8, #FFFDE7 50%, #DCEDC8); }
.product-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.product-card { background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.4s ease, box-shadow 0.4s ease; border-left: 5px solid var(--secondary-color); }
.product-card:hover { transform: translateY(-12px) scale(1.02); box-shadow: var(--shadow); border-left-color: var(--primary-color); }
.product-image { height: 250px; position: relative; overflow: hidden; border-radius: var(--border-radius) var(--border-radius) 0 0; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-info { padding: 25px; }
.product-info h3 { margin-bottom: 0.5rem; }
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: flex-start; }
.contact-form-container { background: var(--light-color); padding: 40px; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.contact-form-container h3, .contact-details h3 { font-size: 1.8rem; margin-bottom: 2rem; position: relative; padding-bottom: 10px; }
.contact-form-container h3::after, .contact-details h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 4px; background-color: var(--secondary-color); border-radius: 2px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: var(--font-family); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 8px rgba(139, 195, 74, 0.3); }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.info-block { display: flex; align-items: center; background: var(--background-color); padding: 20px; border-radius: var(--border-radius); transition: transform 0.3s, box-shadow 0.3s; }
.info-block:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.info-icon { font-size: 1.5rem; color: var(--light-color); background-color: var(--primary-color); min-width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; margin-right: 20px; }
.info-text strong { display: block; margin-bottom: 5px; color: var(--dark-color); }
.info-text p { color: var(--grey-color); line-height: 1.5; margin: 0; }
.info-text a { color: var(--primary-color); }
.map-container { height: 250px; border-radius: var(--border-radius); overflow: hidden; margin-top: 20px; border: 3px solid var(--background-color); }

/* ---- ESTILOS PARA MENSAJES DE FORMULARIO ---- */
.form-message { margin-top: 20px; padding: 15px; border-radius: 8px; text-align: center; font-weight: 600; display: none; }
.form-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.form-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* ---- FOOTER ---- */
.footer { background: var(--dark-color); color: #fff; padding: 30px 0; }
.footer .container { display: flex; justify-content: space-between; align-items: center; }
.social-links a { color: #fff; margin-left: 15px; font-size: 1.2rem; transition: color 0.3s ease; }
.social-links a:hover { color: var(--secondary-color); }

/* ---- ANIMACIONES ON SCROLL ---- */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.4s; }


/******************************************/
/* ---- CÓDIGO RESPONSIVE ---- */
/******************************************/

/* ---- Para Tablets y pantallas medianas (hasta 992px) ---- */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem; }
    .section-title h1, .section-title h2 { font-size: 2.2rem; }
    .guarantee-cards { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
}

/* ---- Para Móviles (hasta 768px) ---- */
@media (max-width: 768px) {
    :root { --header-height: 70px; }
    body { padding-top: 70px; }
    .container { padding: 0 15px; }

   .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; width: 100%; background: #fff;
    flex-direction: column; padding: 20px 0; box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    opacity: 0; transform: translateY(-15px); visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    align-items: center; /* <-- LÍNEA AÑADIDA PARA CENTRAR */
}
    .nav-links.active { opacity: 1; transform: translateY(0); visibility: visible; }
    .nav-links a { margin: 10px 0; color: var(--dark-color); text-shadow: none; }
    .nav-links a::after { background: var(--primary-color); }
    .nav-toggle { display: block; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--dark-color); }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .section-title { margin-bottom: 3rem; }
    .section-title h1, .section-title h2 { font-size: 2rem; }
    .guarantee-section, .testimonials { padding: 60px 0; }
    .testimonial-quote p { font-size: 1.2rem; }
    .contact-form-container { padding: 30px; }
    .footer .container { flex-direction: column; gap: 15px; text-align: center; }
}

/* ---- Para Móviles muy pequeños (hasta 480px) ---- */
@media (max-width: 480px) {
    .logo { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2.1rem; }
    .section-title h1, .section-title h2 { font-size: 1.8rem; }
    .product-gallery { grid-template-columns: 1fr; }
    .contact-form-container { padding: 20px; }
    .info-block { flex-direction: column; text-align: center; }
    .info-icon { margin-right: 0; margin-bottom: 15px; }
}

