/* =========================================
   1. ESTILOS GLOBALES Y NAVEGACIÓN
   ========================================= */
body, html {
    background-color: #FFF1CF;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
    margin: 0;
    padding: 0;
}

header, .header, .navbar {
    background-color: #B71C1C;
    text-align: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo {
    color: white;
    margin: 0;
}

.menu {
    display: flex;
    list-style: none;
    gap: 20px;
    padding: 0;
}

.menu li {
    display: inline;
}

.menu a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.menu a.activo {
    font-weight: bold;
    border-bottom: 2px solid white;
    padding-bottom: 5px;
}

.menu a:hover {
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 5px;
}

/* =========================================
   2. BANNERS Y ENCABEZADOS (HERO)
   ========================================= */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
    url('../imagenes/Imagen_BANNER_PRINCIPAL.webp');
    background-size: cover;    
    background-position: center; 
    height: 320px;
    padding: 0px 20px;             
    color: white;            
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-content h2, .contenido_hero h2 {
    color: white;
    font-size: 50px;
    margin-bottom: 10px;
}

.hero-content p, .contenido_hero p {
    color: white;
    font-size: 25px;
    margin-top: 0;
}

/* =========================================
   3. BOTONES GLOBALES
   ========================================= */
.btn-recetas {
    background: #2e7d32;
    color: white;
    border: none;
    text-decoration: none;
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    margin: 30px 10px;
    transition: 0.3s;
    cursor: pointer;
}

.volver, .boton {
    background-color: #D62828;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 35px;
    margin: 20px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-recetas:hover, .card button:hover {
    background-color: #6fbb73;
    transform: scale(1.1);
}

.volver:hover, .boton:hover {
    background-color: #B71C1C;
    transform: scale(1.1);
}

.botones-categorias {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.botones-categorias button {
    background-color: #2e7d32; /* Verde original */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s; 
}

.botones-categorias, .filtros {
    background-color: white;
    padding: 15px 30px;
    border-radius: 15px;
    
    width: fit-content; 
    
    margin: 20px auto;  
    
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}

.botones-categorias button:hover {
    background-color: #6fbb73; /* Verde pálido */
    transform: scale(1.1); 
}

/* =========================================
   4. PANTALLA: CATEGORÍAS
   ========================================= */
.productos {
    padding: 5%;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.tarjeta {
    position: relative; 
    background-color: white;
    border-radius: 20px;
    overflow: hidden;   
    transition: transform 1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tarjeta:hover {
    transform: scale(1.03);
}

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

.contenido_frontal {
    transition: opacity 0.3s ease-in-out;
    opacity: 1; 
}

.contenido_frontal .btn-recetas {
    position: relative;
    z-index: 10;
}

.tarjeta:hover .contenido_frontal img,
.tarjeta:hover .contenido_frontal h2,
.tarjeta:hover .contenido_frontal p {
    opacity: 0; 
}

.contenido_oculto {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    background-color: white; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;

    z-index: 5;
    padding-bottom: 80px;
}

.contenido_frontal img,
.contenido_frontal h2,
.contenido_frontal p {
    transition: opacity 0.3s ease-in-out;
}

.tarjeta:hover .contenido_oculto {
    opacity: 1; 
    visibility: visible; 
}

/* =========================================
   5. PANTALLA: RECETAS E INICIO
   ========================================= */
.seccion-recetas {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin: 30px auto;
    max-width: 1200px;
}

.columna {
    flex: 1 1 0%; 
    width: 50%;
}

.filtros {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    background-color: white;
    text-align: center;
}

.filtros button {
    background-color: #2e7d32;
    color: rgb(255, 255, 255);
    border: none;
    padding: 12px 40px;
    margin: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.filtros button:hover {
    background-color: #6fbb73; 
    transform: scale(1.1);
}


.contenedor-recetas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Permite que las tarjetas bajen si la pantalla es muy pequeña */
    gap: 30px;
    margin: 30px;
}

.card {
    background: white;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card p {
    text-align: center;
    text-wrap: balance; 
    line-height: 1.6; 
    margin: 10px 0 15px 0; 
    min-height: 50px; 
}

.contenedor-recetas .card {
    width: 250px;
}

.card:hover {
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    border-radius: 10px; 
}

.card button {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.3s;
}

/* =========================================
   6. PANTALLA: DETALLES DE RECETA
   ========================================= */
 
.TituloReceta {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
    url('../imagenes/Imagen_BANNER_PRINCIPAL.webp');
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    padding: 120px 20px;
    background-size: cover;
    background-position: center;
}
 
.contenedorPrincipal {
    display: flex;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
    max-width: 1200px;
}
.card-resena

.columnaIzquierda {
    flex: 0 0 calc(35% - 15px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
 
.columnaDerecha {
    flex: 0 0 calc(65% - 15px);
}
 
.columna .contenedor-recetas {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px; 
    margin: 20px 0;
}
 
.columna .card {
    width: 100%;
    box-sizing: border-box;
}
 
.tarjetaTacos, .tarjetaIngredientes, .tarjetaComentarios, .caja-carrusel {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: left;
}
 
.tarjetaSustituciones {
    background-color: burlywood;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #000000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tarjetaIngredientes li {
    margin-bottom: 8px;
}
 
.tarjetaTacos h4 {
    text-align: center;
    color: #333;
}
 
.tarjetaTacos img {
    width: 100%;        
    height: 220px;
    object-fit: cover; 
    border-radius: 5px;
}
 
.pasosPreparacion {
    background-color: white;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: left;
}

.pasosPreparacion li {
    margin-bottom: 30px;
}
 
.caja-carrusel h3 {
    text-align: center;
    margin-bottom: 15px;
}
 
.fotos-comunidad {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 20px;              
    padding: 20px 0;
}
 
.fotos-comunidad img {
    width: 160px;            
    height: 120px;           
    object-fit: cover;
    border-radius: 12px;     
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
 
.fotos-comunidad img:hover {
    transform: translateY(-8px); 
    box-shadow: 0 10px 20px rgba(181, 37, 37, 0.25); 
}

.tarjeta-comentario {
    background-color: white;
    padding: 10px 30px;
    width: 100%; 
    max-width: 820px; 
    border-radius: 10px;
    margin: 10px 0 20px 0; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);

}

.tarjeta-comentario h3{
    text-align: left;
}

.tarjeta-comentario a {
    display: block;      
    text-align: right;   
    margin-top: 15px;    
    font-weight: bold;   
}

.seccion-calificaciones h2 {
    margin: 20px auto;
}

.seccion-formulario {
    width: 100%;
    max-width: 600px;
    margin: 10px 0; 
}

.grupo-titulos {
    width: 100%;
    margin-bottom: 25px;
    text-align: left;
}

.grupo-titulos h3 {
    margin-bottom: 8px;
}
 
.card-resena {
    background-color: white;
    width: 100%;
    max-width: 550px;        
    height: 120px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 15px;
}
 
.card-resena textarea { 
    width: 100%;
    height: 100%;
    padding: 30px 25px;
    border: none;
    resize: none;
    box-sizing: border-box;
    outline: none;
    text-align: left;
}
 
.card-nombre, .card-escribir {
    background-color: white;
    width: 100%;
    max-width: 250px;        
    height: 60px;            
    padding: 15px 25px;      
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
 
.card-nombre input[type="text"], .card-escribir input[type="text"],
.card-nombre input, .card-escribir input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    text-align: left;
}
 
.fila-validar {
    display: flex; 
    gap: 15px;
    align-items: center;
    justify-content: flex-start; 
    margin-bottom: 15px;
    width: 100%;
}
 
.fila-validar button {
    padding: 10px 15px;
    background-color: rgb(181, 37, 37);
    border-radius: 6px;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}
.card-resena

.btn-publicar {
    background-color: rgb(181, 37, 37);
    color: white;
    border-radius: 6px;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    margin: 10px 0;
    display: inline-block;
}

.contenedorInferior {
    max-width: 1200px; 
    margin: 0 auto;    
    padding: 0 20px;   
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

.seccion-formulario a, .columnaDerecha a {
    display: block;
    width: 100%;
    text-align: left !important;
    margin-top: 10px;
    text-decoration: none;
}

.btonVolver, .volver {
    background-color: rgb(181, 37, 37);
    color: white;
    border-radius: 6px;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
}
 
button:hover, .btn-publicar:hover, .btonVolver:hover, .volver:hover, .fila-validar button:hover {
    background-color: #97101b;
    transform: scale(1.05);
}


/* =========================================
   7. PANTALLA: CONTACTO
   ========================================= */
.contacto {
    margin: 40px;
    text-align: center;
}

.info-contacto {
    width: 40%;
    display: inline-block;
    text-align: left;
    vertical-align: top;
}

.formulario {
    width: 45%;
    display: inline-block;
    vertical-align: top;
    text-align: left;
}

.info-contacto h2, .formulario h2 {
    color: #B71C1C;
}

.formulario input, .formulario textarea {
    width: 90%;
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: 0.3s;
    box-sizing: border-box;
}

.formulario input:focus, .formulario textarea:focus {
    border-color: #B71C1C;
    outline: none;
}

.fila input {
    width: 48%;
    display: inline-block;
}

#cellphone, #m_correo {
    display: inline-block;
    width: 48%;
    text-align: center;
}

/* =========================================
   8. PANTALLA: SOBRE NOSOTROS
   ========================================= */
.historia {
    margin: 30px;
    text-align: center;
}

.historia img {
    width: 400px;
    margin: 20px;
    border-radius: 15px;
    display: inline-block;
    vertical-align: middle;
}

.texto-historia {
    margin: 20px;
    display: inline-block;
    width: 500px;
    text-align: left;
    vertical-align: middle;
}

.texto-historia h2, .tarjetas h2 {
    color: #B71C1C;
}

#texto {
    background-color: #FFF5E6;
    font-size: 20px;
    color: #4E342E;
    margin: 20px;
    padding: 20px;
    border-radius: 10px;
}

.corazon {
    width: 50px;
    margin-top: 15px; 
}

.tarjetas {
    text-align: center;
}

.tarjetas .card {
    width: 300px;
    display: inline-block;
    vertical-align: top;
    margin: 20px;
}

/* =========================================
   9. PANTALLA: MOSTRAR
   ========================================= */
   
table{
    width: 90%;
    margin: 30px auto;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

th{
    background-color: #B71C1C;
    color: white;
    padding: 12px;
}

td{
    padding: 10px;
    text-align: center;
}

tr:nth-child(even){
    background-color: #F5F5F5;
}

tr:hover{
    background-color: #FFE6C7;
}

.btn-editar,
.btn-guardar,
.Volver{
    background-color: #D62828;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-editar:hover,
.btn-guardar:hover,
.Volver:hover{
    background-color: #B71C1C;
}

/* =========================================
   10. FOOTER GLOBAL
   ========================================= */
footer, .footer {
    background-color: #2E2E2E;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
}

/* =========================================
   11. MEDIA QUERIES (RESPONSIVIDAD)
   ========================================= */

/* Para Tablets (Pantallas medianas) */
@media screen and (max-width: 992px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .productos {
        grid-template-columns: repeat(2, 1fr);
    }

    .contenedorPrincipal {
        flex-direction: column;
    }

    .info-contacto, .formulario, .historia img, .texto-historia {
        width: 90%;
        display: block;
        margin: 20px auto;
    }
}

/* Para Celulares (Pantallas pequeñas) */
@media screen and (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .menu li {
        display: block;
        margin: 5px 0;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-content h2, .contenido_hero h2 {
        font-size: 35px;
    }

    .productos, .contenedor-recetas {
        grid-template-columns: 1fr;
    }

    .seccion-recetas {
        flex-direction: column;
        margin: 15px; 
    }

    .contenedor-recetas .card, .tarjetas .card {
        width: 90%;
        margin: 0 auto; 
        justify-self: center; 
    }

    .contenedor-recetas .card, .tarjetas .card {
        width: 90%;
    }
    
    .columna {
        width: 100%;
    }

    .columna .contenedor-recetas {
        grid-template-columns: 1fr;
    }


    .fila input {
        width: 100%;
        display: block;
    }
    
}

