/* styles.css - Archivo completo */
/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: white !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Grid para dos imágenes lado a lado */
.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.image-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Contenedor de imagen común */
.image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer !important;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-radius: 12px;
    background: white;
    aspect-ratio: 1/1.4142; /* Relación aspecto carta (1:1.4142) */
}

/* Imágenes */
.kids-image, .menu-image, .zoom-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    display: block;
}

/* Efectos hover */
.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.image-wrapper:hover .zoom-overlay {
    opacity: 1;
}

/* Overlay para zoom */
.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.zoom-overlay i {
    font-size: 48px;
    margin-bottom: 10px;
}

.zoom-overlay span {
    font-size: 18px;
    font-weight: 500;
}

/* Etiquetas de imágenes */
.image-label {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    width: 100%;
}

.kids-column .image-label {
    border-left-color: #2ecc71;
}

.image-label h3 {
    color: #2c3e50;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
}

.image-label p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Info de semana para menú */
.week-info {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 2px solid #e9ecef;
    width: 100%;
}

.valid-date {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.valid-date strong {
    color: #3498db;
    display: inline-block;
    margin: 0 5px;
}

.image-counter {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

/* Indicador de imagen faltante */
.image-missing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff3cd;
    color: #856404;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ffeaa7;
    z-index: 2;
}

.image-missing i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #f39c12;
}

.image-missing p {
    font-weight: 600;
    font-size: 16px;
}

/* ========== MODAL FLOTANTE ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border-radius: 12px;
    overflow: visible;
    cursor: grab;
    z-index: 10000;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    transition: transform 0.2s ease;
}

.modal-content:active {
    cursor: grabbing;
}

.close-modal {
    position: absolute;
    top: -50px;
    right: -50px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.close-modal:hover {
    background: #c0392b;
    transform: rotate(90deg) scale(1.1);
}

.modal-image-container {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    max-height: 80vh;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    background: white;
    border-radius: 8px;
    cursor: default;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.modal-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.8);
    padding: 12px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    min-width: 200px;
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-actions {
    position: absolute;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10001;
}

.modal-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.modal-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* ========== ENLACE ADMIN ========== */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.admin-link:hover {
    background: #2980b9;
    transform: rotate(90deg);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .images-grid {
        max-width: 1000px;
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .images-grid {
        gap: 20px;
        max-width: 900px;
    }
    
    .valid-date {
        font-size: 18px;
    }
    
    .image-label h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 900px) {
    .images-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 600px;
    }
    
    .image-column {
        gap: 15px;
    }
    
    .image-wrapper {
        aspect-ratio: 1/1.4142;
    }
    
    .valid-date {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .images-grid {
        gap: 25px;
    }
    
    .image-label h3 {
        font-size: 1.2rem;
    }
    
    .valid-date {
        font-size: 16px;
    }
    
    .zoom-overlay i {
        font-size: 36px;
    }
    
    .zoom-overlay span {
        font-size: 16px;
    }
    
    /* Modal responsive */
    .modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .close-modal {
        top: -45px;
        right: -45px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-info {
        bottom: -55px;
        font-size: 16px;
        padding: 12px 24px;
        min-width: 200px;
    }
    
    .modal-actions {
        bottom: -110px;
        gap: 12px;
    }
    
    .modal-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .admin-link {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 600px) {
    .images-grid {
        gap: 20px;
        max-width: 100%;
    }
    
    .image-label {
        padding: 12px;
    }
    
    .week-info {
        padding: 15px;
    }
    
    .valid-date {
        font-size: 15px;
    }
    
    .image-counter {
        font-size: 13px;
    }
    
    .image-missing i {
        font-size: 36px;
    }
    
    .image-missing p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 98vw;
        max-height: 80vh;
    }
    
    .close-modal {
        top: -40px;
        right: -40px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-info {
        font-size: 14px;
        padding: 10px 20px;
        bottom: -50px;
        min-width: 180px;
    }
    
    .modal-actions {
        bottom: -100px;
        gap: 10px;
    }
    
    .modal-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .image-label h3 {
        font-size: 1.1rem;
    }
    
    .valid-date {
        font-size: 14px;
    }
    
    .zoom-overlay i {
        font-size: 32px;
    }
    
    .zoom-overlay span {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 8px;
    }
    
    .images-grid {
        gap: 15px;
    }
    
    .image-label {
        padding: 10px;
    }
    
    .week-info {
        padding: 12px;
    }
    
    .valid-date {
        font-size: 13px;
    }
    
    .modal-info {
        font-size: 13px;
        padding: 8px 16px;
        bottom: -45px;
        min-width: 160px;
    }
    
    .modal-actions {
        bottom: -90px;
        gap: 8px;
    }
    
    .modal-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ========== ESTILOS PARA LOGIN ADMIN ========== */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
}

.login-box h2 i {
    margin-right: 10px;
    color: #3498db;
}

.login-form .form-group {
    margin-bottom: 25px;
    width: 100%;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 1rem;
}

.login-form label i {
    margin-right: 8px;
    color: #3498db;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #2980b9;
}

.btn-login i {
    margin-right: 8px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #3498db;
}

.back-link i {
    margin-right: 5px;
}

/* ========== ESTILOS PARA PANEL ADMIN ========== */
.admin-panel {
    background: #f5f7fa;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.admin-header h1 i {
    color: #3498db;
    margin-right: 10px;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

.btn-logout i {
    margin-right: 8px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.admin-content {
    display: grid;
    gap: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.info-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.info-card .big-text {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
}

.image-control {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.image-control h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.image-control h2 i {
    color: #3498db;
    margin-right: 10px;
}

.description {
    color: #7f8c8d;
    margin-bottom: 25px;
}

.image-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.image-option label {
    display: block;
    cursor: pointer;
}

.image-option input[type="radio"] {
    display: none;
}

.image-preview {
    position: relative;
    width: 100%;
    padding-top: 141.42%;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #ddd;
    transition: all 0.3s ease;
}

.image-option.selected .image-preview {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-badge {
    background: #2ecc71;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.missing-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
}

.missing-image i {
    font-size: 48px;
    margin-bottom: 10px;
}

.missing-image p {
    font-size: 14px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-save, .btn-preview {
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-save {
    background: #2ecc71;
    color: white;
    border: none;
}

.btn-save:hover {
    background: #27ae60;
}

.btn-preview {
    background: #3498db;
    color: white;
}

.btn-preview:hover {
    background: #2980b9;
}

.btn-save i, .btn-preview i {
    margin-right: 8px;
}

.instructions {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.instructions h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.instructions h2 i {
    color: #f39c12;
    margin-right: 10px;
}

.instructions-content ol {
    margin-left: 20px;
    color: #34495e;
}

.instructions-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.instructions-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #e74c3c;
}

/* ========== RESPONSIVE PARA PANEL ADMIN ========== */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h2 {
        font-size: 1.5rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .image-options {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card .big-text {
        font-size: 28px;
    }
}