/* Aplicamos estilos básicos al body */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Georgia', serif;
    background-color: #f7e0c1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    color: #b8860b;
    padding-top: 60px; /* Espacio para el menú fijo */
}

/* Estilos para el menú de navegación */
nav {
    background-color: #e0c097; /* Color de paleta */
    width: 100%;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000; /* Asegúrate de que el menú tenga un z-index menor */
    border-bottom: 5px solid #b8860b; /* Color de borde */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

nav h1 {
    margin: 0;
    font-size: 1.8rem; /* Tamaño ajustado para pantallas más pequeñas */
    color: #4b2e17; /* Color del texto */
    text-align: center;
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    gap: 15px; /* Espacio entre elementos del menú */
    flex-wrap: wrap; /* Permitir que el menú se envuelva en pantallas pequeñas */
    justify-content: center; /* Centrar el menú */
}

nav ul li {
    margin: 0;
    padding: 0;
    position: relative; /* Posición relativa para el menú desplegable */
}

nav ul li a {
    text-decoration: none;
    color: #4b2e17; /* Color del texto */
    font-size: 1.1rem; /* Tamaño del texto */
    padding: 10px 15px; /* Espaciado del enlace */
    border-radius: 10px; /* Esquinas redondeadas */
    transition: background-color 0.3s, color 0.3s; /* Transición suave */
}

nav ul li a:hover {
    background-color: #b8860b; /* Color de fondo al pasar el ratón */
    color: white; /* Color del texto al pasar el ratón */
}

/* Estilo del menú desplegable */
.dropdown-content {
    display: none; /* Ocultar el menú por defecto */
    position: absolute; /* Posición absoluta */
    background-color: #e0c097; /* Color de fondo del menú desplegable */
    min-width: 160px; /* Ancho mínimo del menú desplegable */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra */
    z-index: 1; /* Asegurar que esté por encima */
}

.dropdown-content a {
    padding: 12px 16px; /* Espaciado de los enlaces del menú desplegable */
    display: block; /* Bloque para cada enlace */
    text-align: left; /* Alinear el texto a la izquierda */
    color: #4b2e17; /* Color del texto */
}

.dropdown-content a:hover {
    background-color: #b8860b; /* Color de fondo al pasar el ratón */
    color: white; /* Color del texto al pasar el ratón */
}

.dropdown:hover .dropdown-content {
    display: block; /* Mostrar el menú desplegable al pasar el ratón */
}

/* Estilos para la galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas siempre */
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 0; /* Espacio para el menú fijo */
}

.gallery img {
    margin: 0;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    cursor: pointer;
}

/* Estilos para el contenedor de enlaces */
.contenedor {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 60%;
    margin: 40px auto;
}

/* Estilos para cada enlace con imagen de fondo */
.bodegones1, .paisajes1, .retratos1 {
    width: 90%;
    text-align: center;
    padding: 20px;
    margin: 10px;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bodegones1 h2, .paisajes1 h2, .retratos1 h2 {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
    position: absolute;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* Estilos para los enlaces */
a {
    text-decoration: none;
    color: inherit;
}

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000; /* Asegúrate de que el modal tenga un z-index mayor */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #434452;
    text-align: center;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    margin: auto;
    display: block;
}

.close {
    position: absolute;
    top: 20px; /* Ajusta la posición superior */
    right: 20px; /* Ajusta la posición derecha */
    color: white; /* Color de la X */
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo semitransparente */
    border-radius: 50%; /* Esquinas redondeadas */
    padding: 5px 10px; /* Espaciado interno */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Sombra para profundidad */
    transition: background-color 0.3s; /* Transición suave para el fondo */
}

.close:hover {
    background-color: rgba(0, 0, 0, 0.8); /* Fondo más oscuro al pasar el ratón */
}

.prev, .next {
    position: absolute;
    top: 50%;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: none;
}

.modal:hover .prev, .modal:hover .next {
    display: block;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Estilo para la descripción debajo de la imagen en el modal */
#caption {
    color: #fff;
    font-size: 16px;
    padding: 10px 20px;
    text-align: center;
    position: fixed;
    bottom: 10px;
    width: 80%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
}


/* Estilos para el pie de página */
footer {
    background-color: #e0c097;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-family: 'Georgia', serif;
    border-top: 5px solid #b8860b;
    border-bottom: 5px solid #b8860b;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    bottom: 0;
    width: 100%;
}

footer h4 {
    font-size: 24px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

footer:hover {
    background-color: #b8860b;
    transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    footer {
        padding: 15px;
    }

    footer h4 {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .gallery {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas siempre */
    }

    .gallery img {
        max-height: 150px; /* Tamaño de imagen reducido */
    }
}

@media (max-width: 480px) {
    footer {
        padding: 10px;
    }

    footer h4 {
        font-size: 18px;
        letter-spacing: 0.5px;
    }

    .gallery {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas siempre */
    }

    .gallery img {
        max-height: 100px; /* Tamaño de imagen más reducido */
    }
}

/* Media query para pantallas medianas */
@media (min-width: 601px) and (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas siempre */
    }

    .gallery img {
        max-height: 180px;
    }
}

/* Media query para pantallas grandes */
@media (min-width: 901px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas siempre */
    }

    .gallery img {
        max-height: 200px;
    }
}