/* ===== ESTILOS BASE ===== */
body {
    font-family: 'Exo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== HEADER ===== */
header {
    background-image: url("fondo_banner.png");
    background-size: cover;
    background-position: center;
    background-color: #ffffff;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== PESTAÑAS PRINCIPALES ===== */
.tabs {
    display: flex;
    justify-content: center;
    background-color: #2c2c2c;
    overflow: hidden;
}

.tab-button {
    background-color: inherit;
    color: white;
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    transition: 0.3s;
}

.tab-button:hover {
    background-color: #40A2E3;
}

.tab-button.active {
    background-color: #0d9276;
}

.tab-content {
    display: none;
    padding: 20px;
    animation: fadeEffect 0.5s;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

.tab-content.active {
    display: block;
}

@keyframes fadeEffect {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== PESTAÑAS DE REGIÓN ===== */
.region-tabs {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    background-color: #9c9c9c;
    border-radius: 5px;
}

.region-tab-button {
    background-color: inherit;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.3s;
}

.region-tab-button:hover {
    background-color: #888888;
}

.region-tab-button.active {
    background-color: #0D9276;
    color: white;
}

.region-tab-content {
    display: none;
}

.region-tab-content.active {
    display: block;
}

/* ===== GALERÍA ===== */
.gallery-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
}

.thumbnail:hover {
    border-color: #0D9276;
}

/* ===== COMENTARIOS ===== */
.comments-section {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #a3a3a3;
    border-radius: 4px;
    resize: vertical;
}

.submit-comment {
    background-color: #0D9276;
    color: white;
    border: none;
    padding: 8px 15px;
    margin-top: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.submit-comment:hover {
    background-color: #0b7a62;
}

.comments-list {
    margin-top: 20px;
}

.comment {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-text {
    margin: 0 0 5px 0;
}

.comment-date {
    font-size: 0.8em;
    color: #777;
}

.comment-actions {
    margin-top: 10px;
}

.comment-actions button {
    margin-right: 10px;
    padding: 5px 10px;
    background-color: #ccc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.comment-actions button:hover {
    background-color: #aaa;
}

/* ===== IMÁGENES EN COMENTARIOS ===== */
.preview-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.preview-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.comment-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.comment-image {
    max-width: 150px;
    max-height: 150px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.comment-image:hover {
    border-color: #0D9276;
}

/* ===== MODAL DE IMÁGENES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
    margin-top: 5vh;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* ===== POPUPS ===== */
.popup-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    text-align: center;
}

.popup-buttons {
    margin-top: 10px;
}

.popup-buttons button {
    margin: 0 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #0D9276;
    color: white;
}

.popup-buttons button:hover {
    background-color: #0b7a62;
}

/* ===== EDITOR DE IMÁGENES ===== */
.edit-preview-images {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.edit-preview-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ddd;
    cursor: pointer;
}

.edit-preview-images img:hover {
    border-color: red;
}

.add-images-button {
    background-color: #40A2E3;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 10px 0;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    width: 100%;
}

.add-images-button:hover {
    background-color: #2d8ac7;
}

.edit-images-controls {
    margin-top: 10px;
}

/* ===== INPUT FILE ===== */
.image-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.upload-button {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    box-sizing: border-box;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
    margin: 0;
}

/* ===== HEADER RESPONSIVE ===== */
header {
    background-color: #ffffff;
    color: white;
    text-align: center;
    padding: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header .banner {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Ajustes para tablets */
@media (max-width: 768px) {
    header {
        padding: 0.5rem;
    }
    
    header .banner {
        max-width: 90%;
    }
}

/* Ajustes para móviles */
@media (max-width: 480px) {
    header .banner {
        max-width: 85%;
        padding: 0.5rem 0;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 14px;
    }
}
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #0d9276; /* verde éxito */
    color: white;
    text-align: center;
    border-radius: 4px;
    padding: 12px 20px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.5s ease;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}
/* ===== SPINNER DE CARGA ===== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0D9276;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner para botones */
.button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
    vertical-align: middle;
}



/* ===== TEMPORIZADOR ===== */
.timer-wrapper {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin: 15px auto;
    max-width: 500px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.timer-select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: white;
    flex: 1;
    min-width: 150px;
}

.timer-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.timer-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.start-btn {
    background-color: #0D9276;
    color: white;
}

.start-btn:hover {
    background-color: #0b7a62;
}

.pause-btn {
    background-color: #FFA500;
    color: white;
}

.pause-btn:hover {
    background-color: #e69500;
}

.reset-btn {
    background-color: #f44336;
    color: white;
}

.reset-btn:hover {
    background-color: #d32f2f;
}

.timer-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: #333;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    .timer-controls {
        flex-direction: column;
    }
    
    .timer-select {
        width: 100%;
    }
    
    .timer-buttons {
        width: 100%;
    }
    
    .timer-btn {
        flex: 1;
        justify-content: center;
    }
    
    .timer-display {
        font-size: 2rem;
    }
}
/* Estilo especial para toast del temporizador */
.toast-timer {
    background-color: #f44336; /* Rojo */
    font-weight: bold;
    font-size: 1.1em;
}

/* Estilo para errores */
.toast-error {
    background-color: #ff5722; /* Naranja */
}