/*
Theme Name: POF LatAm 2028
Theme URI: https://latam.portofthefutureconference.com/
Author: VBA
Description: Bilingual (English / Spanish) demo theme for Port of the Future LatAm 2028. Tracks custom post type with ACF fields, homepage with static content and a Tracks list, language switcher for WPML (recommended) or Polylang.
Version: 1.1.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: pof-latam
Domain Path: /languages
*/

:root {
	--red: #c7112f;
	--red-dark: #9e0d25;
	--blue: #0026fe;
	--black: #0b0b0c;
	--ink: #1b1d22;
	--muted: #5b6070;
	--line: #e3e7ef;
	--bg: #ffffff;
	--bg-soft: #f6f9fe;
	--white: #ffffff;
	--radius: 5px;
	--container: 1200px;
	--font: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; color: var(--black); }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 14px;
}

/* Buttons -------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 200px; padding: 15px 28px;
	font-family: var(--font); font-size: .95rem; font-weight: 700;
	letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
	color: var(--white); background: var(--red);
	border: 2px solid var(--red); border-radius: var(--radius);
	transition: background .2s, border-color .2s, color .2s;
	cursor: pointer;
}
.btn:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn--ghost { background: transparent; border-color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--dark { background: var(--black); border-color: var(--black); }
.btn--dark:hover { background: var(--red); border-color: var(--red); }
.btn--sm { min-width: 0; padding: 10px 18px; font-size: .8rem; }

/* Top bar + header ----------------------------------------------------- */
.topbar { background: var(--black); color: #cfd3dc; font-size: .85rem; }
.topbar .container { display: flex; gap: 24px; justify-content: space-between; align-items: center; min-height: 40px; flex-wrap: wrap; }
.topbar__info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__info span::before { content: "•"; color: var(--red); margin-right: 8px; }

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .97);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(6px);
}
.site-header .container { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.site-logo img { height: 56px; width: auto; }
.site-logo { flex-shrink: 0; text-decoration: none; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.main-nav a { color: var(--black); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 16px; }

/* Language switcher */
.lang-switcher { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-soft); }
.lang-switcher a,
.lang-switcher span {
	display: block; padding: 6px 13px; border-radius: 999px;
	font-size: .8rem; font-weight: 700; letter-spacing: .06em;
	text-decoration: none; color: var(--muted);
}
.lang-switcher a:hover { color: var(--black); }
.lang-switcher .is-active { background: var(--red); color: var(--white); }
.lang-switcher .is-missing { opacity: .45; }

.nav-toggle {
	display: none; margin-left: auto; width: 44px; height: 44px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 20px; height: 2px; background: var(--black); margin: 0 auto; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* Hero ----------------------------------------------------------------- */
.hero {
	position: relative; color: var(--white); overflow: hidden;
	background: var(--black) center / cover no-repeat;
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(8, 9, 14, .92) 0%, rgba(8, 9, 14, .72) 55%, rgba(199, 17, 47, .45) 100%);
}
.hero .container { position: relative; padding-top: 120px; padding-bottom: 120px; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .eyebrow { color: #ff8a9d; }
.hero__lead { font-size: 1.2rem; max-width: 56ch; color: #e6e8ee; margin-bottom: 28px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-bottom: 36px; font-weight: 700; }
.hero__meta div { display: flex; flex-direction: column; }
.hero__meta small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #aeb3c0; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Stats */
.stats { background: var(--red); color: var(--white); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 20px; text-align: center; border-right: 1px solid rgba(255, 255, 255, .25); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 2.3rem; font-weight: 800; line-height: 1.1; }
.stat span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; opacity: .9; }

/* Sections */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 760px; margin-bottom: 48px; }
.section__head p { color: var(--muted); font-size: 1.08rem; }

.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about__text { color: var(--ink); }
.about__media { position: relative; }
.about__media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about__media::after {
	content: ""; position: absolute; left: -18px; bottom: -18px; width: 45%; height: 45%;
	border-left: 6px solid var(--red); border-bottom: 6px solid var(--red); z-index: -1;
}

/* Venue */
.venue { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.venue__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.venue__card h3 { font-size: 1.1rem; }
.venue__card p { color: var(--muted); margin: 0; }
.venue__num { display: inline-block; font-weight: 800; color: var(--red); font-size: 1.6rem; margin-bottom: 8px; }

/* Tracks */
.tracks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.track-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 30px 28px 26px; text-decoration: none; color: var(--ink);
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.track-card::before {
	content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 56px; background: var(--red);
	border-top-left-radius: var(--radius); transition: width .25s;
}
.track-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(16, 24, 48, .1); border-color: transparent; color: var(--ink); }
.track-card:hover::before { width: 100%; border-top-right-radius: var(--radius); }
.track-card__num { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.track-card h3 { margin-bottom: 12px; }
.track-card p { color: var(--muted); font-size: .97rem; flex-grow: 1; }
.track-card__meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.track-card__more { font-weight: 700; color: var(--black); white-space: nowrap; }
.tracks-footer { margin-top: 40px; text-align: center; }
.empty-note { padding: 30px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--white); }

/* CTA band */
.cta-band { background: var(--black); color: var(--white); }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 70px; padding-bottom: 70px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: #c3c7d1; margin: 0; max-width: 60ch; }

/* Single track */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 64px 0 52px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 22ch; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red); }
.track-layout { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; }
.track-body { font-size: 1.05rem; }
.track-aside { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; position: sticky; top: 110px; }
.track-aside dl { margin: 0 0 22px; }
.track-aside dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.track-aside dd { margin: 2px 0 16px; font-weight: 700; color: var(--black); }
.track-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.track-nav a { text-decoration: none; font-weight: 700; color: var(--black); }
.track-nav a:hover { color: var(--red); }

.entry-content > *:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { background: #111216; color: #a9aebb; padding: 56px 0 30px; font-size: .92rem; }
.site-footer a { color: #e3e5ea; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { background: #fff; display: inline-block; padding: 8px 12px; border-radius: var(--radius); margin-bottom: 16px; }
.footer-logo img { height: 44px; width: auto; }
.footer-bottom { border-top: 1px solid #262830; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
	.tracks-grid { grid-template-columns: repeat(2, 1fr); }
	.about { grid-template-columns: 1fr; gap: 40px; }
	.track-layout { grid-template-columns: 1fr; }
	.track-aside { position: static; }
}
@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 20px 20px;
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.header-actions .btn { display: none; }
	.site-header .container { gap: 14px; }
	.header-actions { order: 2; }
	.nav-toggle { order: 3; margin-left: 0; }
	.site-logo { margin-right: auto; }
	.stats .container { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(2) { border-right: 0; }
	.stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .25); }
	.venue { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.tracks-grid { grid-template-columns: 1fr; }
	.section { padding: 68px 0; }
	.hero .container { padding-top: 80px; padding-bottom: 80px; }
	.site-logo img { height: 44px; }
	.topbar__info span:last-child { display: none; }
	.btn { min-width: 0; width: 100%; }
	.hero__actions { flex-direction: column; }
}

/* Language switcher in the dark footer */
.site-footer .lang-switcher { background: #1d1f25; border-color: #2c2f37; }
.site-footer .lang-switcher a { color: #c3c7d1; }
.site-footer .lang-switcher a:hover { color: #fff; }
