/*
Theme Name: Academia 5D
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: academia-5d
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === footer === */
footer .wp-site-title,
footer .wp-block-paragraph {
	color: var(--wp--preset--color--navy);
}
footer {
	border-top: 1px solid #ececec;
}

/* === sections === */
.info-card {
	background: #f5f5f5;
	border-radius: var(--wp--custom--rounded--sm, 4px);
	padding: 1.5rem;
	min-height: 100%;
}
.info-card h1,
.info-card h2,
.info-card h3,
.info-card h4,
.info-card h5,
.info-card h6 {
	color: var(--wp--preset--color--navy);
	margin-bottom: 0.75rem;
}
.wp-block-columns .info-card {
	height: 100%;
}

.wp-block-column .wp-block-image {
	width: 100%;
}
.wp-block-column .wp-block-image img {
	width: 100%;
	max-width: 100%;
	height: auto;
}

.wp-block-columns {
	display: flex;
	gap: 1.5em;
	align-items: stretch;
}

/* Velo oscuro sobre el fondo de imagen del hero para que el texto blanco se lea */
.wp-block-group[style*="geralt-ai-generated"] {
	position: relative;
}
.wp-block-group[style*="geralt-ai-generated"] > * {
	position: relative;
	z-index: 1;
}
.wp-block-group[style*="geralt-ai-generated"]::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(16, 21, 84, 0.62);
}
@media (min-width: 782px) {
	.wp-block-group[style*="geralt-ai-generated"] {
		min-height: 520px;
		align-content: center;
	}
}
/* Texto del hero siempre en blanco, por encima del velo */
.wp-block-group[style*="geralt-ai-generated"] .wp-block-heading,
.wp-block-group[style*="geralt-ai-generated"] .wp-block-paragraph,
.wp-block-group[style*="geralt-ai-generated"] strong {
	color: #ffffff;
}
.wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}
.info-card {
	height: 100%;
}

/* === buttons === */
.wp-block-button__link:hover {
	opacity: 0.9;
}
.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--navy);
	border-color: var(--wp--preset--color--primary);
	background: transparent;
}
.is-style-outline .wp-block-button__link:hover {
	color: #ffffff;
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* === typography === */
.has-body-font-size {
	line-height: 1.6;
}

/* === header === */
.site-logo img {
	width: 140px;
	height: auto;
}

/* Junta solo las secciones grandes (bloques a sangre completa directos del contenido),
   sin tocar el espaciado interno de botones, menú ni tarjetas. */
.entry-content > .alignfull + *,
.entry-content > .alignfull {
	margin-block-start: 0;
}

/* === price rows (página Precios) === */
.price-row {
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding-block: 0.65rem;
	border-bottom: 1px solid #e6e6e6;
}
.price-row p {
	margin: 0;
}
.price-row p:last-child {
	white-space: nowrap;
	text-align: right;
}

/* === contact form (página Contacto) === */
.wp-block-jetpack-contact-form .wp-block-jetpack-input,
.wp-block-jetpack-contact-form textarea.wp-block-jetpack-input {
	border-radius: 2rem;
	padding: 16px 20px;
}
.wp-block-jetpack-contact-form .wp-block-jetpack-label {
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	margin-bottom: 0.35rem;
}

/* === responsive === */
@media (max-width: 600px) {
	.info-card {
		padding: 1.25rem;
	}
	.wp-block-columns:has(.price-row) {
		gap: 2rem;
	}
}
