/*
Theme Name: Bula Abogados
Theme URI: https://bulaabogados.com/
Author: Bula Abogados
Description: Tema de bloques para Bula Abogados. Todo se edita desde el editor de WordPress: páginas con patrones listos (Inicio, Personas, Empresas, Entidades públicas, Abogados, Sobre mí, Contacto, Política de datos) y un blog pensado para captar clientes.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bula
*/

/* ---------- Detalles que theme.json no cubre ---------- */

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

::selection { background: #A9C3E6; color: #14294A; }

/* Encabezado fijo con línea inferior */
.bula-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid #D5DCE5;
}
.admin-bar .bula-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bula-header { top: 0; position: relative; } }

.bula-header .wp-block-site-logo img { max-height: 44px; width: auto; }

/* Rutas por público (portada) */
.bula-rutas { border-top: 1px solid #D5DCE5; }
.bula-ruta {
	position: relative;
	border-bottom: 1px solid #D5DCE5;
	transition: background-color .15s ease;
}
.bula-ruta:hover, .bula-ruta:focus-within { background-color: #EEF2F6; }
.bula-ruta h3 a { color: inherit; text-decoration: none; }
.bula-ruta h3 a::after { content: ""; position: absolute; inset: 0; } /* toda la fila es clicable */
.bula-ruta h3 a:focus-visible { outline: none; }
.bula-ruta:focus-within { outline: 2px solid #1C6B52; outline-offset: -2px; }
.bula-ruta .bula-ruta__ir {
	color: #1C6B52;
	font-weight: 600;
	white-space: nowrap;
}
@media (max-width: 781px) {
	.bula-ruta .wp-block-columns { gap: .25rem !important; }
}

/* Bloque oscuro (plan mensual, llamados) */
.bula-oscuro a:not(.wp-element-button) { color: #A9C3E6; }
.bula-oscuro .wp-block-separator { color: rgba(255,255,255,.2); }

/* Lista con marca de verificación */
.bula-check { list-style: none; padding-left: 0 !important; }
.bula-check li { position: relative; padding-left: 1.75rem; margin-bottom: .55rem; }
.bula-check li::before {
	content: "";
	position: absolute;
	left: .15rem;
	top: .55em;
	width: .7rem;
	height: .38rem;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	color: #1C6B52;
}
.bula-oscuro .bula-check li::before { color: #A9C3E6; }

/* Pasos numerados */
.bula-paso-num {
	font-family: "Source Serif 4", Georgia, serif;
	font-size: 2.75rem;
	line-height: 1;
	color: #1C6B52;
	font-weight: 400;
}

/* Preguntas frecuentes */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	color: #14294A;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: .25rem;
	top: -.1rem;
	font-size: 1.4rem;
	font-weight: 400;
	color: #1C6B52;
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { margin-top: .75rem; color: #3A4556; }

/* Tarjetas de artículos */
.bula-tarjeta .wp-block-post-featured-image img { border-radius: 6px; }
.bula-tarjeta .wp-block-post-title { margin-top: .5rem; }

/* Caja de servicio dentro de artículos */
.bula-caja-cta { border-left: 4px solid #1C6B52; }

/* Tabla de precios */
.bula-precio {
	font-family: "Source Serif 4", Georgia, serif;
	font-weight: 600;
	color: #14294A;
	white-space: nowrap;
}

/* Lectura cómoda en artículos */
.single .wp-block-post-content { font-size: 1.125rem; }
.single .wp-block-post-content > p,
.single .wp-block-post-content li { line-height: 1.75; }
.single .wp-block-post-content h2 { margin-top: 2.5rem; }

.bula-lista-limpia { list-style: none; padding-left: 0 !important; }
.bula-oscuro a:not(.wp-element-button) { text-decoration: none; }
.bula-oscuro a:not(.wp-element-button):hover { text-decoration: underline; }

/* ---------- v2: portada llamativa ---------- */
.bula-hero { position: relative; overflow: hidden; }
.bula-hero > * { position: relative; }
.bula-hero h1 { color: #fff; letter-spacing: -0.02em; }

/* Tarjeta de consulta gratis en la portada */
.bula-tarjeta-consulta { box-shadow: 0 24px 60px rgba(5, 15, 35, .35); }

/* Fondos de color: botón principal en blanco */
.bula-color .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: #14294A; }
.bula-color .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #F3C969; color: #14294A; }
.bula-color .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.7); }
.bula-color .wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); }
.bula-color a:not(.wp-element-button) { color: #fff; }
.bula-color .bula-check li::before { color: #F3C969; }

/* Tarjetas por público */
.bula-publicos { margin-top: calc(-1 * clamp(3rem, 7vw, 6rem)) !important; position: relative; z-index: 2; }
.bula-publico {
	height: 100%;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 14px 40px rgba(20, 41, 74, .14);
	display: flex;
	flex-direction: column;
}
.bula-publico > .wp-block-group:last-child { flex: 1; display: flex; flex-direction: column; }
.bula-publico > .wp-block-group:last-child > .wp-block-buttons { margin-top: auto; }
.bula-publico .bula-check li { font-size: .95rem; margin-bottom: .45rem; }
.bula-publicos > .wp-block-column { display: flex; }
.bula-publicos > .wp-block-column > .bula-publico { width: 100%; }
.bula-publico--personas .bula-check li::before { color: #1C6B52; }
.bula-publico--empresas .bula-check li::before { color: #14294A; }
.bula-publico--entidades .bula-check li::before { color: #2C5A8C; }
.bula-publico--abogados .bula-check li::before { color: #8C5410; }

/* Franja de experiencia */
.bula-experiencia p { margin: 0; }
.bula-experiencia .bula-entidad {
	font-family: "Source Serif 4", Georgia, serif;
	font-size: 1.15rem;
	font-weight: 600;
	color: #14294A;
}

/* Tarjetas de planes */
.bula-plan { height: 100%; border-radius: 12px; }
.bula-plan--destacado { box-shadow: 0 18px 50px rgba(20, 41, 74, .28); }

/* Tarjeta blanca dentro de fondos de color: vuelve a los colores normales */
.bula-color .bula-tarjeta-consulta a:not(.wp-element-button) { color: #1C6B52; }
.bula-color .bula-tarjeta-consulta .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #1C6B52; color: #fff; }
.bula-color .bula-tarjeta-consulta .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #14513E; }
.bula-color .bula-tarjeta-consulta .bula-check li::before { color: #1C6B52; }
.bula-tarjeta-consulta .wp-block-button { width: 100%; }
.bula-tarjeta-consulta .wp-block-button__link { width: 100%; text-align: center; }

.bula-publico .wp-block-button { width: 100%; }
.bula-publico .wp-block-button__link { width: 100%; text-align: center; }
@media (min-width: 782px) {
	.bula-publico > .wp-block-group:first-child { min-height: 10.5rem; }
}
.has-text-align-right { text-align: right; }
@media (max-width: 781px) { .bula-precio.has-text-align-right { text-align: left; } }
.bula-servicio { border-bottom: 1px solid #D5DCE5; }
