/* =========================================================================
   ACRD — Homepage redesign
   Tokens del Figma + maquetación de todas las secciones.
   Todo va scopeado bajo .acrd-home para no afectar a wp-admin u otras vistas.
   ========================================================================= */

/* ---- Fuente principal: Satoshi (self-host) ---- */
@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/Satoshi-Regular.woff2') format('woff2');
	font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/Satoshi-Medium.woff2') format('woff2');
	font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Satoshi';
	src: url('../fonts/Satoshi-Bold.woff2') format('woff2');
	font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- Tokens ---- */
:root {
	--acrd-gold: #C69D05;
	--acrd-gold-bright: #E6AC00;
	--acrd-green: #154A20;
	--acrd-green-dark: #0E3618;
	--acrd-teal: #006D7F;
	--acrd-ink: #0A0E1A;
	--acrd-body: #4A4F58;
	--acrd-muted: #6B7280;
	--acrd-bg: #FFFFFF;
	--acrd-bg-gray: #F2F3F6;
	--acrd-bg-green: #EEF5EE;
	--acrd-border: #E3E7E9;
	--acrd-shadow: 0 14px 40px rgba(10,14,26,.08);
	--acrd-radius: 10px;
	--acrd-wrap: 1200px;
	--acrd-font: 'Satoshi', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--acrd-font-alt: 'Inter', var(--acrd-font);
}

/* ---- Reset scopeado ---- */
.acrd-home-body { margin: 0; }
.acrd-home, .acrd-home * { box-sizing: border-box; }
.acrd-home {
	font-family: var(--acrd-font);
	color: var(--acrd-body);
	font-size: 15px;
	line-height: 1.65;
	background: var(--acrd-bg);
	-webkit-font-smoothing: antialiased;
}
.acrd-home img { max-width: 100%; height: auto; display: block; }
.acrd-home a { color: inherit; text-decoration: none; }
.acrd-home h1, .acrd-home h2, .acrd-home h3, .acrd-home h4 {
	margin: 0; color: var(--acrd-ink); font-weight: 700; line-height: 1.2;
}
.acrd-home p { margin: 0 0 1em; }
.acrd-home ul { margin: 0; padding: 0; list-style: none; }

.acrd-wrap { max-width: var(--acrd-wrap); margin: 0 auto; padding: 0 24px; }
.acrd-section { padding: 72px 0; }

/* ---- Botones ---- */
.acrd-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--acrd-gold); color: #fff; font-weight: 700;
	font-size: 14px; padding: 12px 26px; border-radius: 6px;
	transition: background .2s ease, transform .2s ease; cursor: pointer; border: 0;
}
.acrd-btn:hover { background: var(--acrd-gold-bright); transform: translateY(-1px); }
.acrd-btn--ghost { background: transparent; color: var(--acrd-green); border: 1.5px solid var(--acrd-border); }
.acrd-btn--ghost:hover { background: var(--acrd-green); color: #fff; border-color: var(--acrd-green); }

/* ---- Encabezado de sección ---- */
.acrd-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.acrd-head h2 { font-size: 32px; }
.acrd-head--center { flex-direction: column; text-align: center; }
.acrd-head--center p { color: var(--acrd-muted); max-width: 560px; margin: 10px auto 0; font-size: 14px; }
.acrd-eyebrow { color: var(--acrd-gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }

/* ---- Tag de categoría ---- */
.acrd-tag {
	display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
	padding: 5px 12px; border-radius: 4px; text-transform: capitalize; letter-spacing: .02em;
}
.acrd-tag.is-green { background: var(--acrd-green); }
.acrd-tag.is-teal { background: var(--acrd-teal); }
.acrd-tag.is-gold { background: var(--acrd-gold); }

/* =========================================================================
   HEADER
   ========================================================================= */
.acrd-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--acrd-border); }
.acrd-header__inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(28px, 5vw, 64px); height: 76px; }
.acrd-logo { display: inline-flex; align-items: center; }
.acrd-home .acrd-logo__img { height: 46px; width: auto; max-width: none; display: block; }
.acrd-home .acrd-footer__about .acrd-logo__img { height: 54px; }
.acrd-nav { display: flex; align-items: center; }
.acrd-menu { display: flex; align-items: center; gap: 34px; }
.acrd-menu li { position: relative; }
.acrd-menu a { color: var(--acrd-ink); font-weight: 500; font-size: 15px; display: block; padding: 6px 0; transition: color .2s; }
.acrd-menu a:hover { color: var(--acrd-gold); }
.acrd-menu .menu-item-has-children > a::after { content: '⌄'; margin-left: 6px; font-size: 13px; position: relative; top: -2px; }
/* Submenús (dropdown en desktop) */
.acrd-menu .sub-menu {
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
	background: #fff; border: 1px solid var(--acrd-border); border-radius: 10px;
	box-shadow: var(--acrd-shadow); padding: 8px 0; z-index: 60;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s;
}
.acrd-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
/* Pequeño retardo al salir para que el dropdown no se cierre de golpe. */
.acrd-menu .sub-menu { transition: opacity .18s, transform .18s, visibility .18s; transition-delay: .12s; }
/* Puente invisible que cubre el hueco entre el ítem y el dropdown,
   para no perder el :hover al bajar el cursor (dead zone). */
