/*
Theme Name: Colegio San Nicolás
Theme URI: https://colegiosannicolas.edu.pe/
Author: Gestión Web 23
Description: Tema de bloques a medida para el Colegio San Nicolás, San Juan de Lurigancho. Inicial, Primaria y Secundaria.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
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: sannicolas
*/

/* ---------- Base ---------- */
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-post-content > .alignfull { margin-block-start: 0; }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--sol);
	outline-offset: 3px;
}
img { max-width: 100%; height: auto; }

/* ---------- Cabecera ---------- */
.sn-topbar {
	background: var(--wp--preset--color--tinta);
	color: #fff;
	font-size: 14px;
	padding-block: 8px;
}
.sn-topbar p { margin: 0; }
.sn-topbar a { color: #fff; font-weight: 600; }
.sn-header {
	background: #fff;
	border-bottom: 1px solid #D9ECF3;
	padding-block: 12px;
}
.sn-logo { margin: 0; }
.sn-logo img { height: 60px; width: auto; display: block; }
.sn-nav { font-weight: 600; font-size: 16px; }
.sn-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--texto); padding-block: 10px; text-decoration: none; }
.sn-nav .current-menu-item > .wp-block-navigation-item__content,
.sn-nav [aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
	text-decoration-color: var(--wp--preset--color--rojo);
}
@media (max-width: 781px) {
	.sn-topbar .sn-topbar-horario,
	.sn-topbar .sn-topbar-direccion { display: none; }
	.sn-topbar .wp-block-group { justify-content: center !important; }
	.sn-logo img { height: 48px; }
	.sn-header .wp-block-buttons { display: none; }
	.sn-header .wp-block-group { flex-wrap: nowrap !important; }
}

