/* ==========================================================================
   MASTER EN REPRODUCCIÓN HUMANA (IVI & URJC) - STYLESHEET
   ========================================================================== */

:root {
  /* Color Palette */
  --primary: #0A2540;
  --primary-light: #1A365D;
  --accent: #00A3E0;
  --accent-hover: #0084B6;
  --secondary: #0D9488;
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;
  --border: #E2E8F0;
  --border-focus: #38BDF8;

  /* Status Colors */
  --status-open-bg: #ECFDF5;
  --status-open-text: #047857;
  --status-open-border: #A7F3D0;

  /* Elevation / Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Background Biological Canvas Animation */
#bio-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  #bio-canvas {
    opacity: 0.6;
  }
}

/* Layering Structure */
.top-bar, .main-header, main, .main-footer, .mobile-nav-drawer, .mobile-overlay {
  position: relative;
  z-index: 2;
}


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

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

a:hover {
  color: var(--accent-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

/* Top Utility Bar */
.top-bar {
  background: var(--primary);
  color: #E2E8F0;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 500;
}

.top-bar-info span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Main Navigation Header */
.main-header {
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

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

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Desktop Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent);
  background-color: #F1F5F9;
}

.nav-link.active {
  color: var(--accent);
  background-color: #E0F2FE;
}

/* Primary Action Button in Nav */
.btn-nav-campus {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #FFFFFF !important;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 163, 224, 0.3);
}

.btn-nav-campus:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 163, 224, 0.4);
  background: var(--accent-hover);
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
}

/* Mobile Nav Drawer Overlay */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: #FFFFFF;
  z-index: 1100;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.mobile-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-list .nav-link {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   HERO & BANNERS
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 163, 224, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38BDF8;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: #CBD5E1;
  max-width: 650px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.975rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 163, 224, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 163, 224, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.hero-card-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-xl);
  color: var(--text-dark);
}

.hero-card-header img {
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.hero-card-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-card-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
}

.hero-card-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Banner Image Bar */
.banner-image-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  margin: -2rem 0 3rem 0;
  position: relative;
  z-index: 10;
  text-align: center;
}

.banner-image-box img {
  max-height: 200px;
  margin: 0 auto;
  object-fit: contain;
}

/* Page Header Title Section */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #FFFFFF;
  padding: 3rem 0;
  text-align: center;
}

.page-banner h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-banner p {
  color: #CBD5E1;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   CARDS & GRID LAYOUTS
   ========================================================================== */

.section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Feature Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: #E0F2FE;
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
}

.card-link:hover {
  gap: 0.6rem;
}

/* Highlight Box / Alert Box */
.highlight-box {
  background: #F0F9FF;
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
}

.highlight-box h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   PROGRAM ACCORDION & FACULTY TABLE
   ========================================================================== */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--accent);
}

.accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: #FFFFFF;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background: #F8FAFC;
}

.accordion-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform var(--transition-normal);
}

.accordion-item.active .accordion-header svg {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 1.25rem 1.5rem;
  background: #FAFAFA;
  border-top: 1px solid var(--border);
}

.accordion-item.active .accordion-content {
  display: block;
}

.topic-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.topic-num {
  background: #E2E8F0;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Faculty Table & Search */
.table-filter-box {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  flex-grow: 1;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.15);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: #FFFFFF;
}

.faculty-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.faculty-table th {
  background: #F1F5F9;
  color: var(--primary);
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--border);
}

.faculty-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}

.faculty-table tr:hover td {
  background: #F8FAFC;
}

/* ==========================================================================
   MATRICULA & DOWNLOADS
   ========================================================================== */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #CBD5E1;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
}

/* Download Action Card */
.download-card {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.download-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.main-footer {
  background: var(--primary);
  color: #94A3B8;
  margin-top: auto;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top {
  padding: 3.5rem 0 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #CBD5E1;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  background: #071729;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.footer-bottom-links a {
  color: #94A3B8;
}

.footer-bottom-links a:hover {
  color: #FFFFFF;
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}
