/*
Theme Name: CastilloHost
Theme URI: https://castillohost.com
Author: CastilloHost
Author URI: https://castillohost.com
Description: Tema a medida para CastilloHost (venta de streaming de radio, streaming de TV y sistema de hotel para huéspedes). Incluye únicamente las páginas de Inicio y Contacto. Construido desde cero, sin frameworks ni page builders.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: castillohost
*/

/* -------------------------------------------------
   1. Variables y reset
------------------------------------------------- */
:root {
	--ch-navy: #16324f;
	--ch-navy-light: #1f4468;
	--ch-gold: #c9a227;
	--ch-gold-light: #e0c157;
	--ch-bg: #ffffff;
	--ch-bg-alt: #f5f7fa;
	--ch-text: #2b2f36;
	--ch-text-light: #5b6472;
	--ch-border: #e3e7ec;
	--ch-radius: 10px;
	--ch-shadow: 0 8px 24px rgba(22, 50, 79, 0.08);
	--ch-max-width: 1160px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ch-text);
	background: var(--ch-bg);
	line-height: 1.6;
	font-size: 16px;
}

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

a {
	color: var(--ch-navy);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover,
a:focus {
	color: var(--ch-gold);
}

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.6em;
	color: var(--ch-navy);
}

p {
	margin: 0 0 1em;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.container {
	width: 100%;
	max-width: var(--ch-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.btn {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 2px solid transparent;
	cursor: pointer;
}

.btn-primary {
	background: var(--ch-gold);
	color: var(--ch-navy);
}

.btn-primary:hover,
.btn-primary:focus {
	background: var(--ch-gold-light);
	color: var(--ch-navy);
}

.btn-outline {
	background: transparent;
	border-color: #ffffff;
	color: #ffffff;
}

.btn-outline:hover,
.btn-outline:focus {
	background: #ffffff;
	color: var(--ch-navy);
}

/* -------------------------------------------------
   2. Encabezado / navegación
------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--ch-border);
	background: var(--ch-bg);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 84px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	order: 1;
	flex: 0 0 auto;
}

.site-branding img {
	max-height: 52px;
	width: auto;
}

.site-title {
	font-size: 1.4rem;
	margin: 0;
	color: var(--ch-navy);
}

.site-title a {
	color: inherit;
}

.site-description {
	margin: 0;
	font-size: 0.8rem;
	color: var(--ch-text-light);
}

.main-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	order: 3;
	flex: 1 1 auto;
}

.main-navigation ul {
	display: flex;
	gap: 28px;
	align-items: center;
	justify-content: center;
}

.main-navigation a {
	font-weight: 600;
	color: var(--ch-text);
	font-size: 0.98rem;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
	color: var(--ch-gold);
}

.main-navigation a.nav-cta {
	background: var(--ch-navy);
	color: #ffffff;
	padding: 9px 22px;
	border-radius: 999px;
	font-size: 0.92rem;
}

.main-navigation a.nav-cta:hover,
.main-navigation a.nav-cta:focus {
	background: var(--ch-gold);
	color: var(--ch-navy);
}

/* -------------------------------------------------
   2.1 Reproductor en vivo (junto al menú, en el encabezado)
------------------------------------------------- */
.header-player {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 14px 4px 10px;
	background: var(--ch-bg-alt);
	border: 1px solid var(--ch-border);
	border-radius: 999px;
	order: 4;
	flex: 0 0 auto;
}

.live-dot {
	width: 8px;
	height: 8px;
	flex: none;
	border-radius: 50%;
	background: #e5484d;
	box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6);
	animation: ch-pulse 1.8s infinite;
}

@keyframes ch-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(229, 72, 77, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(229, 72, 77, 0);
	}
}

.header-player audio {
	display: block;
	width: 230px;
	max-width: 40vw;
	height: 30px;
}

.menu-toggle {
	display: none;
	order: 2;
	background: none;
	border: 2px solid var(--ch-navy);
	border-radius: 8px;
	padding: 8px 12px;
	font-weight: 600;
	color: var(--ch-navy);
	cursor: pointer;
}

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

	.main-navigation {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
	}

	.main-navigation.is-open {
		display: flex;
	}

	.site-header .container {
		flex-wrap: wrap;
		padding-top: 14px;
		padding-bottom: 14px;
	}

	.main-navigation ul {
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 14px;
		padding: 16px 0 8px;
	}

	.header-player {
		order: 4;
		width: 100%;
		justify-content: center;
		margin-top: 12px;
	}

	.header-player audio {
		width: 100%;
		max-width: none;
	}
}

