/* === 🌙 Variables globales (modo oscuro moderno) === */
:root {
  --color-fondo: #0e0e0e;
  --color-texto: #f5f5f5;
  --color-secundario: #b8b8b8;
  --color-acento: linear-gradient(90deg, #ff5757, #8c52ff);
  --color-navbar: rgba(20, 20, 20, 0.85);
  --color-placeholder: rgba(200, 200, 200, 0.6);
  --sombra-acento: 0 0 25px rgba(140, 82, 255, 0.25);
  
  /* 🎨 NUEVAS VARIABLES PARA PROYECTOS */
  --color-primario: #0f0f23;
  --color-acento-solido: #6a11cb;
  --fondo-tarjeta: rgba(255, 255, 255, 0.05);
  --fondo-tarjeta-hover: rgba(255, 255, 255, 0.08);
  --fondo-imagen: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --borde-tarjeta: rgba(255, 255, 255, 0.1);
  --borde-tarjeta-hover: rgba(106, 17, 203, 0.3);
  --texto-primario: #ffffff;
  --texto-secundario: rgba(255, 255, 255, 0.7);
  --texto-destacado: #c084fc;
  
  /* Colores de estado */
  --color-exito: #10b981;
  --color-advertencia: #f59e0b;
  --color-peligro: #ef4444;
  --color-info: #3b82f6;
}

/* === 🧩 Configuración general === */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-fondo);
  color: var(--color-texto);
  font-family: "JetBrains Mono", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.ball {
  position: absolute;
  top: 100vh;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: min(300px, 80vw);
  height: min(300px, 80vw);
  background: url('/assets/elements/gradient-ball.png') no-repeat center center;
  background-size: cover;
  filter: blur(60px);
  border-radius: 50%;
  z-index: -1 !important;
  /* SIN ANIMACIÓN */
}

/* === 🚀 Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(60px, 10vw, 70px);
  background: var(--color-navbar);
  backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 28px);
  z-index: 1000;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 20px);
}

.logo {
  height: clamp(32px, 6vw, 38px);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* === MENÚ DE USUARIO === */
.user-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-name {
  color: var(--color-texto);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-trigger i {
  color: var(--color-secundario);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.user-menu-container.active .user-trigger i {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 8px 0;
  display: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 100;
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 5px;
}

.user-menu-container.active .user-menu {
  display: block;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--color-texto);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.user-menu-item i {
  width: 16px;
  text-align: center;
  color: var(--texto-destacado);
}

.user-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

/* === 🌌 Contenido principal === */
main {
  padding: clamp(90px, 15vw, 110px) clamp(16px, 4vw, 24px) clamp(40px, 8vw, 60px);
  text-align: center;
  max-width: min(1400px, 95vw);
  width: 100%;
}

/* === ✨ Título animado === */
h1 {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--color-acento);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-align: center;
  margin: 0 auto;
  line-height: 1.3;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#cursor {
  display: inline-block;
  margin-left: 2px;
  background: linear-gradient(90deg, #ff5757, #8c52ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: blink 0.8s steps(1) infinite, glow 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.1%, 100% { opacity: 0; }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(255, 87, 87, 0.6), 0 0 10px rgba(140, 82, 255, 0.6);
  }
  50% {
    text-shadow: 0 0 15px rgba(255, 87, 87, 0.9), 0 0 25px rgba(140, 82, 255, 0.9);
  }
}

/* === 🧠 Subtítulo === */
p {
  margin-top: clamp(12px, 3vw, 15px);
  color: var(--color-secundario);
  font-size: clamp(0.9rem, 3vw, 1rem);
  max-width: min(600px, 90vw);
  margin-inline: auto;
  line-height: 1.6;
}

/* === 🔍 Buscador === */
.buscador {
  margin: clamp(25px, 6vw, 35px) auto clamp(15px, 4vw, 20px);
  max-width: min(500px, 90vw);
  width: 100%;
  display: flex;
  justify-content: center;
}

.input-busqueda {
  width: 100%;
  padding: clamp(11px, 3vw, 13px) clamp(18px, 4vw, 22px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-texto);
  font-size: clamp(14px, 3vw, 15px);
  transition: all 0.3s ease;
  outline: none;
  backdrop-filter: blur(6px);
  min-height: 44px; /* Tamaño mínimo para touch */
}

.input-busqueda::placeholder {
  color: var(--color-placeholder);
}

.input-busqueda:focus {
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--sombra-acento);
  transform: scale(1.01);
}

