/*
Theme Name: Nacional 2 - Con página de inicio
Theme URI: https://www.nacional2.es
Author: Origen
Description: Tema de bloques a medida para Nacional 2 (Urbanización El Condado, Alfajarín). Web de una sola página: concepto, gastronomía, horario, eventos deportivos, localización y contacto. Versión con página: crea la página Inicio y la pone como portada; el contenido se edita en Páginas > Inicio.
Requires at least: 6.6
Requires PHP: 7.4
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: nacional2
*/

/* Los estilos globales viven en theme.json. Aquí solo lo que theme.json no cubre. */

/* ---------- Navegación por anclas ---------- */
html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

main [id] {
	scroll-margin-top: 90px;
}

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--amarillo);
	color: var(--wp--preset--color--negro);
}

/* Portada: las secciones de la página "Inicio" van pegadas, sin el espacio entre bloques */
.wn2-portada.wn2-portada > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Sin hueco entre la última sección y el pie */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* ---------- Cabecera fija ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar header.wp-block-template-part {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar header.wp-block-template-part {
		top: 46px;
	}
}

.wn2-header {
	border-bottom: 3px solid var(--wp--preset--color--rojo);
}

.wn2-logo-header img {
	width: 150px;
	height: auto;
	display: block;
}

.wn2-nav {
	font-family: var(--wp--preset--font-family--anton);
	font-size: 1.05rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.wn2-nav a:hover,
.wn2-nav a:focus {
	color: var(--wp--preset--color--amarillo);
}

/* ---------- Portada ---------- */
.wn2-logo-hero img {
	width: min(620px, 86vw);
	height: auto;
}

.wn2-kicker {
	letter-spacing: 0.25em;
	text-transform: uppercase;
}

/* ---------- Tarjetas de la carta ---------- */
.wn2-card {
	height: 100%;
	border-top: 4px solid var(--wp--preset--color--rojo);
}

.wn2-card .wp-block-image {
	margin: 0;
}

.wn2-carta {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wn2-carta li {
	padding: 0.65rem 0;
	border-bottom: 1px dashed var(--wp--preset--color--grafito);
	color: var(--wp--preset--color--gris);
}

.wn2-carta li:last-child {
	border-bottom: 0;
}

.wn2-carta li strong {
	display: block;
	font-family: var(--wp--preset--font-family--anton);
	font-weight: 400;
	font-size: 1.2rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blanco);
}

/* Menú en tres tiempos, separados por una línea roja como en la carta impresa */
.wn2-tiempo {
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--wp--preset--color--rojo);
}

.wn2-tiempo li {
	color: var(--wp--preset--color--blanco);
}

/* Minigastro: lista larga en dos columnas cuando hay sitio */
@media (min-width: 600px) {
	.wn2-carta--columnas {
		column-count: 2;
		column-gap: 2rem;
	}

	.wn2-carta--columnas li {
		break-inside: avoid;
	}
}

.wn2-carta--simple li {
	color: var(--wp--preset--color--blanco);
	padding: 0.45rem 0;
}

/* ---------- Tablas de horario y partidos ---------- */
.wn2-tabla table {
	width: 100%;
	border-collapse: collapse;
}

.wn2-tabla th,
.wn2-tabla td {
	padding: 0.7rem 0.9rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--grafito);
	text-align: left;
}

.wn2-tabla th {
	background: var(--wp--preset--color--rojo);
	color: var(--wp--preset--color--blanco);
	font-family: var(--wp--preset--font-family--anton);
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.wn2-tabla tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.04);
}

.wn2-tabla td:first-child {
	white-space: nowrap;
}

.wn2-tabla td:last-child {
	color: var(--wp--preset--color--amarillo);
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.wn2-tabla th,
	.wn2-tabla td {
		padding: 0.55rem 0.5rem;
		font-size: 0.9rem;
	}
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wn2-wa-flotante {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	margin: 0;
}

.wn2-wa-flotante a {
	display: inline-block;
	padding: 0.8rem 1.2rem;
	border-radius: 999px;
	background: #25d366;
	color: #0b0b0b;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.wn2-wa-flotante a:hover,
.wn2-wa-flotante a:focus {
	background: #1ebe5a;
	color: #0b0b0b;
}

/* ---------- Pie ---------- */
.wn2-footer {
	border-top: 3px solid var(--wp--preset--color--rojo);
}

.wn2-footer .wn2-logo-header img {
	width: 190px;
}
