/* Import fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Custom Properties (Design System) */
:root {
  /* Colors */
  --primary: #0A2240;
  --primary-light: #153A6B;
  --primary-dark: #051326;
  --secondary: #C5A059;
  --secondary-light: #DFBA73;
  --secondary-dark: #A37E39;
  --accent: #E53E3E;
  --accent-light: #F56565;
  --text-main: #1F2937;
  --text-muted: #4B5563;
  --text-light: #F9FAFB;
  --bg-main: #FFFFFF;
  --bg-subtle: #F4F7FA;
  --bg-dark: #081B33;
  
  /* Fonts */
  --font-headings: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout & Transitions */
  --header-height: 80px;
  --topbar-height: 40px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(10, 34, 64, 0.05);
  --shadow-md: 0 10px 20px rgba(10, 34, 64, 0.08);
  --shadow-lg: 0 20px 40px rgba(10, 34, 64, 0.12);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

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

ul {
  list-style: none;
}

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

/* Top bar styles */
.top-bar {
  background-color: var(--primary-dark);
  color: var(--text-light);
  font-size: 0.85rem;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.top-bar-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-contact {
  display: flex;
  gap: 20px;
}

.top-bar-contact a, .top-bar-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(249, 250, 251, 0.85);
}

.top-bar-contact a:hover {
  color: var(--secondary-light);
}

.top-bar-socials {
  display: flex;
  gap: 15px;
}

.top-bar-socials a {
  color: rgba(249, 250, 251, 0.85);
}

.top-bar-socials a:hover {
  color: var(--secondary-light);
  transform: translateY(-2px);
}

/* Header & Nav styles */
.main-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

.main-header.shrink .nav-container {
  height: 64px;
}

.main-header.shrink .logo-link {
  height: 48px;
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  height: var(--header-height);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.logo-link {
  height: 60px;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.logo-img {
  height: 100%;
  width: auto;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-item {
  position: relative;
  padding: 10px 0;
}

.nav-link {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link:hover, .nav-item.active > .nav-link {
  color: var(--secondary-dark);
  background-color: rgba(197, 160, 89, 0.08);
}

.nav-link svg {
  transition: var(--transition-fast);
}

.nav-item:hover .nav-link svg {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-main);
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(10, 34, 64, 0.05);
  border-top: 3px solid var(--secondary);
  width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  padding: 10px 0;
  z-index: 100;
}

.dropdown-right {
  left: auto;
  right: 0;
}

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

.dropdown-link {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary);
  padding: 10px 20px;
  display: block;
  border-left: 3px solid transparent;
}

.dropdown-link:hover {
  background-color: var(--bg-subtle);
  color: var(--secondary-dark);
  border-left-color: var(--secondary);
  padding-left: 25px;
}

/* Call to Action Button in Nav */
.nav-cta {
  background-color: var(--primary);
  color: var(--text-light) !important;
  font-weight: 600;
  border: 1px solid var(--primary);
}

.nav-cta:hover {
  background-color: var(--secondary) !important;
  border-color: var(--secondary);
  color: var(--primary) !important;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 5px;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 34, 64, 0.95) 0%, rgba(5, 19, 38, 0.9) 100%), 
              url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
  padding: 140px 0 100px 0;
  color: var(--text-light);
  min-height: calc(100vh - var(--header-height) - var(--topbar-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Wave Background Effect */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--bg-main);
  clip-path: ellipse(60% 80px at 50% 80px);
}

.hero-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(197, 160, 89, 0.15);
  border: 1px solid var(--secondary);
  color: var(--secondary-light);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  color: var(--text-light);
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-title span {
  color: var(--secondary-light);
  background: linear-gradient(120deg, var(--secondary-light), #F3E5AB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: rgba(249, 250, 251, 0.8);
  margin-bottom: 35px;
  max-width: 600px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--secondary-light);
  color: var(--secondary-light);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Glass Card overlay in Hero */
.hero-glass-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-glass-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(197,160,89,0.2) 100%);
  border-radius: var(--border-radius-lg);
  z-index: -1;
}

.hero-stats-title {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 15px;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.hero-stat-item:last-child {
  margin-bottom: 0;
}

.hero-stat-icon {
  width: 45px;
  height: 45px;
  background-color: rgba(197, 160, 89, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-light);
  flex-shrink: 0;
}

.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
}

.hero-stat-text {
  font-size: 0.85rem;
  color: rgba(249, 250, 251, 0.7);
}

/* Sections General */
section {
  padding: 90px 0;
}

.section-bg-subtle {
  background-color: var(--bg-subtle);
}

.section-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-subtitle {
  color: var(--secondary-dark);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

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

/* Nosotros Section */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.nosotros-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.nosotros-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.nosotros-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.nosotros-feature {
  display: flex;
  gap: 15px;
}

.nosotros-feature-icon {
  color: var(--secondary);
  flex-shrink: 0;
  margin-top: 4px;
}

.nosotros-feature h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.nosotros-feature p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.nosotros-visual {
  position: relative;
}

.nosotros-img-container {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg-main);
  z-index: 2;
  position: relative;
}

.nosotros-badge-floating {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background-color: var(--primary);
  border: 2px solid var(--secondary);
  border-radius: var(--border-radius-md);
  padding: 20px;
  color: var(--text-light);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 15px;
}

.nosotros-badge-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--secondary-light);
  font-family: var(--font-headings);
  line-height: 1;
}

