/* ============================================
   HEADER STICKY
   ============================================ */
header {
	position: fixed;
	top: 4px;
	width: 100%;
	z-index: 1000;
}

/* ============================================
   BLOQUE MEDIOS Y TEXTO
   ============================================ */
.wp-block-media-text {
	margin-top: 30px;
	margin-bottom: 30px;
	grid-gap: 30px;
}

.wp-block-media-text .wp-block-media-text__content {
	padding: 30px;
	text-align: justify;
}

.wp-block-media-text .wp-block-media-text__media img,
.wp-block-media-text .wp-block-media-text__media video {
	margin: 2px;
}

/* ============================================
   CONTENIDO PRINCIPAL — ANCHO Y ESPACIADO
   ============================================ */
.entry-content,
.wp-block-post-content,
.page-content {
	padding-top: 0;
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/* ============================================
   FIX TÍTULO — ESPACIO BAJO HEADER STICKY
   ============================================ */
.single .wp-block-post-title,
.single h1.entry-title,
.page .wp-block-post-title,
.page h1.entry-title {
	margin-top: 60px !important;
	padding-top: 0 !important;
}

/* ============================================
   IMÁGENES — ALTURA CONTROLADA EN ESCRITORIO
   ============================================ */
@media (min-width: 768px) {
	.entry-content img,
		  .wp-block-post-content img,
		  .page-content img {
		max-height: 500px;
		width: auto;
		display: block;
		margin-left: auto;
		margin-right: auto;
		object-fit: cover;
	}
}

/* ============================================
   SIDEBAR
   ============================================ */
.widget-area,
.sidebar,
aside.widget-area {
	width: 160px !important;
	min-width: 160px !important;
	max-width: 160px !important;
	background-color: #a9c0d6;
	border-right: 1px solid #91adc5;
	padding: 20px 14px;
}

.widget-area,
.sidebar,
aside.widget-area,
.widget-area a,
.sidebar a {
	color: #1a1a1a;
}

.widget-area a:hover,
.sidebar a:hover {
	color: #1A3A5C;
}

/* ============================================
   ANIMACIÓN SCROLL
   ============================================ */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.entry-content > * {
	animation: fadeInUp .5s linear both;
}

.home .wp-block-group,
.home .wp-block-columns,
.home .wp-block-column,
.home figure.wp-block-image,
.home p.wp-block-paragraph,
.home h2.wp-block-heading,
.home h3.wp-block-heading,
.home .wp-block-separator,
.home .wp-block-quote,
.home .wp-block-buttons,
.home ul.wp-block-list li {
	animation: fadeInUp .5s linear both;
}

/* ============================================
   CARDS DE ARTÍCULOS — HOVER
   ============================================ */
.home ul.wp-block-list li,
.wp-block-latest-posts__list li {
	transition: transform .3s ease, box-shadow .3s ease;
	border-radius: 6px;
}

.home ul.wp-block-list li:hover,
.wp-block-latest-posts__list li:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.home ul.wp-block-list li:hover h3 a,
.wp-block-latest-posts__list li:hover a {
	color: #1A3A5C;
}

.home ul.wp-block-list li img,
.wp-block-latest-posts__list li img {
	transition: transform .4s ease;
}

.home ul.wp-block-list li:hover img,
.wp-block-latest-posts__list li:hover img {
	transform: scale(1.05);
}

/* ============================================
   SEPARADORES ANIMADOS
   ============================================ */
@keyframes growLine {
	from {
		transform: scaleX(0);
		transform-origin: left;
	}
	
	to {
		transform: scaleX(1);
		transform-origin: left;
	}
}

.wp-block-separator,
hr {
	animation: growLine .6s linear both;
}

/* ============================================
   BOTONES — HOVER + RIPPLE
   ============================================ */
@keyframes ripple {
	from {
		transform: scale(0);
		opacity: .4;
	}
	
	to {
		transform: scale(3);
		opacity: 0;
	}
}

.wp-block-button__link,
.wp-element-button {
	position: relative;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .2s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.wp-block-button__link::after,
.wp-element-button::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: rgba(255,255,255,0.35);
	border-radius: 50%;
	transform: scale(0);
	opacity: 0;
}

.wp-block-button__link:active::after,
.wp-element-button:active::after {
	animation: ripple .5s ease-out;
}

/* ============================================
   LINKS CON SUBRAYADO ANIMADO
   ============================================ */
.entry-content a {
	text-decoration: none;
	background-image: linear-gradient(#1A3A5C, #1A3A5C);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: left bottom;
	transition: background-size .3s ease;
}

.entry-content a:hover {
	background-size: 100% 1px;
}

/* ============================================
   FIX POSTS — ESPACIO ICONOS SOCIALES
   ============================================ */
.sharedaddy,
.sd-sharing,
.sd-block.sd-social,
div.sharedaddy.sd-sharing-enabled {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.sharedaddy + *,
.sd-block + * {
	margin-top: 8px !important;
}

.wp-block-social-links {
	margin-bottom: 8px !important;
}

.wp-block-social-links + * {
	margin-top: 8px !important;
}

/* ============================================
   MENÚ MÓVIL
   ============================================ */
.main-navigation .nav-menu,
.main-navigation ul,
.main-navigation ul li,
.main-navigation ul li a,
.nav-menu li a,
header nav a,
.site-header nav ul li a {
	color: #1a1a1a !important;
	background-color: transparent !important;
}

.main-navigation {
	background-color: #ffffff !important;
}

/* ============================================
   BOTONES — COLOR
   ============================================ */
.wp-block-button__link,
.wp-element-button {
	color: #1a1a1a !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	color: #1a1a1a !important;
	opacity: .75;
}

/* ============================================
   ENLACES GLOBALES
   ============================================ */
a {
	text-decoration: underline !important;
}

a:hover {
	text-decoration: underline !important;
	opacity: .7;
}

.main-navigation a,
nav a,
.wp-block-button a,
.wp-block-button__link {
	text-decoration: none !important;
}

.main-navigation a:hover,
nav a:hover {
	text-decoration: underline !important;
}

/* ============================================
   MENÚ MÓVIL — FIX EXPANSIÓN
   ============================================ */
@media (max-width: 768px) {
	header {
		overflow: visible !important;
	}
	
	.main-navigation,
	  .site-header nav,
	  nav.main-navigation {
		overflow: visible !important;
	}
	
	.main-navigation ul,
	  .main-navigation .nav-menu {
		overflow: visible !important;
		position: absolute !important;
		top: 100% !important;
		left: 0 !important;
		width: 100% !important;
		background-color: #ffffff !important;
		z-index: 9999 !important;
		flex-direction: column !important;
		padding: 8px 0 !important;
		box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
	}
	
	.main-navigation ul li a {
		display: block !important;
		padding: 12px 20px !important;
		color: #1a1a1a !important;
		text-decoration: none !important;
		background-color: #ffffff !important;
	}
	
	.main-navigation ul li a:hover {
		background-color: #f0f4f8 !important;
	}
}

@media (max-width: 768px) {
	.home .main-navigation,
	  .home header nav,
	  .home .nav-menu {
		transform: none !important;
		animation: none !important;
	}
}