/* ================================================
   Portal Web - Facultad de Derecho y Ciencias Sociales
   Universidad Nacional del Este
   ================================================ */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* === Design Tokens === */
:root {
  /* Colors — Paleta académica borgoña */
  --color-primary: #7B1A2C;
  --color-primary-dark: #521120;
  --color-primary-light: #962338;
  --color-primary-hover: #6A1525;
  --color-accent: #C8A135;
  --color-accent-light: #DDB84E;
  --color-accent-muted: rgba(200, 161, 53, 0.15);

  /* Neutrals — tono pergamino cálido */
  --color-text: #1E1A18;
  --color-text-light: #5C5550;
  --color-text-muted: #9A918C;
  --color-bg: #FAF8F4;
  --color-bg-white: #FFFFFF;
  --color-bg-alt: #F2EFE8;
  --color-bg-dark: #140A0D;
  --color-border: #DDD8D0;
  --color-border-light: #EDE9E3;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

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

  /* Sizing */
  --container-max: 1200px;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(30, 10, 15, 0.08);
  --shadow-md: 0 4px 16px rgba(30, 10, 15, 0.12);
  --shadow-lg: 0 8px 32px rgba(30, 10, 15, 0.14);
  --shadow-xl: 0 16px 48px rgba(30, 10, 15, 0.18);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* === Container === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-accent);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================
   HEADER
   ========================================= */
.header {
  background: var(--color-bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

/* Top bar */
.header-top {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
  color: inherit;
}

.header-brand:hover {
  color: inherit;
}

.header-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.header-brand-text h1 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.header-brand-text p {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
  font-style: italic;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.header-contact svg {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.header-contact a {
  color: var(--color-text-light);
  font-weight: 500;
}

.header-contact a:hover {
  color: var(--color-primary);
}

.header-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-social a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.header-social a:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.header-social a svg {
  width: 14px;
  height: 14px;
}

.header-search {
  position: relative;
}

.header-search input {
  width: 200px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), width var(--transition-base);
}

.header-search input::placeholder {
  color: var(--color-text-muted);
}

.header-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(123, 26, 44, 0.1);
  width: 240px;
  background: white;
}

.header-search button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  padding: 0.2rem;
  transition: color var(--transition-fast);
}

.header-search button:hover {
  color: var(--color-primary);
}

.header-search button svg {
  width: 16px;
  height: 16px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  background: var(--color-primary-dark);
  border-top: 1px solid rgba(200, 161, 53, 0.3);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  align-items: center;
}

.nav-list a {
  display: block;
  padding: 0.75rem 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-accent-light);
}

.nav-list a.active::after {
  content: '';
  position: static;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--color-accent);
}

/* Dropdown Base */
.nav-list li {
  position: relative;
}

.nav-list .has-dropdown>a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-right: 0.75rem;
}

.nav-list .has-dropdown>a::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  margin-top: -3px;
  flex-shrink: 0;
}

.nav-list .has-dropdown:hover>a::after {
  border-color: var(--color-accent-light);
  transform: rotate(-135deg) translateY(-2px);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-xl);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 100;
  padding: var(--space-md) 0;
  border-top: 2px solid var(--color-accent);
}

/* Desktop: dropdown activo via JS */
@media (min-width: 1025px) {
  .nav-list>li.has-dropdown.dropdown-active>.nav-dropdown {
    opacity: 1;
    visibility: visible;
  }
}

.nav-dropdown li {
  width: 100%;
  position: relative;
}

.nav-dropdown a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: transparent;
  transition: all var(--transition-fast);
  white-space: normal;
  text-transform: none;
}

.nav-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-accent-light);
  padding-left: 1.6rem;
}

