/*
Theme Name: padel.pt
Theme URI: https://padelpt.pt
Author: padel.pt
Description: Tema WordPress próprio para o padel.pt — notícias, clubes e conteúdo sobre padel em Portugal.
Version: 1.0
Text Domain: padelpt
*/

:root {
  --green-light: #00e870;
  --green-dark: #029a52;
  --green-on-light: #027a45;
  --green-on-light-hover: #015c35;
  --green-gradient: linear-gradient(90deg, var(--green-light), var(--green-dark));

  --bg: #ffffff;
  --surface: #f4f6f5;
  --surface-2: #eef1ef;

  --text-primary: #14181a;
  --text-secondary: #565f5b;
  --text-muted: #7c847f;
  --border: #e3e7e5;

  /* Header/menu principal — mantém-se escuro */
  --header-text: #eef2f0;
  --header-text-secondary: #a7b3ae;
  --header-text-muted: #79857f;

  --radius: 10px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

footer.site-footer {
  background: #ffffff;
}

.footer-inner,
.footer-inner span,
.footer-social a {
  color: #04331b;
}

.footer-social a:hover {
  color: var(--green-on-light);
}

header.site-header { flex-shrink: 0; }

main.wrap { flex: 1 0 auto; }

footer.site-footer { flex-shrink: 0; }

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

img { max-width: 100%; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — transparent/glass look (mantém-se escuro) */
header.site-header {
  position: relative;
  background: rgba(20, 25, 23, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

header.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-light) 15%, var(--green-light) 85%, transparent);
  opacity: 0.5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 24px;
}

.logo img {
  height: 34px;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--header-text-secondary);
  transition: color .15s ease;
}

nav a:hover, nav a:focus-visible {
  color: var(--green-dark);
}

/* WordPress marks the current page/category with this class automatically */
nav li.current-menu-item > a,
nav li.current-menu-parent > a,
nav li.current-category-ancestor > a {
  color: var(--green-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--header-text);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* Main layout */
main.wrap {
  padding-top: 40px;
  padding-bottom: 60px;
}

/* Some page templates (clubes) want a bit more top padding */
.page-template-page-clubes main.wrap {
  padding-top: 48px;
}

.page-head { margin-bottom: 24px; }

.page-head h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

.page-head p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Two-column layout: content + sidebar ad (home + noticias) */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 32px;
  align-items: start;
}

/* Hero */
.hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 28px;
  max-width: 560px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--green-gradient);
  color: #04331b;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 16px;
  color: #ffffff;
}

.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--green-gradient);
  color: #04331b;
  border: none;
  cursor: pointer;
}

/* Section heading */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 36px 0 16px;
}

.section-head h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.section-head a {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-on-light);
}

/* News list (homepage) */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child { border-bottom: none; }

.news-thumb {
  width: 96px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface);
  background-size: cover;
  background-position: center;
}

.news-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green-on-light);
  margin-bottom: 4px;
  display: block;
}

.news-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
}

.news-title a:hover { color: var(--green-on-light-hover); }

.news-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* News grid (category/noticias archive) */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  transition: all .15s ease;
  display: inline-block;
}

.filter-chip:hover { border-color: var(--green-dark); color: var(--text-primary); }

.filter-chip.active {
  background: var(--green-gradient);
  color: #04331b;
  border-color: transparent;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}

.news-card {
  display: flex;
  flex-direction: column;
}

.news-card .thumb {
  border-radius: 10px;
  height: 150px;
  background: var(--surface);
  background-size: cover;
  background-position: center;
  margin-bottom: 10px;
}

.news-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
}

.news-card h3 a:hover { color: var(--green-on-light-hover); }

.news-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 8px;
}

.news-grid .ad-native {
  grid-column: 1 / -1;
}

/* Pagination (WordPress native) */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  display: inline-block;
}

.pagination a:hover { border-color: var(--green-dark); color: var(--text-primary); }

.pagination .current {
  background: var(--green-gradient);
  color: #04331b;
  border-color: transparent;
}

/* Ad blocks (shared across all templates) */
.ad {
  border: 1px dashed #c7cdc9;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-align: center;
}

.ad-inline { height: 72px; margin: 8px 0; }
.ad-native-block { height: 100px; margin: 8px 0 20px; }
.ad-banner { height: 90px; margin: 28px 0; }
.ad-rectangle { height: 250px; margin: 32px 0; }
.ad-sidebar {
  height: 600px;
  position: sticky;
  top: 20px;
}

