/* ==========================
   �9�3 Variables Globales
========================== */
:root {
  --rojo: #d60000;
  --rojo-oscuro: #a80000;
  --rojo-intenso: #e60000;
  --rojo-hover: #b80000;
  --morado: #52007b;
  --dorado: #ffcc00;
  --dorado-suave: #f39c12;
  --fondo-oscuro: #111;
  --blanco: #fff;
  --gris-claro: #f8f9fa;
  --gris-texto: #444;
}

/* ==========================
   �0�1 Reset y fuentes
========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--gris-claro);
  color: #222;
  line-height: 1.6;
}

/* ==========================
   �0�5 Barra de Navegaci��n
========================== */
nav {
  background: linear-gradient(90deg, var(--rojo), var(--rojo-oscuro));
  border-bottom: 2px solid var(--rojo-oscuro);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Franja inferior */
nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: var(--morado);
}

nav .logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--blanco);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
}

nav .logo:hover {
  color: var(--dorado);
}

nav img {
  height: 45px;
  margin-left: 15px;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
}

nav ul li {
  margin-left: 25px;
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: var(--blanco);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 6px 10px;
  border-radius: 5px;
}

nav ul li a:hover {
  color: #333;
  background: var(--dorado);
}

/* ==========================
   �9�4 Men�� Usuario
========================== */
.user-menu > a {
  font-weight: bold;
  color: var(--dorado);
  cursor: pointer;
}

.user-menu .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--blanco);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  padding: 8px 0;
  z-index: 999;
}

.user-menu .dropdown li {
  padding: 10px 15px;
}

.user-menu .dropdown li a {
  color: var(--rojo);
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
}

.user-menu .dropdown li a:hover {
  background: var(--dorado);
  color: #333;
}

.user-menu:hover .dropdown {
  display: block;
}

/* ==========================
   Imagen de presentaci��n (GIF)
========================== */
.video-presentacion {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

.video-presentacion .img-presentacion {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 80vh;
  border: none;
  outline: none;
  user-select: none;
  transition: all 0.3s ease;
}

/* ===============================
   Responsivo (m��viles y tablets)
================================= */
@media (max-width: 768px) {
  .video-presentacion .img-presentacion {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 60vh;
  }
}

/* ==========================
   �9�4 Secci��n Noticias
========================== */
#lista-noticias {
  padding: 40px 20px;
  background: #f9f9f9;
}

#lista-noticias h2 {
  text-align: center;
  color: var(--rojo-intenso);
  font-size: 2.2rem;
  font-weight: bold;
  margin: 0 auto 30px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--rojo-intenso);
  padding-bottom: 6px;
  width: fit-content;
}

#contenedor-noticias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tarjeta de noticia */
.noticia-card {
  background: var(--blanco);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.noticia-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.noticia-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.noticia-card h3 {
  font-size: 1.2rem;
  color: #222;
  margin: 15px;
  line-height: 1.4;
}

.noticia-card p {
  color: var(--gris-texto);
  font-size: 0.95rem;
  margin: 0 15px 15px;
}

.btn-ver-mas {
  background: var(--rojo-intenso);
  color: var(--blanco);
  border: none;
  padding: 10px 16px;
  margin: 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn-ver-mas:hover {
  background: var(--rojo-hover);
}

/* ============================================================
   �0�2 FORMULARIO MODERNO (ROJO + MORADO + DORADO)
============================================================ */
#modalFormulario .modal-contenido {
  background: linear-gradient(145deg, var(--morado) 0%, var(--rojo) 100%);
  color: var(--blanco);
  border: 3px solid var(--blanco);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(82, 0, 123, 0.5);
  padding: 30px;
  width: 600px;
  max-width: 95%;
  margin: 5% auto;
  animation: aparecer 0.4s ease;
  position: relative;
}

#modalFormulario h2 {
  text-align: center;
  color: var(--blanco);
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--dorado);
  display: inline-block;
  padding-bottom: 6px;
}

#modalFormulario .cerrar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  color: var(--dorado);
  cursor: pointer;
  transition: 0.3s ease;
}

#modalFormulario .cerrar:hover {
  color: var(--blanco);
  transform: rotate(90deg);
}

/* Campos del formulario */
#form-noticia label {
  font-weight: bold;
  color: var(--dorado);
  margin-bottom: 6px;
  display: block;
}

