:root {
    --accent-color: #366c4c;
    --accent-secondary-color: #ddc690;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #333;
    line-height: 1.6;
}

img .selected{
    border: 2px solid var(--accent-color);
}

img{
    border: 2px solid transparent;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 80px 0;
    justify-content: center;
}
section:nth-child(even){background:#f8f9fa}
section:nth-child(odd){background:white}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}
.editor-toolbar .easymde-dropdown,.editor-toolbar button{color:#333}

.btn {
    display: inline-block;
    background-color: var(--accent-color); /* Rojo deportivo */
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-secondary-color);
    color: var(--accent-color);
    transform: translateY(-3px);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto;
}

/* Header y navegación */
header {
    position: fixed;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background-color: #000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
}

.logo h1 {
    color: white;
    margin-left: 10px;
    font-size: 1.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

section{
    display: flex;
}

/* Hero Section */
section.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../images/portada.webp') no-repeat center center/cover;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Secciones genéricas de la home */
.home-section-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

section:nth-child(even) .container .home-section-content {
    flex-direction: row-reverse;
}

.home-section-text {
    flex: 1;-width: 300px;
    padding-right: 30px;
}

.home-section-image {
    flex: 1;
    min-width: 300px;
}

.home-section-image img {
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
/* FIN de Secciones genéricas de la home */


/* Equipos */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.team-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-image {
    height: 250px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-info {
    padding: 20px;
}

/* Calendario */
.schedule-container {
    display: flex;
    flex-wrap: wrap;
}

.next-match {
    flex: 1;
    min-width: 300px;
    background: var(--accent-color);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-right: 30px;
}

.match-details {
    margin-bottom: 20px;
}

.match-date {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.match-teams {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.match-location {
    font-size: 1rem;
}

.schedule-list {
    flex: 2;
    min-width: 300px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.schedule-item:hover {
    background-color: #f1f1f1;
}

/* Patrocinadores */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    align-items: center;
}

.sponsor-item {
    text-align: center;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sponsor-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.sponsor-item img {
    max-width: 100%;
    max-height: 100px;
}

/* Contacto */
section.contact {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/contact.png') no-repeat center center/cover;
    color: white;
    input, textarea, select{
        color:black;
    }
    a { color:white }
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding-right: 30px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-detail i {
    margin-right: 15px;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    min-height: 150px;
}

/* Footer */
footer {
    background-color: #111;
    color: white;
    padding: 40px 0 20px;
    text-align: center;

    .ap_m{display:none}

    .ap {
        display: flex;
        justify-content: space-around;
        margin: 25px 0;
        a{
            width: 250px;
        }
        img {
            height: 62px;
        }
    }
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-links {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

.footer-links h4 {
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4:after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px 0;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: white;
    margin: 0 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #888;
}

/* ============================================
   Calendario partidos
   ============================================ */

/* Tabla Próximos Partidos — Artabriños Hockey Club
   Todo el CSS está bajo #partidos — no afecta a nada más de la página */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300..700&display=swap');

#partidos {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  background: #111110;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(201,162,39,0.35), 0 8px 32px rgba(0,0,0,0.55);
  color: #f0ede3;
}

#partidos thead {
  background: #181816;
  border-bottom: 2px solid #7a5e13;
}

#partidos thead tr {
  background: transparent;
}

#partidos thead th {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9a227;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: none;
}

#partidos thead th:first-child { padding-left: 1.5rem; }
#partidos thead th:last-child  { padding-right: 1.5rem; }

#partidos tbody tr {
  border-bottom: 1px solid rgba(201,162,39,0.09);
  background: transparent;
  transition: background 160ms ease;
}

#partidos tbody tr:last-child {
  border-bottom: none;
}

#partidos tbody tr:hover {
  background: rgba(201,162,39,0.06);
}

#partidos tbody td {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.84rem;
  color: #f0ede3;
  padding: 1rem 1rem;
  vertical-align: middle;
  background: transparent;
  border: none;
  line-height: 1.4;
  white-space: nowrap;
}

#partidos tbody td:first-child { padding-left: 1.5rem; }
#partidos tbody td:last-child  { padding-right: 1.5rem; }

#partidos tbody td:empty::after {
  content: '—';
  color: #5a5854;
  font-size: 0.78rem;
}

#partidos .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.6;
}

#partidos .fecha {
  font-variant-numeric: tabular-nums;
  color: #e8e6dc;
  font-weight: 500;
}

#partidos .own {
  color: var(--accent-color);
  font-weight: 600;
}

#partidos .secondary {
  color: var(--accent-secondary-color);
  font-weight: 600;
}

@media (max-width: 680px) {
  /* Ocultar cabecera */
  #partidos{
    box-shadow: none;
    background: transparent;
  }

  #partidos thead {
    display: none;
  }
  
  #partidos tbody td:first-child { padding-left: 1rem; }

  /* Cada fila se convierte en bloque */
  #partidos tbody tr {
    display: block;
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
    background: #111110;
  }

  /* Cada celda ocupa toda la fila con etiqueta a la izquierda */
  #partidos tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    white-space: normal;      /* Permitir wrap en móvil */
    border-bottom: 1px solid rgba(201, 162, 39, 0.06);
    font-size: 0.82rem;
  }

  #partidos tbody td:last-child {
    border-bottom: none;
  }

  /* Etiqueta generada desde data-label */
  #partidos tbody td::before {
    content: attr(data-label);
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c9a227;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Celdas vacías: ocultar en móvil para no desperdiciar espacio */
  #partidos tbody td:empty,
  #partidos tbody td[data-label="Resultado"]:empty,
  #partidos tbody td[data-label="Dónde"]:empty{
    display: none;
  }
}

/* ============================================
   Fin de claendario de partidos
   ============================================ */

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .about-text, .about-image {
        flex: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .next-match {
        margin-right: 0;
        margin-bottom: 30px;
    }
}

#whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #25D366;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

#whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

/* ============================================
   HAMBURGER MENU
   ============================================ */

.button-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  position: relative;
}

.button-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.button-menu.open span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.button-menu.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.button-menu.open span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

/* Overlay oscuro detrás del menú */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.visible {
  opacity: 1;
}

i.fas{ vertical-align: top}

/* ============================================
   HAMBURGER MENU RESPONSIVE: pantallas pequeñas (≤ 768px)
   ============================================ */
@media (max-width: 768px) {

  /* Mostrar el botón hamburguesa */
  .button-menu {
    display: flex;
  }

  /* Ocultar el nav por defecto y posicionarlo como drawer lateral */
  header nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100dvh;
    background-color: #1a1a2e; /* Ajusta al color de tu header */
    z-index: 1050;
    padding: 80px 2rem 2rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  /* Menú abierto: el nav entra desde la derecha */
  header nav.open {
    right: 0;
  }

  header nav ul {
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  header nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  header nav ul li:last-child {
    border-bottom: none;
  }

  header nav ul li a {
    display: block;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
  }

  header nav ul li a:hover {
    color: #c60c30; /* Ajusta al color de acento de tu marca */
    padding-left: 1rem;
  }

  footer .ap{
    display: none;
  }

  footer .ap_m{
    display: flex;
    justify-content: space-between;
  }

  footer .ap_m img {
    width: 20vw;
    padding: 20px 0;
  }
}
