/*
Theme Name: AEB Badalones
Theme URI: https://aebadalones.cat
Author: AEB Badalones
Author URI: https://aebadalones.cat
Description: Tema oficial de l'Associació Esportiva Badalones
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: aeb-badalones
Tags: esports, club, bàsquet, badalona
*/

/* =============================================
   VARIABLES
   ============================================= */
:root {
  --red:       #CC0000;
  --red-dark:  #a80000;
  --black:     #111111;
  --dark:      #1a1a1a;
  --gray-dark: #444444;
  --gray:      #888888;
  --gray-light:#cccccc;
  --bg:        #f5f3ef;
  --white:     #ffffff;
  --font-main: 'Barlow', sans-serif;
  --font-cond: 'Barlow Condensed', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* =============================================
   TIPOGRAFIA
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-cond);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

h1 { font-size: clamp(48px, 8vw, 88px); }
h2 { font-size: clamp(32px, 5vw, 52px); }
h3 { font-size: clamp(22px, 3vw, 32px); }
h4 { font-size: 22px; }

p { font-size: 15px; color: var(--gray-dark); line-height: 1.7; }

/* =============================================
   UTILITATS
   ============================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gray);
}

.text-red { color: var(--red); }

.btn {
  display: inline-block;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }

.btn-dark {
  background: var(--black);
  color: var(--white);
}
.btn-dark:hover { background: var(--dark); }

/* =============================================
   HEADER & NAV
   ============================================= */
#masthead {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo .logo-text {
  font-family: var(--font-cond);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--white);
  text-transform: uppercase;
}

.site-logo .logo-text span { color: var(--red); }

/* Menú principal */
#primary-menu {
  display: flex;
  gap: 0;
  align-items: center;
}

#primary-menu > li > a {
  display: block;
  padding: 0 1.1rem;
  height: 60px;
  line-height: 60px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: color 0.2s;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
  color: var(--white);
}

/* Submenú */
#primary-menu li { position: relative; }

#primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--black);
  min-width: 180px;
  border-top: 2px solid var(--red);
  padding: 0.5rem 0;
  z-index: 200;
}

#primary-menu li:hover > .sub-menu { display: block; }

#primary-menu .sub-menu li a {
  display: block;
  padding: 8px 1.25rem;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

#primary-menu .sub-menu li a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

/* Botó mòbil */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* =============================================
   HERO (Home)
   ============================================= */
.hero {
  position: relative;
  height: calc(100vh - 60px);
  min-height: 500px;
  max-height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-content h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 2.5rem;
}

/* =============================================
   SPORTS STRIP
   ============================================= */
.sports-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--red);
}

.sport-item {
  display: block;
  padding: 1rem 0;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.sport-item:last-child { border-right: none; }

.sport-item::after {
  content: '';
  display: block;
  height: 2px;
  width: 0;
  background: var(--white);
  margin: 4px auto 0;
  transition: width 0.2s;
}

.sport-item:hover,
.sport-item.active {
  color: var(--white);
  background: rgba(0,0,0,0.1);
}

.sport-item:hover::after,
.sport-item.active::after { width: 20px; }

/* =============================================
   SECCIONS GENERALS
   ============================================= */
.section { padding: 4rem 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.section-header h2 { font-size: clamp(24px, 4vw, 36px); }

.see-all {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.see-all:hover { text-decoration: underline; }

/* =============================================
   NOTÍCIES GRID
   ============================================= */
.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}

.news-card { cursor: pointer; }

.news-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 1rem;
  background: var(--gray-light);
}

.news-card-tag {
  font-size: 11px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 600;
}

.news-card-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  line-height: 1.15;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.news-card:hover .news-card-title { color: var(--red); }

.news-card.featured .news-card-title { font-size: 26px; }

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

/* Filtres etiquetes */
.tag-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag-btn {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border: 1px solid #ddd;
  color: var(--gray);
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
}

.tag-btn:hover,
.tag-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(204,0,0,0.04);
}

/* =============================================
   BLOC EL CLUB (home)
   ============================================= */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.about-block-left {
  padding: 4rem 3rem;
  background: var(--black);
}

.about-block-left .section-label { color: rgba(255,255,255,0.35); margin-bottom: 1rem; }

.about-big {
  font-family: var(--font-cond);
  font-weight: 900;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.about-big span { color: var(--red); }

.about-block-left p {
  color: rgba(255,255,255,0.5);
  margin-bottom: 2rem;
  max-width: 380px;
}

.about-block-photo {
  min-height: 320px;
  background-size: cover;
  background-position: center;
}

/* =============================================
   PÀGINES INTERIORS - ESPORT
   ============================================= */
.page-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.page-hero-content .section-label {
  color: var(--red);
  margin-bottom: 0.5rem;
}

.page-hero-content h1 { color: var(--white); }

/* =============================================
   EQUIPS GRID
   ============================================= */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border: 1px solid #e8e5e0;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.team-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.team-card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg);
}

.team-card-body { padding: 1.25rem; }

.team-card-category {
  font-size: 11px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 600;
}

.team-card-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  margin-bottom: 8px;
}

.team-card-meta { font-size: 12px; color: var(--gray); }

/* =============================================
   FITXA EQUIP
   ============================================= */
.team-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 400px;
}

.team-header-photo {
  background-size: cover;
  background-position: center top;
}

.team-header-info {
  background: var(--black);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-header-info .section-label { color: var(--red); margin-bottom: 0.75rem; }
.team-header-info h1 { color: var(--white); margin-bottom: 1.5rem; }

.team-meta-list { display: flex; flex-direction: column; gap: 0.75rem; }

.team-meta-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.team-meta-label {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 100px;
}

.team-meta-value {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
}

/* =============================================
   JUGADORS GRID
   ============================================= */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.player-card { text-align: center; cursor: pointer; }

.player-card-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  background: #e8e5e0;
  margin-bottom: 0.75rem;
  transition: filter 0.2s;
}

.player-card:hover .player-card-photo { filter: brightness(0.85); }

.player-dorsal {
  font-family: var(--font-cond);
  font-weight: 900;
  font-size: 28px;
  color: var(--red);
  line-height: 1;
}

.player-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 16px;
  color: var(--black);
  text-transform: uppercase;
}

.player-pos { font-size: 12px; color: var(--gray); }

/* =============================================
   FOOTER
   ============================================= */
#colophon {
  background: var(--black);
  border-top: 3px solid var(--red);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .logo-text {
  font-family: var(--font-cond);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-brand .logo-text span { color: var(--red); }

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card.featured { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  #primary-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  #primary-menu.open { display: flex; }

  #primary-menu > li > a { height: auto; line-height: 1; padding: 12px 2rem; }

  .sports-strip { grid-template-columns: repeat(3, 1fr); }

  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-column: span 1; }

  .about-block { grid-template-columns: 1fr; }
  .about-block-photo { min-height: 240px; }

  .team-header { grid-template-columns: 1fr; }
  .team-header-photo { min-height: 250px; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .sports-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .players-grid { grid-template-columns: repeat(2, 1fr); }
}