/* ---------- Botones ---------- */
.wp-block-button__link { min-height: 44px; box-sizing: border-box; }
.wp-block-button.is-style-sn-amarillo .wp-block-button__link { background: var(--wp--preset--color--sol); color: #1A1C22; }
.wp-block-button.is-style-sn-amarillo .wp-block-button__link:hover { background: #F2C200; color: #1A1C22; }
.wp-block-button.is-style-sn-contorno .wp-block-button__link { background: transparent; color: var(--wp--preset--color--tinta); box-shadow: inset 0 0 0 2px currentColor; }
.wp-block-button.is-style-sn-contorno .wp-block-button__link:hover { background: var(--wp--preset--color--celeste-claro); color: var(--wp--preset--color--tinta); }
.wp-block-button.is-style-sn-contorno-blanco .wp-block-button__link { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.wp-block-button.is-style-sn-contorno-blanco .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.wp-block-button.is-style-sn-whatsapp .wp-block-button__link { background: var(--wp--preset--color--whatsapp); color: #fff; }
.wp-block-button.is-style-sn-whatsapp .wp-block-button__link:hover { background: #18773F; color: #fff; }

/* ---------- Secciones ---------- */
.sn-seccion { padding-block: clamp(64px, 9vw, 104px); }
.sn-seccion-corta { padding-block: 40px; }
.sn-fondo-celeste { background: var(--wp--preset--color--celeste-claro); }
.sn-cuadricula {
	background-color: #fff;
	background-image: linear-gradient(#D9ECF3 1px, transparent 1px), linear-gradient(90deg, #D9ECF3 1px, transparent 1px);
	background-size: 28px 28px;
}
.sn-fondo-tinta {
	background-color: var(--wp--preset--color--tinta);
	background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 28px 28px;
	color: #fff;
}
.sn-fondo-tinta :where(h1, h2, h3) { color: #fff; }
.sn-fondo-tinta .sn-lead { color: #E6E7F5; }
.sn-borde-abajo { border-bottom: 1px solid #D9ECF3; }

/* Línea roja de margen, como en el cuaderno */
.sn-margen { position: relative; }
.sn-margen::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: max(12px, calc((100% - 1200px) / 2));
	width: 2px;
	background: var(--wp--preset--color--rojo);
	opacity: 0.75;
	pointer-events: none;
}
.sn-margen-texto { padding-left: 40px; }
@media (max-width: 781px) { .sn-margen-texto { padding-left: 20px; } }

.sn-antetitulo { color: #B5222A; font-weight: 600; margin: 0; }
.sn-lead { font-size: var(--wp--preset--font-size--destacado); line-height: 1.55; color: #3A3F4A; max-width: 32em; }
.sn-hero h1 { max-width: 11ch; margin-top: 0; }
.sn-hero-interior h1 { max-width: 15ch; }
.sn-cabecera-seccion { margin-bottom: 40px; }
.sn-cabecera-seccion h2 { max-width: 18ch; margin: 0; }
.sn-cabecera-seccion p { max-width: 30em; margin: 0; color: #3A3F4A; }
.sn-gap-grande { gap: 56px !important; }

/* ---------- Fotos pegadas ---------- */
.sn-foto, .wp-block-image.is-style-sn-pegada {
	position: relative;
	background: #fff;
	padding: 12px 12px 14px;
	box-shadow: 0 10px 30px rgba(62, 64, 149, 0.18);
	margin: 0;
}
.sn-foto img, .wp-block-image.is-style-sn-pegada img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sn-foto figcaption, .wp-block-image.is-style-sn-pegada figcaption { font-size: 14px; color: #4A5568; margin: 10px 2px 0; text-align: left; }
.sn-giro-der { transform: rotate(1.5deg); }
.sn-giro-izq { transform: rotate(-1.5deg); }
.sn-cinta::after {
	content: "";
	position: absolute;
	top: -13px;
	left: 40%;
	width: 92px;
	height: 26px;
	background: rgba(255, 210, 31, 0.6);
	transform: rotate(-4deg);
}
.sn-cinta-celeste::after { background: rgba(175, 217, 229, 0.85); left: 18%; transform: rotate(5deg); }

/* Collage de la portada */
.sn-collage { position: relative; min-height: 560px; }
.sn-collage .sn-foto-1 figcaption { text-align: right; padding-left: 40%; }
.sn-collage > * { margin: 0 !important; }
.sn-collage .sn-foto-1 { position: absolute; top: 0; right: 0; width: 82%; transform: rotate(2deg); }
.sn-collage .sn-foto-1 img { aspect-ratio: 16 / 10; }
.sn-collage .sn-foto-2 { position: absolute; bottom: 0; left: 0; width: 46%; transform: rotate(-3deg); }
.sn-collage .sn-flor { position: absolute; right: 2%; bottom: 0; width: 130px; margin: 0; }
.sn-flor img { display: block; width: 100%; height: auto; }
@media (max-width: 781px) {
	.sn-collage { min-height: 0; display: grid; gap: 28px; }
	.sn-collage .sn-foto-1, .sn-collage .sn-foto-2 { position: relative; width: auto; inset: auto; }
	.sn-collage .sn-foto-2 { width: 80%; }
	.sn-collage .sn-foto-1 figcaption { text-align: left; padding-left: 0; }
	.sn-flor { display: none; }
}

/* ---------- Datos destacados ---------- */
.sn-datos { gap: 28px 40px !important; }
.sn-datos .wp-block-column { border-left: 3px solid var(--wp--preset--color--rojo); padding-left: 18px; }
.sn-dato-titulo { font-family: var(--wp--preset--font-family--titulos); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--wp--preset--color--tinta); margin: 0; }
.sn-dato-texto { font-size: 15px; color: var(--wp--preset--color--texto-suave); margin: 4px 0 0 !important; }
@media (min-width: 600px) and (max-width: 1023px) {
	.sn-datos { flex-wrap: wrap !important; }
	.sn-datos > .wp-block-column { flex-basis: calc(50% - 20px) !important; }
}

/* ---------- Niveles (portada) ---------- */
.sn-niveles { border-top: 2px solid var(--wp--preset--color--tinta); }
.sn-niveles > * { margin-block-start: 0 !important; }
.sn-nivel { border-bottom: 1px solid #C5DCE8; padding-block: 32px; gap: 20px 48px !important; align-items: center !important; }
.sn-nivel h3 { font-size: clamp(32px, 3.4vw, 40px); color: var(--wp--preset--color--texto); margin: 0; white-space: nowrap; }
.sn-nivel-edad { font-weight: 600; color: var(--wp--preset--color--texto-suave); margin: 4px 0 0 !important; }
.sn-nivel > .wp-block-column:first-child { flex: 0 1 260px !important; }
.sn-nivel > .wp-block-column:nth-child(2) { flex: 1 1 380px !important; }
.sn-nivel > .wp-block-column:last-child { flex: 0 0 220px !important; }
.sn-nivel-img { margin: 0; }
.sn-nivel-img img { width: 220px; height: 150px; object-fit: cover; border-radius: 10px; display: block; }

/* ---------- Galería ---------- */
.sn-galeria-principal img { aspect-ratio: 21 / 9 !important; object-position: center 30%; }

/* ---------- Pasos de admisión ---------- */
.sn-pasos { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: sn-paso; }
.sn-pasos li {
	counter-increment: sn-paso;
	position: relative;
	padding: 22px 24px 22px 84px;
	background: rgba(255, 255, 255, 0.09);
	border-radius: 12px;
	color: #E6E7F5;
}
.sn-pasos li strong { display: block; color: #fff; font-size: 19px; }
.sn-pasos li::before {
	content: counter(sn-paso);
	position: absolute;
	left: 24px;
	top: 22px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--wp--preset--color--sol);
	color: #1A1C22;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sn-pasos-compacto { margin-top: 32px !important; }
.sn-pasos-compacto li { background: none; padding: 4px 0 4px 56px; }
.sn-pasos-compacto li::before { left: 0; top: 0; width: 36px; height: 36px; }

/* ---------- Tarjetas y cajas ---------- */
.sn-tarjeta { background: #fff; border-radius: 12px; padding: 26px; }
.sn-tarjeta h3 { font-size: 22px; color: var(--wp--preset--color--texto); margin: 0; }
.sn-tarjeta p { color: var(--wp--preset--color--texto-suave); margin: 8px 0 0; }
.sn-tarjeta-borde { border: 1.5px solid #C5DCE8; }
.sn-bloque-rojo { border-top: 4px solid var(--wp--preset--color--rojo); padding-top: 28px; }
.sn-bloque-rojo p { font-size: 19px; }
.sn-caja-cta { border: 2px solid var(--wp--preset--color--tinta); border-radius: 16px; padding: 40px; gap: 24px 48px; }
.sn-caja-cta h2 { font-size: 34px; margin: 0; }
.sn-caja-cta p { margin: 10px 0 0; color: var(--wp--preset--color--texto-suave); }
.sn-aviso { background: #FFF8D6; border-radius: 12px; padding: 20px 24px; gap: 16px 32px; margin-top: 32px !important; }
.sn-aviso p { margin: 0; font-weight: 600; }

/* Chips de datos por nivel */
.sn-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sn-chips > * { margin: 0 !important; }
.sn-chip { background: var(--wp--preset--color--celeste-claro); border-radius: 10px; padding: 14px 16px; margin: 0; font-weight: 700; }
.sn-chip span { display: block; font-size: 14px; font-weight: 400; color: var(--wp--preset--color--texto-suave); }
.sn-fondo-celeste .sn-chip { background: #fff; }
.sn-lista-check { list-style: none; padding: 0; display: grid; gap: 12px; }
.sn-lista-check li { position: relative; padding-left: 34px; }
.sn-lista-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D7262F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Requisitos ---------- */
.sn-requisito { border: 1.5px solid #C5DCE8; border-radius: 16px; overflow: hidden; }
.sn-requisito > * { margin: 0 !important; }
.sn-requisito-cabecera { background: var(--wp--preset--color--celeste-claro); padding: 24px 26px; border-bottom: 1.5px solid #C5DCE8; }
.sn-requisito-cabecera h3 { font-size: 30px; margin: 0; }
.sn-requisito-cabecera p { margin: 4px 0 0; font-weight: 600; }
.sn-requisito-cuerpo { padding: 24px 26px; }
.sn-requisito-cuerpo > :first-child { margin-top: 0; }
.sn-subtitulo { font-weight: 700; margin: 22px 0 10px !important; }
.sn-requisito-cuerpo ul { padding-left: 20px; display: grid; gap: 6px; margin: 0; }
.sn-edades { list-style: none; padding: 0 !important; gap: 0 !important; }
.sn-edades li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #C5DCE8; padding: 8px 0; }
.sn-edades li:last-child { border-bottom: 0; }

/* ---------- Formulario (WPForms) ---------- */
.sn-form { background: #fff; color: var(--wp--preset--color--texto); border-radius: 16px; padding: 32px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.sn-form h2 { color: var(--wp--preset--color--tinta); font-size: 28px; margin: 0; }
.sn-form .sn-nota { font-size: 14px; color: var(--wp--preset--color--texto-suave); }
.sn-form .wpforms-container { margin: 0; }
.sn-form .wpforms-field-label { font-weight: 600; font-size: 15px; }
.sn-form .wpforms-container input[type="text"],
.sn-form .wpforms-container input[type="email"],
.sn-form .wpforms-container input[type="tel"],
.sn-form .wpforms-container select,
.sn-form .wpforms-container textarea {
	border: 1.5px solid #B4C9DC !important;
	border-radius: 10px !important;
	min-height: 48px;
	font: inherit !important;
	max-width: 100% !important;
}
.sn-form .wpforms-submit {
	background: var(--wp--preset--color--tinta) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 15px 26px !important;
	min-height: 52px;
	height: auto !important;
	font-weight: 700 !important;
	font-size: 17px !important;
	width: 100%;
}

/* ---------- Preguntas frecuentes ---------- */
.sn-faq { display: grid; gap: 12px; }
.sn-faq > * { margin: 0 !important; }
.sn-faq .wp-block-details { background: #fff; border: 1px solid #D9ECF3; border-radius: 12px; padding: 4px 22px; }
.sn-faq summary { font-weight: 700; font-size: 18px; padding: 16px 0; cursor: pointer; }
.sn-faq .wp-block-details p { margin: 0 0 18px; }

/* ---------- Contacto ---------- */
.sn-datos-contacto { list-style: none; padding: 0; display: grid; gap: 18px; font-size: 18px; }
.sn-datos-contacto li { position: relative; padding-left: 38px; }
.sn-datos-contacto li::before { content: ""; position: absolute; left: 0; top: 3px; width: 24px; height: 24px; background: center / contain no-repeat; }
.sn-datos-contacto a { overflow-wrap: anywhere; }
.sn-datos-contacto .sn-i-lugar::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4095' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.sn-datos-contacto .sn-i-reloj::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4095' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.sn-datos-contacto .sn-i-fono::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4095' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E"); }
.sn-datos-contacto .sn-i-correo::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4095' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.sn-mapa { margin: 0; }
.sn-mapa iframe { width: 100%; height: 100%; min-height: 380px; border: 0; border-radius: 14px; display: block; }
.sn-tarjeta-contacto { border-radius: 14px; padding: 26px; border: 1.5px solid #C5DCE8; background: #fff; }
.sn-tarjeta-contacto > * { margin: 0 !important; }
.sn-tarjeta-contacto .sn-etiqueta { font-size: 15px; color: var(--wp--preset--color--texto-suave); }
.sn-tarjeta-contacto .sn-valor { font-weight: 700; font-size: 19px; line-height: 1.35; margin-top: 6px !important; overflow-wrap: anywhere; }
.sn-tarjeta-wa { background: var(--wp--preset--color--whatsapp); border-color: var(--wp--preset--color--whatsapp); color: #fff; }
.sn-tarjeta-wa .sn-etiqueta { color: #E8F5EE; }
.sn-tarjeta-wa a { color: #fff; }
.sn-tarjeta-wa .sn-valor { font-family: var(--wp--preset--font-family--titulos); font-size: 30px; font-weight: 800; }
.sn-enlaces-redes { list-style: none; padding: 0; display: grid; gap: 12px; }
.sn-enlaces-redes a { display: block; background: #fff; border: 1.5px solid #C5DCE8; border-radius: 12px; padding: 16px 20px; font-weight: 700; text-decoration: none; }

/* ---------- Testimonios ---------- */
.sn-testimonio { border: 2px dashed #C5DCE8; border-radius: 12px; padding: 28px; }
.sn-testimonio p { font-size: 18px; color: var(--wp--preset--color--texto-suave); }
.sn-testimonio .sn-autor { font-weight: 700; color: var(--wp--preset--color--texto); font-size: 17px; }

/* ---------- Pie de página ---------- */
.sn-footer { background: var(--wp--preset--color--tinta-oscura); color: #E6E7F5; padding-block: 64px 32px; font-size: 15px; }
.sn-footer a { color: #fff; }
.sn-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sn-escudo { margin: 0; flex: 0 0 auto; }
.sn-escudo img { width: 72px; height: auto; display: block; }
.sn-footer-nombre { font-family: var(--wp--preset--font-family--titulos); font-weight: 800; font-size: 24px; line-height: 1.1; color: #fff; margin: 0; }
.sn-lema { color: var(--wp--preset--color--sol); font-weight: 600; margin: 4px 0 0 !important; }
.sn-copy { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 20px; margin-top: 48px !important; font-size: 14px; color: #CBCDE8; }
.sn-wa-flotante {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wp--preset--color--whatsapp);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	z-index: 99;
}
.sn-wa-flotante:hover { background: #18773F; color: #fff; }
