/*
Theme Name: Urdimbre
Theme URI: https://urdimbre.com
Author: Urdimbre
Author URI: https://urdimbre.com
Description: Tema oficial de Urdimbre — revista digital de cultura, diseño, gastronomía e industrias creativas de México.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: urdimbre
Tags: blog, magazine, custom-colors, custom-menu, featured-images, post-formats, rtl-language-support, sticky-post, threaded-comments, two-columns
*/

/* ─── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── VARIABLES ──────────────────────────────────── */
:root {
  --black: #111111;
  --white: #ffffff;
  --yellow: #FFE600;
  --cyan: #00CFFF;
  --pink: #FF2D78;
  --blue: #1A1AFF;
  --green: #00FF7F;
  --orange: #FF6B00;
  --light-gray: #f5f5f5;
  --gray: #888;
  --dark-gray: #333;
  --font-main: 'Inter', sans-serif;
  --font-display: 'Anton', sans-serif;
}

body { font-family: var(--font-main); background: var(--white); color: var(--black); font-size: 13px; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ─── TOP BAR ─────────────────────────────────────── */
.top-bar {
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 24px;
  font-size: 11px;
}
.top-bar .site-logo {
  display: flex;
  align-items: center;
}

/* Fallback texto cuando no hay logo */
.top-bar .site-logo a {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.2s;
}
.top-bar .site-logo a:hover { opacity: 0.8; }

/* Logo imagen */
.top-bar .site-logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}
.top-bar .site-logo .custom-logo {
  max-height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  /* Aplica filtro blanco si el logo es oscuro sobre fondo negro */
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}
.top-bar .site-logo .custom-logo:hover { opacity: 0.85; }

/* Si prefieres el logo en su color original, comenta las 2 líneas de filter */
.top-bar .site-logo.logo-color .custom-logo {
  filter: none;
}
.top-bar-right { display: flex; align-items: center; gap: 10px; }

.search-form { display: flex; align-items: center; }
.search-form input[type="search"] {
  border: none; outline: none;
  padding: 4px 8px; font-size: 11px;
  width: 130px; font-family: var(--font-main);
}
.search-form button {
  background: var(--yellow); color: var(--black);
  border: none; padding: 4px 10px;
  font-size: 10px; font-weight: 700;
  cursor: pointer; font-family: var(--font-main);
}
.search-form button:hover { background: var(--pink); color: var(--white); }

.social-icons { display: flex; gap: 5px; }
.social-icons a {
  width: 22px; height: 22px; border-radius: 50%;
  background: #333; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  transition: background 0.2s;
}
.social-icons a:hover { background: var(--pink); }

/* ─── MAIN NAV ────────────────────────────────────── */
.main-nav {
  background: var(--white);
  border-bottom: 2px solid #e0e0e0;
  padding: 0 24px;
}
.main-nav ul { list-style: none; display: flex; gap: 0; flex-wrap: wrap; }
.main-nav ul li a {
  display: block; padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--black); transition: color 0.2s, background 0.2s;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a { color: var(--pink); border-bottom: 3px solid var(--pink); }

/* ─── SUB BAR ─────────────────────────────────────── */
.sub-bar {
  background: var(--black); color: var(--white);
  text-align: center; padding: 9px 24px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
}
.sub-bar span { color: var(--yellow); }

