:root {
  --color-primary: #0B2545;
  --color-secondary: #1391FF;
  --color-accent: #FF7A00;
  --color-bg-light: #F8F9FA;
  --color-text: #172033;
  --color-muted: #64748b;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg-light);
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 8px 0;
}

.site-header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  display: block;
  width: min(380px, 82vw);
  height: auto;
  max-height: 88px;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .site-header {
    padding: 6px 0;
  }

  .site-header-inner {
    min-height: 50px;
  }

  .site-logo {
    width: min(300px, 88vw);
    max-height: 70px;
  }
}

/* =========================================================
   DIRECTORIO
   ========================================================= */

.directory-intro {
  text-align: center;
  margin: 10px 0 22px;
}

.directory-intro h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.3;
  font-weight: 800;
  color: var(--color-primary);
}

.directory-intro h2 {
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  color: #374151;
}

/* =========================================================
   TARJETAS DE RADIOS
   ========================================================= */

.radio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.radio-card {
  display: block;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 12px rgba(17, 24, 39, .07);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.radio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(17, 24, 39, .12);
}

.radio-logo-wrap {
  aspect-ratio: 1 / .78;
  border-radius: 9px;
  overflow: hidden;
  background: #eef2f7;
}

.radio-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.radio-logo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-muted);
}

.radio-card-info {
  padding: 7px 2px 2px;
  min-width: 0;
}

.radio-card-info strong {
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .92rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

.radio-card-info span {
  display: block;
  color: var(--color-muted);
  font-size: .78rem;
  margin-top: 2px;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .radio-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Celular */
@media (max-width: 767.98px) {
  .directory-intro {
    margin-top: 8px;
    margin-bottom: 18px;
  }

  .directory-intro h2 {
    margin-top: 16px;
  }

  .radio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .radio-card {
    padding: 6px;
  }

  .radio-card-info {
    padding-top: 6px;
  }

  .radio-card-info strong {
    font-size: .78rem;
  }
}

/* =========================================================
   PÁGINA INDIVIDUAL DE RADIO
   ========================================================= */

.radio-detail-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.radio-detail-logo {
  width: 300px;
  height: 300px;
  max-width: 80vw;
  max-height: 80vw;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.radio-detail-logo-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 575.98px) {
  .radio-detail-logo {
    width: 230px;
    height: 230px;
    max-width: 70vw;
    max-height: 70vw;
  }
}

/* =========================================================
   REPRODUCTOR FIJO
   ========================================================= */

.pb-player {
  padding-bottom: 110px !important;
}

.footer-player {
  position: fixed;
  z-index: 1000;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 37, 69, .97);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}

.player-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, 260px) auto;
  gap: 14px;
  align-items: center;
}

.player-station {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #374151;
  font-size: 1.3rem;
}

.player-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-text {
  min-width: 0;
}

.player-name,
.player-track {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-name {
  font-weight: 800;
  color: #fff;
}

.player-track {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
}

.play-button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 18px rgba(255,122,0,.35);
}

.play-button:hover:not(:disabled) {
  background: #e66d00;
}

.play-button:disabled {
  opacity: .55;
}

.volume-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-area input {
  width: 100%;
  accent-color: var(--color-secondary);
}

.player-status {
  font-size: .68rem;
  font-weight: 800;
  color: var(--color-secondary);
  min-width: 78px;
  text-align: right;
}

@media (max-width: 700px) {
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .volume-area {
    grid-column: 1 / -1;
  }

  .player-status {
    display: none;
  }

  .play-button {
    width: 54px;
    height: 54px;
  }
}

/* =========================================================
   ESTADOS Y ENLACES
   ========================================================= */

.live,
.live-indicator,
.status-live {
  color: var(--color-secondary);
}

a {
  color: var(--color-secondary);
}