.nosotros-badge-text {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Residencias Quirúrgicas Section */
.residencias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.residencia-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10, 34, 64, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.residencia-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 89, 0.25);
}

.residencia-banner {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.residencia-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 34, 64, 0.2) 0%, rgba(10, 34, 64, 0.8) 100%);
  z-index: 1;
}

.residencia-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.residencia-card:hover .residencia-banner img {
  transform: scale(1.1);
}

.residencia-hospital-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--secondary);
  color: var(--primary-dark);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--border-radius-sm);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.residencia-title-container {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.residencia-card-title {
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.residencia-location {
  color: rgba(249, 250, 251, 0.8);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.residencia-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.residencia-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.residencia-details {
  border-top: 1px solid var(--bg-subtle);
  border-bottom: 1px solid var(--bg-subtle);
  padding: 15px 0;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.residencia-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.residencia-detail-item strong {
  color: var(--primary);
  font-weight: 600;
}

.residencia-detail-icon {
  color: var(--secondary);
}

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

.residencia-aval {
  display: flex;
  align-items: center;
  gap: 5px;
}

.residencia-aval-logo {
  height: 25px;
  width: auto;
  opacity: 0.85;
}

.residencia-aval-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-card {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-card:hover {
  color: var(--secondary-dark);
}

.btn-card svg {
  transition: var(--transition-fast);
}

.btn-card:hover svg {
  transform: translateX(4px);
}

/* Chapters (Capítulos) Section */
.capitulos-container {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 50px;
  align-items: center;
}

.capitulos-left h3 {
  font-size: 1.75rem;
  margin-bottom: 15px;
}

.capitulos-left p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.capitulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.capitulo-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-md);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 34, 64, 0.03);
  text-align: center;
  transition: var(--transition-smooth);
}

.capitulo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(197, 160, 89, 0.15);
}

.capitulo-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(197, 160, 89, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-dark);
  margin: 0 auto 20px auto;
  transition: var(--transition-smooth);
}

.capitulo-card:hover .capitulo-icon {
  background-color: var(--primary);
  color: var(--secondary-light);
}

.capitulo-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.capitulo-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* Eventos / Noticias Section */
.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.evento-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-bottom: 3px solid var(--primary);
  transition: var(--transition-smooth);
}

.evento-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--secondary);
}

.evento-banner {
  height: 200px;
  position: relative;
}

.evento-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evento-date-badge {
  position: absolute;
  bottom: 15px;
  left: 20px;
  background-color: var(--secondary);
  color: var(--primary-dark);
  padding: 8px 15px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.evento-date-badge span {
  display: block;
  font-size: 1.15rem;
  line-height: 1;
}

.evento-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.evento-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--secondary-dark);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.evento-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.evento-title a:hover {
  color: var(--secondary-dark);
}

.evento-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.evento-info {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-subtle);
  padding-top: 15px;
}

