/* ======= CSS + Buscador TOP + Mobile inline (sin modal) ======= */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --line:#e7eaf2;
  --ink:#111827;
  --muted:#6b7280;
  --violet:#4f46e5;
  --violetHover:#4338ca;
  --gold:#d4af37;
  --goldBorder:#f0b429;
  --green:#16a34a;
  --shadow: 0 4px 12px rgba(17,24,39,.06);
  --shadow2: 0 10px 24px rgba(17,24,39,.12);
  --r:16px;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* container: aquí está el padding que evita “pegado a los costados” en mobile */
.container{ max-width: 1400px; margin: 0 auto; padding: 0 10px; }

/* ===== HEADER ===== */
.topbar{
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner{
  height: 74px;
  display:flex;
  align-items:center;
  gap: 12px;
}
.logo{
  display:flex;
  align-items:baseline;
  color: var(--ink);
  flex-shrink: 0;
}
.logo .brand{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo .brand span{ color: var(--violet); }

.iconbtn{
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink: 0;
  color: var(--ink);
}
.actions{ display:flex; align-items:center; gap: 15px; margin-left:auto; }
.link{ font-weight: 600; font-size: 14px; }
.btn-primary{
  background: var(--violet);
  color:#fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
}
.mob-actions{
  margin-left:auto;
  display:none;
  gap:8px;
}

/* ===== Mobile Search Inline (no popup) ===== */
.mob-search-inline{
  display:none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mob-search-inline.open{ display:block; }
.mob-search-row{
  padding: 10px 0 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.mob-search-row .inp{
  height:48px;
  border-radius: 12px;
  border:1px solid var(--line);
  background:#fff;
  padding:0 14px;
  outline:none;
  font-weight:650;
  font-size: 14px;
}
.mob-search-row .btn-go{
  height:48px;
  border-radius: 12px;
  border:none;
  padding:0 16px;
  background: var(--violet);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.mob-search-row .btn-go:hover{ background: var(--violetHover); }

/* ===== TOP SEARCH BAR (PC) ===== */
.top-searchbar{
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top-search-inner{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 0;
}
.top-search-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex:1;
}
.top-search-form .inp{
  height:44px;
  border-radius: 12px;
  border:1px solid var(--line);
  background:#fff;
  padding:0 14px;
  outline:none;
  font-weight: 650;
  font-size: 14px;
  flex:1;
  min-width: 240px;
}
.top-search-form .btn-go{
  height:44px;
  border-radius: 12px;
  border:none;
  padding:0 16px;
  background: var(--violet);
  color:#fff;
  font-weight: 900;
  cursor:pointer;
  white-space:nowrap;
}
.top-search-form .btn-go:hover{ background: var(--violetHover); }

/* ===== Subheader ===== */
.subhead{
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.subhead-inner{
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.bcrumb{
  display:flex;
  align-items:center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.right-title{ font-weight: 600; font-size: 14px; }

/* H1 + desc */
.page-h1{
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -0.3px;
}
.page-desc{
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  max-width: 900px;
}

/* ===== Layout ===== */
.main{ padding: 16px 0; }
.layout{
  display:grid;
  grid-template-columns: 1fr 230px;
  gap: 20px;
}
.grid{
  display:grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

/* ===== Card ===== */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow2);
  border-color: var(--goldBorder);
}
.card-link{ display:flex; flex-direction:column; height:100%; }

.photo{
  position: relative;
  aspect-ratio: 3 / 4;
  background:#0b1220;
}
.photo img{ width:100%; height:100%; object-fit:cover; display:block; }

/* texto card */
.info{ padding: 12px; flex-grow: 1; }
.line1{
  font-size: 15.5px;
  font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line2{
  font-size: 13px;
  font-weight: 450;
  color: #374151;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line3{
  font-size: 13.5px;
  font-weight: 450;
  color: var(--muted);
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}

/* ===== Native ad in feed (solo mobile) ===== */
.native-ad .line1{ font-weight: 900; }
.native-badge{
  position:absolute;
  top:8px; left:8px;
  background: rgba(0,0,0,.65);
  color:#fff;
  font-size:10px;
  padding:4px 8px;
  border-radius: 999px;
  font-weight: 900;
}

/* ===== Sidebar ===== */
.sidebar{ display:flex; flex-direction:column; gap: 16px; }
.sidebar-sticky{ position: sticky; top: 90px; display:flex; flex-direction:column; gap:16px; }
.box{ background:#fff; border: 1px solid var(--line); border-radius: var(--r); overflow:hidden; }
.box-head{ padding: 12px; font-size: 11px; font-weight: 800; background: #0b1220; color:#fff; }
.box-body{ padding: 10px; }
.rowlink{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.rowlink:hover{ background: #f9fafb; color: var(--violet); }
.count{ background:#f3f4f6; padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--muted); }

/* ===== Load more ===== */
.loadmore-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin: 16px 0 6px;
}
.btn-loadmore{
  border:1px solid var(--line);
  background:#fff;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 900;
  cursor:pointer;
}
.btn-loadmore:hover{ color: var(--violet); border-color: rgba(79,70,229,.35); }
.btn-loadmore:disabled{ opacity:.55; cursor:default; }
.loadmore-note{ font-size: 12px; color: var(--muted); }

/* ===== Pagination ===== */
.pager{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}
.pbtn{
  border:1px solid var(--line);
  background:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--ink);
}
.pbtn:hover{ color: var(--violet); border-color: rgba(79,70,229,.35); }
.pbtn[aria-current="page"]{
  background: var(--violet);
  color:#fff;
  border-color: rgba(79,70,229,.35);
}
.pbtn.disabled{
  opacity:.45;
  pointer-events:none;
}

/* ===== SUGGEST dropdown ===== */
.sugg{
  position: fixed;
  z-index: 9999;
  display:none;
  background:#fff;
  border:1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow2);
  padding: 6px;
  max-height: min(360px, 60vh);
  overflow:auto;
}
.sugg .opt{
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
}
.sugg .opt:hover{ background:#f3f4f6; color: var(--violet); }

/* ===== SEO section ===== */
.seo-section{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.seo-box{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 14px;
}
.seo-title{
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: -0.2px;
}
.seo-p{
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.seo-p:last-child{ margin-bottom: 0; }
.seo-links{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.seo-chip{
  display:inline-flex;
  align-items:center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.seo-chip:hover{
  color: var(--violet);
  border-color: rgba(79,70,229,.35);
  box-shadow: var(--shadow);
}

/* ===== Figmotion ===== */
.figmotion{ opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.figmotion.in{ opacity: 1; transform: translateY(0); }

/* ===== Footer ===== */
.site-footer{
  margin-top: 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.footer-inner{
  padding: 18px 0;
  display:flex;
  gap: 14px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap: wrap;
}
.footer-brand{
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.footer-brand span{ color: var(--violet); }
.footer-links{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}
.footer-links a{
  padding: 6px 8px;
  border-radius: 10px;
}
.footer-links a:hover{
  color: var(--violet);
  background: #f3f4f6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar-sticky{ position: static; }
  .grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px){
  .actions{ display:none; }
  .mob-actions{ display:flex; }
  .topbar-inner{ height: 60px; }
  .logo .brand{ font-size: 19px; }
  .top-searchbar{ display:none; }

  .grid{ grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .info{ padding: 10px; }
  .line1{ font-size: 14.5px; }
  .line2{ font-size: 12.5px; }
  .line3{ font-size: 12.8px; }
  .card{ border-radius: 12px; }

  /* IMPORTANTE: padding en mobile para que footer no quede pegado */
  .container{ padding: 0 2px; }

  .footer-inner{ padding: 16px 0; }
}

@media (max-width: 360px) {
  .grid{ gap: 8px; }
  .line1{ font-size: 14px; }
}

/* ===== Publicidad responsive (PC vs Mobile) ===== */
.only-mobile{ display:none; }
.only-desktop{ display:block; }

/* PC: uno sobre otro (10 banners) */
.banner-stack{
  display:flex;
  flex-direction:column;
  gap:3px; /* <-- espacio entre banners (PC) */
}

/* ===== Publicidad: estilos ===== */
.banner-link{
  border-radius: 12px;
  overflow: hidden;
  display: block;
}
.banner-img{
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile: mostrar solo nativos (only-mobile) y ocultar only-desktop */
@media (max-width: 760px){
  .only-mobile{ display:block; }
  .only-desktop{ display:none !important; }
}


/* ESTOS ESTILOS NO SE CANBIA SE MANTIENEN */
/* ==========================
   VIP CARDS (SOLO PARA #adsGrid.vip-wrap)
   SOLO diseño de card (NO cambia el grid)
   ========================== */

/* Registro de propiedades para que el navegador entienda la animación del Magic Glow */
@property --hue { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --rotate { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

#adsGrid.vip-wrap .vip-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* --- CARD BASE --- */
#adsGrid.vip-wrap .card{
  background: #ffffff;
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  border: 1px solid #eee;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;

  /* IMPORTANTE: no overflow hidden para que el glow respire */
  overflow: visible;
}

#adsGrid.vip-wrap .card:hover{
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* --- APLICACIÓN MAGIC GLOW (SOLO PARA IS-TOP) --- */
#adsGrid.vip-wrap .is-top{
  border: none;
  z-index: 1;
}

/* El borde neón que gira */
#adsGrid.vip-wrap .is-top::before{
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: conic-gradient(from var(--rotate),
    hsl(calc(var(--hue)), 100%, 60%),
    hsl(calc(var(--hue) + 120), 100%, 60%),
    hsl(calc(var(--hue) + 240), 100%, 60%),
    hsl(calc(var(--hue)), 100%, 60%));
  border-radius: 22px;
  animation: rotate-border 3s linear infinite,
             hue-shift 3s linear infinite;
}

/* El resplandor (Glow) */
#adsGrid.vip-wrap .is-top::after{
  content: "";
  position: absolute;
  inset: -0px;
  z-index: -2;
  background: conic-gradient(from var(--rotate),
    hsl(calc(var(--hue)), 100%, 60%),
    hsl(calc(var(--hue) + 120), 100%, 60%),
    hsl(calc(var(--hue) + 240), 100%, 60%),
    hsl(calc(var(--hue)), 100%, 60%));
  border-radius: 20px;
  filter: blur(15px);
  opacity: 0.8;
  animation: rotate-border 3s linear infinite,
             hue-shift 3s linear infinite;
}

@keyframes rotate-border { from { --rotate: 0deg; } to { --rotate: 360deg; } }
@keyframes hue-shift { from { --hue: 0; } to { --hue: 360; } }

/* Contenedores internos con overflow controlado para no tapar el borde */
#adsGrid.vip-wrap .card-name,
#adsGrid.vip-wrap .img-box,
#adsGrid.vip-wrap .card-footer{
  position: relative;
  overflow: hidden;
  z-index: 2;
  background: #fff;
}

#adsGrid.vip-wrap .card-name{
  padding: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px 16px 0 0;
}

/* Latido solo en el texto TOP */
@keyframes heartbeat{
  0% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

#adsGrid.vip-wrap .is-top .card-name span{
  color: #ff0063;
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

#adsGrid.vip-wrap .vcheck{
  color: #2f89ff;
  font-size: 16px;
}

#adsGrid.vip-wrap .img-box{
  width: 100%;
  aspect-ratio: 1 / 1.3;
  background: #f0f0f0;
}
#adsGrid.vip-wrap .img-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#adsGrid.vip-wrap .badge-photo-top{
  position: absolute;
  bottom: 12px;
  left: 0;
  background: #ff0063;
  color: #fff;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 0 20px 20px 0;
  font-size: 13px;
  z-index: 5;
}

#adsGrid.vip-wrap .ribbon{
  position: absolute;
  top: 0;
  right: 0;
  width: 85px;
  height: 85px;
  overflow: hidden;
  z-index: 10;
}
#adsGrid.vip-wrap .ribbon::after{
  content: "NOVEDAD";
  position: absolute;
  top: 16px;
  right: -25px;
  width: 110px;
  background: #ff0063;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
  transform: rotate(45deg);
}

#adsGrid.vip-wrap .card-footer{
  padding: 15px;
  border-top: 1px solid #eee;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 0 0 16px 16px;
}

/* ===== ORDEN: Nacionalidad primero, luego ciudad, y al final edad ===== */
#adsGrid.vip-wrap .card-footer{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Misma pinta que ciudad/edad */
#adsGrid.vip-wrap .nacionalidad{
  order: 1;
  color: #666;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

/* La fila con ciudad + edad queda al final */
#adsGrid.vip-wrap .info-row{
  order: 2;               /* si solo hay una fila, será la última */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #666;
}

/* Dentro de la fila: ciudad primero y edad al final */
#adsGrid.vip-wrap .info-item{
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
#adsGrid.vip-wrap .info-item:nth-child(1){ order: 1; } /* ciudad */
#adsGrid.vip-wrap .info-item:nth-child(2){ order: 2; } /* edad */
#adsGrid.vip-wrap .nacionalidad i{ font-size: 0.95em; }


/* Desktop/tablet: como lo tengas */
.card-footer .info-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;           /* importante: permite que baje */
  align-items:center;
}

/* Mobile: colapsa a 1 columna */
@media (max-width: 520px){
  .card-footer{
    display:flex;
    flex-direction:column;
    gap:6px;
  }
  .card-footer .info-row{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .card-footer .info-item,
  .card-footer .nacionalidad{
    font-size:13px;          /* opcional */
    line-height:1.2;
  }
}