:root {
    --color-chartreuse: chartreuse;
    --color-crimson: crimson;
    --color-gray: gray;
    --color-red: red;
    --color-darkred: darkred;
}

html, body {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    margin: 0;
    background-color: whitesmoke;
}

h6 {
    font-size: 1.5rem;
    margin: 1rem;
}

/* ********* HEADER ******** */

header {
    padding: 1rem;
    border-bottom: 4px solid var(--color-darkred);
    background-color: rgba(0, 0, 0, 0.2);
    /* border-bottom: 1px solid var(--color-gray); */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-image: url('../fondos/naranja_02.jpg');
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-size: cover; /* Resize the background image to cover the entire container */
}

h1 {
    margin: 0.5rem;
    display: inline-block;
    font-size: 1.5rem;
    color: var(--color-chartreuse);
    text-align: center;
    line-height: 1.3rem;
    cursor: pointer;
    /* border: 1px solid var(--color-gray); */
}

#header_iconos {
    display: flex;
    gap: 1rem;
}

#btn_abrir_buscador {
    border: none;
    border-radius: 1rem;
    cursor: pointer;
}

.btn_inicio_sesion {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre imagen y texto */
    padding: 0.3rem;
    border-radius: 1rem;
    color: var(--color-crimson);
    background-color: #eee;
    border: none;
    border-bottom: 2px solid #ccc;
    cursor: pointer;
}

.btn_inicio_sesion .texto_inicio_sesion {
    font-size: 1rem;
    display: none;
    margin: 0;
}

.btn_inicio_sesion:hover {
    background-color: #ddd;
    border-bottom: 2px solid #bbb;
}

.btn_inicio_sesion:focus {
    outline: none;
}

.btn_inicio_sesion:focus-visible {
    /* aplica el contorno solo cuando el usuario navega con teclado (no con el mouse) */
    outline: 1px solid #bbb;
}

#como_anunciar {
    border: none;
    background-color: lightblue;
    color: blue;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 1rem;
    padding: 0 0.9rem;
    cursor: pointer;
}

#como_anunciar .texto {
    display: none;
}

#como_anunciar .interrogante {
    display: block;
} 

#como_anunciar:active {
  transform: scale(0.9);
  background-color: #ccc;
}


.icono {
    width: 24px;
    margin: 0;
    padding: 0;
}



/* ********* MENU ******** */


/* ********* BUSCADOR ******** */

#form_buscador {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* negro con opacidad 0.5 */
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    justify-content: center;
    align-items: center;
}

#form_buscador.visible {
    opacity: 1;
    visibility: visible;
}

#btn_abrir_buscador:hover {
    background-color: #ddd;
}

#form_buscador * {
    font-size: 1rem;
    border: 1px solid var(--color-darkred);
    border-radius: 0.5rem;
}

#form_buscador select, #form_buscador input {
    padding: 0.3rem;
    color: black;
}

#form_buscador select:focus, #form_buscador input:focus {
    outline: none;
}

#form_buscador button[type="button"] {
    width: 9rem;
    background-color: transparent;
    border: none;
    text-align: right;
    cursor: pointer;
}

#btn_cerrar_buscador {
    background-color: #eee;
}

#btn_cerrar_buscador:hover {
    background-color: #ccc;
}

#form_buscador button[type="submit"] {
    padding: 0.3rem 1rem;
    color: whitesmoke;
    background-color: var(--color-darkred);
    border: 1px solid var(--color-darkred);
    cursor: pointer;
}

#form_buscador button[type="submit"]:hover {
    border: 1px solid firebrick;
    background-color: firebrick;
}

/* ********* SECTION ******** */

#menu_izd, #menu_drch  {
    display: none;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 80vh;   /* 80% de la altura de la ventana del navegador (viewport height) */
    margin: 1rem 0.5rem;
}

#central {
    margin-right: 0.5rem;
}

.notificacion_busqueda {
    font-size: 1.2rem;
    color: gray;
}

.resultados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.acto {
    /* display: inline-block;
    margin: 1rem;
    width: 280px;
    border-radius: 1rem; */
    background-color: #fdfdfd;
    border-bottom: 4px solid var(--color-darkred);
    box-shadow: 2px 2px 5px #888888;
    cursor: pointer;
}

.imagen {
    width: 100%;
    height: 200px;
    /* border-radius: 1rem 1rem 0 0; */
    background-position: top center; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
    background-size: cover; /* Resize the background image to cover the entire container */
}
.imagen h2 {
    margin: 0;
    padding-right: 1rem;
    color: white;
    font-size: 1.5rem;
    text-align: right;
}