.evento-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Eventos Carousel Component */
.eventos-carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.eventos-carousel-viewport {
  overflow: hidden;
  width: 100%;
  padding: 15px 5px;
  margin: -15px -5px;
}

.eventos-carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.eventos-carousel-track .evento-card {
  flex: 0 0 calc((100% - 60px) / 3);
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .eventos-carousel-track .evento-card {
    flex: 0 0 calc((100% - 30px) / 2);
  }
}

@media (max-width: 680px) {
  .eventos-carousel-track .evento-card {
    flex: 0 0 100%;
  }
}

/* Carousel Navigation Buttons */
.eventos-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--bg-main);
  color: var(--primary);
  border: 1px solid rgba(10, 34, 64, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.eventos-nav-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(10, 34, 64, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.eventos-nav-btn.prev {
  left: -23px;
}

.eventos-nav-btn.next {
  right: -23px;
}

@media (max-width: 900px) {
  .eventos-nav-btn.prev {
    left: -10px;
  }
  .eventos-nav-btn.next {
    right: -10px;
  }
}

@media (max-width: 640px) {
  .eventos-nav-btn {
    display: none; /* Emplear gestos táctiles y dots en móviles */
  }
}

/* Dots Indicators */
.eventos-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 35px;
}

.eventos-dot {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background-color: rgba(10, 34, 64, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
}

.eventos-dot:hover {
  background-color: var(--secondary);
  transform: scale(1.15);
}

.eventos-dot.active {
  width: 32px;
  background-color: var(--secondary);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.4);
}

/* Contact Section */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
}

.contacto-info-col h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.contacto-info-col p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.contacto-details {
  margin-bottom: 40px;
}

.contacto-detail-card {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.contacto-detail-card:last-child {
  margin-bottom: 0;
}

.contacto-detail-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-subtle);
  border: 1px solid rgba(10, 34, 64, 0.05);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.contacto-detail-card:hover .contacto-detail-icon {
  background-color: var(--primary);
  color: var(--secondary-light);
  border-color: var(--primary);
}

.contacto-detail-text h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.contacto-detail-text p, .contacto-detail-text a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contacto-detail-text a:hover {
  color: var(--secondary-dark);
}

/* Glassmorphism Map Card */
.mapa-card {
  background: var(--bg-main);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10, 34, 64, 0.05);
  height: 250px;
}

.mapa-card iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Contact Form */
.contacto-form-col {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(10, 34, 64, 0.02);
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-subtle);
  border: 1px solid rgba(10, 34, 64, 0.05);
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  background-color: var(--bg-main);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 34, 64, 0.08);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  border: none;
  background-color: var(--primary);
  color: var(--text-light);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(10, 34, 64, 0.15);
}

.btn-submit:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(197, 160, 89, 0.35);
  transform: translateY(-2px);
}

