/* =============================================
   Nelson Vásquez - Candidatura Rector PUCV 2026-2030
   Estilos Globales
   ============================================= */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  /* Colores Institucionales Centenario PUCV */
  /* Vigencia: Diseño predeterminado hasta diciembre de 2028 */
  --color-fondo-base: #ece5e0;
  
  --color-azul-pucv: #1d71b8;
  --color-azul-pucv-dark: #24588d;
  --color-azul-pucv-light: #36a9e1;
  --color-dorado: #f4ce46; /* Amarillo acento */
  --color-dorado-light: #f4ce46;
  --color-dorado-dark: #f4ce46; 
  --color-rojo: #e73a34;
  --color-coral: #ee7269;
  --color-morado: #9366a9;
  --color-turquesa: #30b6be;

  --color-blanco: #FFFFFF;
  --color-gris-claro: #F8FAFC;
  --color-gris-medio: #64748B;
  --color-gris-oscuro: #334155;
  --color-texto: #0F172A;

  /* Gradientes Modernos */
  --gradient-primary: linear-gradient(135deg, #1d71b8 0%, #36a9e1 50%, #1d71b8 100%);
  --gradient-dark: linear-gradient(180deg, #24588d 0%, #1d71b8 100%);
  --gradient-gold: linear-gradient(135deg, #f4ce46 0%, #faf0b5 50%, #f4ce46 100%);
  --gradient-hero: linear-gradient(135deg, #24588d 0%, #1d71b8 40%, #008cba 100%);
  --gradient-section: linear-gradient(180deg, #1d71b8 0%, #24588d 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

  /* Tipografía */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Tamaños de fuente */
  --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: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;

  /* Bordes */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-gold: 0 4px 20px rgba(244, 206, 70, 0.3);

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Layout */
  --max-width: 1200px;
  --header-height: 120px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-texto);
  background-color: var(--color-fondo-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-azul-pucv);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-gris-oscuro);
}

a {
  color: var(--color-azul-pucv);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-dorado);
}

strong {
  font-weight: 600;
}

/* ===== Layout Utilities ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-4xl) 0;
}

.section--alt {
  background-color: var(--color-gris-claro);
}

.section--dark {
  background: var(--gradient-section);
  color: var(--color-blanco);
  position: relative;
  overflow: hidden;
}

.section--dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(0, 82, 163, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(244, 206, 70, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-blanco);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== Header & Navigation ===== */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(36, 88, 141, 0.25);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header--scrolled {
  background: rgba(36, 88, 141, 0.92);
  border-bottom: 1px solid rgba(244, 206, 70, 0.25);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Header for Subpages - with blue gradient (Force specificity to override JS-added header--light) */
.header.header--subpage {
  background: var(--gradient-hero) !important;
  position: relative;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(244, 206, 70, 0.3);
}

.header.header--subpage .nav__link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.header.header--subpage .nav__link:hover,
.header.header--subpage .nav__link--active {
  color: var(--color-blanco) !important;
}

.header.header--subpage .header__logo-text {
  color: var(--color-blanco) !important;
}

/* Header Light Mode - for light backgrounds */
.header--light {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(29, 113, 184, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header--light .header__logo-text {
  color: var(--color-azul-pucv);
}

.header--light .nav__link {
  color: var(--color-azul-pucv);
}

.header--light .nav__link:hover,
.header--light .nav__link--active {
  color: var(--color-azul-pucv);
}

.header--light .nav__toggle span {
  background: var(--color-azul-pucv);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-blanco);
  letter-spacing: -0.02em;
  display: none; /* Oculto ya que usaremos el logo imagen */
}

.header__logo-img {
  max-height: 100px;
  width: auto;
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav__list {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--spacing-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-dorado);
  transition: width var(--transition-normal);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-blanco);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-blanco);
  transition: all var(--transition-fast);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn--primary {
  background: var(--color-dorado);
  color: var(--color-azul-pucv-dark) !important;
  border-color: var(--color-dorado);
}

.btn--primary:hover {
  color: var(--color-azul-pucv-dark) !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(244, 206, 70, 0.5); /* updated shadow color */
}

.btn--secondary {
  background: transparent;
  color: var(--color-azul-pucv) !important;
  border-color: var(--color-azul-pucv);
}

.btn--secondary:hover {
  color: var(--color-azul-pucv) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(29, 113, 184, 0.2);
}

.btn--white {
  background: var(--color-blanco);
  color: var(--color-azul-pucv) !important;
  border-color: var(--color-blanco);
}

.btn--white:hover {
  color: var(--color-azul-pucv) !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.4);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
  background: var(--color-azul-pucv-dark);
  /* Fallback */
  overflow: hidden;
  text-align: center;
}

.hero__video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Capas de Overlay para legibilidad */
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      rgba(36, 88, 141, 0.9) 0%,
      rgba(29, 113, 184, 0.5) 50%,
      rgba(36, 88, 141, 0.95) 100%);
  z-index: 1;
}

.hero__overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.hero__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  width: 100%;
}

.hero__content {
  color: var(--color-blanco);
  text-align: center;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out forwards;
}

.hero__subtitle {
  display: block;
  width: fit-content;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-dorado);
  margin: 0 auto var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(244, 206, 70, 0.2);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--color-blanco);
  margin: 0 auto var(--spacing-lg);
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero__title span,
.text-gradient-animated {
  background: linear-gradient(90deg,
      var(--color-blanco) 0%,
      var(--color-dorado-light) 25%,
      var(--color-dorado) 50%,
      var(--color-dorado-light) 75%,
      var(--color-blanco) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
  display: inline-block;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

.hero__description {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto var(--spacing-2xl);
  line-height: 1.7;
  max-width: 700px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero__buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Image Placeholder ===== */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-gris-claro) 0%, #E5E7EB 100%);
  border: 2px dashed var(--color-gris-medio);
  border-radius: var(--radius-lg);
  min-height: 300px;
  padding: var(--spacing-xl);
}

.image-placeholder span {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-gris-medio);
  text-align: center;
}

.image-placeholder--circle {
  border-radius: var(--radius-full);
  width: 120px;
  height: 120px;
  min-height: auto;
}

.image-placeholder--hero {
  min-height: 500px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.3);
}

.image-placeholder--hero span {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-3xl);
}

.section-header__label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-dorado);
  margin-bottom: var(--spacing-sm);
}

.section-header__title {
  margin-bottom: var(--spacing-md);
}

.section-header__description {
  font-size: var(--text-lg);
  color: var(--color-gris-medio);
}

/* ===== Cards ===== */
.card {
  background: var(--color-blanco);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--bordered {
  border: 1px solid rgba(29, 113, 184, 0.1);
}

.card--gold-hover:hover {
  border-color: var(--color-dorado);
  box-shadow: var(--shadow-gold);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-azul-pucv-dark);
  color: var(--color-blanco);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-2xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-blanco);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

.footer__logo span {
  color: var(--color-dorado);
}

.footer__description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer__title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-dorado);
  margin-bottom: var(--spacing-lg);
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--spacing-sm);
}

.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-dorado);
}

.footer__bottom {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__bottom p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }

  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
    --spacing-4xl: 4rem;
    --spacing-3xl: 3rem;
  }

  .nav__list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(36, 88, 141, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(244, 206, 70, 0.2);
  }

  .nav__list.active {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__brand {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --spacing-lg: 1rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }
}