/* Estilos generales */
:root {
    --primary-color: #1da413;
    --secondary-color: #003366;
    --accent-color: #e67e22;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 5px;
}

.logo img {
    max-width: 200px;
    transition: all 0.3s ease;
    margin: 0;
}

.menu {
    display: flex;
    margin-top: -15px;
}

.menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.menu a:hover::after, .menu a.active::after {
    width: 100%;
    left: 0;
}

.menu a:hover, .menu a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/productos/estibas8.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    animation: fadeInUp 1s ease-out 0.5s;
    animation-fill-mode: both;
}

/* PARA QUE EL TEXTO EN MOVIL NO SE VEA TAN PEQUEÑO */
@media (max-width: 768px) {
    .productos-hero .hero-content p {
        font-size: 1.3rem; 
        line-height: 1.2; 
    }

    .productos-hero .hero h1 {
        font-size: 2rem;
        letter-spacing: 1px; 
    }
}

.cta-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out 1s;
    animation-fill-mode: both;
}

.cta-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nosotros Section */
.nosotros {
    padding: 3rem 0;
    background-color: var(--white);
}

.nosotros .container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.nosotros-content {
    flex: 1;
}

.nosotros-image {
    flex: 1;
    position: relative;
}

.nosotros-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nosotros-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    z-index: -1;
}

.nosotros-image:hover img {
    transform: translate(10px, 10px);
}

.nosotros h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.nosotros h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.nosotros p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #168f0e;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Galería */
.galeria {
    padding: 3rem 0;
    background-color: #f9f9f9;
}

.galeria h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
}

.galeria h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.galeria-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 164, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.galeria-overlay p {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.galeria-item:hover img {
    transform: scale(1.1);
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-item:hover .galeria-overlay p {
    transform: translateY(0);
}

.galeria-item:active img {
    transform: scale(1.1);
}

.galeria-item:active .galeria-overlay {
    opacity: 1;
}

.galeria-item:active .galeria-overlay p {
    transform: translateY(0);
}

/* Servicios */
.servicios {
    padding: 3rem 0;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.servicios h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 4rem;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.servicios h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.servicio {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.servicio:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.servicio-content {
    position: relative;
    background-color: white;
    height: 100%;
}

.servicio-image {
    height: 250px;
    overflow: hidden;
}

.servicio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.servicio:hover .servicio-image img {
    transform: scale(1.1);
}

.servicio-info {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.servicio h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
    position: relative;
}

.servicio h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.servicio:hover h3::after {
    width: 60px;
}

.servicio p {
    color: #666;
    line-height: 1.6;
    margin: 1.5rem 0 0;
    font-size: 1rem;
}

.servicio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    opacity: 0.9;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .servicios {
        padding: 6rem 0;
    }

    .servicios h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .servicios-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .servicio-image {
        height: 200px;
    }

    .servicio h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .servicios {
        padding: 4rem 0;
    }

    .servicios h2 {
        font-size: 2rem;
    }

    .servicio-info {
        padding: 1.5rem;
    }
}

/* VALORES DE LA COMPAÑIA (MISION VISION ETC) */
.company-values {
    padding: 3rem 0;
    background-color: #f4f4f4;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.values-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.values-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.values-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.values-item ul {
    list-style-type: none;
    padding-left: 0;
}

.values-item li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.values-item li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
}

.values-item.quality {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
}

.values-item.quality h3 {
    margin-bottom: 0;
}

/* FOOTER (EL DE ABAJO DEL TODO) */
/* DEJE INDICADO ALGUNAS COSAS QUE NO SE USAN, POR SI SE BUSCA EN UN FUTURO AÑADIR COSAS AHÍ */

.footer {
    background-color: white;
    color: var(--black);
    padding: 1rem 0 1rem;
  }
        
  .footer-bottom {
    padding-top: 1rem;
    text-align: center;
  }
  
  @media (max-width: 768px) {
    .footer-content {
      flex-direction: column;
    }
    
    .footer-section {
      width: 100%;
    }
  }

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }

    .menu {
        margin-top: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nosotros .container {
        flex-direction: column;
    }

    .nosotros-image::before {
        display: none;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .values-item.quality {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nosotros h2,
    .galeria h2,
    .servicios h2 {
        font-size: 2rem;
    }
}

/* CONTACTOS */
.contacto-seccion {
    padding: 6rem 0;
    background-color: #f8f9fa;
}

.contacto-seccion h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
}


.mapa-info-wrapper {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
}

.mapa {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mapa iframe {
    display: block;
    width: 100%;
    height: 400px;
}

.informacion-empresa {
    flex: 1;
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.informacion-empresa h2,
.formulario-contacto h2 {
    color: #003366;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.informacion-empresa p {
    margin-bottom: 1rem;
}

.whatsapp-btn,
.formulario-btn {
    display: inline-flex;
    align-items: center;
    background-color: #25D366;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 1rem;
}

.formulario-btn {
    background-color: #007bff;
}


.whatsapp-btn img {
    width: 24px;
    margin-right: 10px;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

.botones-contacto {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.formulario-contacto {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

form {
    display: grid;
    gap: 1rem;
}

form label {
    font-weight: 600;
}

form input,
form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

form textarea {
    height: 150px;
}

form button {
    background-color: #1da413;
    color: #fff;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

form button:hover {
    background-color: #168f0e;
}

/* Responsive */
@media (max-width: 768px) {
    .mapa-info-wrapper {
        flex-direction: column;
    }

    .mapa,
    .informacion-empresa {
        width: 100%;
    }

    .botones-contacto {
        flex-direction: column;
        gap: 0.5rem;
    }

    .whatsapp-btn, 
    .formulario-btn {
        width: 100%;
        text-align: center;
    }

    .formulario-btn {
        text-align: center; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
    }
}

    

/* PRODUCTOS */
.productos-lista {
    padding: 6rem 0;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.producto {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.producto:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.producto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
}

.producto h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: #003366;
}

.producto p {
    padding: 0 1.5rem 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-fadeIn { animation: fadeIn 1s ease-out; }
.animate-slideInLeft { animation: slideInLeft 1s ease-out; }
.animate-slideInRight { animation: slideInRight 1s ease-out; }

/* SECCIÓN DEL MODAL DE PRODUCTOS */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.close {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.close:hover {
    color: #bbb;
    text-decoration: none;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
    font-family: 'Poppins', sans-serif;
}

/* ANIMACIONES DEL MODAL */
.modal-content {
    animation: zoomIn 0.6s;
}

@keyframes zoomIn {
    from {
        transform: translateY(-50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media only screen and (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .close {
        right: 15px;
        top: 15px;
        font-size: 35px;
    }

    .modal-content {
        max-width: 95%;
    }

    #caption {
        width: 95%;
        font-size: 14px;
    }
}

/* MUY PEQUEÑOS */
@media only screen and (max-width: 480px) {
    .close {
        right: 10px;
        top: 10px;
        font-size: 30px;
    }

    .modal-content {
        max-width: 98%;
    }
}