:root {
  --primary: #6f2c91;
  /* Purple */
  --primary-dark: #4f1d6a;
  /* Dark Purple */
  --secondary: #5ba84a;
  /* Green */
  --bg-light: #f4f4f5;
  /* Light Gray */
  --text-dark: #4a4a4a;
  /* Dark Gray */
  --white: #ffffff;

  --font-main: "Inter", sans-serif;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --radius-md: 8px;
  --radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

body {
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

/* 6. BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(111, 44, 145, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(91, 168, 74, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* ================= HEADER & NAVIGATION ================= */
header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  color: var(--secondary);
  font-size: 40px;
  display: flex;
  align-items: center;
}

.logo-icon i {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
}

.logo-text small {
  display: block;
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-item {
  position: relative;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
  text-transform: uppercase;
  padding: 10px 0;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

/* 7. SUGERENCIA DE NAVEGACIÓN EN MENÚ */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border-top: 3px solid var(--primary);
  overflow: hidden;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-dark);
  text-transform: none;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 500;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--primary);
  padding-left: 25px;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  color: var(--primary-dark);
  cursor: pointer;
}

/* ================= 1. PÁGINA PRINCIPAL (HERO) ================= */
.hero {
  display: flex;
  align-items: center;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      to right,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.95) 45%,
      rgba(255, 255, 255, 0) 75%
    ),
    url("https://images.unsplash.com/photo-1559757175-5700dde675bc?auto=format&fit=crop&q=80&w=1600")
      center/cover no-repeat;
}

.hero-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M100,0 L100,50 A18,50 0 0,0 82,0 Z" fill="%234F1D6A" opacity="0.85"/><path d="M50,100 C65,90 75,55 85,75 C90,85 95,95 100,85 L100,100 Z" fill="%236F2C91" opacity="0.85"/></svg>')
    no-repeat center center;
  background-size: 100% 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-content {
  width: 55%;
  padding: 40px 0;
}

