/* ==========================================================================
   MondoSalud - CSS personalizado adicional
   Se carga después de todos los demás estilos del tema.
   ========================================================================== */

/* --- Blog grid improvements --- */
.wp-block-post-template.is-layout-grid {
	gap: 2rem !important;
}

/* Post cards inner padding */
.wp-block-post > .wp-block-group {
	padding: 1.2rem;
}

/* Blog page header */
.wp-block-query > .wp-block-group:first-child {
	text-align: center;
	margin-bottom: 2rem;
}

/* --- Single post improvements --- */
.wp-block-post-content {
	line-height: 1.8;
	font-size: 1.05rem;
}

.wp-block-post-content p {
	margin-bottom: 1.2em;
}

.wp-block-post-content > h2,
.wp-block-post-content > h3 {
	margin-top: 2em;
	margin-bottom: 0.6em;
}

/* --- Author box --- */
.wp-block-post-author {
	background: var(--wp--preset--color--contrast-3);
	padding: 1rem 1.5rem;
	border-radius: var(--ms-radius-md, 12px);
	border-left: 3px solid var(--wp--preset--color--base-2);
}

/* --- Page hero sections --- */
.wp-block-cover .wp-block-cover__inner-container {
	max-width: 800px;
}

/* --- Smooth scroll --- */
html {
	scroll-behavior: smooth;
}

/* --- Selection color --- */
::selection {
	background: rgba(154, 212, 204, 0.3);
	color: var(--wp--preset--color--contrast);
}

/* --- Focus styles (accesibilidad) --- */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--base-2);
	outline-offset: 2px;
}

/* --- Social links row --- */
.wp-block-social-links .wp-social-link a {
	transition: opacity 0.2s ease;
}

.wp-block-social-links .wp-social-link:hover a {
	opacity: 0.85;
}

/* --- Preload animation --- */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-post {
		animation: fadeInUp 0.5s ease both;
	}
	.wp-block-post:nth-child(2) { animation-delay: 0.1s; }
	.wp-block-post:nth-child(3) { animation-delay: 0.2s; }
	.wp-block-post:nth-child(4) { animation-delay: 0.3s; }
	.wp-block-post:nth-child(5) { animation-delay: 0.4s; }
	.wp-block-post:nth-child(6) { animation-delay: 0.5s; }

	.mondosalud-testimonial {
		animation: fadeInUp 0.6s ease both;
	}
}

/* --- Landing page: equipo section --- */
#equipo ~ .wp-block-columns .wp-block-column {
	text-align: center;
}

/* Equipo cards: shadow and hover */
#equipo ~ .wp-block-columns > .wp-block-column {
	box-shadow: 0 4px 20px rgba(87, 61, 62, 0.10);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#equipo ~ .wp-block-columns > .wp-block-column:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 36px rgba(87, 61, 62, 0.16);
}

/* Equipo member images: force proper circle sizing */
.mondosalud-team-photo figure,
#equipo ~ .wp-block-columns .is-style-rounded figure {
	max-width: 200px;
	margin: 0 auto 0.5rem;
}
.mondosalud-team-photo img {
	border-radius: 50% !important;
	border: 4px solid var(--wp--preset--color--base-2, #9ad4cc);
	box-shadow: 0 4px 16px rgba(154, 212, 204, 0.3);
}

/* Equipo: accent color for specialty */
#equipo ~ .wp-block-columns .has-accent-color {
	color: var(--wp--preset--color--base-2, #9ad4cc) !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* --- Landing: tarifas prices emphasis --- */
.wp-block-column h4[id*="h-"] + hr + .wp-block-group p,
.wp-block-column h4[id*="h-"] + hr + .wp-block-group p strong {
	font-size: 1.1rem;
}

/* Landing: CTA section full width button */
.wp-block-button.has-custom-width {
	margin-top: 0.5rem;
}

/* --- Blog section in landing --- */
#blog .wp-block-post-template.is-layout-grid {
	gap: 1.5rem !important;
}

#blog .wp-block-post {
	background: #fff;
}

/* --- Landing sections: alternating subtle backgrounds --- */
main > .wp-block-group.alignfull:nth-child(even) {
	background-color: rgba(246, 246, 246, 0.5);
}

/* Ensure bg-colored sections keep their color */
main > .wp-block-group.alignfull.has-base-2-background-color,
main > .wp-block-group.alignfull.has-contrast-3-background-color,
main > .wp-block-group.alignfull.has-contrast-background-color {
	background-color: revert;
}

/* ==========================================================================
   Formulario de citas
   ========================================================================== */
.mondosalud-form {
	background: #fff;
	padding: 2rem;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(87, 61, 62, 0.08);
}

.mondosalud-form .form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

.mondosalud-form .form-group {
	display: flex;
	flex-direction: column;
}

.mondosalud-form .form-group.full-width {
	margin-bottom: 1rem;
}

.mondosalud-form label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #573d3e;
	margin-bottom: 0.3rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.mondosalud-form input,
