@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary: #165c89;
  --primary-dark: #0f405f;
  --secondary: #5eb035;
  --secondary-dark: #4c8c2b;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --white: #ffffff;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
  --shadow-hover: 0 15px 30px rgba(22, 92, 137, 0.2);
  
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --font-family: 'Roboto', sans-serif;
}

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

body {
  font-family: var(--font-family);
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
  width: 100%;
  padding-right: 20px;
  padding-left: 20px;
  margin-right: auto;
  margin-left: auto;
  max-width: 1200px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--gray); }
.text-white { color: var(--white); }

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

.py-5 { padding-top: 5rem; padding-bottom: 5rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.overflow-hidden { overflow: hidden; }

/* Botones */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary);
  box-shadow: 0 4px 10px rgba(22, 92, 137, 0.3);
}

.btn-primary:hover {
  color: var(--white);
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(22, 92, 137, 0.4);
}

.btn:disabled, .btn-primary:disabled {
  background-color: #b0c5d4;
  border-color: #b0c5d4;
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.btn-secondary {
  color: var(--white);
  background-color: var(--secondary);
  box-shadow: 0 4px 10px rgba(94, 176, 53, 0.3);
}

.btn-secondary:hover {
  color: var(--white);
  background-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(94, 176, 53, 0.4);
}

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

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

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

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

/* Tarjetas */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: none;
  display: flex;
  flex-direction: column;
}

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

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.card-body {
  padding: 2rem;
  flex: 1;
}

/* Badges / Pilares */
.valor-badge {
  padding: 12px 25px;
  border-radius: 30px;
  color: var(--white);
  font-weight: 500;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-align: center;
}

.valor-badge::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: all 0.5s ease;
}

.valor-badge:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.valor-badge:hover::before {
  left: 200%;
}

.valor-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.valor-secondary { background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); }

/* Team Cards */
.team-card {
  box-shadow: var(--shadow-md);
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  background: white;
  display: flex;
  flex-direction: column;
}

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

.team-avatar-container {
  padding: 30px 20px 10px;
  text-align: center;
}

.team-avatar {
  width: 100px;
  height: 100px;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 auto;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  object-fit: cover;
  object-position: top center;
}

.team-card:hover .team-avatar {
  transform: scale(1.05);
}

.team-expertise {
  font-size: 0.9rem;
  color: var(--dark);
  margin-top: 10px;
  margin-bottom: 15px;
  font-weight: 400;
  line-height: 1.4;
  padding: 0 10px;
}

.btn-linkedin {
  display: inline-block;
  background-color: #0077b5;
  color: white !important;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: auto auto 0;
  text-align: center;
  width: fit-content;
  box-shadow: 0 4px 6px rgba(0, 119, 181, 0.15);
}

.btn-linkedin:hover {
  background-color: #005987;
  color: white !important;
  box-shadow: 0 6px 12px rgba(0, 119, 181, 0.3);
  transform: translateY(-2px);
}

.btn-linkedin.disabled {
  background-color: #e9ecef;
  color: #adb5bd !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.team-info {
  padding: 10px 20px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.team-degrees {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 15px;
  line-height: 1.5;
  flex-grow: 1; /* Pushes everything else down */
}

.team-degree-item {
  display: block;
  margin-bottom: 4px;
}

.team-role-badge {
  display: inline-block;
  padding: 5px 15px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 15px;
}

.team-role-director { border: 1px solid var(--secondary); color: var(--secondary); }
.team-role-consultor { border: 1px solid var(--gray); color: var(--gray); }

.team-social {
  border-top: 1px solid #f1f3f5;
  padding-top: 15px;
  margin-top: auto;
}

.team-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background-color: #f8f9fa;
  color: #0077b5; /* LinkedIn Blue */
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  font-weight: bold;
}

.team-social-link:hover {
  background-color: #0077b5;
  color: white;
}

/* Grids */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.navbar {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 1rem 0;
}

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

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar-brand span {
  color: var(--secondary);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--dark);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* Lang Switcher */
.lang-switcher {
  display: flex;
  background-color: var(--light);
  border-radius: 20px;
  padding: 4px;
  margin-left: 10px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray);
  border-radius: 16px;
  transition: var(--transition);
}

.lang-btn.active {
  background-color: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
}

/* =========================================
   SLIDER (MAIN HERO)
   ========================================= */
.slider-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, rgba(22, 92, 137, 0.85) 0%, rgba(22, 92, 137, 0.3) 100%);
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: var(--white);
  max-width: 600px;
  z-index: 2;
}

.slide-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 10;
}

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

.dot.active {
  background-color: var(--white);
  transform: scale(1.3);
}

/* =========================================
   PAGE HEADERS (Internal Banners)
   ========================================= */
.page-header {
  position: relative;
  padding: 6rem 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white);
  text-align: center;
  margin-bottom: 4rem;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 64, 95, 0.85); 
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page-header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* =========================================
   COUNTERS SECTION
   ========================================= */
.counters-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 4rem 0;
}

.counter-box h3 {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 5px;
  line-height: 1;
}

.counter-box p {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  font-weight: 500;
}


/* =========================================
   CONTACT FORM & MAP
   ========================================= */
.contact-section {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  font-family: var(--font-family);
  font-size: 1rem;
  border: 1px solid #ced4da;
  border-radius: var(--radius);
  transition: var(--transition);
  margin-bottom: 20px;
  background-color: var(--light);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 92, 137, 0.1);
  background-color: var(--white);
}

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

.map-container {
  height: 100%;
  min-height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================
   SPECIFIC SECTIONS
   ========================================= */
.section-title {
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 50px;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--dark);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
}

.section-title.left::after {
  left: 0;
  transform: none;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 5rem 0 2rem;
  margin-top: 0;
}

footer a {
  color: rgba(255,255,255,0.7);
}

footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 2rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* Hall specific */
.hall-wrapper {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.hall-wrapper::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(94, 176, 53, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(22, 92, 137, 0.05) 0%, transparent 60%);
  z-index: 0;
}

.hall-wrapper .container {
  position: relative;
  z-index: 1;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    
    .slide-content h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    /* Navbar Mobile */
    .menu-toggle { display: block; }
    
    .navbar-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px 0;
        gap: 15px;
    }
    
    .navbar-nav.active { display: flex; }
    .lang-switcher { margin: 10px auto 0; }
    
    /* Layout */
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    
    .slide-content { left: 5%; right: 5%; text-align: center; }
    .slide-content h1 { font-size: 2rem; }
    
    .page-header h1 { font-size: 2.5rem; }
    .page-header { padding: 4rem 0; margin-bottom: 2rem; }
    
    .counters-section { padding: 3rem 0; }
    
    /* Casos Slider Mobile */
    .caso-card { min-width: 100%; }
    
    /* Contact Form */
    .contact-section .grid-2 { grid-template-columns: 1fr; }
    .map-container { min-height: 300px; }
}

/* Modal de Éxito y Simulación de Correo */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.contact-modal-overlay.active .contact-modal-card {
  transform: scale(1);
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background-color: #e8f5e9;
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 4px 10px rgba(94, 176, 53, 0.2);
}

.email-simulator-container {
  display: none;
  margin-top: 3rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid #dee2e6;
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}

.email-simulator-header {
  background-color: #f1f3f5;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-simulator-meta {
  font-size: 0.85rem;
  color: var(--gray);
}

.email-simulator-body {
  padding: 30px;
  background-color: #f8f9fa;
  overflow-x: auto;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