/* -------------------------------------------------
   3. Hero (Inicio)
------------------------------------------------- */
.hero {
	background: linear-gradient(135deg, var(--ch-navy) 0%, var(--ch-navy-light) 100%);
	color: #ffffff;
	padding: 96px 0;
}

.hero .container {
	display: grid;
	gap: 32px;
}

.hero-grid {
	grid-template-columns: 1fr;
	align-items: center;
}

@media (min-width: 900px) {
	.hero-grid {
		grid-template-columns: 1.1fr 0.9fr;
		gap: 48px;
	}
}

.hero-image {
	justify-self: center;
	max-width: 420px;
}

@media (min-width: 900px) {
	.hero-image {
		justify-self: end;
		max-width: 100%;
	}
}

.hero-image img {
	width: 100%;
	height: auto;
	display: block;
}

.hero-eyebrow {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ch-gold-light);
	margin-bottom: 16px;
}

.hero h1 {
	color: #ffffff;
	font-size: clamp(2rem, 4vw, 3.1rem);
	max-width: 20ch;
}

.hero p {
	color: rgba(255, 255, 255, 0.85);
	max-width: 55ch;
	font-size: 1.08rem;
}

.hero-actions {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* -------------------------------------------------
   4. Servicios
------------------------------------------------- */
.services {
	padding: 88px 0;
	background: var(--ch-bg);
}

.section-heading {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 56px;
}

.section-heading h2 {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-heading p {
	color: var(--ch-text-light);
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.service-card {
	display: block;
	background: var(--ch-bg-alt);
	border: 1px solid var(--ch-border);
	border-radius: var(--ch-radius);
	padding: 36px 28px;
	text-align: center;
	color: inherit;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ch-shadow);
}

.service-icon {
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var(--ch-navy);
	color: var(--ch-gold-light);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	margin: 0 auto 20px;
}

.service-card h3 {
	font-size: 1.15rem;
	margin-bottom: 10px;
}

.service-card p {
	color: var(--ch-text-light);
	font-size: 0.96rem;
	margin-bottom: 0;
}

@media (max-width: 900px) {
	.services-grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------
   4.1 ¿Por qué elegirnos?
------------------------------------------------- */
.why-us {
	padding: 0 0 88px;
	background: var(--ch-bg);
}

.why-us-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
}

.why-us-grid .service-card {
	padding: 28px 16px;
}

.why-us-grid .service-card p {
	font-size: 0.87rem;
}

@media (max-width: 1100px) {
	.why-us-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 28px;
	}

	.why-us-grid .service-card {
		padding: 36px 28px;
	}

	.why-us-grid .service-card p {
		font-size: 0.96rem;
	}
}

@media (max-width: 900px) {
	.why-us-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.why-us-grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------
   5. Franja de confianza / CTA
------------------------------------------------- */
.cta-band {
	background: var(--ch-bg-alt);
	border-top: 1px solid var(--ch-border);
	border-bottom: 1px solid var(--ch-border);
	padding: 64px 0;
	text-align: center;
}

.cta-band h2 {
	margin-bottom: 12px;
}

.cta-band p {
	color: var(--ch-text-light);
	max-width: 50ch;
	margin: 0 auto 28px;
}

/* -------------------------------------------------
   6. Página de Contacto
------------------------------------------------- */
.page-header {
	background: var(--ch-bg-alt);
	padding: 64px 0;
	text-align: center;
	border-bottom: 1px solid var(--ch-border);
}

.page-header h1 {
	margin-bottom: 8px;
}

.page-header p {
	color: var(--ch-text-light);
	margin: 0 auto;
	max-width: 55ch;
}

/* -------------------------------------------------
   6.0 Páginas de servicio (Radio, TV, Hotel...)
------------------------------------------------- */
.service-page-section {
	padding: 72px 0;
}

.service-page-section .entry-content {
	max-width: 800px;
	margin: 0 auto;
}

.entry-content h2 {
	font-size: 1.6rem;
	margin-top: 1.6em;
}

.entry-content h3 {
	font-size: 1.25rem;
	margin-top: 1.4em;
}

.entry-content p {
	color: var(--ch-text);
	font-size: 1.02rem;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.2em 1.4em;
	padding: 0;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li {
	margin-bottom: 0.5em;
	color: var(--ch-text);
}

.entry-content a {
	color: var(--ch-navy);
	font-weight: 600;
	text-decoration: underline;
}

.entry-content img {
	border-radius: var(--ch-radius);
	margin: 1.2em 0;
}

.entry-content blockquote {
	border-left: 3px solid var(--ch-gold);
	margin: 1.4em 0;
	padding-left: 1.2em;
	color: var(--ch-text-light);
	font-style: italic;
}

/* -------------------------------------------------
   6.05 Planes y precios (tarjetas)
------------------------------------------------- */
.plans-section {
	padding: 0 0 72px;
	background: var(--ch-bg-alt);
}

.plans-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

@media (max-width: 900px) {
	.plans-grid {
		grid-template-columns: 1fr;
		max-width: 420px;
		margin: 0 auto;
	}
}

.plan-card {
	display: flex;
	flex-direction: column;
	background: var(--ch-bg);
	border: 1px solid var(--ch-border);
	border-radius: var(--ch-radius);
	box-shadow: var(--ch-shadow);
	padding: 36px 30px;
	text-align: center;
}

.plan-title {
	font-size: 1.2rem;
	color: var(--ch-navy);
	margin-bottom: 14px;
}

.plan-price {
	margin: 0 0 22px;
	line-height: 1;
}

.plan-price-currency {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--ch-navy);
	vertical-align: top;
}

.plan-price-amount {
	font-size: 2.1rem;
	font-weight: 800;
	color: var(--ch-gold);
}

.plan-price-period {
	display: block;
	font-size: 0.85rem;
	color: var(--ch-text-light);
	margin-top: 6px;
}

.plan-features {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	text-align: left;
	flex-grow: 1;
}

.plan-features li {
	position: relative;
	padding: 7px 0 7px 26px;
	border-bottom: 1px solid var(--ch-border);
	font-size: 0.93rem;
	color: var(--ch-text);
}

.plan-features li:last-child {
	border-bottom: none;
}

.plan-features li::before {
	content: '\2713';
	position: absolute;
	left: 0;
	top: 7px;
	color: var(--ch-gold);
	font-weight: 700;
}

.plan-btn {
	width: 100%;
}

/* -------------------------------------------------
   6.1 Encabezado con imagen de fondo
------------------------------------------------- */
.contact-hero {
	position: relative;
	padding: 90px 0 150px;
	background: linear-gradient(135deg, var(--ch-navy) 0%, var(--ch-navy-light) 100%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.contact-hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 30, 45, 0.45);
}

.contact-hero .container {
	position: relative;
	text-align: center;
}

.contact-hero-title {
	display: block;
	color: #ffffff;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: clamp(1.2rem, 3.5vw, 2.1rem);
	text-align: center;
	margin: 0 auto;
}

/* -------------------------------------------------
   6.2 Tarjeta de contacto (info + formulario)
------------------------------------------------- */
.contact-section {
	padding: 0 0 90px;
}

.contact-form-card {
	background: #ffffff;
	border-radius: var(--ch-radius);
	box-shadow: 0 20px 45px rgba(15, 30, 45, 0.18);
	margin: -110px auto 0;
	max-width: 920px;
	position: relative;
	z-index: 2;
	overflow: hidden;
}

.contact-card-header {
	background: linear-gradient(120deg, var(--ch-navy) 0%, var(--ch-navy-light) 100%);
	padding: 20px 32px;
	text-align: center;
}

.contact-card-header h1 {
	color: #ffffff;
	margin: 0;
	text-align: center;
	font-size: 1.1rem;
}

.contact-card-body {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

@media (min-width: 780px) {
	.contact-card-body {
		grid-template-columns: 1fr 1.3fr;
	}
}

.contact-info-col {
	padding: 40px 36px;
	border-bottom: 1px solid var(--ch-border);
}

@media (min-width: 780px) {
	.contact-info-col {
		border-bottom: none;
		border-right: 1px solid var(--ch-border);
	}
}

.contact-info-list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 18px;
	font-size: 0.95rem;
	color: var(--ch-text);
}

.contact-info-list a {
	color: var(--ch-text);
}

.contact-info-list a:hover {
	color: var(--ch-gold);
}

.ci-icon {
	flex: none;
	color: var(--ch-navy);
	font-size: 1rem;
	line-height: 1.5;
	width: 20px;
	text-align: center;
}

.contact-social {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}

.social-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ch-navy);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.social-btn:hover,
.social-btn:focus {
	background: var(--ch-gold);
	color: var(--ch-navy);
}

.contact-info-col .contact-map {
	margin-top: 28px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ch-border);
}