.mondosalud-form select,
.mondosalud-form textarea {
	padding: 0.75rem 1rem;
	border: 1px solid rgba(87, 61, 62, 0.15);
	border-radius: 8px;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.95rem;
	color: #573d3e;
	background: #fafafa;
	transition: border-color 0.3s, box-shadow 0.3s;
	width: 100%;
	box-sizing: border-box;
}

.mondosalud-form input:focus,
.mondosalud-form select:focus,
.mondosalud-form textarea:focus {
	outline: none;
	border-color: #9ad4cc;
	box-shadow: 0 0 0 3px rgba(154, 212, 204, 0.2);
	background: #fff;
}

.mondosalud-form input::placeholder,
.mondosalud-form textarea::placeholder {
	color: #aaa;
}

.mondosalud-form textarea {
	resize: vertical;
	min-height: 100px;
}

.mondosalud-form .form-actions {
	text-align: center;
	margin-top: 0.5rem;
}

.mondosalud-submit-btn {
	display: inline-block;
	padding: 0.9rem 2.5rem;
	background: #9ad4cc;
	color: #fff;
	border: none;
	border-radius: 25px;
	font-family: 'Montserrat', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
	letter-spacing: 0.02em;
}

.mondosalud-submit-btn:hover {
	background: #7ab8b0;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(154, 212, 204, 0.35);
}

.mondosalud-submit-btn:active {
	transform: translateY(0);
}

.form-status {
	margin-top: 1rem;
	padding: 0.8rem 1rem;
	border-radius: 8px;
	text-align: center;
	font-size: 0.9rem;
}

.form-status.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.form-status.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Legal note under form */
.mondosalud-form-legal {
	text-align: center;
	font-size: 0.8rem;
	color: #888;
	margin-top: 0.8rem;
	margin-bottom: 0;
}
.mondosalud-form-legal a {
	color: #7ab8b0;
	text-decoration: underline;
}
.mondosalud-form-legal a:hover {
	color: #573d3e;
}

@media (max-width: 600px) {
	.mondosalud-form .form-row {
		grid-template-columns: 1fr;
	}
	.mondosalud-form {
		padding: 1.2rem;
	}
}

/* ==========================================================================
   Mapa
   ========================================================================== */
.mondosalud-map-wrapper {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(87, 61, 62, 0.10);
}

.mondosalud-map-wrapper iframe {
	display: block;
	width: 100%;
	min-height: 280px;
}

/* Contact items */
.mondosalud-contact-item {
	padding: 0.3rem 0;
}
.mondosalud-contact-item a {
	color: #573d3e;
	text-decoration: none;
	border-bottom: 1px solid rgba(154, 212, 204, 0.4);
	transition: border-color 0.3s;
}
.mondosalud-contact-item a:hover {
	border-color: #9ad4cc;
}

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.mondosalud-whatsapp-float {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9998;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
	text-decoration: none;
	transition: transform 0.3s, box-shadow 0.3s;
	animation: whatsappPulse 2s infinite;
}

.mondosalud-whatsapp-float:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
	animation: none;
}

.mondosalud-whatsapp-float svg {
	width: 32px;
	height: 32px;
	fill: #fff;
}

@keyframes whatsappPulse {
	0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
	50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6); }
}

/* WhatsApp in-page button */
.mondosalud-whatsapp-btn .wp-block-button__link {
	background: #25D366 !important;
	color: #fff !important;
	font-weight: 600;
}
.mondosalud-whatsapp-btn .wp-block-button__link:hover {
	background: #1ebe5a !important;
}

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */
.mondosalud-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 10000;
	background: #fff;
	box-shadow: 0 -4px 24px rgba(87, 61, 62, 0.12);
	padding: 1.2rem 2rem;
	transform: translateY(100%);
	transition: transform 0.4s ease;
	border-top: 3px solid #9ad4cc;
}

.mondosalud-cookie-banner.is-visible {
	transform: translateY(0);
}

.mondosalud-cookie-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.mondosalud-cookie-text {
	flex: 1;
	font-size: 0.9rem;
	color: #573d3e;
	line-height: 1.5;
	min-width: 280px;
}

.mondosalud-cookie-text a {
	color: #7ab8b0;
	text-decoration: underline;
}

.mondosalud-cookie-actions {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
}

.mondosalud-cookie-btn {
	padding: 0.6rem 1.4rem;
	border-radius: 25px;
	border: none;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s, transform 0.2s;
	white-space: nowrap;
}

.mondosalud-cookie-btn:hover {
	transform: translateY(-1px);
}

.cookie-btn-accept {
	background: #9ad4cc;
	color: #fff;
}

.cookie-btn-accept:hover {
	background: #7ab8b0;
}

.cookie-btn-necessary {
	background: transparent;
	color: #573d3e;
	border: 1px solid rgba(87, 61, 62, 0.2);
}

.cookie-btn-necessary:hover {
	background: #f6f6f6;
}

.cookie-btn-settings {
	background: transparent;
	color: #7ab8b0;
	text-decoration: underline;
	border: none;
	padding: 0.6rem 0.5rem;
}