.acrd-menu .menu-item-has-children > .sub-menu::before {
	content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 12px;
}
.acrd-menu > li > a { padding: 12px 0; }
.acrd-menu .sub-menu a { padding: 10px 18px; font-size: 14px; white-space: nowrap; }
.acrd-menu .sub-menu a:hover { background: var(--acrd-bg-gray); color: var(--acrd-gold); }
.acrd-menu .sub-menu .sub-menu { top: -8px; left: 100%; }
/* Submenú anidado: el puente va al costado (abre hacia la derecha). */
.acrd-menu .sub-menu .sub-menu::before {
	top: 0; bottom: 0; left: -12px; right: auto; width: 14px; height: auto;
}
.acrd-nav__contacto { display: none; }
.acrd-header__actions { display: flex; align-items: center; gap: 18px; }
.acrd-search { width: 20px; height: 20px; color: var(--acrd-ink); cursor: pointer; }
.acrd-burger { display: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--acrd-ink); width: 28px; height: 28px; }
.acrd-burger svg { width: 28px; height: 28px; }

/* =========================================================================
   HERO
   ========================================================================= */
.acrd-hero { padding: 20px 32px 0; }
.acrd-hero__frame {
	position: relative; max-width: 1640px; margin: 0 auto;
	height: 560px; border-radius: 24px; overflow: hidden;
}
.acrd-hero__track { position: absolute; inset: 0; }
.acrd-hero__slide {
	position: absolute; inset: 0; opacity: 0; visibility: hidden;
	transition: opacity .6s ease; z-index: 1;
}
.acrd-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.acrd-hero__media { position: absolute; inset: 0; overflow: hidden; }
.acrd-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.acrd-hero__media::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(7,10,17,.78) 0%, rgba(7,10,17,.45) 55%, rgba(7,10,17,.15) 100%);
}
.acrd-hero__inner { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 52px; }
.acrd-hero__card {
	max-width: 520px; color: #fff;
	background: rgba(7,10,17,.55); backdrop-filter: blur(6px);
	border-radius: 18px; padding: 38px 40px;
}
.acrd-hero__card h1 { color: #fff; font-size: 40px; line-height: 1.16; margin-bottom: 16px; }
.acrd-hero__card h1 a { color: #fff; transition: color .2s; }
.acrd-hero__card h1 a:hover { color: var(--acrd-gold-bright); }
.acrd-hero__card p { color: rgba(255,255,255,.80); font-size: 14.5px; margin-bottom: 26px; }

/* Flechas del carrusel (círculos dorados) dentro de la tarjeta */
.acrd-hero__nav-group { display: flex; gap: 14px; }
.acrd-hero__nav {
	width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
	display: grid; place-items: center; color: #fff; background: var(--acrd-gold);
	transition: background .2s, transform .2s;
}
.acrd-hero__nav:hover { background: var(--acrd-gold-bright); transform: translateY(-2px); }
.acrd-hero__nav svg { width: 17px; height: 17px; }
.acrd-hero__nav--prev svg { transform: scaleX(-1); }

/* Iconos sociales (círculos dorados) sobre el borde derecho del marco */
.acrd-hero__social { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 12px; }
.acrd-hero__social a {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
	background: var(--acrd-gold); color: #fff; transition: background .2s, transform .2s;
}
.acrd-hero__social a:hover { background: var(--acrd-gold-bright); transform: scale(1.08); }

/* =========================================================================
   RECOMENDACIONES
   ========================================================================= */
.acrd-recs .acrd-head h2 { font-size: 40px; }
.acrd-recs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.acrd-rec {
	background: var(--acrd-bg-gray); border-radius: 12px; padding: 36px 30px;
	transition: transform .2s, box-shadow .2s, background .2s; text-align: left;
}
.acrd-rec:hover { transform: translateY(-4px); box-shadow: var(--acrd-shadow); }
.acrd-rec.is-active { background: var(--acrd-gold); color: #fff; }
.acrd-rec.is-active .acrd-rec__title { color: #fff; }
.acrd-rec.is-active p { color: rgba(255,255,255,.88); }
.acrd-rec__icon {
	width: 64px; height: 64px; border-radius: 50%;
	background: #fff; color: var(--acrd-gold);
	display: grid; place-items: center; margin-bottom: 26px;
	box-shadow: 0 4px 14px rgba(10,14,26,.07);
}
.acrd-rec__icon svg { width: 30px; height: 30px; }
.acrd-rec.is-active .acrd-rec__icon { background: var(--acrd-ink); color: var(--acrd-gold); }
.acrd-rec__title { font-size: 19px; font-weight: 700; color: var(--acrd-ink); margin-bottom: 10px; }
.acrd-rec p { font-size: 13px; color: var(--acrd-muted); margin: 0; }

/* =========================================================================
   HISTORIA
   ========================================================================= */
.acrd-historia { background: var(--acrd-bg-gray); }
.acrd-historia__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.acrd-historia h2 { font-size: 36px; margin-bottom: 20px; }
.acrd-historia p { color: var(--acrd-body); margin-bottom: 16px; }
.acrd-historia .acrd-btn { margin-top: 10px; padding: 13px 34px; }
.acrd-historia__media img { border-radius: 16px; box-shadow: var(--acrd-shadow); width: 100%; }
.acrd-historia__ph {
	aspect-ratio: 3 / 2; border-radius: 16px; box-shadow: var(--acrd-shadow);
	background: linear-gradient(135deg, #E9ECEF 0%, #D7DDE0 100%);
}

/* =========================================================================
   GRID DE NOTICIAS
   ========================================================================= */
.acrd-news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.acrd-card {
	background: #fff; border: 1px solid var(--acrd-border); border-radius: var(--acrd-radius);
	overflow: hidden; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.acrd-card:hover { transform: translateY(-4px); box-shadow: var(--acrd-shadow); }
.acrd-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.acrd-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.acrd-card:hover .acrd-card__media img { transform: scale(1.05); }
.acrd-card__media .acrd-tag { position: absolute; top: 14px; left: 14px; }
.acrd-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.acrd-card__meta { display: flex; gap: 16px; color: var(--acrd-muted); font-size: 12px; margin-bottom: 10px; }
.acrd-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.acrd-card__title { font-size: 17px; font-weight: 700; color: var(--acrd-ink); line-height: 1.35; margin-bottom: 14px; }
.acrd-card__title a:hover { color: var(--acrd-gold); }
.acrd-readmore { margin-top: auto; color: var(--acrd-green); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.acrd-readmore:hover { color: var(--acrd-gold); gap: 10px; }

/* =========================================================================
   INVESTIGACIONES (fondo gris)
   ========================================================================= */
.acrd-invest { background: var(--acrd-bg-gray); }
.acrd-invest__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.acrd-invest__feature { background: #fff; border-radius: var(--acrd-radius); overflow: hidden; box-shadow: var(--acrd-shadow); }
.acrd-invest__feature img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.acrd-invest__feature .pad { padding: 26px 30px 32px; }
.acrd-invest__feature h3 { font-size: 24px; margin-bottom: 12px; }
.acrd-invest__list { display: flex; flex-direction: column; gap: 18px; }
.acrd-mini { display: grid; grid-template-columns: 110px 1fr; gap: 16px; background: #fff; border-radius: var(--acrd-radius); padding: 12px; align-items: center; }
.acrd-mini img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; }
.acrd-mini h4 { font-size: 15px; line-height: 1.35; margin-bottom: 6px; }
.acrd-mini .acrd-card__meta { margin: 0; }

/* =========================================================================
   EVENTOS
   ========================================================================= */
.acrd-events__list { border: 1px solid var(--acrd-border); border-radius: var(--acrd-radius); overflow: hidden; }
.acrd-event { display: grid; grid-template-columns: 130px 150px 1fr 200px 160px; align-items: center; gap: 20px; padding: 22px 28px; border-bottom: 1px solid var(--acrd-border); }
.acrd-event:last-child { border-bottom: 0; }
.acrd-event:hover { background: var(--acrd-bg-gray); }
.acrd-event__date { text-align: center; }
.acrd-event__date b { display: block; font-size: 26px; color: var(--acrd-ink); }
.acrd-event__date span { font-size: 12px; color: var(--acrd-muted); text-transform: uppercase; }
.acrd-event__time { color: var(--acrd-muted); font-size: 13px; }
.acrd-event__title { font-weight: 700; color: var(--acrd-ink); font-size: 16px; }
.acrd-event__speaker { color: var(--acrd-body); font-size: 14px; }
.acrd-event__loc { color: var(--acrd-muted); font-size: 13px; }

/* =========================================================================
   EXALTACIÓN (texto + video)
   ========================================================================= */
.acrd-exalt { background: var(--acrd-bg-green); }
.acrd-exalt__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.acrd-exalt h2 { font-size: 32px; margin-bottom: 18px; }
.acrd-exalt p { color: var(--acrd-body); margin-bottom: 14px; }
.acrd-video { position: relative; border-radius: var(--acrd-radius); overflow: hidden; box-shadow: var(--acrd-shadow); }
.acrd-video img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.acrd-video__play {
	position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
	background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--acrd-gold);
	transition: transform .2s, background .2s;
}
.acrd-video:hover .acrd-video__play { transform: scale(1.08); background: #fff; }

/* =========================================================================
   ACTIVIDAD MIEMBROS
   ========================================================================= */
.acrd-members__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.acrd-footer { background: var(--acrd-bg-green); padding: 64px 0 0; margin-top: 8px; }
.acrd-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; }
.acrd-footer h4 { font-size: 15px; color: var(--acrd-ink); margin-bottom: 18px; }
.acrd-footer__about p { font-size: 13px; color: var(--acrd-muted); margin: 16px 0 6px; }
.acrd-footer__links a { display: block; color: var(--acrd-body); font-size: 14px; padding: 6px 0; transition: color .2s; }
.acrd-footer__links a:hover { color: var(--acrd-gold); }
/* flex-wrap desde la base: mantiene input y botón en una fila cuando caben, y
   deja que envuelvan cuando no. Sin él, el min-content del formulario obliga a
   la columna del footer a medir ~278px y desborda a 768px (iPad vertical). */
.acrd-news-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* min-width:0 es imprescindible: sin él el input no baja de su tamaño
   intrínseco, y ese min-content infla las columnas 1fr del grid del footer,
   provocando scroll horizontal en pantallas de ~500-700px. */
.acrd-news-form input { flex: 1; min-width: 0; border: 1px solid var(--acrd-border); border-radius: 6px; padding: 11px 14px; font: inherit; font-size: 13px; }
.acrd-social { display: flex; gap: 10px; margin-top: 18px; }
.acrd-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--acrd-green); color: #fff; transition: background .2s; }
.acrd-social a:hover { background: var(--acrd-gold); }
.acrd-footer__bar { border-top: 1px solid var(--acrd-border); padding: 22px 0; text-align: center; color: var(--acrd-muted); font-size: 13px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
	.acrd-recs__grid { grid-template-columns: repeat(2, 1fr); }
	.acrd-news__grid, .acrd-members__grid { grid-template-columns: repeat(2, 1fr); }
	.acrd-historia__grid, .acrd-invest__grid, .acrd-exalt__grid { grid-template-columns: 1fr; gap: 36px; }
	.acrd-event { grid-template-columns: 90px 1fr; grid-template-areas: 'date title' 'date speaker'; row-gap: 6px; }
	.acrd-event__time, .acrd-event__loc { display: none; }
	.acrd-hero__frame { height: 500px; }
	.acrd-hero__card h1 { font-size: 32px; }
}

/* Menú hamburguesa: el nav pasa a panel desplegable bajo el header */
@media (max-width: 880px) {
	.acrd-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-bottom: 1px solid var(--acrd-border);
		box-shadow: 0 12px 30px rgba(10,14,26,.10); padding: 6px 0;
		max-height: 80vh; overflow-y: auto;
	}
	.acrd-header.is-open .acrd-nav { display: flex; }
	.acrd-menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
	.acrd-menu a { padding: 13px 24px; font-size: 15px; }
	.acrd-menu a:hover { background: var(--acrd-bg-gray); }
	.acrd-menu .menu-item-has-children > a::after { content: ''; }
	/* Submenús: en mobile se muestran expandidos e indentados */
	.acrd-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; border-radius: 0; padding: 0; min-width: 0;
		background: var(--acrd-bg-gray);
	}
	.acrd-menu .sub-menu a { padding: 11px 38px; font-size: 14px; }
	.acrd-menu .sub-menu .sub-menu { left: 0; }
	.acrd-menu .sub-menu .sub-menu a { padding-left: 52px; }
	.acrd-nav__contacto { display: block; color: var(--acrd-gold); font-weight: 700; padding: 13px 24px; border-top: 1px solid var(--acrd-border); }
	.acrd-burger { display: grid; place-items: center; }
	.acrd-header__cta { display: none; }
}

@media (max-width: 720px) {
	.acrd-section { padding: 48px 0; }
	.acrd-hero__social { display: none; }
	.acrd-recs__grid, .acrd-news__grid, .acrd-members__grid { grid-template-columns: 1fr; }
	.acrd-head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.acrd-head h2 { font-size: 26px; }

	/* Hero */
	.acrd-hero { padding: 12px 14px 0; }
	.acrd-hero__frame { height: 440px; border-radius: 18px; }
	.acrd-hero__inner { padding: 0 16px; }
	.acrd-hero__media::after { background: linear-gradient(180deg, rgba(7,10,17,.40) 0%, rgba(7,10,17,.78) 100%); }
	.acrd-hero__card { max-width: none; padding: 22px 22px; background: rgba(7,10,17,.58); }
	.acrd-hero__card h1 { font-size: 23px; line-height: 1.22; margin-bottom: 12px; }
	.acrd-hero__card p { font-size: 13px; margin-bottom: 20px;
		display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.acrd-hero__nav { width: 40px; height: 40px; }

	.acrd-recs .acrd-head h2 { font-size: 30px; }
	.acrd-historia h2, .acrd-exalt h2 { font-size: 28px; }
	.acrd-footer__grid { grid-template-columns: 1fr 1fr; }

	/* Boletín: en columna estrecha el input y el botón no caben en una fila. */
	.acrd-news-form { flex-wrap: wrap; }
	.acrd-news-form input { flex-basis: 100%; }
	.acrd-news-form .acrd-btn { width: 100%; }
}

@media (max-width: 480px) {
	.acrd-header__cta { display: none; }
	.acrd-home .acrd-logo__img { height: 38px; }
	.acrd-hero__frame { height: 400px; }
	.acrd-hero__card h1 { font-size: 21px; }
	.acrd-footer__grid { grid-template-columns: 1fr; }
}