/* === DESKTOP MEGA PANELS === */
@media (min-width: 1025px) {

  .nav-list>.has-dropdown:has(.nav-dropdown .has-dropdown) {
    position: static;
  }

  .nav-list>.has-dropdown:has(.nav-dropdown .has-dropdown)>.nav-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-xl);
    padding: var(--space-2xl) var(--space-xl);
  }

  .nav-list>.has-dropdown>.nav-dropdown>li {
    flex: 1;
    min-width: 200px;
  }

  /* OFERTA ACADÉMICA — Grid 4 columnas */
  #nav-oferta+.nav-dropdown {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-areas:
      "title title title posg"
      "der not cpol posg";
    align-items: start;
    gap: var(--space-xl);
  }

  #nav-oferta+.nav-dropdown>li:first-child {
    display: contents;
  }

  #nav-oferta+.nav-dropdown>li:first-child>a {
    grid-area: title;
    margin-bottom: 0;
    margin-left: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  #nav-oferta+.nav-dropdown>li:first-child>ul {
    display: contents;
  }

  #nav-oferta+.nav-dropdown>li:first-child>ul>li:nth-child(1) {
    grid-area: der;
  }

  #nav-oferta+.nav-dropdown>li:first-child>ul>li:nth-child(2) {
    grid-area: not;
  }

  #nav-oferta+.nav-dropdown>li:first-child>ul>li:nth-child(3) {
    grid-area: cpol;
  }

  #nav-oferta+.nav-dropdown>li:last-child {
    grid-area: posg;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown {
    position: static;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>a {
    font-family: var(--font-heading);
    color: var(--color-accent-light);
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
    padding: 0 0 var(--space-sm) 0;
    margin-bottom: var(--space-md);
    margin-left: 1.25rem;
    border-bottom: 1px solid rgba(200, 161, 53, 0.25);
    pointer-events: none;
    text-transform: none;
    letter-spacing: 0;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>a::after {
    display: none;
  }

  .nav-list>.has-dropdown>.nav-dropdown .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: inherit;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    border: none;
    display: block;
    min-width: 100%;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>.nav-dropdown:has(> li.has-dropdown) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>.nav-dropdown:has(> li.has-dropdown)>li {
    flex: 1;
    min-width: 160px;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>.nav-dropdown>li.has-dropdown>a {
    color: white;
    font-weight: 700;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    margin: var(--space-md) 1.25rem var(--space-sm);
    padding: 0.2rem 0;
    pointer-events: none;
    font-style: normal;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .nav-list>.has-dropdown>.nav-dropdown>li.has-dropdown>.nav-dropdown>li.has-dropdown>a::after {
    display: none;
  }

  .nav-list>.has-dropdown>.nav-dropdown .nav-dropdown a:hover {
    padding-left: 1.6rem;
  }
}

/* === MOBILE OVERRIDES === */
@media (max-width: 1024px) {
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.12);
    border: none;
    display: none;
    padding: 0;
  }

  .has-dropdown.dropdown-open>.nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    padding-left: 2rem;
  }

  .nav-dropdown .nav-dropdown a {
    padding-left: 3rem;
  }

  .nav-dropdown .nav-dropdown .nav-dropdown a {
    padding-left: 4rem;
  }

  .has-dropdown>a::after {
    position: absolute;
    right: 1.5rem;
  }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      rgba(30, 8, 14, 0.92) 0%,
      rgba(82, 17, 32, 0.78) 45%,
      rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: var(--space-3xl) 0;
}

.hero-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--color-accent-muted);
  border: 1px solid rgba(200, 161, 53, 0.4);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero-content h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.hero-content .hero-university {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero-content .hero-university::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.hero-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 480px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* =========================================
   QUICK ACCESS BAR
   ========================================= */
.quick-access {
  background: var(--color-bg-white);
  padding: var(--space-sm) 0;
  border-bottom: 3px solid var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}

.quick-access .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.quick-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.quick-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.quick-btn--highlight {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.quick-btn--highlight:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
}

/* =========================================
   SECTION LAYOUT
   ========================================= */
.section {
  padding: var(--space-3xl) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* =========================================
   PROGRAM CARDS
   ========================================= */
.program-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.program-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
  position: relative;
}

.program-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  transform-origin: bottom;
  z-index: 1;
}

.program-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.program-card:hover::before {
  transform: scaleY(1);
}

.program-card-img {
  position: relative;
  height: 185px;
  overflow: hidden;
}

.program-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.program-card:hover .program-card-img img {
  transform: scale(1.06);
}

.program-card-img .program-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1rem;
  background: linear-gradient(transparent, rgba(30, 8, 14, 0.88));
  color: white;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
}

.program-card-body {
  padding: var(--space-lg);
}

.program-card-body h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.program-card-body p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.program-card-actions {
  display: flex;
  align-items: center;
}

/* =========================================
   SIDEBAR PANELS
   ========================================= */
.sidebar-panel {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.sidebar-panel-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
}

/* Direcciones grid */
.directions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.direction-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.direction-item:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary-light);
  transform: translateY(-1px);
  color: var(--color-primary-dark);
}

.direction-item svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.direction-item span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-light);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* Social link inside sidebar */
.sidebar-social-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  transition: background var(--transition-fast);
}

.sidebar-social-link:hover {
  background: var(--color-bg-alt);
}

.sidebar-social-link .social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1877F2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.sidebar-social-link .social-icon svg {
  width: 16px;
  height: 16px;
}

.sidebar-social-link .social-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

/* =========================================
   STATISTICS BAND
   ========================================= */
.stats-band {
  background: var(--color-bg-dark);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.stats-band::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
}

.stats-band::after {
  content: 'FDCS';
  position: absolute;
  right: -2rem;
  bottom: -1.5rem;
  font-family: var(--font-heading);
  font-size: 10rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.02);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.stats-band .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.stat-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.4rem;
}

/* =========================================
   NEWS SECTION
   ========================================= */
.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.news-item {
  display: flex;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
}

.news-item:last-child {
  border-bottom: none;
}