/* === 🏷️ Categorías === */
.categorias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 2vw, 12px);
  margin-top: clamp(20px, 4vw, 25px);
  padding: 0 10px;
}

.categorias button {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: clamp(8px, 2vw, 10px) clamp(18px, 3vw, 22px);
  font-size: clamp(13px, 3vw, 14px);
  color: var(--color-texto);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "JetBrains Mono", monospace;
  backdrop-filter: blur(6px);
  min-height: 40px; /* Tamaño mínimo para touch */
  flex: 0 1 auto; /* Permite que los botones se ajusten */
}

.categorias button:hover {
  background: var(--color-acento);
  border: none;
  color: white;
  box-shadow: var(--sombra-acento);
  transform: translateY(-2px);
}

.categorias button.active {
  background: var(--color-acento);
  border: none;
  color: white;
  box-shadow: var(--sombra-acento);
}

/* === 🎯 ESTILOS PARA PROYECTOS POR CATEGORÍAS === */

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

.category-section {
  margin-bottom: 60px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--borde-tarjeta);
}

.category-title {
  font-size: 1.8rem;
  font-weight: 600;
  background: var(--color-acento);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.project-count {
  color: var(--color-secundario);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* 🎨 TARJETA DE PROYECTO MEJORADA */
.project-card {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--borde-tarjeta-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background: var(--fondo-tarjeta-hover);
}

/* 🖼️ CONTENEDOR DE IMAGEN MEJORADO */
.project-media-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--fondo-imagen);
}

.project-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-cover img {
  transform: scale(1.05);
}

.project-cover.no-image {
  background: var(--color-acento);
}

.project-cover-placeholder {
  color: var(--texto-primario);
  font-size: 3rem;
  opacity: 0.8;
}

/* 🏷️ TÍTULO SOBRE LA IMAGEN - EN PARTE INFERIOR */
.project-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  padding: 40px 20px 20px;
  z-index: 2;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--texto-primario);
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 🎯 ESTADO DEL PROYECTO */
.project-status {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.85);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 3;
}

.project-status.planning {
  color: var(--color-advertencia);
  border-color: rgba(245, 158, 11, 0.3);
}

.project-status.development {
  color: var(--color-info);
  border-color: rgba(59, 130, 246, 0.3);
}

.project-status.launched {
  color: var(--color-exito);
  border-color: rgba(16, 185, 129, 0.3);
}

/* 📝 CONTENIDO DE LA TARJETA */
.project-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-subtitle {
  color: var(--texto-secundario);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Información del autor */
.project-author {
  margin: 15px 0;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.author-avatar.placeholder {
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--color-secundario);
}

.author-name {
  color: var(--color-secundario);
  font-size: 0.9rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.project-category,
.project-visibility {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--texto-secundario);
}

.project-visibility.public {
  color: var(--color-exito);
}

.project-visibility.private {
  color: var(--color-peligro);
}

.project-visibility.link-only {
  color: var(--color-advertencia);
}

/* 🛠️ TECNOLOGÍAS */
.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  background: rgba(106, 17, 203, 0.15);
  color: var(--texto-destacado);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(106, 17, 203, 0.3);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(106, 17, 203, 0.25);
  transform: translateY(-1px);
}

.tech-tag-more {
  background: rgba(255, 255, 255, 0.1);
  color: var(--texto-secundario);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
}

/* 🔘 ACCIONES */
.project-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-view-project,
.btn-edit-project {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: "JetBrains Mono", monospace;
}

