/*
Theme Name: Urbanas Gallery
Theme URI: https://domvoxy.com/
Author: Domvoxy
Description: Tema oscuro tipo galeria para entradas con imagen destacada, boton de video, enlaces de Facebook y compartir interactivo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: urbanas-gallery
*/

:root {
  --ug-bg: #090909;
  --ug-bg-soft: #121212;
  --ug-panel: #181818;
  --ug-panel-2: #202020;
  --ug-line: rgba(255, 255, 255, 0.1);
  --ug-text: #f4f4f4;
  --ug-muted: #a9a9a9;
  --ug-red: #d71920;
  --ug-red-2: #ff3a3f;
  --ug-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ug-text);
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.14), transparent 28%),
    linear-gradient(180deg, #050505 0%, var(--ug-bg) 42%, #0f0f0f 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.ug-shell {
  width: min(calc(100% - 32px), 1420px);
  margin: 0 auto;
}

.ug-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ug-line);
  background: rgba(9, 9, 9, 0.86);
  backdrop-filter: blur(14px);
}

.ug-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 18px;
}

.ug-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ug-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ug-red);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(215, 25, 32, 0.13);
}

.ug-brand-copy {
  display: grid;
  gap: 2px;
}

.ug-brand-copy small {
  color: var(--ug-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: none;
}

.ug-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ug-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ug-muted);
  font-weight: 700;
}

.ug-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ug-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ug-text);
  cursor: pointer;
}

.ug-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.ug-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.ug-hero {
  display: grid;
  align-items: end;
  min-height: 430px;
  margin: 24px 0 34px;
  overflow: hidden;
  border: 1px solid var(--ug-line);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42)),
    var(--ug-hero-image, linear-gradient(135deg, #1b1b1b, #080808));
  background-size: cover;
  background-position: center;
  box-shadow: var(--ug-shadow);
}

.ug-hero-content {
  max-width: 760px;
  padding: clamp(28px, 5vw, 58px);
}

.ug-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--ug-red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ug-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.ug-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(244, 244, 244, 0.82);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.55;
}

.ug-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ug-section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.ug-section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--ug-muted);
}

.ug-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.ug-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ug-line);
  border-radius: 8px;
  background: var(--ug-panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ug-card:hover {
  transform: translateY(-4px);
  border-color: rgba(215, 25, 32, 0.56);
}

.ug-card-image {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #111;
}

.ug-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.ug-card:hover .ug-card-image img {
  transform: scale(1.045);
}

.ug-card-body {
  padding: 12px;
}

.ug-card h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.ug-card-meta {
  display: block;
  margin-top: 7px;
  color: var(--ug-muted);
  font-size: 0.78rem;
}

.ug-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 46px;
}

.ug-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--ug-line);
  border-radius: 8px;
  background: var(--ug-panel);
  color: var(--ug-text);
  font-weight: 800;
}

.ug-pagination .current {
  border-color: var(--ug-red);
  background: var(--ug-red);
}

.ug-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  margin: 28px 0 46px;
}

.ug-single-main,
.ug-single-side {
  border: 1px solid var(--ug-line);
  border-radius: 10px;
  background: rgba(24, 24, 24, 0.84);
  box-shadow: var(--ug-shadow);
}

.ug-single-main {
  overflow: hidden;
}

.ug-single-image {
  display: block;
  width: 100%;
  background: #111;
}

.ug-single-image img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #050505;
}

.ug-single-content {
  padding: clamp(18px, 3vw, 28px);
}

.ug-single h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.05;
}

.ug-entry-content {
  color: #d8d8d8;
  line-height: 1.7;
}

.ug-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.ug-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ug-red);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ug-button:hover {
  background: var(--ug-red-2);
}

.ug-button-secondary {
  border-color: var(--ug-line);
  background: rgba(255, 255, 255, 0.08);
}

.ug-button-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ug-single-side {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 18px;
}

.ug-single-side h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.ug-related {
  display: grid;
  gap: 12px;
}

.ug-related a {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--ug-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ug-related img {
  width: 78px;
  height: 78px;
  border-radius: 6px;
  object-fit: cover;
}

.ug-related span {
  font-weight: 800;
  line-height: 1.25;
}

.ug-facebook-rail {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 80;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.ug-facebook-rail a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
}

.ug-facebook-rail a:hover {
  transform: translateX(-3px);
}

.ug-share-panel {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 120;
  display: none;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ug-line);
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.96);
  box-shadow: var(--ug-shadow);
  transform: translateX(-50%);
}

.ug-share-panel.is-open {
  display: grid;
}

.ug-share-panel a,
.ug-share-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ug-panel-2);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.ug-notice {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 130;
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ug-red);
  color: #fff;
  font-weight: 900;
  transform: translateX(-50%);
}

.ug-notice.is-visible {
  display: block;
}

.ug-footer {
  padding: 34px 0;
  border-top: 1px solid var(--ug-line);
  color: var(--ug-muted);
  text-align: center;
}

.ug-empty {
  padding: 38px;
  border: 1px solid var(--ug-line);
  border-radius: 10px;
  background: var(--ug-panel);
  text-align: center;
}

@media (max-width: 1180px) {
  .ug-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ug-single {
    grid-template-columns: 1fr;
  }

  .ug-single-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .ug-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ug-section-head,
  .ug-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .ug-hero {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 72px;
  }

  .ug-shell {
    width: min(calc(100% - 20px), 1420px);
  }

  .ug-header-inner {
    position: relative;
    min-height: 68px;
    padding: 12px 0;
  }

  .ug-brand {
    max-width: calc(100% - 58px);
  }

  .ug-brand-copy {
    min-width: 0;
  }

  .ug-brand-copy strong,
  .ug-brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ug-menu-toggle {
    display: block;
    position: absolute;
    top: 12px;
    right: 0;
  }

  .ug-nav {
    display: none;
    width: 100%;
    padding-top: 8px;
  }

  .ug-nav.is-open {
    display: grid;
    gap: 8px;
  }

  .ug-nav a {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
  }

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

  .ug-card-body {
    padding: 10px;
  }

  .ug-card h2 {
    font-size: 0.9rem;
  }

  .ug-hero {
    min-height: 320px;
    border-radius: 8px;
    margin: 14px 0 24px;
    background-position: center top;
  }

  .ug-hero-content {
    padding: 24px;
  }

  .ug-section-head {
    gap: 10px;
    margin-bottom: 14px;
  }

  .ug-section-head p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .ug-single {
    gap: 14px;
    margin: 16px 0 30px;
  }

  .ug-single-main,
  .ug-single-side {
    border-radius: 8px;
  }

  .ug-single-image img {
    max-height: none;
    min-height: 260px;
    object-fit: contain;
  }

  .ug-single-content {
    padding: 16px;
  }

  .ug-single-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ug-button {
    width: 100%;
  }

  .ug-related a {
    grid-template-columns: 64px 1fr;
  }

  .ug-related img {
    width: 64px;
    height: 64px;
  }

  .ug-facebook-rail {
    top: auto;
    right: 10px;
    bottom: 10px;
    grid-template-columns: repeat(3, 44px);
    transform: none;
  }

  .ug-facebook-rail a {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .ug-share-panel {
    width: calc(100% - 20px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: 66px;
  }

  .ug-notice {
    bottom: 138px;
    width: max-content;
    max-width: calc(100% - 32px);
    text-align: center;
  }
}

@media (max-width: 390px) {
  .ug-grid {
    grid-template-columns: 1fr;
  }

  .ug-card-image {
    aspect-ratio: 1 / 1;
  }

  .ug-hero h1 {
    font-size: 2.05rem;
  }
}