/* Footer Section */
.footer {
  background-color: var(--primary-dark);
  color: rgba(249, 250, 251, 0.75);
  padding: 80px 0 30px 0;
  font-size: 0.9rem;
  border-top: 4px solid var(--secondary);
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: var(--text-light);
  font-size: 1.15rem;
  margin-bottom: 25px;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-logo {
  height: 60px;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 100%;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-col p {
  margin-bottom: 20px;
  line-height: 1.6;
}

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

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.footer-contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  align-items: flex-start;
}

.footer-contact-icon {
  color: var(--secondary-light);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-newsletter p {
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex-grow: 1;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: var(--text-light);
  font-size: 0.85rem;
  outline: none;
}

.newsletter-input::placeholder {
  color: rgba(249, 250, 251, 0.4);
}

.newsletter-btn {
  background-color: var(--secondary);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 10px 15px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-btn:hover {
  background-color: var(--secondary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-copy {
  font-size: 0.8rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
}

.footer-bottom-links a:hover {
  color: var(--secondary-light);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .hero-visual {
    justify-content: flex-start;
  }
  
  .hero-glass-card {
    max-width: 100%;
  }
  
  .footer-top {
    grid-template-columns: 1.2fr 0.8fr 1fr;
  }
  
  .footer-col:last-child {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .top-bar {
    display: none; /* Hide top bar on mobile for cleaner view */
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-main);
    flex-direction: column;
    align-items: stretch;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transition: left 0.4s ease;
    overflow-y: auto;
    gap: 10px;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    padding: 0;
    border-bottom: 1px solid var(--bg-subtle);
  }
  
  .nav-link {
    padding: 15px 10px;
    justify-content: space-between;
    font-size: 1.05rem;
  }
  
  .nav-link:hover, .nav-item.active > .nav-link {
    background-color: transparent;
  }
  
  /* Dropdowns on Mobile */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--secondary);
    border-top: none;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease-out;
    border-radius: 0;
  }
  
  .nav-item.open .dropdown-menu {
    max-height: 350px;
    padding: 10px 0;
  }
  
  .dropdown-link {
    padding: 8px 25px;
  }
  
  .dropdown-link:hover {
    padding-left: 30px;
  }
  
  .hero {
    padding: 100px 0 60px 0;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .nosotros-visual {
    order: -1;
  }
  
  .capitulos-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-col:last-child {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column-reverse;
    text-align: center;
  }
}

/* ==========================================
   NUEVOS ESTILOS: CARRUSEL EN EL HERO
   ========================================== */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 460px;
  background-color: var(--primary-dark);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 5;
}

/* Background image blurred effect */
.carousel-blur-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.35);
  transform: scale(1.1);
  z-index: 1;
}

/* Centered poster image frame */
.carousel-img-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-img-frame img {
  max-height: 95%;
  max-width: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Text overlay at the bottom */
.carousel-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48%;
  background: linear-gradient(to top, 
              rgba(8, 27, 51, 1) 0%, 
              rgba(8, 27, 51, 0.95) 75%, 
              rgba(8, 27, 51, 0) 100%);
  z-index: 3;
  padding: 20px 25px 25px 25px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.carousel-tag {
  font-family: var(--font-headings);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--secondary-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  display: block;
}

.carousel-slide-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.carousel-slide-details {
  margin-bottom: 12px;
}

.carousel-slide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(249, 250, 251, 0.8);
  margin-bottom: 4px;
}

.carousel-slide-meta svg {
  color: var(--secondary-light);
  flex-shrink: 0;
}

.carousel-slide-speaker {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary-light);
  margin-top: 4px;
  border-left: 2px solid var(--secondary);
  padding-left: 8px;
}

.btn-carousel-more {
  align-self: flex-start;
  background-color: var(--secondary);
  color: var(--primary-dark);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  margin-top: 5px;
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
}

.btn-carousel-more:hover {
  background-color: var(--secondary-light);
  transform: translateY(-1px);
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  right: 25px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-dot.active {
  background-color: var(--secondary-light);
  width: 18px;
  border-radius: 5px;
}

/* ==========================================
   NUEVOS ESTILOS: CABECERA DE SUBPÁGINAS
   ========================================== */
.page-hero {
  background: linear-gradient(135deg, rgba(8, 27, 51, 0.98) 0%, rgba(10, 34, 64, 0.95) 100%),
              url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&q=80&w=1500') no-repeat center center/cover;
  padding: 100px 0 60px 0;
  color: var(--text-light);
  text-align: center;
  border-bottom: 4px solid var(--secondary);
  position: relative;
}

.page-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 12px;
}

.page-hero-title span {
  color: var(--secondary-light);
}

.page-hero-desc {
  font-size: 1.05rem;
  color: rgba(249, 250, 251, 0.85);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================
   NUEVOS ESTILOS: MAESTROS DE LA CIRUGÍA
   ========================================== */
.maestros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.maestro-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  padding: 40px 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10, 34, 64, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
  height: 100%;
}

.maestro-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 89, 0.25);
}

.maestro-img-container {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--secondary);
  margin-bottom: 25px;
  box-shadow: var(--shadow-md);
}

.maestro-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.maestro-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.maestro-title {
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.maestro-bio {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

/* ==========================================
   NUEVOS ESTILOS: GALERÍA DE EVENTOS
   ========================================== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--bg-subtle);
  border: 1px solid rgba(10, 34, 64, 0.05);
  padding: 8px 22px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(10, 34, 64, 0.15);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid rgba(10, 34, 64, 0.03);
  transition: var(--transition-smooth);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 34, 64, 0.9) 0%, rgba(10, 34, 64, 0.3) 60%, rgba(10, 34, 64, 0) 100%);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: var(--text-light);
  z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 2px;
}

.gallery-item-meta {
  font-size: 0.78rem;
  color: var(--secondary-light);
}

/* Lightbox Modal CSS */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 19, 38, 0.96);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border: 4px solid var(--bg-main);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--secondary-light);
}

