/* ==========================================================
   Fundación DEYNA 2026 — Main Stylesheet
   Space Grotesk + JetBrains Mono + DEYNA Palette
   ========================================================== */

:root {
  /* Brand Colors — Pure DEYNA */
  --color-primary: #007b5c;
  --color-primary-dark: #005a43;
  --color-primary-light: #009966;
  --color-secondary: #1760ab;
  --color-secondary-dark: #0f4a87;
  --color-accent: #e65c2e;
  --color-accent-dark: #c24a20;
  --color-highlight: #fdee9b;
  --color-highlight-light: #ffef97;
  --color-warm-bg: #fffff5;
  --color-footer-blue: #00005a;

  /* Neutrals */
  --color-bg: #ffffff;
  --color-bg-light: #f8faf9;
  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-text-muted: #888888;
  --color-border: #d4ddd8;

  /* Semantic */
  --color-success: #008a59;

  /* Fonts */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --max-width: 1200px;
  --header-height: 80px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }
ul, ol { padding-left: var(--space-lg); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* ---------- Layout ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
.text-center { text-align: center; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  height: var(--header-height);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}
.header__logo img { height: 72px; width: auto; }
.header__logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  text-transform: uppercase;
  line-height: 1.1;
}

/* ---------- Navigation ---------- */
.nav { display: flex; align-items: center; gap: 0; }
.nav__list {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}
.nav__list li { position: relative; }
.nav__link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link.active {
  color: var(--color-primary);
  background: rgba(0, 123, 92, 0.05);
}
.nav__link.active { border-bottom: 2px solid var(--color-primary); }
.nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 100;
  padding: var(--space-sm) 0;
  list-style: none;
}
.nav__item:hover .nav__dropdown { display: block; }
.nav__dropdown li a {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s;
}
.nav__dropdown li a:hover {
  background: rgba(0, 123, 92, 0.08);
  color: var(--color-primary);
}

/* Language switch */
.lang-switch {
  display: flex;
  gap: var(--space-xs);
  margin-left: var(--space-md);
  border-left: 1px solid var(--color-border);
  padding-left: var(--space-md);
}
.lang-switch__link {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.lang-switch__link:hover,
.lang-switch__link.active {
  color: var(--color-primary);
  background: rgba(0, 123, 92, 0.08);
  font-weight: 700;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 40%, var(--color-secondary) 100%);
  color: #ffffff;
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/images/fondolog.jpg') center/cover;
  opacity: 0.12;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero__title {
  font-size: var(--text-5xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  color: #fff;
}
.hero__subtitle {
  font-size: var(--text-xl);
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: var(--space-2xl);
  line-height: 1.5;
}
.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-4xl) 0; }
.section--warm { background: var(--color-warm-bg); }
.section--green { background: var(--color-primary); color: #fff; }
.section--highlight { background: var(--color-highlight-light); }
.section--grey { background: var(--color-bg-light); }
.section--dark { background: var(--color-footer-blue); color: #fff; }

.section__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}
.section__title--white { color: #ffffff; }

.lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--color-text-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}
.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn--secondary:hover {
  background: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  color: #fff;
}
.btn--accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn--accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn--white {
  background: #fff;
  color: var(--color-primary-dark);
  border-color: #fff;
}
.btn--white:hover { background: rgba(255,255,255,0.9); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--text-2xl);
}
.card__icon--green { background: rgba(0, 123, 92, 0.1); color: var(--color-primary); }
.card__icon--blue { background: rgba(23, 96, 171, 0.1); color: var(--color-secondary); }
.card__icon--orange { background: rgba(230, 92, 46, 0.1); color: var(--color-accent); }
.card__icon--yellow { background: rgba(253, 238, 155, 0.4); color: #b8860b; }
.card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}
.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: var(--space-xl); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Content block (text + image) ---------- */
.content-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}
.content-block__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.content-block__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Quote ---------- */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
}

/* ---------- Page header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-secondary) 100%);
  color: #fff;
  padding: var(--space-3xl) 0 var(--space-2xl);
}
.page-header__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: #fff;
}
.page-header__breadcrumb {
  font-size: var(--text-sm);
  opacity: 0.85;
}
.page-header__breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.page-header__breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Interior content ---------- */
.content {
  padding: var(--space-2xl) 0;
}
.content h2 {
  color: var(--color-primary);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: var(--text-2xl);
}
.content h3 {
  color: var(--color-primary-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
}
.content p {
  margin-bottom: var(--space-md);
  text-align: justify;
}
.content ul, .content ol {
  margin-bottom: var(--space-md);
}
.content li {
  margin-bottom: var(--space-sm);
}
.content blockquote {
  border-left-color: var(--color-accent);
  background: var(--color-warm-bg);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.content blockquote p {
  text-align: left;
  margin-bottom: var(--space-sm);
}
.content blockquote footer {
  font-weight: 600;
  font-style: normal;
  font-size: var(--text-sm);
}

/* ---------- Awards table ---------- */
.awards-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
}
.awards-table th,
.awards-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.awards-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.awards-table tr:nth-child(even) { background: var(--color-bg-light); }

/* ---------- Accent bar ---------- */
.accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  border: none;
  margin: var(--space-2xl) 0;
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-footer-blue);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-lg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.footer__title {
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}
.footer__list {
  list-style: none;
  padding: 0;
}
.footer__list li {
  margin-bottom: var(--space-sm);
}
.footer__list a {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__list a:hover {
  color: #ffffff;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: var(--text-xs);
}

/* ---------- Utilities ---------- */
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mt-md { margin-top: var(--space-md); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.text-green { color: var(--color-primary); }
.text-blue { color: var(--color-secondary); }
.text-orange { color: var(--color-accent); }
.text-muted { color: var(--color-text-light); }
.text-small { font-size: var(--text-sm); }

/* Canvas obfuscation elements */
canvas[data-obf] {
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .content-block__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .hero__title { font-size: var(--text-3xl); }
  .hero__subtitle { font-size: var(--text-lg); }
  .section__title { font-size: var(--text-2xl); }
  .page-header__title { font-size: var(--text-3xl); }
  .nav__list { display: none; }
  .menu-toggle { display: flex; }
  .nav.open .nav__list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);
  }
  .nav.open .nav__dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
  }
  .lang-switch {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .hero { padding: var(--space-2xl) 0; }
  .section { padding: var(--space-2xl) 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  .hero__title { font-size: var(--text-2xl); }
}
