@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700;800;900&display=swap');

/* ============================================
	VARIABLES
============================================ */

:root {
	--color-black: #000;
	--color-off: #999;
	--color-white: #fff;
	--color-bone: #F2F1E7;
	--color-orange: #F26E21;
	--color-yellow: #F2AF21;
	--color-gray: #888;
	--fw-medium: 600;
	--radius: 3px;
	--shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ========================= */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: 'Montserrat', sans-serif;
}

img {
	user-select: none;
}

html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--color-bone);
	font-size: 14px;
	min-height: 100dvh;
	display: flex;
	justify-content: center;
	align-items: start;
}

/* ============================================
	NAV
============================================ */

nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--color-yellow);
	z-index: 1000;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
	transition: background-color 0.4s ease;
}

#menu {
	width: 90dvw;
	max-width: 1080px;
	margin: 0 auto;
	padding: 12px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: width 0.3s ease, margin-top 0.2s ease, margin-bottom 0.5s ease;
}

#menu.show {
	margin-top: 40px;
	margin-bottom: 40px;
}

#bird {
		height: 50px;
	width: auto;
	transform: translateY(2px);
	transition: opacity 0.6s ease, height 0.3s ease-in-out;
}

#menu.show #bird {
	height: 70px;
}

/* Solo el ul principal en fila */
#menu>ul {
	display: flex;
	gap: 20px;
	list-style: none;
}

#menu a,
#menu-movil a {
	text-decoration: none;
	text-transform: uppercase;
	color: var(--color-white);
	font-weight: var(--fw-medium);
	transition: color 0.3s ease;
}

/* Los submenús en columna */
.dropdown-menu {
	display: flex;
	flex-direction: column;
	list-style: none;
	max-height: 0;
	overflow: hidden;
	gap: 10px;
	transition: max-height 0.3s ease;
}

.dropdown-menu>li:first-child {
	margin-top: 10px;
}

.dropdown-menu.show {
	max-height: 300px;
	transition: max-height 1s ease-out;
}

.dropdown>a::after,
.dropdown-movil>a::after {
	content: " ⌄";
	display: inline-block;
	margin-left: 6px;
	transform: translateY(-4px);
}

#movil {
	display: none;
	width: 30px;
	height: auto;
	transition: color 0.3s ease;
}

#menu-movil {
	display: none;
}

#menu-movil ul {
	width: 100%;
	text-align: left;
}

/* ========================= */

h1 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	text-transform: uppercase;
}

h2 {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 20px;
	text-transform: uppercase;
}

h3 {
	font-size: 16px;
	font-weight: 500;
}


p {
	font-weight: 400;
	line-height: 1.7;
	margin-bottom: 20px;
}

section p {
	text-align: justify;
}

#sobre-rdl {
	width: 100%;
	text-align: left;
}

#convocatoria p:last-of-type {
	margin-bottom: 0;
}

.medium {
	font-weight: var(--fw-medium);
}

.page {
	width: 90dvw;
	max-width: 1080px;
	padding: 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
	transition: width 0.3s ease;
	min-height: 100dvh;
	/*que ocupe toda la pantalla*/
}

/* Home: carousel full-screen + .page como hermanos. El hero hace de clearance del nav fijo. */
body:not(.post-page) {
		flex-direction: column;
}

/* El alto mínimo de pantalla ya lo cubre el hero: si .page lo repite,
	 el margin-top:auto del footer empuja contra un alto fantasma. */
body:not(.post-page) .page {
		min-height: 0;
}

/* ============================================
	BOTONES INSCRIPCION
============================================ */

#botonera {
	width: 100%;
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-top: 40px;
}

.btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: var(--fw-medium);
	padding: 15px 30px;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	display: inline-block;
	border: none;
	appearance: none;
	-webkit-appearance: none;
	border-radius: var(--radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
	transform: translateY(0);
	transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, max-width 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.btn-yellow {
	color: var(--color-white);
	background-color: var(--color-yellow);

	border: none;
	outline: none;
	z-index: 10;
}

.btn-orange {
	color: var(--color-white);
	background-color: var(--color-orange);
	z-index: 10;
}

.btn-gray {
	margin-left: -14px;
	opacity: 0;
	max-width: 0;
	padding: 0;
	pointer-events: none;

	color: var(--color-white);
	background-color: var(--color-gray);
	z-index: 1;
}

.btn-gray.visible {
	margin-left: 0;
	opacity: 1;
	max-width: 200px;
	padding: 15px 30px;
	pointer-events: auto;
}

/* ============================================
	CAROUSEL
============================================ */

#hero-carousel {
	position: relative;
	/* Si querés que ocupe todo el ancho podés sacar o subir el max-width */
	max-width: 1080px;
	aspect-ratio: 16/9;
	height: auto;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 40px;
}

