/* Feria Encuentra — light flexbox shell */

:root {
  --fe-navy: #112533;
  --fe-cyan: #009fe3;
  --fe-sky: #42affc;
  --fe-text: #525252;
  --fe-muted: #808080;
  --fe-line: #c3c3c3;
  --fe-bg: #f4f8fb;
  --fe-white: #ffffff;
  --fe-max: 1100px;
  --fe-header-h: 72px;
  --fe-font: "Source Sans 3", "Segoe UI", sans-serif;
  --fe-display: "Outfit", "Source Sans 3", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--fe-font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--fe-text);
  background: var(--fe-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--fe-cyan);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--fe-sky);
  text-decoration: underline;
}

.site-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: var(--fe-white);
  border-bottom: 1px solid rgba(17, 37, 51, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: var(--fe-max);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--fe-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  max-height: 52px;
  width: auto;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--fe-line);
  background: var(--fe-white);
  color: var(--fe-navy);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--fe-navy);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--fe-cyan);
  text-decoration: none;
}

.site-main {
  flex: 1;
}

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

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 37, 51, 0.88) 0%, rgba(0, 159, 227, 0.72) 55%, rgba(66, 175, 252, 0.55) 100%),
    radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(160deg, #0a1a24 0%, #0d4f73 45%, #009fe3 100%);
  color: var(--fe-white);
  min-height: calc(100vh - var(--fe-header-h));
  display: flex;
  align-items: center;
}

.hero__inner {
  max-width: var(--fe-max);
  margin: 0 auto;
  padding: 64px 20px 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  width: 100%;
}

.hero__brand {
  max-width: 280px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  animation: fe-rise 0.7s ease both;
}

.hero__title {
  margin: 0;
  font-family: var(--fe-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 14ch;
  animation: fe-rise 0.7s 0.08s ease both;
}

.hero__lead {
  margin: 0;
  max-width: 38ch;
  font-size: 1.125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  animation: fe-rise 0.7s 0.16s ease both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fe-rise 0.7s 0.24s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--fe-white);
  color: var(--fe-navy);
}

.btn--primary:hover {
  background: #e8f6fc;
  color: var(--fe-navy);
}

.btn--ghost {
  background: transparent;
  color: var(--fe-white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--fe-white);
}

@keyframes fe-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 56px 0;
}

.section--white {
  background: var(--fe-white);
}

.section__header {
  margin-bottom: 28px;
  max-width: 42rem;
}

.section__header h2 {
  margin: 0 0 10px;
  font-family: var(--fe-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--fe-navy);
  letter-spacing: -0.02em;
}

.section__header p {
  margin: 0;
  color: var(--fe-muted);
}

.page-header {
  padding: 40px 0 8px;
}

.page-header h1 {
  margin: 0;
  font-family: var(--fe-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: var(--fe-navy);
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 10px 0 0;
  color: var(--fe-muted);
  max-width: 40rem;
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0 0 1em;
}

.prose h2 {
  margin: 1.6em 0 0.5em;
  font-family: var(--fe-display);
  color: var(--fe-navy);
  font-size: 1.35rem;
}

/* Sponsors */
.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.sponsors-grid a,
.sponsors-grid .sponsor-item {
  flex: 0 1 140px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--fe-white);
  border: 1px solid rgba(195, 195, 195, 0.7);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sponsors-grid a:hover {
  border-color: var(--fe-cyan);
  text-decoration: none;
  transform: translateY(-2px);
}

.sponsors-grid img {
  max-height: 48px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
}

.section--sponsors {
  background:
    linear-gradient(180deg, var(--fe-bg) 0%, #e9f4fa 100%);
}

/* Blog list (r-template_blog) */
.blog-container {
  padding: 24px 0 48px;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  background: var(--fe-white);
  border: 1px solid rgba(195, 195, 195, 0.7);
  padding: 20px 22px;
}

.blog-title {
  margin: 0 0 8px;
  font-family: var(--fe-display);
  font-size: 1.2rem;
}

.blog-title a {
  color: var(--fe-navy);
}

.blog-title a:hover {
  color: var(--fe-cyan);
}

.blog-preview {
  color: var(--fe-text);
}

.blog-preview p {
  margin: 0;
}

/* Article / romlicontainer */
.romlicontainer {
  max-width: var(--fe-max);
  margin: 0 auto;
  padding: 16px 20px 48px;
}

/* Footer */
.site-footer {
  background: var(--fe-navy);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
}

.site-footer a {
  color: #9fdcf5;
}

.site-footer a:hover {
  color: var(--fe-white);
}

.site-footer__inner {
  max-width: var(--fe-max);
  margin: 0 auto;
  padding: 36px 20px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}

.site-footer__brand {
  flex: 1 1 220px;
}

.site-footer__brand img {
  max-height: 44px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.site-footer__brand p {
  margin: 0;
  font-size: 14px;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__nav {
  flex: 0 1 180px;
}

.site-footer__nav h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer__nav a {
  font-weight: 600;
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.sitewide-block {
  max-width: var(--fe-max);
  margin: 0 auto;
  padding: 0 20px 24px;
}

.sitewide-block img {
  max-width: 170px;
  margin: 0 auto 8px;
}

/* Homepage links from romlifile */
.homepage-links {
  padding: 8px 0 40px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--fe-white);
    border-bottom: 1px solid rgba(17, 37, 51, 0.08);
    padding: 8px 12px 16px;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding: 48px 20px 56px;
  }

  .sponsors-grid a,
  .sponsors-grid .sponsor-item {
    flex: 0 1 calc(50% - 8px);
  }
}