.btn-view-project {
  background: var(--color-acento);
  color: var(--texto-primario);
}

.btn-edit-project {
  background: rgba(255, 255, 255, 0.1);
  color: var(--texto-primario);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-view-project:hover,
.btn-edit-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ✨ EFECTO DE BRILLO AL HOVER */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-acento);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  z-index: 1;
}

.project-card:hover::before {
  transform: scaleX(1);
}

/* === 🔄 SPINNER Y ESTADOS DE CARGA === */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--color-acento-solido);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state, .error-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-secundario);
}

.empty-state i, .error-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.hidden {
  display: none;
}

/* === 🚩 Menú de región === */
.nav-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 15px);
}

.flag-container {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.flag-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.flag-trigger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.flag-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 8px 0;
  display: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 100;
  min-width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 5px;
}

.flag-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  transition: background 0.2s ease;
  min-height: 44px; /* Tamaño mínimo para touch */
}

.flag-option:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* === 👤 Icono de login - CORREGIDO === */
.login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-icon i,
.login-icon svg {
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  cursor: pointer;
  color: var(--color-texto);
  transition: transform 0.2s ease, color 0.2s ease;
  min-width: 44px; /* Tamaño mínimo para touch */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
}

.login-icon i:hover,
.login-icon svg:hover {
  transform: scale(1.1);
  color: #ff5757;
}

/* === 🔻 Footer === */
footer {
  padding: clamp(20px, 4vw, 25px) clamp(15px, 3vw, 20px);
  text-align: center;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  color: var(--color-secundario);
  width: 100%;
}

/* 🌐 Spinner Universal - VERSIÓN CORREGIDA */
.universal-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.universal-spinner.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.universal-spinner-content {
    text-align: center;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem; /* ✅ Más espacio para separar claramente */
    padding: 3rem;
}

/* ✅ CORREGIDO: Contenedor del loader con altura fija */
.universal-spinner .loader-container {
    height: 120px; /* ✅ Altura fija para el área del spinner */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.universal-spinner .loader {
    position: relative;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ CORREGIDO: Pseudo-elementos con dimensiones fijas */
.universal-spinner .loader:before,
.universal-spinner .loader:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    animation: pulsOut 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 1rem rgba(255, 255, 255, 0.75));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* ✅ Centrado perfecto */
}

.universal-spinner .loader:before {
    width: 6rem;
    height: 6rem;
    box-shadow: inset 0 0 0 1rem #fff;
    animation-name: pulsIn;
}

.universal-spinner .loader:after {
    width: 4rem;
    height: 4rem;
    box-shadow: 0 0 0 0 #fff;
}

.universal-spinner-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-align: center;
    max-width: 300px;
    word-wrap: break-word;
    /* ✅ El texto ahora está claramente separado del spinner */
}

@keyframes pulsIn {
    0% {
        box-shadow: inset 0 0 0 1rem #fff;
        opacity: 1;
    }
    50%, 100% {
        box-shadow: inset 0 0 0 0 #fff;
        opacity: 0;
    }
}

@keyframes pulsOut {
    0%, 50% {
        box-shadow: 0 0 0 0 #fff;
        opacity: 0;
    }
    100% {
        box-shadow: 0 0 0 1rem #fff;
        opacity: 1;
    }
}

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

/* === 🔻 Media Queries mejoradas === */

/* Tabletas */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .categorias {
    gap: 8px;
  }

  h1 {
    font-size: 2rem;
  }
  
  .nav-left,
  .nav-right {
    gap: 10px;
  }
  
  /* Asegurar alineación en tablets */
  .flag-container,
  .login-icon {
    height: 44px;
    display: flex;
    align-items: center;
  }

  /* Responsive para proyectos */
  .projects-container {
    padding: 20px 15px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .category-title {
    font-size: 1.5rem;
  }

  .project-media-container {
    height: 180px;
  }

  .universal-spinner-content {
    gap: 2rem;
    padding: 2rem;
  }
  
  .universal-spinner .loader-container {
    height: 100px;
  }
  
  .universal-spinner .loader {
    width: 5rem;
    height: 5rem;
  }
  
  .universal-spinner .loader:before {
    width: 5rem;
    height: 5rem;
  }
  
  .universal-spinner .loader:after {
    width: 3rem;
    height: 3rem;
  }
  
  .universal-spinner-text {
    font-size: 1rem;
    max-width: 250px;
  }
}

