.search-page{
    padding:70px 20px 60px;
}

.search-title{
    font-size:1.6rem;
}

.no-results{
    text-align:center;
    padding:80px 0;
    opacity:.7;
}

.search-close,
.search-loader{
    position:absolute;
    right: 45px;
    top:50%;
    transform: translateY(-50%);
}

.search-close{
    position:absolute;
    right:45px;
    top:50%;
    transform:translateY(-50%);
    width:16px;
    height:16px;
    cursor:pointer;
    opacity:0;
    pointer-events:none;
    transition:opacity .3s ease;
    z-index:3001;
}

/* Mostrar cuando está activo */
.search-wrapper.active .search-close{
    opacity:1;
    pointer-events:auto;
}
	
.search-loader{
    position:absolute;
    right:35px;
    width:16px;
    height:16px;
    border:2px solid rgba(255,255,255,0.2);
    border-top:2px solid #fff;
    border-radius:50%;
    animation: spin .6s linear infinite;
    opacity:0;
    pointer-events:none;
	z-index:3002
}

.search-wrapper.loading .search-loader{
    opacity:1;
}

@keyframes spin{
    to{ transform: rotate(360deg); }
}
	
/* Las dos líneas de la X */
.search-close::before,
.search-close::after{
    content:"";
    position:absolute;
    top:50%;
    left:0;
    width:100%;
    height:2px;
    background:#fff;
    border-radius:2px;
    transition:all .35s ease;
}

.search-close::before{
    transform:translateY(-0%) rotate(45deg);
}

.search-close::after {
    transform: translateY(-50%) rotate(134deg);
}
	
/* 🔥 Cuando está cargando → convertir en círculo */
.search-wrapper.loading .search-close::before,
.search-wrapper.loading .search-close::after{
    transform:translateY(-50%) rotate(0deg);
    height:2px;
    opacity:0;
}

/* Crear el círculo */
.search-wrapper.loading .search-close{
    border:2px solid rgba(255,255,255,0.2);
    border-top:2px solid #fff;
    border-radius:50%;
    animation:spinClose .6s linear infinite;
}

/* Animación */
@keyframes spinClose{
    to{ transform:translateY(-50%) rotate(360deg); }
}

/* === MODO RESPONSIVE === */
/* ==============================
   TOGGLE HAMBURGUESA
============================== */
.menu-toggle {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2001;
}

.menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--texto-general);
  border-radius: 2px;
  transition: all 0.4s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 20px; }

/* X animada */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}
#site-content {
    transition: opacity .3s ease;
    flex: 1;
}
	
.profile-avatar-header img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: 0.2s ease;
}

.profile-avatar-header img:hover{
    border-color: var(--boton-principal-fondo);
}
	
	
/* ===============================
   HEADER DROPDOWN
================================= */

.notification-wrapper{
    position:relative;
}

.notification-icon{
    position:relative;
    cursor:pointer;
    font-size:1.1rem;
}

.notification-badge{
    position:absolute;
    top:-6px;
    right:-8px;
    background:#e50914;
    color:#fff;
    font-size:.65rem;
    padding:2px 6px;
    border-radius:50px;
}

.notification-dropdown{
    position:absolute;
    top:35px;
    right:0;
    width:340px;
    background:#141414;
    border-radius:8px;
    box-shadow:0 20px 60px rgba(0,0,0,.7);
    display:none;
    flex-direction:column;
    overflow:hidden;
    z-index:9999;
}

.notification-wrapper.active .notification-dropdown{
    display:flex;
}

.notification-item{
    padding:12px 15px;
    border-bottom:1px solid rgba(255,255,255,.05);
    text-decoration:none;
    color:#fff;
    transition:.2s;
}

.notification-item:hover{
    background:rgba(255,255,255,.05);
}

.notification-title{
    font-weight:600;
    font-size:.9rem;
}

.notification-text{
    font-size:.8rem;
    opacity:.7;
}

.notification-view-all {
    text-decoration: none;
    padding: 12px;
    text-align: center;
    font-size: .85rem;
    background: var(--boton-principal-fondo);
    color: var(--boton-principal-texto);
}