.lightbox-caption {
  color: var(--text-light);
  text-align: center;
  margin-top: 15px;
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-prev:hover, .lightbox-next:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  border-color: var(--secondary);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* Responsive adjustments for new elements */
@media (max-width: 1024px) {
  .hero-carousel {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 10px;
    background-color: rgba(5, 19, 38, 0.6);
  }
  .lightbox-next {
    right: 10px;
    background-color: rgba(5, 19, 38, 0.6);
  }
  .lightbox-close {
    right: 10px;
    top: -40px;
  }
  .page-hero-title {
    font-size: 2.1rem;
  }
}

/* ==========================================
   NUEVOS ESTILOS: MODAL PROMOCIONAL POP-UP
   ========================================== */
.promo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 19, 38, 0.82);
  backdrop-filter: blur(8px);
  z-index: 15000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.promo-modal.active {
  opacity: 1;
  visibility: visible;
}

.promo-content {
  background-color: var(--primary-dark);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--secondary);
  padding: 10px;
  position: relative;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.promo-modal.active .promo-content {
  transform: scale(1);
}

.promo-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.promo-close:hover {
  background-color: var(--secondary-light);
  transform: scale(1.1) rotate(90deg);
}

.promo-body-img {
  width: 100%;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

.promo-body-img img {
  width: 100%;
  height: auto;
  max-height: 65vh;
  display: block;
  object-fit: contain;
}

.promo-footer {
  width: 100%;
  padding: 15px 5px 5px 5px;
  display: flex;
  justify-content: center;
}

.promo-btn-action {
  width: 100%;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  background-color: var(--secondary);
  color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.25);
  border: none;
}

.promo-btn-action:hover {
  background-color: var(--secondary-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(197, 160, 89, 0.35);
}

@media (max-width: 500px) {
  .promo-close {
    top: 15px;
    right: 15px;
    background-color: rgba(8, 27, 51, 0.7);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* ==========================================
   NUEVOS ESTILOS: JUNTA DIRECTIVA (SOMOS)
   ========================================== */
.directiva-grupo-section {
  background-color: var(--bg-main);
  padding: 60px 0 40px 0;
}

.directiva-grupo-frame {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--secondary);
  margin-bottom: 35px;
  position: relative;
}

.directiva-grupo-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10,34,64,0) 50%, rgba(10,34,64,0.4) 100%);
  pointer-events: none;
}

.directiva-grupo-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Directiva Photo Carousel Component */
.directiva-carousel {
  position: relative;
  width: 100%;
  height: clamp(350px, 52vw, 560px);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--secondary);
  margin-bottom: 35px;
  background-color: var(--primary-dark);
}

.directiva-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
  transform: scale(1.02);
  z-index: 1;
}

.directiva-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.directiva-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.directiva-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 25px 22px 25px;
  background: linear-gradient(to top, rgba(10,34,64,0.92) 0%, rgba(10,34,64,0.4) 60%, transparent 100%);
  color: #fff;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.directiva-slide-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary-dark);
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.directiva-slide-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Nav arrows on directiva-carousel */
.directiva-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(10, 34, 64, 0.75);
  color: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.directiva-nav-btn:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  border-color: var(--secondary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.5);
}

.directiva-nav-btn.prev {
  left: 20px;
}

.directiva-nav-btn.next {
  right: 20px;
}

/* Dots */
.directiva-carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.directiva-dot {
  width: 11px;
  height: 11px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
}

.directiva-dot:hover {
  background-color: var(--secondary);
  transform: scale(1.2);
}

.directiva-dot.active {
  width: 28px;
  background-color: var(--secondary);
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.85);
}