/* Home: el alto manda, el ancho hereda el viewport */
body:not(.post-page) #hero-carousel {
	width: 100%;
	max-width: none;
	height: 100dvh;
	aspect-ratio: auto;
	border-radius: 0;
	margin-bottom: 0;
}
body:not(.post-page) #hero-carousel::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 20;
	opacity: 0.5;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	mix-blend-mode: overlay;
}

.post-page .page {
	padding-top: 110px; /* 40 base + 70 de clearance, ahora adentro del min-height */
}

.post-page #hero-carousel {
	margin: 40px 0;
}

.post-page .page section:first-of-type {
	margin-bottom: 20px;
}

.post-page #blog:first-of-type {
	margin-top: 0;
}

.carousel-track {
	display: flex;
	height: 100%;
	transition: transform 0.5s ease-in-out;
}

.carousel-track img {
	width: 100%;
	min-width: 100%;
	height: 100%;
	object-fit: cover;
}

.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(0, 0, 0, 0.4);
	border: none;
	padding: 14px 16px;
	cursor: pointer;
	border-radius: 999px;
	transition: background-color 0.3s ease;
	z-index: 10;
}

.carousel-btn img {
	width: 14px;
	height: 14px;
}

.carousel-btn-prev img {
	padding-top: 2px;
	padding-right: 2px;
}

.carousel-btn-next img {
	padding-top: 2px;
	transform: scaleX(-1);
}

.carousel-btn-prev {
	left: 30px;
}

.carousel-btn-next {
	right: 30px;
}

.carousel-dots {
	position: absolute;
	/* el contenedor no intercepta, los dots sí */
	pointer-events: none;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.carousel-dot {
	pointer-events: auto;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.5);
	border: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.carousel-dot.active {
	background-color: var(--color-white);
}

/* ============================================
	SPONSORS
============================================ */
#footer-placeholder {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: auto;
}

.contacto {
	display: flex;
	flex-direction: row;
	gap: 12px;
}

.contacto p {
	margin-bottom: 5px;
}

.contacto a {
	color: var(--color-orange);
}

#sponsors {
	width: 70%;
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin-top: 50px;
	transition: width 0.3s ease;
}

.sponsors-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	/* 5 columnas iguales */
	align-items: center;
	gap: 20px;
}
.sponsors-row:first-child {
	grid-template-columns: 1.7fr 1fr 1fr 1fr 1.7fr;
}
.sponsors-row:last-child {
	grid-template-columns: 1fr 1.2fr 0.6fr 1.2fr 0.7fr;
}

.sponsors-row img {
	width: 100%;
	height: 50px;
	object-fit: contain;
	opacity: 0.6;
}

.sponsors-row:last-child img:nth-child(3) {
	height: 60px;
}

/* ============================================
	HOVERS solo en DESK
============================================ */

@media (hover: hover) and (pointer: fine) {
	.btn:hover,
	.blog-card:hover {
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
		transform: translateY(-5px);
	}

	.carousel-btn:hover {
		background-color: rgba(0, 0, 0, 0.7);
	}

	#movil:hover {
		filter: invert(1);
	}

	#menu a:hover,
	#menu-movil a:hover {
		color: var(--color-black);
	}
}

/* ========================= */


/* ============================================
	RESPONSIVE
============================================ */

@media(max-width: 620px) {
	nav #menu {
		transform: translateY(-1px);
		width: 100%;
	}

	#movil {
		display: flex;
		cursor: pointer;
	}

	.page {
		width: 100%;
		padding: 40px;
		margin: 0;
	}

	#hero-carousel {
		aspect-ratio: 4/3;
	}

	.carousel-btn {
		display: none;
	}

	#botonera {
		flex-direction: column;
		align-items: center;
	}

	.contacto {
		flex-direction: column;
		align-items: center;
		gap: 0;
	}
	.contacto p {
		margin-bottom: 8px;
	}

	.btn-gray {
		max-height: 0;
		margin-top: -14px;
		margin-left: 0;
	}

	.btn-gray.visible {
		max-height: 100px;
		margin-top: 0;
	}

	.sponsors-row:first-child img:nth-child(3),
	.sponsors-row:first-child img:nth-child(4) {
		height: 35px;
	}

	.sponsors-row:last-child img:nth-child(3) {
		height: 50px;
	}

	/*MENU MOVIL*/
	/* Ocultar menu desktop */
	nav #menu>ul {
		display: none;
	}

	/* Mostrar container mobile pero colapsado */
	#menu-movil {
		display: flex;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.7s ease-in-out;
	}

	#menu-movil ul {
		list-style: none;
		display: flex;
		flex-direction: column;
	}

	/* Agrega espacio solo a los ul hijos de menu-movil */
	#menu-movil>ul {
		gap: 20px;
		padding: 0 40px 30px 40px;
	}

	/* Agrega espacio solo a los ul hijos de .dropdown-movil */
	.dropdown-movil>ul {
		gap: 20px;
	}

	#menu-movil.show {
		max-height: 1000px;
		/* mayor al contenido real */
	}

	/* Submenús colapsados por defecto */
	.dropdown-menu-movil {
		list-style: none;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.7s ease-in-out;
	}

	.dropdown-menu-movil>li:first-child {
		margin-top: 20px;
	}

	.dropdown-menu-movil.show-submenu {
		max-height: 300px;
	}

	/* Flecha o indicador visual (opcional) */
	.dropdown-movil>a {
		cursor: pointer;
	}
}

