/* ===========================
   Fundacion Oid Mortales
   Brand colors from manual:
   Primary:  #0f4c81
   Black:    #000000
   Cream:    #FFF8F0
   Gray:     #9c9b9b
   Font:     Poppins
   =========================== */

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

:root {
  --color-primary: #0f4c81;
  --color-primary-dark: #0a3660;
  --color-primary-light: #1a6bb5;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-cream: #FFF8F0;
  --color-gray: #9c9b9b;
  --color-gray-light: #f0f0f0;
  --color-text: #222222;
  --color-text-light: #555555;
  --font-family: 'Poppins', sans-serif;
  --header-height: 110px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===========================
   Header
   =========================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-white);
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}

.header--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo-img {
  height: 80px;
  width: auto;
}

.header__nav-list {
  display: flex;
  gap: 2rem;
}

.header__nav-list a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  position: relative;
}

.header__nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.header__nav-list a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.header__menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   Hero
   =========================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero__logo {
  max-width: 280px;
  margin: 0 auto 2.5rem;
  filter: brightness(0) invert(1);
}

.hero__slogan {
  color: var(--color-white);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Background stripe pattern inspired by brand manual cover */
.hero__bg-pattern {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  gap: 60px;
  opacity: 0.08;
  pointer-events: none;
}

.hero__stripe {
  width: 80px;
  height: 100%;
  background: var(--color-white);
  transform: skewX(-8deg);
}

/* ===========================
   Sections (generic)
   =========================== */

.section {
  padding: 6rem 2rem;
}

.section__container {
  max-width: 1100px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
}

.section__subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 700px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.section__content--narrow {
  max-width: 780px;
}

.section__content--narrow p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Section color variants */
.section--light {
  background: var(--color-white);
}

.section--light .section__title {
  color: var(--color-primary);
}

.section--cream {
  background: var(--color-cream);
}

.section--cream .section__title {
  color: var(--color-primary);
}

.section--blue {
  background: var(--color-primary);
  color: var(--color-white);
}

.section--blue .section__title {
  color: var(--color-white);
}

.section--blue .section__title::after {
  background: var(--color-white);
}

.section--blue .section__subtitle {
  opacity: 0.9;
}

/* ===========================
   Proposito cards
   =========================== */

.proposito-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.proposito-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  transition: background 0.3s;
}

.proposito-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.proposito-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.proposito-card p {
  font-size: 0.95rem;
  line-height: 1.75;
  opacity: 0.9;
}

/* ===========================
   Areas grid
   =========================== */

.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  justify-content: center;
}

.area-item {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1rem 2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ===========================
   Espacios cards
   =========================== */

.espacios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.espacio-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.espacio-card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.espacio-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
}

.espacio-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.espacio-card p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.espacio-card p:last-child {
  margin-bottom: 0;
}

/* ===========================
   Agendas cards
   =========================== */

.agendas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.agenda-card {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}

.agenda-card:hover {
  background: rgba(255, 255, 255, 0.12);
}

.agenda-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  color: var(--color-white);
  opacity: 0.8;
}

.agenda-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.agenda-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.85;
}

/* ===========================
   Contacto
   =========================== */

.contacto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.contacto-item {
  text-align: center;
}

.contacto-item__icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  color: var(--color-primary);
}

.contacto-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contacto-item p,
.contacto-item a {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.contacto-item a:hover {
  color: var(--color-primary);
}

/* ===========================
   Footer
   =========================== */

.footer {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 0 2rem;
}

.footer__bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.78rem;
  opacity: 0.4;
}

/* ===========================
   Animations
   =========================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
  .proposito-grid,
  .espacios-grid,
  .agendas-grid {
    grid-template-columns: 1fr;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

}

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
  }

  .header__menu-toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--color-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .header__nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 1.25rem;
  }

  .header__nav-list a {
    font-size: 1rem;
  }

  .header__logo-img {
    height: 56px;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .hero__logo {
    max-width: 200px;
  }

  .hero__bg-pattern {
    gap: 30px;
  }

  .hero__stripe {
    width: 40px;
  }
}