#form-noticia input,
#form-noticia textarea,
#form-noticia select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--blanco);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--morado);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

#form-noticia input:focus,
#form-noticia textarea:focus,
#form-noticia select:focus {
  border-color: var(--dorado);
  box-shadow: 0 0 10px var(--dorado);
}

#form-noticia .btn-guardar {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--rojo-intenso), var(--morado));
  color: var(--blanco);
  font-weight: bold;
  border: 2px solid var(--blanco);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

#form-noticia .btn-guardar:hover {
  background: linear-gradient(90deg, var(--morado), var(--rojo-intenso));
  color: var(--dorado);
  box-shadow: 0 0 12px var(--dorado);
}

/* ==========================================
   �9�4 SCROLL INTERNO PARA EL FORMULARIO MODAL
========================================== */
#modalFormulario {
  overflow-y: auto; /* permite scroll vertical si es muy largo */
}

#modalFormulario .modal-contenido {
  max-height: 85vh; /* limita la altura al 85% del alto de la ventana */
  overflow-y: auto; /* activa scroll interno si el contenido es grande */
  scrollbar-width: thin; /* scroll m��s delgado (Firefox) */
  scrollbar-color: #ffcc00 #52007b; /* colores personalizados */
}

/* �9�6 Scroll personalizado (Chrome, Edge, Safari) */
#modalFormulario .modal-contenido::-webkit-scrollbar {
  width: 8px;
}
#modalFormulario .modal-contenido::-webkit-scrollbar-thumb {
  background-color: #ffcc00;
  border-radius: 10px;
}
#modalFormulario .modal-contenido::-webkit-scrollbar-track {
  background-color: rgba(82, 0, 123, 0.3);
}

/* ============================================================
   �9�5 MODAL DE EDICI�0�7N DE NOTICIAS (EDITA)
   Estilo coherente con el formulario principal
=========================================================== */
#modalEditar {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Fondo oscuro transl��cido */
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

/* Contenido del modal */
#modalEditar .modal-contenido {
  background: linear-gradient(135deg, var(--morado) 0%, var(--rojo-intenso) 100%);
  color: var(--blanco);
  border: 3px solid var(--dorado);
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
  padding: 30px;
  width: 650px;
  max-width: 95%;
  margin: 4% auto;
  animation: aparecer 0.4s ease-out;
  position: relative;
}

/* T��tulo del modal */
#modalEditar h2 {
  text-align: center;
  font-size: 1.9rem;
  font-weight: bold;
  color: var(--dorado);
  margin-bottom: 20px;
  text-transform: uppercase;
  border-bottom: 3px solid var(--blanco);
  display: inline-block;
  padding-bottom: 8px;
}

/* Bot��n de cierre */
#modalEditar .cerrar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: var(--dorado);
  cursor: pointer;
  transition: 0.3s ease;
}

#modalEditar .cerrar:hover {
  color: var(--blanco);
  transform: rotate(90deg);
}

/* Campos de edici��n */
#form-editar label {
  font-weight: bold;
  color: var(--dorado);
  margin-bottom: 6px;
  display: block;
}

#form-editar input,
#form-editar textarea,
#form-editar select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--blanco);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--morado);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

#form-editar input:focus,
#form-editar textarea:focus,
#form-editar select:focus {
  border-color: var(--dorado);
  box-shadow: 0 0 10px var(--dorado);
}

/* Bot��n principal del modal editar */
#form-editar .btn-actualizar {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--rojo-intenso), var(--morado));
  color: var(--blanco);
  font-weight: bold;
  border: 2px solid var(--blanco);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

#form-editar .btn-actualizar:hover {
  background: linear-gradient(90deg, var(--morado), var(--rojo-intenso));
  color: var(--dorado);
  box-shadow: 0 0 12px var(--dorado);
}

/* Scroll interno si el contenido es largo */
#modalEditar .modal-contenido {
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dorado) var(--morado);
}

/* Scroll personalizado (Chrome, Edge, Safari) */
#modalEditar .modal-contenido::-webkit-scrollbar {
  width: 8px;
}
#modalEditar .modal-contenido::-webkit-scrollbar-thumb {
  background-color: var(--dorado);
  border-radius: 10px;
}
#modalEditar .modal-contenido::-webkit-scrollbar-track {
  background-color: rgba(82, 0, 123, 0.3);
}