.news-img {
  width: 160px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-item:hover .news-img img {
  transform: scale(1.05);
}

.news-body h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  line-height: 1.35;
  transition: color var(--transition-fast);
}

.news-item:hover .news-body h4 {
  color: var(--color-primary);
}

.news-body .news-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-body .news-meta svg {
  width: 12px;
  height: 12px;
  color: var(--color-accent);
}

.news-body p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* =========================================
   SOCIAL / REVISTA SIDEBAR
   ========================================= */
.social-panel {
  margin-top: var(--space-lg);
}

.social-panel-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.social-fb-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  border: 1px solid var(--color-border-light);
}

.social-fb-card .fb-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1877F2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.social-fb-card .fb-icon svg {
  width: 18px;
  height: 18px;
}

.social-fb-card .fb-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.social-fb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 0.65rem;
  background: var(--color-primary-dark);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition-fast);
}

.social-fb-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.social-fb-btn:hover {
  background: var(--color-primary);
  color: white;
}

/* Revista */
.revista-card {
  margin-top: var(--space-lg);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.revista-header {
  background: var(--color-primary-dark);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}

.revista-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
}

.revista-header h4 {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
}

.revista-header .revista-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: white;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}

.revista-body {
  padding: var(--space-lg);
}

.revista-body .revista-edition {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.revista-body .revista-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.revista-body .revista-links a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.revista-body .revista-links a:hover {
  color: var(--color-primary);
  padding-left: var(--space-sm);
}

.revista-body .revista-links a svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.revista-footer-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.revista-footer-link:hover {
  color: var(--color-primary-dark);
  gap: var(--space-md);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.service-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-bottom: 3px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 26, 44, 0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  border-bottom-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  color: inherit;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
  border: 1px solid var(--color-border-light);
}

.service-card:hover .service-card-icon {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.service-card-icon svg {
  width: 24px;
  height: 24px;
}

.service-card-text h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.service-card-text span {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.service-card-text span svg {
  width: 12px;
  height: 12px;
  color: var(--color-accent);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--color-bg-dark);
  color: white;
  padding: var(--space-3xl) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.footer-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 4px;
}

.footer-brand-text h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.footer-brand-text .footer-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  display: block;
}

.footer-brand-text p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  max-width: 300px;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(200, 161, 53, 0.25);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.footer-contact-item svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: block;
}

.footer-links a:hover {
  color: var(--color-accent-light);
  padding-left: 4px;
}

.footer-bottom {
  padding: var(--space-lg) 0;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent);
  color: var(--color-bg-dark);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 14px;
  height: 14px;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fade-in-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays pomochas hijas */
.stagger>*:nth-child(1) {
  transition-delay: 0.05s;
}

.stagger>*:nth-child(2) {
  transition-delay: 0.12s;
}

.stagger>*:nth-child(3) {
  transition-delay: 0.19s;
}

.stagger>*:nth-child(4) {
  transition-delay: 0.26s;
}

.stagger>*:nth-child(5) {
  transition-delay: 0.33s;
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .header-search input {
    width: 160px;
  }

  .hero-content h2 {
    font-size: 2.4rem;
  }

  .section-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .stats-band .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .hamburger {
    display: flex;
  }

  .nav .container {
    justify-content: flex-end;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 290px;
    height: 100vh;
    background: var(--color-primary-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 0 40px;
    transition: right var(--transition-base);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-list.open {
    right: 0;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    padding: 0.9rem 1.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
    min-width: 100%;
  }

  .nav-list li.dropdown-open>.nav-dropdown {
    max-height: 2000px;
  }

  .nav-dropdown a {
    color: rgba(255, 255, 255, 0.75);
    padding-left: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    text-transform: none;
    letter-spacing: 0.02em;
  }

  .nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
  }

  .nav-dropdown .nav-dropdown a {
    padding-left: 3.5rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }
}

/* Small Tablet */
@media (max-width: 768px) {
  .header-top .container {
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
  }

  .header-brand {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-contact {
    display: none;
  }

  .hero {
    min-height: 400px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-content {
    padding: var(--space-xl) 0;
  }

  .quick-access .container {
    gap: var(--space-xs);
  }

  .quick-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .program-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-band .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .header-logo {
    width: 46px;
    height: 46px;
  }

  .header-brand-text h1 {
    font-size: 0.9rem;
  }

  .header-search input {
    width: 130px;
  }

  .hero {
    min-height: 340px;
  }

  .hero-content h2 {
    font-size: 1.7rem;
  }

  .quick-access .container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .quick-btn {
    flex: 0 0 calc(50% - var(--space-xs));
    justify-content: center;
    font-size: 0.72rem;
  }

  .program-cards {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .news-item {
    flex-direction: column;
  }

  .news-img {
    width: 100%;
    height: 160px;
  }

  .stats-band .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .footer-contact-item {
    flex-direction: column;
    gap: var(--space-xs);
  }
}