.textos {
    padding: 0 0.5em 0.5rem 0.5rem;
}

.textos * {
    margin: 0;
}

.textos h3 {
    font-size: 1.4rem;
    color: var(--color-darkred);
    text-align: center;
    margin: 0.2rem 0;
    min-height: 2.8rem;
    display: flex;
    align-items: center;   /* centra verticalmente */
    justify-content: center; /* centra horizontalmente */
}

.textos .subtitulo {
    border-bottom: 1px solid var(--color-darkred);
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    min-height: 2rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.textos .comentario {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    min-height: 3rem;
    font-style: italic;
    text-align: justify;
}

.textos h4 {
    font-size: 1.2rem;
    color: var(--color-darkred);
    font-weight: 700;
    margin: 0.5rem 0;
    text-align: center;
}

.lugar {
    border-bottom: 1px solid var(--color-darkred);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.fecha, .hora {
    /* background-color: #bbb; */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: Arial, sans-serif;
    font-weight: 300;
    align-self: flex-end;
}

.fecha span {
    color: var(--color-darkred);
}

 .banner_300x250, .banner_320x50 {
    margin-top: 1rem;
    text-align: center;
}




/* ********* FOOTER ******** */

footer {
    background-color: #ccc;
    margin: 0;
    padding: 1rem 0;
}

#copyright p {
    color: var(--color-darkred);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

#contacto_normas {
    list-style: none;
    margin: 0;
    padding: 0;       /* quita el padding por defecto */
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

#contacto_normas li a {
    margin: 0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-darkred);
}

#contacto_normas li a:hover {
    color: var(--color-crimson);
}

#textos_legales {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    /* border: 1px solid black; */
}

#textos_legales li a {
    text-decoration: none;
    font-size: 0.8rem;
    color: var(--color-darkred);
}

/* @media all and (max-width: 576px) */
@media (max-width: 576px) {
    /* Menos de 576px */
    
}

@media (min-width: 576px) {
    /* Entre 576px y 768px */
        
}

@media (min-width: 768px) {
    /* Entre 768px y 992px */
    
    header {
        padding: 1rem 2rem;
    }
    #btn_abrir_buscador {
        display: none;
    }
    
    #form_buscador #btn_cerrar_buscador {
        display: none;
    }

    #form_buscador {
        opacity: 1;
        visibility: visible;
        position: static;       /* vuelve al flujo normal */
        display: block;
        padding: 0;
        width: 50%;
        height: auto;
        text-align: center;
        background-color: transparent; /* quitamos el fondo */
        background-image: none;   /* elimina la imagen */
        box-shadow: none;         /* elimina la sombra */
    }

    #form_buscador select {
        margin-bottom: 0.5rem;
    }
    
    /* .acto {
        width: 320px;
    } */

    .resultados {
        grid-template-columns: repeat(auto-fit, minmax(300px, 0.3fr));
        gap: 2rem;
        justify-content: center;
    }

    .imagen {
        height: 300px;
    }
    #copyright {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }

    #contacto_normas {
        gap: 3rem;
    }

    #contacto_normas li a {
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    /* Entre 992px y 1200px */
    
    .btn_inicio_sesion {
        padding-right: 0.8rem;
    }
    .btn_inicio_sesion .texto_inicio_sesion {
        display: inline;
    }
    
    #como_anunciar {
        font-size: 0.9rem;
        font-weight: 500;
        border-bottom: 3px solid blue; 
        border-right: 3px solid blue;
        border-radius: 0.3rem;
    }
    
    #como_anunciar .interrogante {
        display: none;
    } 
    
    #como_anunciar .texto {
        display: block;
    }
    
    main {
        grid-template-columns:auto 25% ;
    }

    .banner_300x250, .banner_320x50 {
        display: none;
    }
    
    /* #menu_izd {
        display: block;
        background-color: whitesmoke;
    } */

    #menu_drch {
        display: block;
    }

    #menu_drch>div  {
        margin-top: 1rem;
        text-align: center;
        position: sticky;
        top: 0.5rem;
    }
        
    .textos h3 {
        font-size: 1.8rem;
    }

    .textos .subtitulo, .textos .comentario,
    .textos .fecha, .textos .hora {
        font-size: 1.2rem;
        color: #444;
    }

    .textos h4, .textos .lugar  {
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    /* Entre 1200px y 1440px */
    
    /* main {
        grid-template-columns: 15% auto 15%;
    }

    #menu_drch {
        display: block;
        background-color: whitesmoke;
    } */
}

@media (min-width: 1440px) {
    /* Mayor de 1440px */
    
}