@media (max-width: 640px) {
  .directiva-slide-tagline {
    display: none;
  }
  .directiva-nav-btn {
    width: 38px;
    height: 38px;
  }
  .directiva-nav-btn.prev {
    left: 10px;
  }
  .directiva-nav-btn.next {
    right: 10px;
  }
}

.directiva-grupo-info {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.directiva-grupo-info h2 {
  font-size: 2.15rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.directiva-grupo-info p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.directiva-members-section {
  background-color: var(--bg-subtle);
  padding: 60px 0 80px 0;
}

.directiva-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 900px; /* Ancho máximo centrado para un listado legible */
  margin: 40px auto 0 auto;
}

.directiva-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  padding: 25px 35px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 34, 64, 0.03);
  border-left: 5px solid var(--secondary); /* Borde dorado de acento izquierdo */
  display: flex;
  gap: 30px;
  align-items: center;
  transition: var(--transition-smooth);
}

.directiva-card:hover {
  transform: translateX(8px); /* Desplazamiento lateral sutil en hover (ideal para listas) */
  box-shadow: var(--shadow-md);
  border-color: rgba(197, 160, 89, 0.25);
  background-color: #FAFBFD; /* Tono de fondo suave */
}

.directiva-member-img {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  overflow: hidden;
  border: 3.5px solid var(--primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.directiva-card:hover .directiva-member-img {
  border-color: var(--secondary);
}

.directiva-member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directiva-member-info {
  flex-grow: 1;
}

.directiva-member-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.directiva-member-role {
  font-family: var(--font-headings);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.directiva-member-msg {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  position: relative;
  padding-left: 20px;
  border-top: 1px dashed rgba(197, 160, 89, 0.2); /* Separador punteado sobre la cita */
  padding-top: 10px;
}

.directiva-member-msg::before {
  content: '“';
  position: absolute;
  left: 0;
  top: 5px;
  font-family: Georgia, serif;
  font-size: 2.2rem;
  color: var(--secondary-light);
  line-height: 1;
}

@media (max-width: 600px) {
  .directiva-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px;
    gap: 15px;
  }
  
  .directiva-card:hover {
    transform: translateY(-5px); /* Elevación vertical en lugar de lateral en móviles */
  }
  
  .directiva-member-img {
    margin-bottom: 5px;
  }
  
  .directiva-member-msg {
    padding-left: 0;
    padding-top: 12px;
  }
  
  .directiva-member-msg::before {
    position: static;
    display: inline-block;
    margin-bottom: -15px;
    margin-top: 0;
  }
}

/* ==========================================
   NUEVOS ESTILOS: SISTEMA DE RESIDENCIAS
   ========================================== */

/* Breadcrumbs Navigation */
.breadcrumbs-bar {
  background-color: var(--primary-dark);
  padding: 12px 0;
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
  font-size: 0.85rem;
}

.breadcrumbs-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(249, 250, 251, 0.7);
}

.breadcrumbs-container a {
  color: rgba(249, 250, 251, 0.85);
  transition: var(--transition-fast);
}

.breadcrumbs-container a:hover {
  color: var(--secondary-light);
}

.breadcrumbs-separator {
  color: var(--secondary);
  font-weight: bold;
}

.breadcrumbs-current {
  color: var(--secondary-light);
  font-weight: 600;
}

/* Single Residence Hero */
.residencia-hero-single {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 80px 0 60px 0;
  color: var(--text-light);
  border-bottom: 4px solid var(--secondary);
}

.residencia-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(8, 27, 51, 0.96) 0%, rgba(10, 34, 64, 0.88) 100%);
  z-index: 1;
}

.residencia-hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.residencia-hero-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-tag-gold {
  background-color: var(--secondary);
  color: var(--primary-dark);
}

.badge-tag-blue {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.4);
  color: var(--secondary-light);
}

.residencia-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-light);
  line-height: 1.15;
  margin-bottom: 12px;
}

.residencia-hero-subtitle {
  font-size: 1.2rem;
  color: rgba(249, 250, 251, 0.85);
  margin-bottom: 25px;
  max-width: 800px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.residencia-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md);
  padding: 20px;
}

.hero-stat-box {
  border-left: 3px solid var(--secondary);
  padding-left: 15px;
}

.hero-stat-box-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(249, 250, 251, 0.65);
  letter-spacing: 1px;
}

