/* AIFP Theme — CSS Principal */
:root {
  --ink: #0d1f3c;
  --cream: #eef3f9;
  --gold: #1a6bb5;
  --gold-light: #3a8fd4;
  --rust: #0e4d8a;
  --sage: #1e6b6b;
  --warm-gray: #5a6a80;
  --border: #b8d0e8;
  --white: #f4f8fd;
}

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

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── HEADER ── */
header {
  background: var(--ink);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--gold);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 40px;
}

.logo-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.logo-circle img { width: 100%; height: 100%; object-fit: contain; }

.site-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  line-height: 1.3; color: var(--cream);
}
.site-title span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem; font-weight: 300;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold-light);
}

/* ── NAV ── */
nav { background: #0a1628; border-top: 1px solid #1a2d4a; }

.nav-list { list-style: none; display: flex; flex-wrap: wrap; padding: 0 20px; }

.nav-list > li { position: relative; }

.nav-list > li > a {
  display: block; padding: 12px 16px;
  color: #ccc; text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li.active > a { color: var(--gold-light); background: rgba(255,255,255,0.05); }

.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #0d1f3c; min-width: 260px;
  border: 1px solid #1a3a5c;
  border-top: 2px solid var(--gold);
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.dropdown a {
  display: block; padding: 9px 18px;
  color: #bbb; text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}
.dropdown a:hover { color: var(--gold-light); background: rgba(255,255,255,0.05); padding-left: 24px; }
.nav-list > li:hover .dropdown { display: block; }

/* ── PAGES ── */
main { min-height: 70vh; }
.page { display: none; padding: 60px 0; }
.page.active { display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0d1f3c 0%, #0e3460 50%, #0d1f3c 100%);
  color: var(--cream);
  padding: 100px 40px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a6bb5' fill-opacity='0.06'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-logo {
  width: 120px; height: 120px; border-radius: 50%;
  border: 3px solid var(--gold); margin: 0 auto 32px;
  overflow: hidden; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }
.hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 900; line-height: 1.15; margin-bottom: 16px;
}
.hero .acronym {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem; font-weight: 300;
  letter-spacing: 0.3em; color: var(--gold-light);
  margin-bottom: 28px; display: block;
}
.hero p { max-width: 680px; margin: 0 auto 40px; font-size: 1.1rem; opacity: 0.85; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-block; padding: 12px 30px;
  border: 2px solid var(--gold); color: var(--gold-light);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; background: transparent;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--gold); color: #fff; }
.btn-filled { background: var(--gold); color: #fff; }
.btn-filled:hover { background: var(--gold-light); }

/* ── SECTION HEADER ── */
.section-header { text-align: center; margin-bottom: 56px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.section-header h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; margin-bottom: 8px; }
.section-header .subtitle { font-family: 'Montserrat', sans-serif; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* ── FEATURES ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 48px; }
.feature-card { background: var(--white); border: 1px solid var(--border); padding: 32px; border-top: 4px solid var(--gold); transition: transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.feature-card h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 12px; }
.feature-card p { font-size: 0.9rem; color: var(--warm-gray); line-height: 1.7; }

/* ── QUIENES SOMOS ── */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-text h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 20px; }
.about-text p { margin-bottom: 18px; line-height: 1.9; color: #1a2c4a; }
.about-aside { background: var(--ink); color: var(--cream); padding: 40px; }
.about-aside h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--gold-light); margin-bottom: 20px; }
.about-aside p { font-size: 0.88rem; opacity: 0.85; margin-bottom: 10px; }
.info-row { display: flex; gap: 12px; margin-bottom: 12px; font-size: 0.85rem; }
.info-label { font-family: 'Montserrat', sans-serif; font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-light); min-width: 80px; padding-top: 3px; }

/* ── MISIÓN / VISIÓN ── */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.mv-card { padding: 48px; border: 1px solid var(--border); background: var(--white); position: relative; overflow: hidden; }
.mv-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.mv-mision::before { background: var(--gold); }
.mv-vision::before { background: var(--rust); }
.mv-card .icon { font-size: 2.5rem; margin-bottom: 24px; }
.mv-card h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 20px; }
.mv-card p { font-size: 1rem; line-height: 1.9; color: #1a2c4a; font-style: italic; }
.principios-list { list-style: none; }
.principios-list li { padding: 20px 0; border-bottom: 1px solid var(--border); display: flex; gap: 20px; }
.principios-list .num { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--gold); opacity: 0.4; min-width: 40px; }

/* ── ESTATUTOS ── */
.estatutos-content { max-width: 800px; }
.estatutos-content h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin: 32px 0 12px; color: var(--rust); }
.estatutos-content p { margin-bottom: 16px; line-height: 1.9; }
.estatutos-content ol { padding-left: 28px; margin-bottom: 16px; }
.estatutos-content li { margin-bottom: 8px; line-height: 1.8; }