/* ─── URDIMBRE BANNER ───────────────────────────── */
.urd-banner {
  background: var(--black);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.urd-banner-text {
  font-family: var(--font-display);
  font-size: 40px; letter-spacing: 5px;
  color: var(--white); text-transform: uppercase;
  position: relative; z-index: 2;
}
.urd-banner-text .c1 { color: var(--yellow); }
.urd-banner-text .c2 { color: var(--cyan); }
.urd-banner-text .c3 { color: var(--pink); }
.urd-banner-text .c4 { color: var(--green); }
.color-bar {
  height: 5px;
  background: linear-gradient(90deg, #FF2D78 0%, #FF6B00 17%, #FFE600 34%, #00FF7F 51%, #00CFFF 68%, #1A1AFF 85%, #9B59B6 100%);
}

/* ─── HERO SLIDER ─────────────────────────────────── */
.hero-slider {
  position: relative;
  background: var(--black);
  overflow: hidden;
  height: 440px;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.7s ease;
  display: flex; align-items: flex-end; padding: 28px;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.65;
}
.hero-slide .slide-caption {
  position: relative; z-index: 2;
  color: var(--white);
  background: rgba(0,0,0,0.55);
  padding: 10px 16px;
  font-size: 15px; font-weight: 700;
  max-width: 480px; line-height: 1.4;
  border-left: 4px solid var(--yellow);
}
.hero-slide .slide-category {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--yellow); margin-bottom: 4px;
}
.hero-dots {
  position: absolute; bottom: 16px; right: 24px; z-index: 5;
  display: flex; gap: 7px;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.35);
  cursor: pointer; padding: 0; transition: background 0.2s;
}
.hero-dots button.active { background: var(--yellow); }

/* ─── SECTION WRAPPER ─────────────────────────────── */
.site-section { padding: 32px 24px; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--black); padding-bottom: 8px;
}
.section-title { font-size: 22px; font-weight: 900; }
.section-more {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--gray);
  transition: color 0.2s;
}
.section-more:hover { color: var(--pink); }

/* ─── CARD GRID ───────────────────────────────────── */
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.post-card { position: relative; }
.post-card .card-thumb {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
  background: #ddd;
  transition: opacity 0.2s;
}
.post-card:hover .card-thumb { opacity: 0.88; }
.post-card .card-category {
  position: absolute; top: 10px; left: 10px;
  background: var(--black); color: var(--white);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 7px;
}
.post-card .card-category.cat-pink { background: var(--pink); }
.post-card .card-category.cat-yellow { background: var(--yellow); color: var(--black); }
.post-card .card-category.cat-cyan { background: var(--cyan); color: var(--black); }

.post-card .card-body { padding: 8px 0; }
.post-card .card-title {
  font-size: 12px; font-weight: 700;
  line-height: 1.4; color: var(--black);
  transition: color 0.2s;
}
.post-card:hover .card-title { color: var(--pink); }
.post-card .card-meta {
  font-size: 10px; color: var(--gray);
  margin-top: 4px;
}

/* ─── AD BANNER ───────────────────────────────────── */
.ad-banner {
  background: linear-gradient(90deg, #f0e8f5, #e8d8f0);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;
}
.ad-banner .ad-label { font-weight: 900; font-size: 18px; font-style: italic; color: #7a3a9a; }
.ad-banner .ad-tag { font-size: 9px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }

/* ─── MOST VIEWED ─────────────────────────────────── */
.most-viewed-wrap { background: #f8f8f8; padding: 32px 24px; }
.mv-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; align-items: start; }
.mv-list { list-style: none; }
.mv-list li {
  padding: 10px 0; border-bottom: 1px solid #e0e0e0;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  counter-increment: mv-counter;
  display: flex; gap: 10px; align-items: flex-start;
}
.mv-list li::before {
  content: counter(mv-counter);
  font-family: var(--font-display); font-size: 20px;
  color: var(--yellow); flex-shrink: 0; line-height: 1;
}
.mv-list { counter-reset: mv-counter; }
.mv-list li a:hover { color: var(--pink); }

/* ─── STRIPS ──────────────────────────────────────── */
.dots-strip-black {
  background: var(--black); padding: 10px 24px;
  display: flex; gap: 5px; flex-wrap: wrap;
}
.dots-strip-black span { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.dots-strip-blue {
  background: var(--blue); padding: 10px 24px;
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: center;
}
.dots-strip-blue span { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); display: inline-block; }

/* ─── INSTAGRAM SECTION ───────────────────────────── */
.ig-section { padding: 32px 24px; background: #fafafa; }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ig-thumb { aspect-ratio: 1/1; width: 100%; object-fit: cover; display: block; transition: opacity 0.2s; }
.ig-thumb:hover { opacity: 0.8; }
.ig-btn-wrap { text-align: center; margin-top: 18px; }
.ig-btn {
  background: var(--black); color: var(--white);
  border: none; padding: 12px 32px;
  font-size: 11px; font-weight: 700;
  cursor: pointer; letter-spacing: 1.5px;
  text-transform: uppercase; font-family: var(--font-main);
  transition: background 0.2s;
}
.ig-btn:hover { background: var(--pink); }

/* ─── SIDEBAR ─────────────────────────────────────── */
.content-sidebar-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 32px 24px; }
.widget { margin-bottom: 28px; }
.widget-title {
  font-size: 14px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 3px solid var(--black);
}

/* ─── SINGLE POST ─────────────────────────────────── */
.single-post { max-width: 780px; }
.single-post .post-header { margin-bottom: 24px; }
.single-post .post-category {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--pink); margin-bottom: 8px;
}
.single-post .post-title { font-size: 28px; font-weight: 900; line-height: 1.2; margin-bottom: 10px; }
.single-post .post-meta { font-size: 11px; color: var(--gray); }
.single-post .post-thumbnail { width: 100%; margin-bottom: 24px; }
.single-post .post-content { font-size: 15px; line-height: 1.75; }
.single-post .post-content p { margin-bottom: 18px; }
.single-post .post-content h2 { font-size: 20px; font-weight: 900; margin: 28px 0 12px; }
.single-post .post-content h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }

/* ─── FOOTER ──────────────────────────────────────── */
.site-footer {
  background: var(--black); color: var(--white);
  padding: 28px 24px 20px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.footer-logo { font-family: var(--font-display); font-size: 22px; }
.footer-logo span { color: var(--yellow); }
.footer-logo .tagline { font-size: 9px; letter-spacing: 3px; color: var(--gray); text-transform: uppercase; margin-top: 4px; }
.footer-col h4 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); margin-bottom: 10px; }
.footer-col p, .footer-col a { font-size: 11px; color: #aaa; line-height: 2; display: block; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid #333; padding-top: 14px; font-size: 10px; color: var(--gray); text-align: center; }
.footer-rainbow { display: flex; height: 6px; }
.footer-rainbow span { flex: 1; }

/* ─── CUSTOM POST TYPE: COOL GUIDE ───────────────── */
.guia-header {
  background: var(--black); padding: 24px;
  display: flex; align-items: center; gap: 16px;
}
.guia-badge {
  background: var(--yellow); color: var(--black);
  font-family: var(--font-display); font-size: 28px;
  padding: 8px 16px; line-height: 1;
}
.guia-title { font-family: var(--font-display); font-size: 32px; color: var(--white); }

/* ─── PILLS ───────────────────────────────────────── */
.tag-pill {
  display: inline-block; border-radius: 20px;
  padding: 3px 10px; font-size: 10px; font-weight: 700;
  margin: 2px; text-transform: uppercase;
}
.tag-pill-outline { border: 1px solid #555; color: #aaa; }
.tag-pill-pink { background: var(--pink); color: var(--white); }
.tag-pill-yellow { background: var(--yellow); color: var(--black); }
.tag-pill-cyan { background: var(--cyan); color: var(--black); }

/* ─── AGENDA POST TYPE ─────────────────────────────── */
.agenda-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid #eee; align-items: flex-start;
}
.agenda-date {
  background: var(--black); color: var(--white);
  min-width: 48px; text-align: center; padding: 6px 8px;
  flex-shrink: 0;
}
.agenda-date .day { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.agenda-date .month { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--yellow); }
.agenda-info .agenda-title { font-size: 13px; font-weight: 700; }
.agenda-info .agenda-meta { font-size: 11px; color: var(--gray); margin-top: 3px; }

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .card-grid-3 { grid-template-columns: 1fr 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mv-grid { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .urd-banner-text { font-size: 26px; }
  .hero-slider { height: 280px; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav ul { overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  .card-grid-3 { grid-template-columns: 1fr; }
  .top-bar { flex-direction: column; gap: 8px; }
}