#form-editar .btn-guardar {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--rojo-intenso), var(--morado));
  color: var(--blanco);
  font-weight: bold;
  border: 2px solid var(--blanco);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* Responsivo (pantallas peque�0�9as) */
@media (max-width: 768px) {
  #modalEditar .modal-contenido {
    width: 90%;
    padding: 20px;
  }

  #modalEditar h2 {
    font-size: 1.4rem;
  }
}

/* ==========================
   �7�5�1�5 Botones principales
========================== */
#abrirFormulario,
#abrirEditar,
#abrirEliminar,
#abrirFiltro {
  font-weight: bold;
  padding: 12px 20px;
  border: 2px solid var(--rojo-intenso);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px 5px;
  background-color: var(--rojo-intenso);
  color: var(--blanco);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* �9�6 Efecto hover */
#abrirFormulario:hover,
#abrirEditar:hover,
#abrirEliminar:hover,
#abrirFiltro:hover {
  background-color: var(--blanco);
  color: var(--rojo-intenso);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* ==========================
   �9�3 ESTILOS DEL MODAL FILTRO
========================== */

/* Fondo general del modal */
.modal {
  display: none; /* oculto por defecto */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

/* Contenido interno del modal */
.modal-contenido {
  background: linear-gradient(135deg, #52007b, #b30000);
  color: #fff;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  width: 320px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  animation: aparecer 0.3s ease;
}

@keyframes aparecer {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Bot��n de cerrar (X) */
.cerrar {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
}

.cerrar:hover {
  color: #000;
}

/* Selector de categor��as */
#filtro-categoria {
  background: #fff;
  color: #000;
  font-weight: bold;
  border: 2px solid #52007b;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: 0.3s;
  width: 90%;
}

#filtro-categoria:hover {
  background: #b30000;
  color: #fff;
}
/* ======== MODAL GENERAL ======== */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

/* ======== CONTENIDO DEL MODAL ======== */
.modal-filtro-contenido {
  background: linear-gradient(90deg, #52007b, #b30000);
  color: white;
  border-radius: 14px;
  margin: 10% auto;
  padding: 25px;
  width: 60%;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: aparecer 0.3s ease;
}

/* ======== BOT�0�7N CERRAR ======== */
.cerrar {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.cerrar:hover {
  color: #ffb6c1;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ==========================
   �7�8�1�5 Modal base
========================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================
   �9�5 Responsive
========================== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    display: none;
    background-color: #222;
    position: absolute;
    top: 70px;
    right: 20px;
    width: 220px;
    border-radius: 8px;
    padding: 15px 0;
  }

  nav ul.active {
    display: flex;
    animation: fadeIn 0.4s ease;
  }

  nav ul li {
    margin: 12px 0;
    text-align: center;
  }

  #modalFormulario .modal-contenido {
    width: 90%;
    padding: 20px;
  }

  #modalFormulario h2 {
    font-size: 1.4rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================== 
   Footer ARTEMUSA TV
========================== */
.footer {
  background-color: #b30000; /* Rojo principal */
  border-top: 8px solid #52007b; /* Franja morada superior */
  color: #fff;
  padding: 40px 20px 10px;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
  gap: 30px;
}

.footer-column {
  flex: 1 1 250px;
  max-width: 300px;
}

/* T��tulos de columnas */
.footer h4 {
  color: #ffcc00; /* Dorado */
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 4px;
}

/* Textos y enlaces */
.footer p,
.footer a {
  color: #f5f5f5;
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer a:hover {
  color: #ffcc00; /* Dorado al pasar el mouse */
  transform: translateX(3px);
}

.footer-slogan {
  font-style: italic;
  color: #f0f0f0;
  margin-top: 5px;
}

/* �0�1conos sociales */
.social-icons {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.social-icons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #52007b; /* Fondo morado de los ��conos */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.social-icons li a i {
  color: #ffcc00; /* �0�1cono dorado */
  font-size: 18px;
}

.social-icons li a:hover {
  background-color: #ffcc00; /* Dorado en hover */
  border-color: #fff;
  transform: scale(1.1);
}

.social-icons li a:hover i {
  color: #52007b; /* �0�1cono morado sobre dorado */
}

/* L��nea inferior */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #f0f0f0;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-column {
    max-width: 100%;
  }

  .social-icons {
    justify-content: center;
  }
}