@media(max-width: 1080px) {
	#sponsors {
		width: 98%;
	}
}


/* ========================= */

/* SECCIONES */
#secciones {
	width: 100%;

}

footer {
	margin-top: 40px;
	color: var(--color-off);
	font-size: 12px;
	text-align: center;
}

#secciones ul,
#sobre-rdl ul {
	list-style: none;
	padding: 0;
	margin: 0 0 20px 0;
}

#secciones ul li::before,
#sobre-rdl ul li::before {
	content: "— ";
	margin-right: 10px;
}

.editor-area p,
#sobre-rdl p,
.module-col-edit p,
.module-card-text-edit p {
	margin: 0;
}


/* ============================================
	BLOG
============================================ */

#blog {
	width: 100%;
	margin-top: 30px;
}

.blog-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
	margin-bottom: 30px;
}

.blog-card {
	display: flex;
	flex-direction: column;
	background-color: var(--color-white);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	text-decoration: none;
	color: inherit;
	transition: box-shadow .3s ease, transform .3s ease;
}

.blog-card-img {
	width: 100%;
	aspect-ratio: 1350 / 640;
	overflow: hidden;
}

.blog-card-img:not(:has(img)) {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-bone);
}

.blog-card-img:not(:has(img))::after {
	content: "";
	width: 40px;
	height: 40px;
	background-color: var(--color-off);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.blog-card-img img,
.post-hero-single img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.blog-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.blog-card-body h2 {
	margin-bottom: 10px;
}

.blog-card-body p {
	flex: 1;
	text-align: left;
	font-size: 13px;
	margin-bottom: 0;
}

.btn-blog-ver-todo {
	display: block;
	width: fit-content;
	margin: 0 auto;
	color: var(--color-white);
	background-color: var(--color-gray);
}

/* ============================================
	CONTENT GRID (variant "grid" — imagen completa + caption)
============================================ */

.content-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
	margin: 30px 0;
}

.content-grid-card {
	position: relative;
	background-color: var(--color-black);
	border-radius: var(--radius);
	overflow: hidden;
}

.content-grid-card img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

.content-grid-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 16px;
	color: var(--color-white);
	font-size: 13px;
	background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}

/* ============================================
	POST — imagen única (sin carousel)
============================================ */

.post-hero-single {
	width: 100%;
	max-width: 1080px;
	aspect-ratio: 16/9;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 40px;
}

.post-hero-single img {
	width: 100%;
	max-width: 1080px;
	aspect-ratio: 16/9;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 40px;
}

/* ============================================
	MÓDULOS (editor)
============================================ */

.module-block { --module-color: var(--color-black); margin: 30px 0; }
.module-color-yellow { --module-color: var(--color-yellow); }
.module-color-gray   { --module-color: var(--color-gray); }
.module-color-orange { --module-color: var(--color-orange); }
.module-color-black  { --module-color: var(--color-black); }

.module-block p,
.module-block h2,
.module-block h3,
.module-block li { color: var(--module-color); }

.module-block ul,
#sobre-rdl .module-block ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.module-block ul li::before {
	content: "— ";
	margin-right: 10px;
}

.module-size-sm { font-size: 12px; }
.module-size-md { font-size: 14px; }
.module-size-lg { font-size: 17px; }

.module-weight-regular p { font-weight: 400; }
.module-weight-medium p  { font-weight: 600; }
.module-weight-bold p    { font-weight: 700; }

/* Cards: grid 3 col → 2 col → 1 col mobile (columnas fijas, no se estiran filas incompletas) */
.module-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}
.module-card {
	display: flex;
	flex-direction: column;
	background-color: var(--color-white);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	margin: 0;
}
.module-card img { width: 100%; height: auto; display: block; }
.module-card-body { padding: 20px; }
.module-card-body h3 { margin-bottom: 8px; }

@media (max-width: 480px) {
	.module-cards { grid-template-columns: 1fr; }
}

/* Texto 2 columnas → 1 col mobile */
.module-text2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

/* ============================================
	VENTANA EN DESK MUY ANGOSTA — hasta 1080px
============================================ */

@media (max-width: 1080px) {
	body:not(.post-page) #hero-carousel {
		height: 80dvh;
	}
}

/* ============================================
	MOBILE — todos los ajustes hasta 720px
============================================ */

@media (max-width: 720px) {
	.blog-grid {
		grid-template-columns: 1fr;
	}

	.content-grid {
		grid-template-columns: 1fr;
	}

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

	.module-text2col {
		grid-template-columns: 1fr;
	}

	body:not(.post-page) #hero-carousel {
		height: 50dvh;
	}
}