/* Colores base */
:root {
    --azul: #004080;
    --amarillo: #f9d81f;
    --cafe: #6B4F3A;
    --rojo: #C82333;
    --blanco: #f9f9f9;
    --gris: #cecece;
}

/* Reset básico */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--blanco);
    color: #333;
}
/* Franja superior */
.top-bar {
    background-color: #333;     /* color de fondo */
    color: white;              /* texto blanco */
    text-align: center;
    padding: 0.5px 0;            /* espacio arriba y abajo */
    font-size: 14px;
    font-family: Arial, sans-serif;
}


/* Navbar */
.navbar {
    background-color: var(--gris);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    width: 100px;
    height: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin-right: 60px;
    padding: 10px;
    background-color: var(--azul);
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 2rem;
    transition: 0.3s;
}

.nav-links a:hover {
    background-color: var(--amarillo);
    border-radius: 10px;
}

.hero {
    text-align: center;
    padding: 30px 20px;
    background: url('/static/fondo2.png') center/cover no-repeat;
    color: #fff;
}

.titulo-principal {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.subtitulo {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffcc00; /* dorado para darle un toque elegante */
}

.slogan {
    font-size: 1.2rem;
    font-style: italic;
    margin-top: 15px;
    color: #e0e0e0;
}

/* Footer */
footer {
    background-color: var(--cafe);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Nosotros */

.about-section {
    padding: 60px 20px;
    text-align: center;
    background: #f9f9f9;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #222;
}

.intro-text {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #555;
}

.about-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.about-cards .card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 30px;
    max-width: 400px;
    flex: 1 1 300px;
    transition: transform 0.3s ease;
}

.about-cards .card:hover {
    transform: translateY(-5px);
}

.about-cards h3 {
    font-size: 1.6rem;
    color: #0056b3;
    margin-bottom: 15px;
}

.about-cards p {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* --- */
/* Sección de Valores Corporativos */
.valores-corporativos {
    padding: 60px 20px;
    background-color: #f0f0f0;
    text-align: center;
}

.valores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.valor-card {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 350px;
    width: 100%;
    text-align: left;
    transition: transform 0.3s ease;
}

.valor-card:hover {
    transform: translateY(-5px);
}

.valor-card h3 {
    color: var(--azul);
    margin-top: 0;
    font-size: 1.5rem;
}

.valor-card p {
    color: #555;
    line-height: 1.6;
}

/* Sección de Servicios */
.services-section {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--blanco);
}

.services-section .section-title {
    color: var(--azul);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.services-section .section-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
}

.services-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.service-card {
    background: #fff;
    border: 1px solid var(--gris);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    max-width: 450px;
    flex: 1 1 300px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.service-card-image {
    height: 200px; /* Tamaño fijo para que las imágenes no varíen el diseño */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.service-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ajusta la imagen sin deformarla */
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--cafe);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background-color: var(--azul);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--amarillo);
    color: black;
}

/* --- */
/* Sección de Contacto */
.contact-section {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--blanco);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-form p {
    text-align: left;
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 5px;
    box-sizing: border-box; /* Para que el padding no afecte el ancho total */
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form label {
    display: block;
    text-align: left;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.btn-submit {
    background-color: var(--azul);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    background-color: var(--amarillo);
    color: black;
}

/* --- */
/* Transiciones de Página */

main {
    /* Estado inicial: invisible */
    opacity: 0; 
    /* Duración de la animación */
    transition: opacity 0.5s ease-in-out;
}

/* Transición de entrada (Fade-in) */
main.fade-in {
    opacity: 1;
}

/* Transición de salida (Fade-out) */
main.fade-out {
    opacity: 0;
}

/* --- */
/* Botón de WhatsApp con Bootstrap */

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-size: 50px; /* Tamaño del ícono */
    color: #25D366; /* Color verde de WhatsApp */
    background-color: #fff;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- */
/* Sección de Productos */

.products-section {
    display: none;
    padding: 60px 20px;
    text-align: center;
    background-color: #f9f9f9;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.products-section.is-visible {
    display: block; /* MUESTRA LA SECCIÓN */
    opacity: 1;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 350px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-header img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 10px;
}

.product-header h3 {
    font-size: 1.5rem;
    color: var(--azul);
    padding: 15px;
    margin: 0;
}

.product-details {
    padding: 0 20px 20px;
    text-align: left;
    border-top:1px solid #eee ;
}

.product-details.is-active {
    max-height: 500px; /* Un valor lo suficientemente grande para que se vea */
    padding: 20px;
}

.product-details p {
    margin: 10px 0;
    line-height: 1.6;
    color: #444;
}

.btn-details {
    background-color: var(--amarillo);
    color: black;
    border: none;
    padding: 10px 20px;
    margin: 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-details:hover {
    background-color: #fbd81f;
}