.hero-stat-box-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-light);
  font-family: var(--font-headings);
}

/* Sections in Single Residence */
.residencia-section-block {
  padding: 60px 0;
}

.residencia-section-block:nth-child(even) {
  background-color: var(--bg-subtle);
}

.residencia-section-block:nth-child(odd) {
  background-color: var(--bg-main);
}

.residencia-info-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.residencia-text-block h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary);
  position: relative;
  padding-bottom: 10px;
}

.residencia-text-block h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary);
}

.residencia-text-block p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Rotaciones por Año R1-R4 */
.rotaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.rotacion-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 34, 64, 0.08);
  border-top: 4px solid var(--primary);
  padding: 25px 20px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.rotacion-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--secondary);
}

.rotacion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--bg-subtle);
  padding-bottom: 10px;
}

.rotacion-year {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.rotacion-badge {
  background-color: rgba(197, 160, 89, 0.15);
  color: var(--secondary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
}

.rotacion-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.rotacion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.rotacion-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
  line-height: 1.45;
}

.rotacion-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-dark);
  font-weight: bold;
}

/* Faculty & Technology Cards */
.faculty-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-md);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 34, 64, 0.05);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
}

.faculty-role {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.faculty-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 3px 0 8px 0;
}

.faculty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* Sidebar Contact & Info Box */
.residencia-sidebar-box {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(10, 34, 64, 0.06);
  position: sticky;
  top: 90px;
}

.residencia-sidebar-box h4 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 8px;
}

.sidebar-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.sidebar-info-item svg {
  color: var(--secondary-dark);
  flex-shrink: 0;
  margin-top: 3px;
}

.sidebar-info-item strong {
  display: block;
  color: var(--primary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.sidebar-info-item span, .sidebar-info-item a {
  color: var(--text-muted);
}

/* Bottom Navigation Bar for Subpages */
.residencia-nav-footer {
  background-color: var(--primary-dark);
  padding: 30px 0;
  border-top: 3px solid var(--secondary);
  color: var(--text-light);
}

.residencia-nav-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.btn-nav-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 18px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
}

.btn-nav-arrow:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  border-color: var(--secondary);
}

@media (max-width: 900px) {
  .residencia-info-grid {
    grid-template-columns: 1fr;
  }
  
  .residencia-sidebar-box {
    position: static;
  }
  
  .residencia-hero-title {
    font-size: 2.2rem;
  }
}

/* ==========================================
   NUEVOS ESTILOS: PASADOS PRESIDENTES (pasadosp.html)
   ========================================== */
.presidentes-section {
  background-color: var(--bg-subtle);
  padding: 70px 0;
}

.presidentes-intro-box {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--secondary);
  border-top: 1px solid rgba(10, 34, 64, 0.04);
  border-right: 1px solid rgba(10, 34, 64, 0.04);
  border-bottom: 1px solid rgba(10, 34, 64, 0.04);
  margin-bottom: 45px;
  display: flex;
  align-items: center;
  gap: 25px;
}

.presidentes-intro-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(197, 160, 89, 0.15);
  color: var(--secondary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.presidentes-intro-text h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.presidentes-intro-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.presidentes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.presidente-card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 34, 64, 0.06);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  text-align: center;
}

.presidente-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 89, 0.4);
}

.presidente-header-strip {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px 15px 55px 15px;
  position: relative;
  display: flex;
  justify-content: center;
}

.presidente-period-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary);
  color: var(--primary-dark);
  font-family: var(--font-headings);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(197, 160, 89, 0.35);
  text-transform: uppercase;
}

.presidente-img-wrapper {
  margin-top: -48px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.presidente-img-frame {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3.5px solid var(--secondary);
  box-shadow: var(--shadow-md);
  background-color: #fff;
}

.presidente-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.presidente-card:hover .presidente-img-frame img {
  transform: scale(1.08);
}

.presidente-body {
  padding: 18px 20px 25px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.presidente-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.presidente-role-subtitle {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.presidente-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  border-top: 1px dashed rgba(197, 160, 89, 0.2);
  padding-top: 10px;
}

@media (max-width: 650px) {
  .presidentes-intro-box {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}