.notification-empty{
    padding:20px;
    text-align:center;
    opacity:.6;
}
.notificaciones-mas {
    margin-top: 10px;
    text-align: center;
}
.notificaciones-mas button#btn-cargar-mas {
    background: rgba(var(--fondo-sitio-rgb), 0.5);
    color: var(--texto-general);
    border: none;
    padding: 9px 20px;
    border-radius: 20px;
    cursor: pointer;
}
.notificaciones-mas button#btn-cargar-mas:hover {
    background: rgba(var(--boton-principal-fondo-rgb), 0.85);
    color: var(--texto-general);
}
button.btn-eliminar-notificacion {
    background: #00000033;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .8rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

/* ===============================
   PÁGINA COMPLETA
================================= */

.notificaciones-lista{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.notificacion-card{
    background:#141414;
    border-radius:10px;
    padding:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    transition:.25s ease;
    border:1px solid rgba(255,255,255,.05);
}

.notificacion-card:hover{
    background:#1a1a1a;
}

.notificacion-card.no-leida{
    border-left:4px solid #e50914;
}

.notificacion-info h4{
    margin:0 0 5px;
    font-size:1rem;
}

.notificacion-info p{
    margin:0 0 8px;
    opacity:.7;
    font-size:.9rem;
}

.notificacion-fecha{
    font-size:.75rem;
    opacity:.5;
}

.notificacion-btn{
    background:#e50914;
    color:#fff;
    padding:8px 14px;
    border-radius:6px;
    font-size:.8rem;
    text-decoration:none;
}
button.btn-eliminar-notificacion {
    background: #00000033;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .8rem;
    text-decoration: none;
    display: inline-block;
}
.notificacion-actions {
    display: flex;
    gap: 10px;
}	

	
/* ==============================
   BUSCADOR EXPANDIBLE
============================== */

.search-wrapper{
    position: relative;
    display: flex;
    align-items: center;
}

.search-input{
    position: absolute;
    right: 35px; /* queda a la izquierda del icono */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    padding: 6px 0;
    background: rgba(0,0,0,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.35s ease;
    z-index: 3000;
}

.search-wrapper.active .search-input{
    width: 185px;
    opacity: 1;
    padding: 6px 12px;
}

.search-icon{
    cursor: pointer;
    font-size: 1rem;
}

.search-results{
    position:absolute;
    top:40px;
    right:0;
    width:420px;
    max-height:500px;
    overflow-y:auto;
    background:#141414;
    border-radius:6px;
    box-shadow:0 10px 40px rgba(0,0,0,0.6);
    padding:15px;
    display:none;
    z-index:9999;
}

.search-results.active{
    display:block;
}

.search-results .grid-tarjetas{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
	  width: 23px;
    height: 5px;
  }
.notificacion-actions {
    display: flex;
    gap: 2px;
    flex-direction: column;
}
.header-left {
    display: flex;
    gap: 20px;
}
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--fondo-sitio);
    padding: 80px 20px 20px;
    transition: left 0.4s ease;
    z-index: 2000;
	  display: block;
	  align-items: flex-start;
  }

  .main-nav.show {
    left: 0;
	  align-items: flex-start;
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu li a {
    font-size: 1.1rem;
	  
  }

  /* overlay oscuro */
  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 20;
  }


  .nav-menu li {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
  }

  .main-nav.show .nav-menu li {
    opacity: 1;
    transform: translateX(0);
  }

  /* delays automáticos */
  .main-nav.show .nav-menu li:nth-child(1) { transition-delay: 0.1s; }
  .main-nav.show .nav-menu li:nth-child(2) { transition-delay: 0.2s; }
  .main-nav.show .nav-menu li:nth-child(3) { transition-delay: 0.3s; }
  .main-nav.show .nav-menu li:nth-child(4) { transition-delay: 0.4s; }
  .main-nav.show .nav-menu li:nth-child(5) { transition-delay: 0.5s; }
  .main-nav.show .nav-menu li:nth-child(6) { transition-delay: 0.6s; }

.header-left img {
    height: 24px;
}
}

@media (max-width: 768px) {
#main-header .container {
    padding: 0px 9px;
}
.header-left img {
    height: 24px;
}

/* ===============================
   NOTIFICACIONES MODO APP (MÓVIL)
================================= */
  .notification-wrapper{
      position: static;
  }

  .notification-dropdown{
      position: fixed;
      bottom: -100%;
      left: 0;
      right: 0;
      top: auto;
      width: 100%;
      height: 55vh;
      border-radius: 20px 20px 0 0;
      background: var(--fondo-sitio);
      z-index: 99999;
      display: flex;
      flex-direction: column;
      transition: bottom 0.35s ease;
      box-shadow: 0 -5px 21px -14px var(--texto-general);
  }

  /* Cuando está activo */
  .notification-wrapper.active .notification-dropdown{
      bottom: 0;
  }

  /* Overlay oscuro */
  .notification-overlay{
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s ease;
  }

  .notification-overlay.show{
      opacity: 1;
      pointer-events: auto;
  }

  /* Scroll interno */
  .notification-dropdown{
      overflow-y: auto;
  }

  /* Pequeña barra superior estilo app */
  .notification-dropdown::before{
      content: "";
      width: 40px;
      height: 4px;
      background: rgba(255,255,255,.3);
      border-radius: 4px;
      margin: 10px auto;
  }

}
/* ===============================
   BUSCADOR MODO APP (MÓVIL)
================================= */
@media (max-width: 768px){
.search-close::before, .search-close::after {
    width: 20px; 
	}
  .search-wrapper{
      position: static;
  }

  /* PANEL COMPLETO */
  .search-input{
      position: fixed;
      top: -100%;
      left: 0;
      right: 0;
      width: 100% !important;
      height: 22px;
      border-radius: 0;
      padding: 20px 60px 20px 15px !important;
      font-size: 1rem;
      background: var(--fondo-sitio);
      border: none;
      opacity: 1;
      z-index: 99999;
      transition: top 0.35s ease;
  }

  /* CUANDO SE ABRE */
  .search-wrapper.active .search-input{
      top: 30px;
  }

  /* ICONO CERRAR */
.search-close{
    position: fixed;
    top: 25px;
    right: 0px;
    z-index: 100000;
    opacity: 0;
	padding: 19px 9px;
    pointer-events: none;
    transition: opacity .3s ease;
}

/* SOLO CUANDO ESTÁ ACTIVO */
.search-wrapper.active .search-close{
    opacity: 1;
    pointer-events: auto;
}

  /* ICONO LUPA (opcional ocultar mientras abre) */
  .search-wrapper.active .search-icon{
      opacity: 0;
      pointer-events: none;
  }

  /* OVERLAY */
  .search-overlay{
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s ease;
      z-index: 99998;
  }

  .search-overlay.show{

  }
    .search-wrapper.active.loading .search-close {
        padding: 4px;
        right: 14px;
        top: 28px;
    }

}