a:hover {
  color: var(--color-primary);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* =========================================================
   ADMINISTRACIÓN
   ========================================================= */

.admin-bg {
  background: #f4f6f9;
  min-height: 100vh;
}

.admin-login-bg {
  background: linear-gradient(145deg, #111827, #334155);
  min-height: 100vh;
}

.admin-card {
  border-radius: 12px;
}

.btn-orange {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
}

.btn-orange:hover,
.btn-orange:focus {
  background: #e96d00;
  border-color: #e96d00;
  color: #fff;
}

.admin-thumb,
.form-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 9px;
  background: #e5e7eb;
}

.form-logo {
  width: 90px;
  height: 90px;
}

.admin-header,
.admin-navbar {
  background: var(--color-primary);
}

.admin a {
  color: var(--color-secondary);
}

.admin .btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.admin .btn-success {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.admin .btn-warning {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.admin .card,
.admin-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,.05);
}

/* =========================================================
   COMPATIBILIDAD CON CONTENIDO ANTIGUO
   ========================================================= */

main.container {
  padding-top: 14px !important;
}

main.container > .d-flex {
  margin-bottom: 14px !important;
}

main.container > .d-flex h2 {
  font-size: 1.15rem;
}

main.container > .d-flex p {
  display: none;
}

@media (max-width: 575.98px) {
  main.container {
    padding-top: 10px !important;
  }

  main.container > .d-flex h2 {
    font-size: 1.05rem;
  }
}
.directory-intro {
  text-align: center;
}

.directory-intro h2 {
  text-align: left;
  max-width: 100%;
  padding-left: 0;
}

/* =========================================================
   TARJETAS - AJUSTE VISUAL DEL DIRECTORIO
   ========================================================= */

.radio-card {
  padding: 6px;
  border: 1px solid rgba(11, 37, 69, .06);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(17, 24, 39, .06);
}

.radio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, .10);
}

.radio-logo-wrap {
  aspect-ratio: 1 / .78;
  border-radius: 9px;
  overflow: hidden;
  background: #f1f3f6;
}

.radio-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.radio-card-info {
  padding: 7px 2px 3px;
}

.radio-card-info strong {
  display: block;
  text-align: center;
  font-size: .9rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0B2545;
}

@media (max-width: 767.98px) {
  .radio-card {
    padding: 5px;
  }

  .radio-card-info {
    padding-top: 6px;
  }

  .radio-card-info strong {
    font-size: .78rem;
  }
}

/* =========================================================
   LOGO - PAGINA INDIVIDUAL DE RADIO
   ========================================================= */

.radio-detail-logo {
  width: 240px;
  height: 240px;
}

@media (max-width: 575.98px) {
  .radio-detail-logo {
    width: 180px;
    height: 180px;
  }
}

/* =========================================================
   PAGINA INDIVIDUAL - CONTENIDO
   ========================================================= */

.radio-detail-card {
  padding-bottom: 20px;
}

.radio-description,
.radio-social-section {
  margin-top: 28px;
}

/* =========================================================
   ME GUSTA
   ========================================================= */

.radio-like-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.radio-like-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  color: #0B2545;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
}

.radio-like-button:hover {
  border-color: #FF7A00;
  color: #FF7A00;
}

.radio-like-button.liked {
  background: #FF7A00;
  border-color: #FF7A00;
  color: #fff;
}

.radio-like-button:disabled {
  cursor: default;
}

.radio-like-icon {
  font-size: 1.1rem;
}

.radio-like-count {
  min-width: 30px;
  font-weight: 700;
  color: #64748b;
}

/* =========================================================
   REDES SOCIALES - PAGINA DE RADIO
   ========================================================= */


.radio-social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.radio-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
  transition: transform .18s ease, opacity .18s ease;
}

.radio-social-btn:hover {
  transform: translateY(-1px);
  opacity: .9;
  color: #fff;
}

.radio-social-btn svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  max-width: 20px;
  min-height: 20px;
  max-height: 20px;
  flex: 0 0 20px;
  display: block;
  fill: currentColor;
  stroke: currentColor;
}

