/* ============================================
   ESTILOS PARA PÁGINAS DE ADMINISTRACIÓN
   ============================================ */

/* BOTONES PEQUEÑOS Y DE ACCIÓN */
.btn-small {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: auto;
}

.btn-small svg {
    width: 14px;
    height: 14px;
}

.btn-accion {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.btn-accion.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

.btn-danger {
    background: #dc2626;
    color: #ebe6d7;
    border: 2px solid #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
}

.btn-success {
    background: #059669;
    color: #ebe6d7;
    border: 2px solid #059669;
}

.btn-success:hover {
    background: #047857;
    border-color: #047857;
    transform: translateY(-2px);
}

.btn-warning {
    background: #d97706;
    color: #ebe6d7;
    border: 2px solid #d97706;
}

.btn-warning:hover {
    background: #b45309;
    border-color: #b45309;
    transform: translateY(-2px);
}

/* BOTONES EMBED */
.embed-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

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

.modal-content {
    background: #ebe6d7;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #d0c9b8;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d0c9b8;
}

.modal-header h3 {
    font-size: 1.3rem;
    color: #222;
    margin: 0;
}

.close-modal {
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #666;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #d32f2f;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #d0c9b8;
}

/* MODAL DE CONFIRMACIÓN (para gestionar_noticias.php) */
.modal-contenido {
    background: #ebe6d7;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.modal-titulo {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-texto {
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
    padding: 15px;
    background: #ebe6d7;
    border-radius: 8px;
}

.modal-acciones {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* TAB BUTTONS */
.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #d0c9b8;
}

.tab-button {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-button:hover {
    color: #d32f2f;
    background: rgba(211, 47, 47, 0.05);
}

.tab-button.active {
    color: #d32f2f;
    border-bottom-color: #d32f2f;
    background: rgba(211, 47, 47, 0.05);
}

/* TAB CONTENT */
.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane .form-group {
    margin-bottom: 20px;
}

.tab-pane .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tab-pane .form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* DATETIME HELPER */
.datetime-helper {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.datetime-helper button {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.datetime-helper button:hover {
    color: #b71c1c;
}

.datetime-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.datetime-container .form-control {
    flex: 1;
}

/* CONTADOR DE CARACTERES */
.contador {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
    font-weight: 500;
}

.contador.alerta {
    color: #d32f2f;
}

.contador.advertencia {
    color: #f57c00;
}

/* ERROR MESSAGES */
.error-message {
    display: none;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* NOTA/INFORMACIÓN */
.nota {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    margin-top: 25px;
    border-left: 4px solid #d32f2f;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.nota ul {
    margin-top: 10px;
    margin-left: 20px;
}

.nota li {
    margin-bottom: 6px;
}

/* BADGES DE ESTADO */
.estado-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
}

.badge-destacado {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-urgente {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-editorial {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.badge-normal {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-programada {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    border: 1px solid #b91c1c;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
}

.badge-programada svg {
    width: 14px;
    height: 14px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* TABLA PARA GESTIONAR NOTICIAS */
.tabla-container {
    background: #ebe6d7;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tabla-header {
    padding: 20px 25px;
    background: #ebe6d7;
    border-bottom: 3px solid #d32f2f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tabla-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.total-noticias {
    background: #222;
    color: #ebe6d7;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* NOTICIA PROGRAMADA */
.noticia-programada {
    background: #f5e5d8 !important;
    border-left: 4px solid #dc2626;
}

.noticia-programada:hover {
    background: #ebe6d7 !important;
}

/* COLUMNAS DE TABLA */
.col-titulo {
    width: 40%;
}

.col-categoria {
    width: 15%;
}

.col-fecha {
    width: 15%;
}

.col-estado {
    width: 10%;
}

.col-acciones {
    width: 20%;
}

/* CONTENIDO DE TABLA */
.titulo-noticia {
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 1.05rem;
}

.titulo-noticia a:hover {
    color: #d32f2f;
}

.info-extra {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.info-extra svg {
    color: #888;
    width: 14px;
    height: 14px;
}

.categoria-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #222;
    color: #ebe6d7;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.fecha {
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.hora {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ACCIONES */
.acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* BÚSQUEDA/FILTROS */
.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 800px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
    border: 2px solid #d1d1d1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #ebe6d7;
}

.search-input:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

select.search-input {
    min-width: 160px;
    cursor: pointer;
}

/* PAGINACIÓN */
.paginacion {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagina-btn {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    background: #ebe6d7;
    border-radius: 8px;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagina-btn:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

.pagina-btn.active {
    background: #d32f2f;
    color: #ebe6d7;
    border-color: #d32f2f;
}

/* FILTROS CONTAINER */
.filtros-container {
    background: #ebe6d7;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
}

/* USER INFO */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ebe6d7;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.user-info svg {
    color: #d32f2f;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #222;
}

.user-role {
    font-size: 13px;
    color: #666;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 25px;
    background: #ebe6d7;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.empty-state svg {
    color: #d32f2f;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #222;
}

.empty-state p {
    color: #666;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA SUBIR_NOTICIA.PHP
   ============================================ */

/* CONTENEDOR PRINCIPAL */
.main-container {
    background: #ebe6d7;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 30px 0;
}

/* CABECERA */
.header {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: #ebe6d7;
    padding: 25px 30px;
    border-bottom: 3px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

/* MAIN CONTENT */
.main-content {
    padding: 30px;
}

/* MENSAJES (para subir_noticia.php) */
.mensaje {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.mensaje.exito {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* FORM ROW */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* FORM GROUP */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #222;
    font-size: 15px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* FORM CONTROL */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    background: #ebe6d7;
}

.form-control:focus {
    border-color: #d32f2f;
    outline: none;
    background: #ebe6d7;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

textarea.tinymce-editor {
    min-height: 400px;
}

select.form-control {
    cursor: pointer;
}

input[type="file"].form-control {
    padding: 12px;
    border: 2px dashed #e0e0e0;
    cursor: pointer;
}

input[type="file"].form-control:hover {
    border-color: #d32f2f;
    background: #f5e5d8;
}

/* DATETIME CONTAINER */
.datetime-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.datetime-container .form-control {
    flex: 1;
}

/* CHECKBOX GROUP */
.checkbox-group {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    padding: 15px;
    background: #ebe6d7;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #444;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s;
    user-select: none;
}

.checkbox-label:hover {
    background: #f0f0f0;
}

.checkbox-label.checked {
    background: #fff5f5;
    border: 1px solid #d32f2f;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d32f2f;
}

/* TAGS INPUT */
.tags-input {
    background: #ebe6d7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-input {
    border: none;
    background: transparent;
    flex: 1;
    min-width: 200px;
    padding: 8px;
    font-size: 14px;
    outline: none;
}

.tag-item {
    background: #d32f2f;
    color: #ebe6d7;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.tag-item button {
    background: none;
    border: none;
    color: #ebe6d7;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.tag-item button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* BTN-SMALL */
.btn-small {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: auto;
}

/* BOTONES FORM ACTIONS */
.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.form-actions .btn {
    flex: 1;
    min-width: 200px;
}

/* TINYMCE CUSTOM */
.tox-tinymce {
    border-radius: 8px !important;
    border: 2px solid #e0e0e0 !important;
    overflow: hidden !important;
}

.tox-tinymce:focus-within {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1) !important;
}

/* RESPONSIVE PARA ADMINISTRACIÓN */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-height: 85vh;
    }
    
    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        white-space: nowrap;
    }
    
    .embed-buttons {
        flex-direction: column;
    }
    
    .embed-buttons button {
        width: 100%;
    }
    
    .tabla-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 800px;
    }
    
    .acciones {
        flex-direction: column;
    }
    
    .btn-accion {
        width: 100%;
        justify-content: center;
    }
    
    .modal-acciones {
        flex-direction: column;
    }
    
    .modal-acciones button {
        width: 100%;
    }
    
    .search-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .datetime-helper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* RESPONSIVE PARA SUBIR NOTICIA */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: 100%;
    }
    
    .datetime-helper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================================================
   ESTILOS RESPONSIVE PARA ADMINISTRACIÓN - TODAS LAS PANTALLAS
   ======================================================================== */

/* TABLETS Y DESKTOP PEQUEÑO (768px - 1023px) */
@media (max-width: 1023px) {
    .main-container {
        padding: 15px;
    }
    
    .header {
        padding: 18px 20px;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 20px;
    }
}

/* MÓVILES Y TABLETS (hasta 767px) */
@media (max-width: 767px) {
    /* CONTENEDOR PRINCIPAL */
    .container {
        padding: 0 8px;
    }
    
    .main-container {
        padding: 10px;
        margin: 10px 0;
    }
    
    /* BANNER */
    .banner img {
        max-height: 120px;
        object-fit: cover;
    }
    
    /* TOP BAR */
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px;
    }
    
    .top-bar > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    /* HEADER */
    .header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    /* MAIN CONTENT */
    .main-content {
        padding: 15px;
    }
    
    /* FORMULARIOS */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-control,
    .search-input {
        padding: 12px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* BOTONES */
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .btn-accion {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    /* MODAL */
    .modal {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .modal-content,
    .modal-contenido {
        max-width: 100%;
        width: 100%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
        margin-top: 10px;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .close-modal {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .modal-footer,
    .modal-acciones {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn,
    .modal-acciones .btn {
        width: 100%;
    }
    
    /* TABS */
    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .tab-button {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    /* TABLA */
    .tabla-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabla-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .tabla-header h2 {
        font-size: 1.1rem;
    }
    
    .total-noticias {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .tabla-datos,
    table {
        min-width: 700px;
        font-size: 13px;
    }
    
    th, td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .titulo-noticia {
        font-size: 0.95rem;
    }
    
    .info-extra {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    
    .categoria-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    /* ACCIONES EN TABLA */
    .acciones {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .acciones .btn-accion,
    .acciones .btn {
        width: 100%;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* FILTROS */
    .filtros-container,
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filtros-container .form-control,
    .search-form .search-input {
        width: 100%;
    }
    
    /* CHECKBOX GROUP */
    .checkbox-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .checkbox-label {
        padding: 12px;
    }
    
    /* COLOR PICKER */
    .color-picker-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-input,
    .color-hex {
        width: 100%;
    }
    
    /* EMBED BUTTONS */
    .embed-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .embed-buttons button {
        width: 100%;
    }
    
    /* IMAGEN PREVIEW */
    .imagen-preview {
        max-width: 100%;
        height: auto;
        max-height: 250px;
    }
    
    /* BADGES */
    .estado-badges {
        gap: 6px;
    }
    
    .badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* PAGINACIÓN */
    .paginacion {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .pagina-btn,
    .paginacion-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* DATETIME HELPER */
    .datetime-helper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* GESTIONAR BOTONES */
    .btn-gestionar {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    /* NOTA/INFORMACIÓN */
    .nota {
        padding: 15px;
        font-size: 13px;
    }
    
    /* USER INFO */
    .user-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-details {
        text-align: left;
    }
}

/* MÓVILES PEQUEÑOS (hasta 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 5px;
    }
    
    .main-container {
        padding: 8px;
        margin: 8px 0;
    }
    
    /* HEADER */
    .header {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    /* MAIN CONTENT */
    .main-content {
        padding: 12px;
    }
    
    /* FORMULARIOS */
    .form-group label {
        font-size: 12px;
    }
    
    .form-control {
        padding: 10px;
        font-size: 16px;
    }
    
    /* BOTONES */
    .btn {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-accion,
    .btn-small {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    /* MODAL */
    .modal-content,
    .modal-contenido {
        padding: 15px;
    }
    
    .modal-header h3,
    .modal-titulo {
        font-size: 1rem;
    }
    
    /* TABLA */
    .tabla-datos,
    table {
        min-width: 600px;
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .titulo-noticia {
        font-size: 0.9rem;
    }
    
    .categoria-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .fecha {
        font-size: 13px;
    }
    
    .hora {
        font-size: 12px;
    }
    
    /* TABS */
    .tab-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* BADGES */
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* PAGINACIÓN */
    .paginacion-btn,
    .pagina-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    /* IMAGEN PREVIEW */
    .imagen-preview {
        max-height: 200px;
    }
    
    /* NOTA */
    .nota {
        padding: 12px;
        font-size: 12px;
    }
}

/* MODO LANDSCAPE PARA MÓVILES */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content,
    .modal-contenido {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .header h1 {
        font-size: 1rem;
    }
}

/* AJUSTES PARA PANTALLAS TÁCTILES */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .btn-accion,
    .tab-button,
    .categoria-btn {
        min-height: 44px; /* Tamaño mínimo táctil recomendado */
    }
    
    .form-control,
    .search-input {
        min-height: 44px;
    }
}