/* ── EVENTOS ── */
.events-tabs { display: flex; gap: 0; margin-bottom: 40px; border-bottom: 2px solid var(--border); }
.event-tab { padding: 12px 24px; border: none; background: none; font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; color: var(--warm-gray); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color 0.2s; }
.event-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.event-panel { display: none; }
.event-panel.active { display: block; }
.event-card { background: var(--white); border: 1px solid var(--border); border-left: 4px solid var(--gold); padding: 28px 32px; margin-bottom: 20px; transition: border-left-color 0.2s; }
.event-card:hover { border-left-color: var(--rust); }
.event-card .event-date { font-family: 'Montserrat', sans-serif; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 8px; }
.event-card h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: 10px; }
.event-card p { font-size: 0.9rem; color: var(--warm-gray); }

/* ── NOTICIAS ── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.news-card { background: var(--white); border: 1px solid var(--border); overflow: hidden; }
.news-image { height: 180px; background: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--gold); opacity: 0.3; }
.news-body { padding: 24px; }
.news-body .date { font-family: 'Montserrat', sans-serif; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 8px; }
.news-body h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin-bottom: 10px; }
.news-body p { font-size: 0.88rem; color: var(--warm-gray); line-height: 1.6; }

/* ── MEMBERS ── */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.member-card { background: var(--white); border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.member-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.member-photo { width: 100%; height: 200px; object-fit: cover; object-position: top center; display: block; }
.member-photo-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, var(--ink) 0%, #0e3460 100%); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 2.5rem; color: var(--gold-light); font-weight: 700; }
.member-info { padding: 18px; }
.member-info h3 { font-family: 'Playfair Display', serif; font-size: 0.95rem; margin-bottom: 4px; }
.member-info .role { font-family: 'Montserrat', sans-serif; font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 8px; }
.member-info p { font-size: 0.8rem; color: var(--warm-gray); line-height: 1.5; }

/* ── MEMBER DETAIL ── */
.member-detail { display: none; }
.member-detail.active { display: block; }
.member-profile { display: grid; grid-template-columns: 280px 1fr; gap: 60px; align-items: start; }
.member-profile-photo { width: 100%; border: 3px solid var(--gold); display: block; }
.member-profile-placeholder { width: 100%; aspect-ratio: 3/4; background: linear-gradient(135deg, var(--ink), #0e3460); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 5rem; color: var(--gold); border: 3px solid var(--gold); }
.member-bio h2 { font-family: 'Playfair Display', serif; font-size: 2rem; margin-bottom: 6px; }
.member-bio .title-academic { font-family: 'Montserrat', sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 28px; display: block; }
.member-bio h4 { font-family: 'Montserrat', sans-serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--warm-gray); margin: 24px 0 10px; }
.member-bio p, .member-bio ul { font-size: 0.95rem; color: #1a2c4a; line-height: 1.8; }
.member-bio ul { padding-left: 20px; }
.member-bio a { color: var(--gold); }
.back-btn { display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--warm-gray); cursor: pointer; border: none; background: none; padding: 0; margin-bottom: 40px; }
.back-btn:hover { color: var(--gold); }

/* ── PUBLICACIONES ── */
.pub-card { background: var(--white); border: 1px solid var(--border); padding: 28px 32px; margin-bottom: 20px; display: flex; gap: 28px; align-items: start; }
.pub-icon { width: 48px; height: 48px; min-width: 48px; background: var(--ink); display: flex; align-items: center; justify-content: center; color: var(--gold-light); font-size: 1.3rem; }
.pub-card h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin-bottom: 6px; }
.pub-card .meta { font-family: 'Montserrat', sans-serif; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 10px; }
.pub-card p { font-size: 0.88rem; color: var(--warm-gray); }

/* ── CONTACTO ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-form label { display: block; font-family: 'Montserrat', sans-serif; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--warm-gray); margin-bottom: 6px; margin-top: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); background: var(--white); font-family: 'EB Garamond', serif; font-size: 1rem; color: var(--ink); outline: none; transition: border-color 0.2s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold); }
.contact-form textarea { height: 140px; resize: vertical; }
.contact-info h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 20px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.contact-item .ci-icon { font-size: 1.4rem; color: var(--gold); min-width: 24px; }
.contact-item p { font-size: 0.9rem; line-height: 1.6; }
.contact-item a { color: var(--gold); text-decoration: none; }
.social-links { display: flex; gap: 16px; margin-top: 20px; }
.social-link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); color: var(--warm-gray); text-decoration: none; font-size: 1.1rem; transition: background 0.2s, color 0.2s; }
.social-link:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.alert { background: var(--sage); color: white; padding: 12px 16px; display: none; font-family: 'Montserrat', sans-serif; font-size: 0.78rem; }
.alert.show { display: block; }

/* ── FOOTER ── */
footer { background: var(--ink); color: var(--cream); padding: 60px 40px 30px; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 30px; }
.footer-brand h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 12px; color: var(--gold-light); }
.footer-brand p { font-size: 0.85rem; opacity: 0.6; line-height: 1.8; }
.footer-col h4 { font-family: 'Montserrat', sans-serif; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold-light); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.5); text-decoration: none; margin-bottom: 8px; cursor: pointer; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-family: 'Montserrat', sans-serif; font-size: 0.68rem; color: rgba(255,255,255,0.3); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-top { padding: 12px 20px; }
  .nav-list { display: none; }
  .about-content, .mv-grid, .contact-grid, .footer-grid, .member-profile { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
  .hero { padding: 60px 20px; }
  .page { padding: 40px 0; }
  .cta-membership { grid-template-columns: 1fr !important; }
}
