/**
 * Estilos globales para Eventos Dos Hermanas
 */

:root {
	--edh-primary: #ed8f0c;
	--edh-dark: #1d3557;
	--edh-light: #f1faee;
	--edh-bg: #fafafa;
	--edh-white: #ffffff;
	--edh-shadow: 0 10px 30px rgba(0,0,0,0.05);
	--edh-shadow-hover: 0 15px 35px rgba(0,0,0,0.1);
}

.edh-container { 
	max-width: 1200px; 
	margin: 0 auto; 
	padding: 0 20px !important; 
}

/* Single Event Template */
.edh-single-evento .edh-event-header { 
	height: 400px; 
	display: flex; 
	align-items: center; 
	justify-content: center; 
	text-align: center; 
	color: #fff; 
	background-size: cover; 
	background-position: center; 
	margin-bottom: 40px; 
}

.edh-single-evento .edh-badge { 
	background: var(--edh-primary); 
	color: #fff; 
	padding: 5px 15px; 
	border-radius: 20px; 
	font-size: 0.8rem; 
	margin-right: 5px; 
}

.edh-single-evento .edh-meta-item { 
	margin: 0 15px; 
	font-size: 1.1rem; 
	display: flex;
	align-items: center;
	gap: 8px;
}

.edh-event-meta-top {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.edh-meta-item-group {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.edh-meta-item-group .edh-meta-item {
	margin: 0;
}

/* single-evento.php Redesign 70/30 Sticky */
article.edh-single-evento .edh-content-wrapper {
	overflow: visible !important;
}

article.edh-single-evento .edh-dynamic-grid {
	display: grid !important;
	grid-template-columns: 70% 30% !important;
	grid-template-areas: 
		"edh-header edh-image"
		"edh-description edh-image"
		"edh-info edh-image" !important;
	margin-top: 80px;
	margin-bottom: 80px;
	gap: 10px 30px;
	align-items: flex-start !important;
	overflow: visible !important;
}

.edh-single-evento .edh-entry-header {
	grid-area: edh-header !important;
	order: 1 !important;
}

.edh-single-evento .edh-entry-description {
	grid-area: edh-description !important;
	order: 2 !important;
}

.edh-single-evento .edh-entry-image {
	grid-area: edh-image !important;
	position: relative;
	height: 100%;
	order: 3 !important;
}

.edh-single-evento .edh-entry-info {
	grid-area: edh-info !important;
	order: 4 !important;
}

.edh-sticky-wrapper {
	position: -webkit-sticky;
	position: sticky;
	top: 100px; /* Un poco más arriba para que se vea mejor */
	z-index: 10;
}

.edh-sticky-wrapper img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: var(--edh-shadow);
	display: block;
}

.edh-single-evento .edh-main-content h3 { 
	border-bottom: 2px solid var(--edh-primary); 
	padding-bottom: 10px; 
	margin-top: 0; 
}

.edh-single-evento .edh-card { 
	background: var(--edh-white); 
	border-radius: 12px; 
	padding: 30px 20px; 
	box-shadow: var(--edh-shadow); 
	border-top: 4px solid var(--edh-primary);
	margin-top: 40px;
}

.edh-single-evento .edh-card h4 { 
	margin-top: 0; 
	margin-bottom: 25px;
	color: var(--edh-dark); 
	font-size: 1.5rem;
	text-align: left;
}

.edh-info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
}

.edh-info-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.edh-info-item strong {
	color: var(--edh-primary);
	font-size: 0.9rem;
	text-transform: uppercase;
}

.edh-info-item span {
	font-size: 1.1rem;
	color: var(--edh-dark);
}