/* Móviles medianos */
@media screen and (max-width: 480px) {
  main {
    padding-top: 80px;
    padding-bottom: 30px;
  }
  
  .navbar {
    height: 60px;
    padding: 0 12px;
  }
  
  .logo {
    height: 30px;
  }
  
  .categorias button {
    padding: 8px 16px;
    font-size: 12px;
    min-height: 36px;
  }
  
  .input-busqueda {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .login-icon i,
  .login-icon svg {
    font-size: 1.4rem;
  }
  
  /* Asegurar alineación en móviles */
  .nav-right {
    gap: 8px;
  }
  
  .flag-container,
  .login-icon {
    height: 40px;
  }

  /* Responsive para proyectos en móviles */
  .project-media-container {
    height: 160px;
  }

  .project-title-overlay {
    padding: 30px 15px 15px;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-card-content {
    padding: 15px;
  }

  .universal-spinner-content {
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .universal-spinner .loader-container {
    height: 80px;
  }
  
  .universal-spinner .loader {
    width: 4rem;
    height: 4rem;
  }
  
  .universal-spinner .loader:before {
    width: 4rem;
    height: 4rem;
  }
  
  .universal-spinner .loader:after {
    width: 2rem;
    height: 2rem;
  }
  
  .universal-spinner-text {
    font-size: 0.9rem;
    max-width: 200px;
  }
}

/* Móviles pequeños (hasta 320px) */
@media screen and (max-width: 320px) {
  .navbar {
    padding: 0 8px;
    height: 55px;
  }
  
  main {
    padding: 70px 8px 20px;
  }
  
  h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  
  .categorias {
    gap: 6px;
  }
  
  .categorias button {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 32px;
    border-radius: 20px;
  }
  
  .input-busqueda {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 40px;
  }
  
  .nav-left,
  .nav-right {
    gap: 6px;
  }
  
  .login-icon i,
  .login-icon svg {
    font-size: 1.3rem;
    min-width: 40px;
    min-height: 40px;
  }
  
  /* Asegurar alineación en móviles pequeños */
  .flag-container,
  .login-icon {
    height: 36px;
  }

  /* Responsive para proyectos en móviles pequeños */
  .projects-container {
    padding: 15px 10px;
  }

  .project-media-container {
    height: 140px;
  }

  .project-title-overlay {
    padding: 25px 12px 12px;
  }

  .project-title {
    font-size: 1rem;
  }
}

/* Tabletas grandes y pantallas pequeñas */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  main {
    max-width: min(1200px, 95vw);
  }
  
  .buscador {
    max-width: min(450px, 80vw);
  }
  
  /* Asegurar alineación en tablets grandes */
  .nav-right {
    gap: 12px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* Pantallas muy grandes */
@media screen and (min-width: 1200px) {
  main {
    max-width: min(1400px, 95vw);
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  #cursor {
    animation: none;
    opacity: 1;
  }
}

/* Soporte para alto contraste */
@media (prefers-contrast: high) {
  .navbar {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  }
  
  .input-busqueda {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
  }
  
  .categorias button {
    border: 2px solid rgba(255, 255, 255, 0.3);
  }

  .project-card {
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
}

/* Prevenir zoom en iOS en inputs */
@supports (-webkit-touch-callout: none) {
  .input-busqueda {
    font-size: 16px; /* Previene zoom en iOS */
  }
}

/* Orientación landscape en móviles */
@media screen and (max-width: 768px) and (orientation: landscape) {
  main {
    padding-top: 80px;
    padding-bottom: 30px;
  }
  
  .navbar {
    height: 55px;
  }
  
  h1 {
    font-size: 1.8rem;
  }

  .projects-container {
    padding: 20px 15px;
  }
}



/* ===== ESTILOS ESPECÍFICOS PARA PÁGINA DE DETALLES ===== */

.project-details-page {
    min-height: 100vh;
    background: var(--color-fondo);
}

/* Header del proyecto */
.project-header {
    background: var(--color-navbar);
    backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--borde-tarjeta);
    padding: 2rem 0;
}

.breadcrumb-container {
    margin-bottom: 1.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-texto);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--color-secundario);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--color-texto);
}

.breadcrumb .current {
    color: var(--color-texto);
    font-weight: 600;
}

.breadcrumb i {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Cover del proyecto */
.project-cover-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.project-cover-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.project-cover-placeholder {
    width: 100%;
    height: 400px;
    background: var(--color-acento);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-primario);
    font-size: 4rem;
}

.project-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--texto-primario);
    padding: 2rem;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: var(--texto-primario);
}