/* Clubes page */
.clubes-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 16px;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; border-color: var(--green-dark); }

.search-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.search-note a {
  color: var(--green-on-light);
  text-decoration: underline;
}

.zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.zone-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .15s ease;
}

.zone-chip:hover { border-color: var(--green-dark); color: var(--text-primary); }

.zone-chip.active {
  background: var(--green-gradient);
  color: #04331b;
  border-color: transparent;
}

.result-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.club-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #9aa39d var(--surface);
}

/* Chrome, Edge, Safari */
.club-list::-webkit-scrollbar {
  width: 8px;
}

.club-list::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 100px;
}

.club-list::-webkit-scrollbar-thumb {
  background: var(--green-dark);
  border-radius: 100px;
  border: 2px solid var(--surface);
}

.club-list::-webkit-scrollbar-thumb {
  background: #9aa39d;
}

.club-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s ease;
}

.club-card:hover, .club-card.highlight { border-color: var(--green-dark); }

.club-card .zone-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green-on-light);
  display: block;
  margin-bottom: 4px;
}

.club-card h3 { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.club-card p { font-size: 12px; color: var(--text-secondary); margin: 0; }

.club-details {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}

.club-card.expanded .club-details { display: block; }

.club-details p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.club-details p:last-child { margin-bottom: 0; }
.club-details strong { color: var(--text-primary); font-weight: 500; }

.empty-state {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
  display: none;
}

.map-panel {
  display: flex;
  justify-content: center;
  position: sticky;
  top: 20px;
}

#map-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}

.pt-outline {
  fill: var(--surface);
  stroke: url(#greenStroke);
  stroke-width: 1.6;
}

.club-dot {
  fill: var(--green-light);
  stroke: var(--green-dark);
  stroke-width: 1.2;
  cursor: pointer;
  transition: opacity .15s ease, r .15s ease;
}

.club-dot.dim { opacity: 0.15; }

.club-dot.selected {
  animation: neon-pulse 1.6s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 2px var(--green-light)) drop-shadow(0 0 4px var(--green-light));
  }
  50% {
    filter: drop-shadow(0 0 7px var(--green-light)) drop-shadow(0 0 14px var(--green-light));
  }
}

/* Single article page */
.article-tag {
  margin-bottom: 14px;
}

.article-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 14px;
}

.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-meta-sep {
  margin: 0 6px;
}

.article-thumb {
  width: 100%;
  height: 380px;
  border-radius: 14px;
  background: var(--surface);
  background-size: cover;
  background-position: center;
  margin-bottom: 28px;
}

.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
}

.article-content p { margin: 0 0 20px; }

.article-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 14px;
}

.article-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 12px;
}

.article-content a {
  color: var(--green-on-light);
  text-decoration: underline;
}

.article-content img {
  border-radius: 10px;
  margin: 12px 0;
}

.article-content blockquote {
  border-left: 3px solid var(--green-dark);
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.article-back {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-back a {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-on-light);
}

@media (max-width: 640px) {
  .article-title { font-size: 22px; }
  .article-thumb { height: 220px; }
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

/* Responsive */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .clubes-layout { grid-template-columns: 1fr; }
  .ad-sidebar { height: 90px; }
  .map-panel { position: static; order: -1; margin-bottom: 24px; }
  #map-svg { max-width: 260px; }
}

@media (max-width: 640px) {
  nav { display: none; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 21px; }
  .hero { min-height: 240px; }
  .news-thumb { width: 76px; height: 60px; }
  .news-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Correção: menu mobile (logo colado à borda + botão dos 3 traços sem função)
   ========================================================================== */
@media (max-width: 640px) {
  .header-inner {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 22px 16px !important;
  }
  .logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
  }
  .logo img {
    height: 28px !important;
  }
  .header-actions {
    position: relative !important;
    z-index: 2 !important;
  }
  .nav-toggle {
    padding: 10px !important;
    margin: -10px !important;
  }
  nav {
    display: none !important;
  }
  header.site-header.nav-open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  header.site-header.nav-open nav {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #1c2321 !important;
    border-top: 1px solid #3a443f !important;
    padding: 12px 20px 20px !important;
    z-index: 999999 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    margin: 0 !important;
  }
  header.site-header.nav-open nav ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  header.site-header.nav-open nav ul li a {
    display: block !important;
    padding: 10px 0 !important;
  }
}