.edh-info-column {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.edh-info-footer {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.edh-btn-info {
	display: block;
	width: 100%;
	padding: 15px;
	background: var(--edh-primary);
	color: var(--edh-white);
	text-align: center;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.edh-btn-info:hover {
	background: var(--edh-dark);
	color: var(--edh-white);
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.edh-btn-info .dashicons {
	font-size: 18px;
}

.edh-event-map {
	margin-top: 30px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--edh-shadow);
	line-height: 0; /* Evita espacios extra debajo del iframe */
}

.edh-event-map iframe {
	display: block;
	border: 0;
}

@media (max-width: 1024px) {
	article.edh-single-evento .edh-dynamic-grid {
		display: flex !important;
		flex-direction: column !important;
		margin-top: 40px;
		margin-bottom: 40px;
	}

	.edh-single-evento .edh-entry-header { order: 1 !important; margin-bottom: 0 !important; }
	.edh-single-evento .edh-entry-image { order: 2 !important; }
	.edh-single-evento .edh-entry-description { order: 3 !important; }
	.edh-single-evento .edh-entry-info { order: 4 !important; }

	.edh-sticky-wrapper {
		position: static !important;
	}
	
	.edh-single-evento .edh-event-title { 
		font-size: 2rem !important; 
	}
}

/* Archive Template */
.edh-archive-wrapper { 
	padding: 60px 0; 
	background: var(--edh-bg); 
	min-height: 80vh; 
}

.edh-archive-header { 
	text-align: center; 
	margin-bottom: 50px; 
}

.edh-archive-header h1 { 
	font-size: 3rem; 
	color: var(--edh-dark); 
	margin-bottom: 10px; 
}

/* Archive Filter Redesign */
.edh-archive-filters {
	margin: 20px 0 40px;
	width: 100%;
}

.edh-archive-filters ul.edh-filter-list {
	list-style: none !important;
	padding: 0 !important;
	display: flex !important;
	flex-direction: row !important;
	justify-content: center !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	margin: 20px 0 40px !important;
}

.edh-archive-filters ul.edh-filter-list li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
}

.edh-archive-filters ul.edh-filter-list li::before,
.edh-archive-filters ul.edh-filter-list li::after {
	content: none !important;
}

.edh-archive-filters .edh-filter-list li a {
	display: block;
	padding: 8px 18px;
	background: var(--edh-white);
	color: var(--edh-dark);
	text-decoration: none;
	border-radius: 30px;
	font-size: 0.95rem;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: var(--edh-shadow);
	line-height: 1.2;
}

.edh-archive-filters .edh-filter-list li a:hover,
.edh-archive-filters .edh-filter-list li a.active {
	background: var(--edh-primary) !important;
	color: var(--edh-white) !important;
	transform: translateY(-2px);
	box-shadow: var(--edh-shadow-hover);
}

/* Visibility Utilities */
.edh-hidden { 
	display: none !important; 
}

.edh-events-list .edh-events-grid { 
	display: grid; 
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
	gap: 30px; 
}

.edh-event-card { 
	background: var(--edh-white); 
	border-radius: 12px; 
	overflow: hidden; 
	box-shadow: var(--edh-shadow); 
	transition: transform 0.3s ease; 
}

.edh-event-card:hover { 
	transform: translateY(-5px); 
	box-shadow: var(--edh-shadow-hover); 
}

.edh-card-img { 
	height: 180px; 
	background-size: cover; 
	background-position: center; 
}

.edh-card-content { 
	padding: 20px; 
}

.edh-card-content h3 { 
	margin: 0 0 15px; 
	font-size: 1.25rem; 
	line-height: 1.4; 
}

.edh-card-content h3 a { 
	text-decoration: none; 
	color: var(--edh-dark); 
}

.edh-meta-info p { 
	margin: 5px 0; 
	font-size: 0.9rem; 
	color: #777; 
	display: flex; 
	align-items: center; 
}

.edh-meta-info .dashicons { 
	font-size: 16px; 
	margin-right: 8px; 
	color: var(--edh-primary); 
}

.edh-card-excerpt { 
	font-size: 0.95rem; 
	color: #666; 
	margin: 15px 0; 
}

.edh-btn-more { 
	display: inline-block; 
	padding: 8px 20px; 
	background: var(--edh-dark); 
	color: var(--edh-white); 
	text-decoration: none; 
	border-radius: 5px; 
	transition: background 0.3s; 
}

.edh-btn-more:hover { 
	background: var(--edh-primary);
	color: var(--edh-white); 
}

.edh-pagination { 
	margin-top: 40px; 
	text-align: center; 
}

.edh-pagination .page-numbers { 
	padding: 8px 15px; 
	background: var(--edh-white); 
	border: 1px solid #ddd; 
	text-decoration: none; 
	border-radius: 4px; 
	margin: 0 5px; 
	color: #555; 
}

.edh-pagination .page-numbers.current { 
	background: var(--edh-primary); 
	color: var(--edh-white); 
	border-color: var(--edh-primary); 
}

/* Blocks */
/* Los estilos de grid y diseño para .edh-eventos-lista se manejan desde aquí para asegurar compatibilidad en frontend */

.edh-eventos-lista {
  display: grid !important;
  width: 100% !important;
  gap: 20px;
  margin: 20px 0;
  box-sizing: border-box;
  border: none !important;
  outline: none !important;
}

/* 1. Escritorio (General) */
.edh-eventos-lista[data-edh-cols="1"] { grid-template-columns: 1fr !important; }
.edh-eventos-lista[data-edh-cols="2"] { grid-template-columns: repeat(2, 1fr) !important; }
.edh-eventos-lista[data-edh-cols="3"] { grid-template-columns: repeat(3, 1fr) !important; }
.edh-eventos-lista[data-edh-cols="4"] { grid-template-columns: repeat(4, 1fr) !important; }

/* 2. Tablet (max-width 1024px) */
@media (max-width: 1024px) {
  .edh-eventos-lista[data-edh-cols-tablet="1"] { grid-template-columns: 1fr !important; }
  .edh-eventos-lista[data-edh-cols-tablet="2"] { grid-template-columns: repeat(2, 1fr) !important; }
  .edh-eventos-lista[data-edh-cols-tablet="3"] { grid-template-columns: repeat(3, 1fr) !important; }
}

/* 3. Móvil (max-width 600px) */
@media (max-width: 600px) {
  .edh-eventos-lista[data-edh-cols-mobile="1"] { grid-template-columns: 1fr !important; }
  .edh-eventos-lista[data-edh-cols-mobile="2"] { grid-template-columns: repeat(2, 1fr) !important; }
}


.edh-evento-card {

  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  border: var(--edh-card-border-width, 1px) solid var(--edh-card-border-color, #ddd) !important;
  border-radius: var(--edh-card-border-radius, 8px) !important;
  overflow: hidden;
  box-shadow: 0 4px var(--edh-card-shadow-blur, 6px) var(--edh-card-shadow-color, rgba(0,0,0,0.1)) !important;
  transition: transform 0.3s ease;
  background: #fff;
}

.edh-evento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.edh-evento-thumbnail img {
  width: 100%;
  height: var(--edh-img-height, 200px) !important;
  object-fit: cover;
  display: block;
}

.edh-evento-content {
  padding: 20px;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

.edh-evento-meta {
  font-size: var(--edh-meta-size, 0.85em) !important;
  color: var(--edh-meta-color, #666) !important;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.edh-evento-title {
  font-size: var(--edh-title-size, 1.25em) !important;
  margin: 0 0 10px !important;
  line-height: 1.4 !important;
}

.edh-evento-title a {
  text-decoration: none !important;
  color: var(--edh-title-color, #333) !important;
}

.edh-evento-link {
  display: inline-block !important;
  align-self: flex-start !important;
  margin-top: auto !important; /* EMPUJA EL BOTÓN AL FONDO */
  padding: 10px 20px;
  background-color: var(--edh-btn-bg, #0073aa) !important;
  color: var(--edh-btn-color, #fff) !important;
  font-size: var(--edh-btn-size, 14px) !important;
  border-radius: var(--edh-btn-radius, 4px) !important;
  text-decoration: none !important;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

/* Eliminamos redundancias del final */