.contact-info-col .contact-map iframe {
	width: 100%;
	height: 220px;
	border: 0;
	display: block;
}

.contact-form-col {
	padding: 40px 36px;
}

.form-notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 0.95rem;
}

.form-notice-ok {
	background: #eaf7ee;
	border: 1px solid #b9e3c4;
	color: #1e6b34;
}

.form-notice-error {
	background: #fdecec;
	border: 1px solid #f3b7b7;
	color: #a3262c;
}

.contact-form .form-row {
	margin-bottom: 12px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	width: 100%;
	font: inherit;
	font-size: 0.88rem;
	color: var(--ch-text);
	background: #ffffff;
	border: 1px solid var(--ch-border);
	border-radius: 6px;
	padding: 8px 12px;
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
	color: #9aa3ad;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--ch-navy);
}

.contact-form textarea {
	resize: vertical;
	min-height: 90px;
}

.form-submit-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.contact-form .btn {
	border: none;
	padding: 10px 24px;
	font-size: 0.9rem;
}

/* Campo trampa para bots: oculto a personas, visible para robots de formularios. */
.castillohost-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.contact-form-card {
		margin-top: -70px;
	}

	.contact-info-col,
	.contact-form-col {
		padding: 28px 22px;
	}
}

/* -------------------------------------------------
   6.2 Página "Nuestros Clientes" (estaciones)
------------------------------------------------- */
.clients-section {
	padding: 64px 0 80px;
}

