/* Estilos base - Mobile First */
/* Comentario: Empezamos con estilos para móviles y luego usamos media queries para tamaños mayores */

/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background-color: #4a8f29;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    text-align: center;
    margin-bottom: 10px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
}

/* Grid de productos */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    padding: 10px 15px 0;
}

.card p {
    padding: 0 15px 15px;
}

/* Sección de video */
.video-section {
    background-color: #f9f9f9;
    padding: 40px 0;
    text-align: center;
}

.video-container {
    max-width: 800px;
    margin: 20px auto 0;
}

/* Sección sobre nosotros */
.about {
    padding: 40px 0;
}

.flex {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-text h2 {
    margin-bottom: 15px;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons img {
    width: 30px;
    height: 30px;
}

.copyright {
    text-align: center;
    padding: 15px 0;
    background-color: #1a252f;
    margin-top: 20px;
}

/* Media Queries para diseño responsivo */
/* Comentario: A partir de 600px cambiamos el diseño para tablets */

@media (min-width: 600px) {
    /* Ajustamos el grid a 2 columnas */
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mejoramos el header */
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    header h1 {
        margin-bottom: 0;
    }
    
    /* Ajustamos el hero */
    .hero {
        padding: 120px 20px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    /* Footer en 2 columnas */
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .footer-section {
        flex: 0 0 calc(50% - 15px);
    }
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* Relación 16:9 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Comentario: A partir de 900px adaptamos para desktop */

@media (min-width: 900px) {
    /* Grid de 3 columnas */
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sección sobre nosotros en fila */
    .flex {
        flex-direction: row;
        align-items: center;
    }
    
    .about-text {
        flex: 1;
    }
    
    .about-image {
        flex: 1;
    }
    
    /* Footer en 3 columnas */
    .footer-section {
        flex: 0 0 calc(33.333% - 20px);
    }
    
    /* Aumentamos tamaño de fuente en hero */
    .hero h2 {
        font-size: 3rem;
    }
}
/* Estilos para el formulario */
#formulario-contacto {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.mensaje-exito {
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
}

/* Comentario: Para pantallas muy grandes ajustamos algunos elementos */

@media (min-width: 1200px) {
    /* Añadimos más padding para no estirar demasiado el contenido */
    .hero {
        padding: 150px 20px;
    }
    
    /* Aumentamos el tamaño de las cards */
    .card img {
        height: 250px;
    }
}