.hero-title-top {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.hero h1 {
  font-size: 38px;
  color: var(--primary-dark);
  margin-bottom: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.hero-line {
  width: 60px;
  height: 3px;
  background-color: var(--secondary);
  border: none;
  margin-bottom: 25px;
}

.hero p {
  font-size: 15px;
  margin-bottom: 30px;
  max-width: 480px;
  color: var(--text-dark);
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.hero-actions .btn {
  font-size: 12px;
  line-height: 1.4;
}

.video-btn-wrapper {
  position: absolute;
  bottom: 30px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  font-weight: 600;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 3;
}

.video-icon {
  width: 60px;
  height: 60px;
  background: transparent;
  border: 2px solid var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Stats */
.stats {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--bg-light);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--bg-light);
}

.stat-icon {
  color: var(--primary);
  font-size: 32px;
}

.stat-text h3 {
  font-size: 28px;
  color: var(--primary-dark);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-text p {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

/* Programas Destacados */
.section-padding {
  padding: 80px 0;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  color: var(--primary-dark);
  font-size: 28px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid var(--bg-light);
}

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

.card-img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}

.card-content h4 {
  color: var(--primary-dark);
  font-size: 16px;
  margin-bottom: 15px;
  min-height: 48px;
  line-height: 1.4;
  text-transform: uppercase;
}

.card-content p {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 20px;
  min-height: 63px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aval {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
}

/* Banner Middle */
.banner-middle {
  background: var(--primary-dark);
  color: var(--white);
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-middle .logos {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner-middle .logos img {
  height: 50px;
  filter: brightness(0) invert(1);
}

.banner-middle p {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Page Separator Title (e.g. 2 PÁGINA: INSTITUTO) */
.page-separator {
  background: var(--primary);
  color: var(--white);
  padding: 20px 0;
  margin-top: 60px;
}

.page-separator h2 {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
}

.breadcrumb {
  font-size: 12px;
  margin-top: 5px;
  opacity: 0.8;
}

/* ================= 2. PÁGINA: INSTITUTO ================= */
.instituto-layout {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.sidebar-menu {
  border: 1px solid var(--bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.sidebar-menu li {
  border-bottom: 1px solid var(--bg-light);
}

.sidebar-menu li:last-child {
  border-bottom: none;
}

.sidebar-menu li a {
  display: block;
  padding: 15px 20px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
  position: relative;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
  background: var(--bg-light);
  color: var(--primary);
}

.sidebar-menu li.active a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.main-content {
  flex-grow: 1;
}

.mision-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.mv-card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 20px;
  text-transform: uppercase;
}

.mv-card p {
  color: var(--text-dark);
  font-size: 15px;
}

.instituto-img-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.instituto-img-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.quote-box {
  background: var(--primary-dark);
  color: var(--white);
  padding: 30px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.quote-box p {
  font-size: 16px;
  font-style: italic;
  margin-bottom: 10px;
}

.quote-box span {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.valores-section {
  margin-top: 50px;
}

.valores-section h3 {
  color: var(--primary-dark);
  margin-bottom: 25px;
  font-size: 20px;
  text-transform: uppercase;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: center;
}

.valor-item {
  padding: 25px 15px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--bg-light);
  transition: transform 0.3s;
}

.valor-item:hover {
  transform: translateY(-5px);
}

.valor-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 15px;
}

.valor-item h4 {
  font-size: 14px;
  color: var(--primary-dark);
}

/* ================= 3. PÁGINA: PROGRAMAS ================= */
.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--bg-light);
  padding-bottom: 10px;
}

.tab-btn {
  padding: 12px 30px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--bg-light);
}

.tab-btn.active {
  color: var(--primary);
  background: var(--white);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.congress-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  height: 100%;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.congress-card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 20px;
}

.congress-card p {
  margin-bottom: 20px;
  color: var(--text-dark);
}

/* ================= 4. PÁGINA: CLAUSTRO ACADÉMICO ================= */
.claustro-desc {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--text-dark);
  font-size: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.profile-card {
  text-align: center;
  background: var(--white);
  padding: 30px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--bg-light);
  transition: transform 0.3s;
}

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

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--bg-light);
}

.profile-card h4 {
  color: var(--primary-dark);
  font-size: 16px;
  margin-bottom: 5px;
  min-height: 40px;
}

.profile-card .role {
  font-size: 12px;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: block;
  min-height: 35px;
}

.btn-outline {
  padding: 8px 16px;
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
  border-radius: var(--radius-md);
  font-size: 12px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ================= FOOTER ================= */
footer {
  background: #383838;
  color: #d1d1d1;
}

.footer-main {
  padding: 60px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-logo-icon {
  color: var(--white);
  font-size: 40px;
}

.footer-logo-text {
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.footer-logo-text small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 2px;
}

.footer-desc {
  font-size: 14px;
  max-width: 300px;
  line-height: 1.6;
}

.footer-title {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 25px;
  letter-spacing: 1px;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.contact-list i {
  margin-top: 4px;
  color: var(--white);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.3s;
}

.social-icons a:hover {
  background: var(--primary);
}

.footer-bottom {
  background: #2b2b2b;
  padding: 20px 0;
  font-size: 12px;
}

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

.footer-links-inline {
  display: flex;
  gap: 20px;
}

/* Responsive basics */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    width: 100%;
    padding: 40px 0;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .video-btn-wrapper {
    position: relative;
    right: 0;
    bottom: 0;
    margin-top: 30px;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .grid-3,
  .grid-4,
  .instituto-layout,
  .footer-main {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

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

  .mobile-menu-btn {
    display: block;
  }

  .header-main .btn-primary {
    display: none;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px 0;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu .dropdown-menu {
    position: static;
    box-shadow: none;
    background: var(--bg-light);
    display: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    padding-left: 15px;
    margin-top: 10px;
    border: none;
  }

  .nav-menu .nav-item:hover .dropdown-menu {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero-wave {
    display: none;
    /* Hide wave on very small screens to avoid overlapping text */
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .stat-item::after {
    display: none;
  }

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

  .tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  .footer-bottom .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .footer-links-inline {
    justify-content: center;
  }
}
