/* ═══════════════════════════════════════════════════
   PÁDEL ENCYCLOPEDIA — Main Component Styles
   Mirrors padel_enciclopedia_1.html design system
═══════════════════════════════════════════════════ */

/* ── NAV ─────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,14,20,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; color: var(--accent);
  padding: 1rem 1.5rem 1rem 0;
  border-right: 1px solid var(--border);
  margin-right: 0.5rem; white-space: nowrap;
  letter-spacing: 2px; text-decoration: none;
}
.site-nav .nav-item {
  color: var(--muted); text-decoration: none;
  font-size: 0.75rem; letter-spacing: 2px;
  text-transform: uppercase;
  padding: 1.2rem 1rem; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav .nav-item:hover,
.site-nav .nav-item.current { color: var(--accent); border-bottom-color: var(--accent); }

/* ── PAGE HEADER ─────────────────────────────── */
.page-header {
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 4rem 2rem 3.5rem; position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px; opacity: 0.2; pointer-events: none;
}
.page-header::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 20% 50%, rgba(0,61,42,0.4) 0%, transparent 70%);
  pointer-events: none;
}
.ph-inner { max-width: var(--max-w); margin: 0 auto; position: relative; z-index: 1; }

.ph-breadcrumb {
  font-size: 0.62rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem; opacity: 0.8;
}
.ph-breadcrumb a { color: inherit; text-decoration: none; }
.ph-breadcrumb a:hover { opacity: 1; }
.ph-breadcrumb span { opacity: 0.4; }

.ph-num {
  font-family: var(--font-display);
  font-size: 0.75rem; letter-spacing: 5px;
  color: var(--border); margin-bottom: 0.3rem; display: block;
}
.ph-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9; letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 70%, #fff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 1rem;
}
.ph-desc {
  color: var(--muted); font-size: 0.95rem;
  letter-spacing: 0.5px; max-width: 600px; line-height: 1.7;
}
.ph-stats { display: flex; gap: 3rem; margin-top: 2rem; flex-wrap: wrap; }
.ph-stat-n {
  font-family: var(--font-display);
  font-size: 2.2rem; color: var(--accent); line-height: 1;
}
.ph-stat-l {
  font-size: 0.62rem; letter-spacing: 2px;
  color: var(--muted); text-transform: uppercase;
}

/* ── CONTENT WRAPPER ─────────────────────────── */
.content-wrap { max-width: var(--max-w); margin: 0 auto; padding: 4rem 2rem 6rem; }

/* ── SECTION HEAD ────────────────────────────── */
.section-head {
  display: flex; align-items: flex-end; gap: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem; margin-bottom: 3rem;
}
.section-num { font-family: var(--font-display); font-size: 5rem; color: var(--border); line-height: 1; flex-shrink: 0; }
.section-title { font-family: var(--font-display); font-size: clamp(2.5rem,5vw,4rem); line-height: 1; letter-spacing: 1px; }
.section-desc { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

/* ── SEARCH ──────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 2.5rem; max-width: 500px; }
.search-wrap input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--text); outline: none; transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap input::placeholder { color: var(--muted); }
.search-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ── TACTIC CARDS ────────────────────────────── */
.tactics-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5px; background: var(--border); border: 1px solid var(--border);
}
.tactic-card {
  background: var(--card); padding: 2rem;
  position: relative; overflow: hidden; transition: background 0.2s;
}
.tactic-card:hover { background: var(--surface2); }
.tactic-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 0; transition: height 0.3s ease;
}
.tactic-card:hover::before { height: 100%; }
.tactic-card[data-color="green"]::before  { background: var(--accent); }
.tactic-card[data-color="orange"]::before { background: var(--accent2); }
.tactic-card[data-color="blue"]::before   { background: var(--accent3); }

.tactic-tag {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 2px; margin-bottom: 1rem; display: inline-block;
}
.tag-ofensiva  { background: rgba(0,229,160,0.12); color: var(--accent); }
.tag-defensiva { background: rgba(61,158,255,0.12); color: var(--accent3); }
.tag-posicion  { background: rgba(255,107,53,0.12); color: var(--accent2); }

.tactic-title  { font-family: var(--font-display); font-size: 1.75rem; letter-spacing: 1px; margin-bottom: 0.75rem; line-height: 1.1; }
.tactic-body   { color: var(--muted); font-size: 0.88rem; line-height: 1.7; }

