/**
 * Páginas legacy (contactar, nosotros, 404, 500, legal modern).
 * Cargado junto a styles.php en todas las plantillas.
 */

/* Hero con imagen dinámica (--hero-bg-image en el elemento) */
.hero.contacto-hero,
.hero.nosotros-hero {
	background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--hero-bg-image);
}

.legacy-hero-inner {
	position: relative;
	z-index: 1;
	color: #fff;
}

.legacy-hero__title {
	font-size: 36px;
	margin-bottom: 20px;
	font-weight: 700;
}

.legacy-wa-link {
	margin-left: 10px;
}

.success-message .success-text--green {
	color: #00b300;
}

/* Legal (plantilla modern) */
.h1-legal-modern {
	font-size: 1.5rem;
	margin-bottom: 0.35rem;
	color: var(--titulos);
}

.legal-meta-modern {
	color: #666;
	font-size: 0.9rem;
	margin-bottom: 1.75rem;
}

.legal-lead-modern {
	line-height: 1.7;
	margin-bottom: 1.25rem;
}

.legal-h2-modern {
	color: var(--titulos);
	margin-top: 2rem;
}

.legal-list-modern {
	line-height: 1.8;
}

/* Nosotros: grilla de servicios */
.about-services .services-grid--1 {
	grid-template-columns: 1fr;
	max-width: 600px;
	margin: 0 auto;
}

.about-services .services-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.about-services .services-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

.about-services .services-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}

.about-services .services-grid {
	display: grid;
	gap: 2rem;
}

.about-services .service-card-icon-fa {
	font-size: 48px;
	color: var(--iconos);
	display: block;
	margin: 0 auto 20px;
}