.radio-social-btn.instagram svg,
.radio-social-btn.web svg {
  fill: none;
  stroke-width: 1.8;
}

.radio-social-btn.whatsapp {
  background: #25D366;
  color: #fff;
}

.radio-social-btn.instagram {
  background: #E4405F;
  color: #fff;
}

.radio-social-btn.facebook {
  background: #1877F2;
  color: #fff;
}

.radio-social-btn.tiktok {
  background: #111;
  color: #fff;
}

.radio-social-btn.web {
  background: #0B2545;
  color: #fff;
}

@media (max-width: 575.98px) {
  .radio-social-buttons {
    gap: 7px;
  }

  .radio-social-btn {
    min-height: 38px;
    padding: 7px 10px;
    font-size: .82rem;
  }

  .radio-social-btn svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    max-width: 18px;
    min-height: 18px;
    max-height: 18px;
    flex-basis: 18px;
  }
}



/* ===== AJUSTE MOBILE GENERAL ===== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.site-header,
.site-header-inner {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.site-logo {
  display: block;
  width: min(100%, 520px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.radio-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.radio-card {
  min-width: 0;
  max-width: 100%;
}

.radio-logo-wrap,
.radio-logo {
  max-width: 100%;
}

@media (max-width: 575.98px) {

  .site-header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-logo {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  main.container {
    width: 100%;
    max-width: 100%;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .directory-intro {
    width: 100%;
    max-width: 100%;
  }

  .directory-intro h1 {
    font-size: 2rem;
    line-height: 1.15;
    overflow-wrap: break-word;
  }

  .directory-intro h2 {
    font-size: 1.7rem;
    overflow-wrap: break-word;
  }

  .radio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .radio-card {
    width: 100%;
  }

  .radio-logo-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .radio-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .radio-card-info {
    overflow-wrap: break-word;
  }
}


/* Logo del encabezado de la página individual */
.radio-header-logo {
  display: block;
  width: 155px;
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .radio-header-logo {
    width: 135px;
    height: 38px;
  }
}


/* Ajuste final del logo del encabezado */
.radio-header-logo {
  width: 175px;
  height: 48px;
}

@media (max-width: 575.98px) {
  .radio-header-logo {
    width: 175px;
    height: 48px;
  }
}


/* Tamaño definitivo del logo del encabezado */
.radio-header-logo {
  width: 240px;
  height: 65px;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  .radio-header-logo {
    width: 200px;
    height: 55px;
  }
}

@media (max-width: 575.98px) {
  .radio-header-logo {
    width: 175px;
    height: 48px;
  }
}


/* =========================
   PUBLICIDAD - HOME
   ========================= */

.home-ad-section {
  width: 100%;
  margin: 32px auto 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.home-ad {
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  border-radius: 12px;
}

.home-ad a {
  display: block;
}

.home-ad img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
}

@media (max-width: 575.98px) {

  .home-ad-section {
    margin-top: 24px;
  }

  .home-ad {
    max-width: 100%;
    border-radius: 10px;
  }

  .home-ad img {
    max-height: 180px;
    border-radius: 10px;
  }

}


/* =========================
   PIE DE PAGINA
   ========================= */

.site-footer {
  margin-top: 48px;
  padding: 22px 15px;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .site-footer {
    margin-top: 36px;
    padding: 20px 12px;
    font-size: 0.82rem;
  }
}


/* =========================
   PUBLICIDAD - PERFIL RADIO
   ========================= */

.radio-ad-slot {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 900 / 250;
  margin: 28px auto;
  overflow: hidden;
  border-radius: 12px;
}

.radio-ad-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
}

.radio-ad-item {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.radio-ad-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.radio-ad-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 575.98px) {

  .radio-ad-slot {
    max-width: 100%;
    margin: 24px auto;
    border-radius: 10px;
  }

  .radio-ad-item img {
    border-radius: 10px;
  }

}