.project-badge.planning { background: rgba(245, 158, 11, 0.8); }
.project-badge.development { background: rgba(59, 130, 246, 0.8); }
.project-badge.launched { background: rgba(16, 185, 129, 0.8); }
.project-badge.completed { background: rgba(14, 165, 233, 0.8); }
.project-badge.paused { background: rgba(139, 92, 246, 0.8); }

/* === 🎯 BANNER DE PROYECTOS POPULARES - CON NAVEGACIÓN LATERAL MEJORADA === */

.popular-banner {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: 20px;
  margin: 2rem 0;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: visible;
  min-height: 320px;
}

/* Imagen como fondo con layout dividido */
.popular-banner.with-background {
  background: linear-gradient(
      to right,
      var(--fondo-tarjeta) 0%,
      var(--fondo-tarjeta) 65%,
      transparent 65%
    ),
    linear-gradient(
      to left,
      transparent 35%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    var(--banner-image) right center/35% auto no-repeat;
  color: white;
  display: flex;
  align-items: center;
}

/* Contenedor principal */
.banner-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-content {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* 🔥 BOTONES DE NAVEGACIÓN LATERALES - MEJORADO PARA EVITAR CORTES */
.banner-nav-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Botón anterior - izquierda CON MARGEN DE SEGURIDAD */
.banner-nav-side.prev {
  left: -75px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

/* Botón siguiente - derecha CON MARGEN DE SEGURIDAD */
.banner-nav-side.next {
  right: -75px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

/* Estados hover de los botones laterales */
.banner-nav-side:hover {
  background: var(--color-acento);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(106, 17, 203, 0.4);
  border-color: transparent;
}

.banner-nav-side:active {
  transform: translateY(-50%) scale(0.95);
}

/* Header con badge - MEJORADO PARA EVITAR SUPERPOSICIÓN */
.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0rem;
  position: relative;
  min-height: 40px;
  gap: 1rem;
}

/* Etiqueta "Proyecto Destacado" en header - CON MÁRGENES DE SEGURIDAD */
.banner-featured-badge {
  background: linear-gradient(135deg, #ff6b35, #ff8e53);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  max-width: calc(100% - 100px);
}

/* Controles para móviles - OCULTOS POR DEFECTO */
.banner-controls {
  display: none;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.banner-nav-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--borde-tarjeta);
  color: var(--color-texto);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "JetBrains Mono", monospace;
  backdrop-filter: blur(6px);
}

.popular-banner.with-background .banner-nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.banner-nav-btn:hover {
  background: var(--color-acento);
  border-color: transparent;
  color: white;
  box-shadow: var(--sombra-acento);
  transform: translateY(-2px);
}

/* Contador - OCULTO */
.banner-counter {
  display: none;
}

/* Contenedor principal del proyecto */
.banner-project-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

/* ESTILOS PARA EL CONTENIDO DINÁMICO (template) */
.banner-project-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  justify-content: space-between;
}

.banner-project-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: left;
  margin-bottom: 1rem;
}

.banner-project-title {
  color: var(--texto-primario);
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  background: var(--color-acento);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: left;
  width: 100%;
  letter-spacing: -0.5px;
}

.popular-banner.with-background .banner-project-title {
  color: white;
  background: linear-gradient(135deg, #ffffff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-project-subtitle {
  color: var(--texto-secundario);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  text-align: left;
  opacity: 0.9;
}

.popular-banner.with-background .banner-project-subtitle {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.banner-project-description {
  color: var(--texto-secundario);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  text-align: left;
  opacity: 0.8;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-banner.with-background .banner-project-description {
  color: rgba(255, 255, 255, 0.8);
}

.banner-project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.banner-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.popular-banner.with-background .banner-author {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.banner-author:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.popular-banner.with-background .banner-author:hover {
  background: rgba(255, 255, 255, 0.3);
}

.banner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.banner-avatar.placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secundario);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.popular-banner.with-background .banner-avatar.placeholder {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

.banner-author-name {
  color: var(--texto-primario);
  font-weight: 600;
  font-size: 0.9rem;
}

.popular-banner.with-background .banner-author-name {
  color: white;
}

.banner-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.banner-actions-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.view-count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--texto-primario);
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.popular-banner.with-background .view-count-badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.view-count-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-banner-view {
  background: var(--color-acento);
  color: white;
  border: none;
  padding: 0.8rem 2.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.popular-banner.with-background .btn-banner-view {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-banner-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4);
  text-decoration: none;
  color: white;
}

.popular-banner.with-background .btn-banner-view:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Etiqueta de estado en esquina inferior izquierda */
.banner-status-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ✨ Efectos de brillo */
.popular-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-acento);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  z-index: 1;
}

.popular-banner:hover::before {
  transform: scaleX(1);
}

.popular-banner.with-background::before {
  background: #ff6b35;
}

/* === 📱 RESPONSIVE MEJORADO - FLECHAS SE ADAPTAN MEJOR === */

/* Pantallas medianas donde las flechas podrían tener overflow */
@media screen and (max-width: 1200px) {
  .banner-nav-side {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .banner-nav-side.prev {
    left: -20px;
  }
  
  .banner-nav-side.next {
    right: -20px;
  }
}

/* Tabletas */
@media screen and (max-width: 968px) {
  .popular-banner.with-background {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.3) 100%
      ),
      var(--banner-image) center/cover no-repeat;
  }
  
  .banner-project-title {
    font-size: 1.8rem;
  }
  
  .banner-project-subtitle {
    font-size: 1.1rem;
  }
  
  /* Flechas más cerca del borde en tabletas */
  .banner-nav-side {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  
  .banner-nav-side.prev {
    left: -15px;
  }
  
  .banner-nav-side.next {
    right: -15px;
  }
}

/* Tabletas pequeñas - TRANSICIÓN A DISEÑO RESPONSIVE */
@media screen and (max-width: 850px) {
  .banner-nav-side {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .banner-nav-side.prev {
    left: -12px;
  }
  
  .banner-nav-side.next {
    right: -12px;
  }
}

/* Tabletas pequeñas y móviles - FLECHAS DENTRO DEL BANNER CON ESPACIO PARA BADGE */
@media screen and (max-width: 768px) {
  .popular-banner.with-background {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.4) 100%
      ),
      var(--banner-image) center/cover no-repeat;
    min-height: 350px;
  }
  
  .banner-header {
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    padding-top: 3rem; /* Espacio para las flechas */
  }
  
  .banner-project-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }
  
  .banner-project-subtitle {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }
  
  .banner-project-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    -webkit-line-clamp: 2;
  }
  
  .banner-project-meta {
    margin: 0.25rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .banner-author {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
  
  .banner-avatar,
  .banner-avatar.placeholder {
    width: 28px;
    height: 28px;
  }
  
  .banner-actions-container {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  
  .view-count-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .btn-banner-view {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .banner-status-badge {
    position: relative;
    bottom: auto;
    left: auto;
    margin: 0.5rem 0 0 0;
    align-self: flex-start;
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* 🔥 FLECHAS SE MUEVEN DENTRO DEL BANNER EN ESQUINAS SUPERIORES CON ESPACIO */
  .banner-nav-side {
    top: 1.5rem;
    transform: none;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
  
  .banner-nav-side.prev {
    left: 1rem;
    top: 1.5rem;
  }
  
  .banner-nav-side.next {
    right: 1rem;
    top: 1.5rem;
  }
  
/* Featured badge con margen para no superponerse con flechas */
.banner-featured-badge {
  margin-left: 0;
  margin-right: 0;
  max-width: calc(100% - 6rem);
  text-align: center;
  /* Centrado con flexbox */
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}
  
  .banner-nav-side:hover {
    transform: scale(1.1) !important;
  }
  
  .banner-nav-side:active {
    transform: scale(0.95) !important;
  }
  
  /* Ocultar controles móviles por defecto en esta resolución */
  .banner-controls {
    display: none;
  }
}

/* Móviles - MOSTRAR CONTROLES MÓVILES */
@media screen and (max-width: 640px) {
  /* Ocultar flechas laterales y mostrar controles móviles */
  .banner-nav-side {
    display: none;
  }
  
  .banner-controls {
    display: flex;
  }
  
  .popular-banner {
    margin: 1rem 0;
    padding: 1.5rem 1rem;
    min-height: 300px;
    border-radius: 16px;
  }
  
  .popular-banner.with-background {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.4) 100%
      ),
      var(--banner-image) center/cover no-repeat;
    min-height: 280px;
  }
  
  .banner-header {
    padding-top: 0; /* Reset del padding para móviles */
  }
  
  .banner-featured-badge {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
  
  .banner-project-title {
    font-size: 1.3rem;
  }
  
  .banner-project-subtitle {
    font-size: 0.9rem;
  }
  
  .banner-project-description {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.5rem;
  }
  
  .banner-controls {
    gap: 0.5rem;
  }
  
  .banner-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  
  .banner-featured-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.8rem;
  }
  
  .banner-actions-container {
    gap: 0.75rem;
  }
  
  .view-count-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .btn-banner-view {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
  }
  
  .banner-author {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
  }
}

/* Móviles pequeños */
@media screen and (max-width: 360px) {
  .popular-banner {
    padding: 1rem 0.8rem;
    min-height: 260px;
  }
  
  .popular-banner.with-background {
    min-height: 240px;
  }
  
  .banner-project-title {
    font-size: 1.1rem;
  }
  
  .banner-project-subtitle {
    font-size: 0.8rem;
  }
  
  .banner-project-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
  }
  
  .banner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .banner-featured-badge {
    align-self: flex-start;
  }
  
  .banner-controls {
    align-self: flex-end;
  }
  
  .banner-actions-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .btn-banner-view {
    width: 100%;
    justify-content: center;
  }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .popular-banner,
  .banner-nav-side,
  .banner-nav-btn,
  .btn-banner-view,
  .banner-author,
  .view-count-badge {
    transition: none;
    transform: none;
  }
}

/* Soporte para alto contraste */
@media (prefers-contrast: high) {
  .popular-banner {
    border: 2px solid var(--texto-primario);
    background: var(--color-fondo);
  }
  
  .banner-nav-side,
  .banner-nav-btn {
    border: 2px solid var(--texto-primario);
  }
  
  .banner-author {
    border: 2px solid var(--texto-primario);
  }
  
  .view-count-badge {
    border: 2px solid var(--texto-primario);
  }
  
  .banner-status-badge,
  .banner-featured-badge {
    border: 2px solid var(--texto-primario);
  }
}