@media screen and (max-width: 1200px) {
	.about-services .services-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media screen and (max-width: 768px) {
	.about-services .services-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Página de contacto */
.contact-page-section {
	padding-top: 30px;
	padding-bottom: 60px;
}

.legacy-card {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.legacy-card--spaced {
	margin-bottom: 30px;
}

.legacy-card__title {
	font-size: 24px;
	margin-bottom: 20px;
}

.legacy-card__subtitle {
	font-size: 18px;
	margin-bottom: 10px;
}

.legacy-block {
	margin-bottom: 20px;
}

.legacy-text-muted {
	color: #666;
}

.legacy-text-muted--tight {
	color: #666;
	margin-bottom: 5px;
}

.legacy-link-muted {
	color: #666;
	text-decoration: none;
}

.legacy-icon-accent {
	color: var(--principal);
	margin-right: 10px;
}

.legacy-icon-wa {
	color: #25d366;
}

.legacy-social-title {
	font-size: 18px;
	margin-bottom: 20px;
}

.legacy-social-row {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: space-between;
}

.legacy-social-link {
	flex: 1;
	min-width: 80px;
	text-align: center;
	padding: 15px;
	border-radius: 8px;
	background-color: #f8f9fa;
	transition: all 0.3s ease;
	font-size: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.legacy-social-link--facebook {
	color: #3b5998;
}

.legacy-social-link--twitter {
	color: #1da1f2;
}

.legacy-social-link--instagram {
	color: #c32aa3;
}

.legacy-social-link--tiktok {
	color: #000;
}

.legacy-social-link--whatsapp {
	color: #25d366;
}

.legacy-social-link__label {
	font-size: 12px;
	margin-top: 5px;
	color: #666;
}

.contact-form-col {
	padding-top: 30px;
}

.captcha-canvas {
	border: 1px solid #ddd;
	border-radius: 4px;
}

.contact-map-section {
	margin-top: 60px;
}

.contact-map {
	height: 400px;
	border-radius: 8px;
	position: relative;
	overflow: hidden;
}

.contact-map__link {
	display: block;
	width: 100%;
	height: 100%;
}

.contact-map__cta-wrap {
	position: absolute;
	bottom: 50px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
}

.contact-map__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 20px;
	background-color: #fff;
	color: var(--principal);
	border: 1px solid var(--principal);
	border-radius: 4px;
	font-weight: 500;
	transition: all 0.3s;
	text-decoration: none;
}

.loader {
	border: 4px solid #f3f3f3;
	border-radius: 50%;
	border-top: 4px solid #3498db;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.captcha-group {
	margin-bottom: 15px;
}

.captcha-container {
	background: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

#refreshCaptcha {
	background: #f8f9fa;
	border: 1px solid #ddd;
	cursor: pointer;
}

#refreshCaptcha:hover {
	background: #e9ecef;
}

.contact-btn:hover {
	background-color: #ff5a39;
}

.contact-info-columns {
	display: flex;
	gap: 30px;
}

.contact-info-col {
	flex: 1;
	min-width: 0;
}

.contact-info-col-right {
	padding-left: 15px;
	border-left: 1px solid #eee;
}

.contact-info-col-left {
	padding-right: 15px;
}

@media (max-width: 767px) {
	.contact-info-columns {
		flex-direction: column;
		gap: 20px;
	}

	.contact-info-col-left {
		padding-right: 0;
	}

	.contact-info-col-right {
		padding-left: 0;
		border-left: 0;
		border-top: 1px solid #eee;
		padding-top: 20px;
	}
}

.form-container {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.form-title {
	font-size: 24px;
	margin-bottom: 30px;
}

.form-row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.form-column {
	flex: 0 0 100%;
	max-width: 100%;
	padding: 0 15px;
	box-sizing: border-box;
}

.form-group {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	color: #333;
	font-weight: 500;
}

.form-control {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-sizing: border-box;
}

textarea.form-control {
	resize: vertical;
}

.refresh-button {
	padding: 5px 10px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	cursor: pointer;
	border-radius: 4px;
}

@media (min-width: 768px) {
	.form-column {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/* 404 / 500 */
.error-page {
	padding: 80px 0;
	text-align: center;
	background-color: var(--fondo);
	min-height: calc(100vh - 400px);
	display: flex;
	align-items: center;
}

.error-content {
	max-width: 600px;
	margin: 0 auto;
	padding: 40px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.error-icon {
	font-size: 80px;
	color: var(--iconos);
	margin-bottom: 20px;
	animation: bounce 2s ease infinite;
}

.error-icon--wrench {
	animation: wrench 2.5s ease infinite;
}

@keyframes bounce {
	0%,
	20%,
	50%,
	80%,
	100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-20px);
	}
	60% {
		transform: translateY(-10px);
	}
}

@keyframes wrench {
	0% {
		transform: rotate(-12deg);
	}
	8% {
		transform: rotate(12deg);
	}
	10% {
		transform: rotate(24deg);
	}
	18% {
		transform: rotate(-24deg);
	}
	20% {
		transform: rotate(-24deg);
	}
	28% {
		transform: rotate(24deg);
	}
	30% {
		transform: rotate(24deg);
	}
	38% {
		transform: rotate(-24deg);
	}
	40% {
		transform: rotate(-24deg);
	}
	48% {
		transform: rotate(24deg);
	}
	50% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(0deg);
	}
}

.error-content h1 {
	font-size: 24px;
	color: var(--titulos);
	margin-bottom: 20px;
}

.error-content p {
	color: var(--texto);
	margin-bottom: 15px;
	font-size: 18px;
}

.error-actions {
	margin-top: 30px;
	display: flex;
	gap: 15px;
	justify-content: center;
}

.btn-home,
.btn-properties,
.btn-contact {
	padding: 12px 25px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.btn-home {
	background-color: var(--boton-fondo);
	color: var(--boton-texto);
}

.btn-properties,
.btn-contact {
	background-color: var(--fondo);
	color: var(--titulos);
	border: 2px solid var(--boton-fondo);
}

.btn-home:hover {
	background-color: var(--boton-fondo-hover);
	color: var(--boton-texto-hover);
}

.btn-properties:hover,
.btn-contact:hover {
	background-color: var(--boton-fondo);
	color: var(--boton-texto);
}

@media (max-width: 768px) {
	.error-content {
		padding: 20px;
	}

	.error-content h1 {
		font-size: 18px;
	}

	.error-content p {
		font-size: 16px;
	}

	.error-actions {
		flex-direction: column;
	}

	.btn-home,
	.btn-properties,
	.btn-contact {
		width: 100%;
	}
}
