/* Estilos generales */
body {
    font-family: 'Rajdhani','Roboto', sans-serif;
    margin: 0;
    padding-top: 140px; /* Ajusta este valor según la altura de tu header */
    background-color: #f4f4f4;
    background-image: url(img/bg.jpeg);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Asegúrate de que el header esté por encima de otros elementos */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 100px !important;
}

/* Estilos para el menú en su estado reducido */
header.shrink {
    height: 40px;
}

.logo.shrink {
    height: 40px !important;
}




.social-icons a {
    margin: 0 5px;
    color: #333;
    text-decoration: none;
    font-size: 24px;
}

.grid-container, .gallery-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    
}

.grid-item, .gallery-item {
    position: relative;
    text-align: center;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.grid-item:hover, .gallery-item:hover {
    transform: scale(1.05);
}

.grid-item img, .gallery-item img {
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.2s;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.grid-item img:hover, .gallery-item img:hover {
    border-color: #1c1d1d;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Estilos para el botón de eliminación */
.delete-image {
    background-color: red;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

/* Estilos para el botón de establecer imagen principal */
.set-main-image {
    background-color: green;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

/* Estilos para centrar el título de la galería */
h1.gallery-title {
    text-align: center;
    margin: 20px 0;
}

/* Estilos para el dropdown de ordenación */
.sort-container {
    margin: 20px 0;
    text-align: center;
}

.sort-container label {
    margin-right: 10px;
    font-size: 18px;
}

.sort-container select {
    padding: 5px;
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.social-icons {
    display: flex;
    align-items: center;
}

.social-icons a {
    margin: 0 10px;
    color: #333;
    text-decoration: none;
    font-size: 24px;
}

/* Media Queries para Responsividad */
@media (max-width: 1200px) {
    .grid-container, .gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-container, .gallery-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container, .gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-container, .gallery-container {
        grid-template-columns: repeat(2,1fr);
    }

    header .logo {
        height: 80px;
    }
}

.lightbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-button:hover {
    color: #ccc;
}

/* Estilos para el formulario de login */
.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.login-form:hover {
    transform: scale(1.02);
}

.login-form h2 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #333;
    font-family: 'Rajdhani', sans-serif;
}

.login-form label {
    width: 100%;
    margin-bottom: 5px;
    font-size: 16px;
    color: #333;
    font-family: 'Roboto', sans-serif;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s ease-in-out;
}

.login-form input:focus {
    border-color: #585858;
    outline: none;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #acadaf;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    transition: background-color 0.3s ease-in-out;
}

.login-form button:hover {
    background-color: #5a5b5b;
}

.login-form .error {
    color: red;
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
}

input.edit-project-name {
    width: 100px;
}


.content {
    text-align: center;
    margin: 50px auto;
    max-width: 800px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.language-toggle {
    margin: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.flag-icon {
    width: 40px;
    height: 30px;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.3s ease;
    border: 1px solid #ccc;
}

.flag-icon.uk-flag {
    width: 40px;
    height: 30px;
}

.flag-icon:hover {
    transform: scale(1.1);
}

.text-content {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin-top: 20px;
}

/* --- Estilos para el Banner de Cookies Modal --- */
#cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    z-index: 1040; /* Debajo del banner pero sobre el contenido */
}

#cookie-consent-banner.cookie-banner-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: white;
    color: #333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1050;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

#cookie-consent-banner.cookie-banner-center p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

#cookie-consent-banner.cookie-banner-center .cookie-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#cookie-consent-banner.cookie-banner-center .cookie-buttons button {
    padding: 12px 25px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

#cookie-consent-banner.cookie-banner-center #accept-cookies {
    background-color: #333;
    color: white;
}

#cookie-consent-banner.cookie-banner-center #configure-cookies {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #333;
}

#scrollToTopBtn {
    display: none; /* Oculto por defecto */
    position: fixed;
    bottom: 0;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 30px;
    border: none;
    outline: none;
    background: none; /* Sin fondo */
    color: #000; /* Color del icono */
    cursor: pointer;
}

#scrollToTopBtn:hover {
    color: #555; /* Cambia el color del icono al pasar el ratón */
}

/* --- Estilos para el Footer --- */
footer {
    background-color: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #e7e7e7;
    font-family: 'Roboto', sans-serif;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Estilos para el Panel de Configuración de Cookies --- */
#cookie-config-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    background-color: white;
    color: #333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1051; /* Encima del overlay y del banner principal */
    font-family: 'Roboto', sans-serif;
    text-align: left;
}

.cookie-config-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    font-family: 'Rajdhani', sans-serif;
}

.cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.cookie-category-title {
    font-weight: bold;
    font-size: 16px;
}

.cookie-category-description {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

#cookie-config-panel .cookie-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

#cookie-config-panel .cookie-buttons button {
    padding: 12px 25px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

#save-cookie-prefs {
    background-color: #007bff;
    color: white;
}

/* --- Estilos para el Toggle Switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Estilo para el botón de configurar */
#cookie-consent-banner.cookie-banner-center #configure-cookies {
    background-color: #ffc107;
    color: white;
}

#cookie-consent-banner .language-selector {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}