.tactic-tips { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.tips-label  { font-size: 0.6rem; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.tactic-tips ul  { list-style: none; }
.tactic-tips li  { font-size: 0.83rem; color: var(--text); padding: 0.25rem 0 0.25rem 1.2rem; position: relative; }
.tactic-tips li::before { content: '→'; position: absolute; left: 0; font-size: 0.72rem; }
.tactic-card[data-color="green"]  .tactic-tips li::before { color: var(--accent); }
.tactic-card[data-color="orange"] .tactic-tips li::before { color: var(--accent2); }
.tactic-card[data-color="blue"]   .tactic-tips li::before { color: var(--accent3); }

.diff-dots { display: flex; gap: 3px; margin-top: 1rem; }
.diff-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.diff-dot.on-green  { background: var(--accent); }
.diff-dot.on-orange { background: var(--accent2); }
.diff-dot.on-blue   { background: var(--accent3); }

/* ── SHOT ROWS (archive) ─────────────────────── */
.shots-container { display: flex; flex-direction: column; gap: 2px; background: var(--border); }
.shot-row {
  background: var(--card);
  display: grid; grid-template-columns: 280px 1fr 300px;
  overflow: hidden; transition: background 0.2s;
}
.shot-row:hover { background: var(--surface2); }

.shot-info { padding: 2rem; border-right: 1px solid var(--border); }
.shot-name { font-family: var(--font-display); font-size: 2rem; letter-spacing: 1px; margin-bottom: 0.4rem; }
.shot-name a { color: inherit; text-decoration: none; transition: color 0.2s; }
.shot-name a:hover { color: var(--accent); }
.shot-aka  { font-size: 0.7rem; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: 0.8rem; }
.shot-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.shot-tag  { font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase; padding: 0.2rem 0.5rem; border: 1px solid var(--border); color: var(--muted); }

.shot-desc { padding: 2rem; border-right: 1px solid var(--border); font-size: 0.88rem; line-height: 1.75; color: var(--muted); }
.shot-desc strong { color: var(--text); font-weight: 600; }

.shot-video { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.75rem; background: rgba(0,0,0,0.2); }
.video-thumb { width: 100%; aspect-ratio: 16/9; background: var(--bg); overflow: hidden; position: relative; cursor: pointer; border: 1px solid var(--border); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.video-thumb:hover img { opacity: 0.7; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.play-icon { width: 44px; height: 44px; background: rgba(255,255,255,0.08); backdrop-filter: blur(6px); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.15); transition: transform 0.2s, background 0.2s; }
.video-thumb:hover .play-icon { transform: scale(1.1); background: var(--accent); }
.play-icon svg { width: 15px; height: 15px; fill: white; margin-left: 2px; }
.video-label { font-size: 0.68rem; letter-spacing: 1px; color: var(--muted); text-align: center; }

/* ── GLOSSARY GRID ───────────────────────────── */
.glossary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.gloss-item { background: var(--card); padding: 1.5rem; transition: background 0.15s; }
.gloss-item:hover { background: var(--surface2); }
.gloss-term { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 1px; color: var(--accent); margin-bottom: 0.35rem; }
.gloss-def  { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }

/* ── FILTER TABS ─────────────────────────────── */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase;
  padding: 0.5rem 1.1rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active-green  { background: rgba(0,229,160,0.12); color: var(--accent);  border-color: var(--accent); }
.filter-btn.active-orange { background: rgba(255,107,53,0.12); color: var(--accent2); border-color: var(--accent2); }
.filter-btn.active-blue   { background: rgba(61,158,255,0.12); color: var(--accent3); border-color: var(--accent3); }
.filter-btn.active-all    { background: var(--surface2); color: var(--text); border-color: var(--muted); }

/* ── VIDEO MODAL ─────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center; padding: 2rem;
}
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--border); max-width: 860px; width: 100%; position: relative; }
.modal-video { width: 100%; aspect-ratio: 16/9; }
.modal-video iframe { width: 100%; height: 100%; border: none; }
.modal-close { position: absolute; top: -2.25rem; right: 0; background: none; border: none; color: var(--muted); font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; font-family: var(--font-body); transition: color 0.2s; }
.modal-close:hover { color: var(--accent); }

/* ── FOOTER ──────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; max-width: var(--max-w); margin: 0 auto; color: var(--muted); font-size: 0.8rem; letter-spacing: 1px; }
.site-footer em { color: var(--accent); font-style: normal; }
.footer-nav { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.68rem; letter-spacing: 3px; text-transform: uppercase; transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim   { opacity: 0; animation: fadeUp 0.65s ease forwards; }
.anim-1 { animation-delay: 0.1s; }
.anim-2 { animation-delay: 0.25s; }
.anim-3 { animation-delay: 0.4s; }
.anim-4 { animation-delay: 0.55s; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .shot-row { grid-template-columns: 1fr; }
  .shot-info, .shot-desc { border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .content-wrap { padding: 3rem 1rem 4rem; }
  .page-header  { padding: 3rem 1rem 2.5rem; }
  .site-nav     { padding: 0 1rem; }
  .ph-stats     { gap: 1.5rem; }
  .tactics-grid { grid-template-columns: 1fr; }
}