.clients-section .entry-content {
	max-width: 800px;
	margin: 0 auto 40px;
}

.clients-empty {
	text-align: center;
	color: var(--ch-text-light);
	max-width: 480px;
	margin: 0 auto;
}

.clients-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 26px;
}

@media (max-width: 1000px) {
	.clients-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 720px) {
	.clients-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.clients-grid {
		grid-template-columns: 1fr;
		max-width: 320px;
		margin: 0 auto;
	}
}

.client-card {
	background: var(--ch-bg-alt);
	border: 1px solid var(--ch-border);
	border-radius: var(--ch-radius);
	padding: 22px;
	text-align: center;
}

.client-photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--ch-radius);
	overflow: hidden;
	background: var(--ch-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.client-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.client-photo-fallback {
	font-size: 2rem;
	color: var(--ch-gold-light);
}

.client-name {
	font-size: 1.05rem;
	margin-bottom: 14px;
}

.client-photo-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.client-photo-link:hover .client-photo {
	opacity: 0.88;
}

.client-photo-link:hover .client-name {
	color: var(--ch-navy-light);
}

.client-play-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: var(--ch-navy);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.client-play-btn:hover {
	background: var(--ch-navy-light);
}

.client-play-btn.is-playing {
	background: var(--ch-gold);
	color: var(--ch-navy);
}

.client-play-icon {
	font-size: 0.75rem;
}

/* -------------------------------------------------
   7. Pie de página
------------------------------------------------- */
.site-footer {
	background: var(--ch-navy);
	color: rgba(255, 255, 255, 0.82);
	padding: 56px 0 28px;
}

.footer-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 40px;
}

.footer-banks {
	text-align: left;
}

.footer-banks-heading {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}

.footer-banks img {
	display: block;
	width: 100%;
	max-width: 320px;
	height: auto;
	margin: 0;
	border-radius: var(--ch-radius);
}

.footer-contact {
	text-align: left;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 32px;
	padding-bottom: 32px;
}

.footer-grid h3,
.footer-top h3 {
	color: #ffffff;
	font-size: 1rem;
	margin-bottom: 14px;
}

.footer-grid p,
.footer-grid a,
.footer-top p,
.footer-top a {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.94rem;
}

.footer-grid a:hover,
.footer-top a:hover {
	color: var(--ch-gold-light);
}

.site-footer .widget-title {
	color: #ffffff;
	font-size: 1rem;
	margin-bottom: 14px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 22px;
	text-align: center;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}