/* Cookie details panel */
.mondosalud-cookie-details {
	display: none;
	width: 100%;
	padding-top: 1rem;
	border-top: 1px solid rgba(87, 61, 62, 0.1);
	margin-top: 0.5rem;
}

.mondosalud-cookie-details.is-open {
	display: block;
}

.cookie-option {
	display: flex;
	align-items: flex-start;
	gap: 0.8rem;
	padding: 0.6rem 0;
}

.cookie-option label {
	font-size: 0.85rem;
	color: #573d3e;
	cursor: pointer;
}

.cookie-option input[type="checkbox"] {
	accent-color: #9ad4cc;
	width: 18px;
	height: 18px;
	margin-top: 2px;
}

/* ==========================================================================
   Back to top button
   ========================================================================== */
.mondosalud-back-top {
	position: fixed;
	bottom: 96px;
	right: 28px;
	z-index: 9997;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(87, 61, 62, 0.7);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s, background 0.3s;
	pointer-events: none;
	font-size: 1.2rem;
}

.mondosalud-back-top.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.mondosalud-back-top:hover {
	background: #573d3e;
}

@media (max-width: 600px) {
	.mondosalud-whatsapp-float {
		bottom: 16px;
		right: 16px;
		width: 54px;
		height: 54px;
	}
	.mondosalud-back-top {
		bottom: 80px;
		right: 20px;
		width: 36px;
		height: 36px;
	}
	.mondosalud-cookie-inner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
	.mondosalud-cookie-actions {
		justify-content: center;
	}
}

/* ==========================================================================
   Footer redesign
   ========================================================================== */

/* Top accent line */
.mondosalud-footer {
	position: relative;
}
.mondosalud-footer::before {
	content: '';
	display: block;
	height: 4px;
	background: linear-gradient(90deg, #9ad4cc 0%, #7ab8b0 50%, #9ad4cc 100%);
}

/* Brand column */
.mondosalud-footer-brand {
	padding-right: 2rem;
}

.mondosalud-footer-logo-group {
	gap: 0.8rem !important;
}

.mondosalud-footer-logo figure {
	margin: 0 !important;
}
.mondosalud-footer-logo img {
	border-radius: 10px;
	filter: brightness(1.05);
}

/* Social icons in footer */
.mondosalud-footer-social .wp-social-link {
	transition: transform 0.3s, opacity 0.3s;
}
.mondosalud-footer-social .wp-social-link:hover {
	transform: scale(1.2);
	opacity: 0.85;
}

/* Heading underline accent */
.mondosalud-footer-heading {
	position: relative;
	padding-bottom: 0.6rem;
	margin-bottom: 1rem !important;
}
.mondosalud-footer-heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 32px;
	height: 2px;
	background: #9ad4cc;
	border-radius: 2px;
}

/* Footer link lists */
.mondosalud-footer-list {
	list-style: none !important;
	padding-left: 0 !important;
}
.mondosalud-footer-list li {
	padding: 0.15rem 0;
}
.mondosalud-footer-list li a {
	color: rgba(255, 251, 251, 0.75);
	text-decoration: none;
	transition: color 0.3s, padding-left 0.3s;
	display: inline-block;
}
.mondosalud-footer-list li a:hover {
	color: #9ad4cc;
	padding-left: 4px;
}

/* Footer contact items */
.mondosalud-footer-contact-items p {
	margin: 0 !important;
}
.mondosalud-footer-contact-items a {
	color: rgba(255, 251, 251, 0.75) !important;
	text-decoration: none;
	transition: color 0.3s;
}
.mondosalud-footer-contact-items a:hover {
	color: #9ad4cc !important;
}

/* Footer bottom bar */
.mondosalud-footer-bottom {
	background: rgba(0, 0, 0, 0.15);
	border-top: 1px solid rgba(255, 251, 251, 0.08);
}

/* Footer responsive */
@media (max-width: 781px) {
	.mondosalud-footer .wp-block-columns {
		gap: 2.5rem !important;
	}
	.mondosalud-footer-brand {
		padding-right: 0;
		text-align: center;
	}
	.mondosalud-footer-logo-group {
		justify-content: center !important;
	}
	.mondosalud-footer-brand > .wp-block-paragraph {
		text-align: center;
	}
	.mondosalud-footer-social {
		justify-content: center !important;
	}
	.mondosalud-footer-heading::after {
		left: 50%;
		transform: translateX(-50%);
	}
	.mondosalud-footer-links,
	.mondosalud-footer-contact {
		text-align: center;
	}
	.mondosalud-footer-list li a:hover {
		padding-left: 0;
	}
	.mondosalud-footer-contact-items {
		align-items: center !important;
	}
	.mondosalud-footer .wp-block-buttons {
		justify-content: center !important;
	}
	.mondosalud-footer-bottom .wp-block-group {
		justify-content: center !important;
		gap: 0.5rem;
		text-align: center;
	}
}
