@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Work+Sans:wght@600;700&display=swap');

:root {
  /* Colors */
  --surface: #f9f9f9;
  --surface-dim: #dadada;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f4;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e0e0e0;
  --on-surface: #1a1c1c;
  --on-surface-variant: #564337;
  --primary: #e87722;
  /* Primary Orange adjusted from text */
  --on-primary: #ffffff;
  --primary-container: #e87722;
  --on-primary-container: #4f2200;
  --secondary: #4a4a4a;
  /* Dark Grey anchor */
  --on-secondary: #ffffff;
  --light-grey: #f4f4f4;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --background: #f9f9f9;
  --on-background: #1a1c1c;
  --whatsapp: #25D366;

  /* Typography */
  --font-headline: 'Work Sans', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --container-max: 1380px;
  --gutter: 24px;
  --margin: 32px;
  --section-gap: 80px;
  --element-gap: 16px;

  /* Radii */
  --radius-sm: 0.125rem;
  --radius-DEFAULT: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;
}

/* Reset & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--on-background);
  line-height: 1.6;
  font-size: 18px;
  /* Accessible size for >45 target */
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  color: var(--secondary);
  line-height: 1.2;
}

h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--element-gap);
}

h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--element-gap);
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }

  to {
    opacity: 1;
    transform: translateX(30px);
  }
}

.animate-slide-in {
  opacity: 0;
  animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

a:hover {
  color: var(--on-surface-variant);
}

ul {
  list-style: none;
}

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

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-gap) 0;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 16px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-4 {
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-DEFAULT);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #cc661a;
  color: var(--on-primary);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--surface-container-lowest);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
}

.header-logo img {
  height: 80px;
}

.header-contact {
  display: flex;
  gap: 60px;
  font-size: 13px;
  font-weight: 500;
  justify-content: center;
  align-items: self-start;
}

.contact-item {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
}

.contact-item span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.header-bottom {
  background-color: var(--secondary);
}

.main-nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.main-nav ul {
  display: flex;
  gap: 32px;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--on-secondary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.main-nav a {
  color: var(--on-secondary);
  font-weight: 700;
  padding: 16px 0;
  display: inline-block;
}

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

/* Hero Skewed Carousel */
.hero-section {
  padding: 60px 0 100px;
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h2 {
  font-size: 5rem;
  margin-bottom: 60px;
  text-transform: none;
  color: #ffffff;
}


/* Base Carousel Styles */
.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  justify-content: center;
  gap: 20px;
  transition: transform 0.3s ease-in-out;
}

/* Global Utility Classes */
.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.text-center {
  text-align: center;
}

.w-100 {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 16px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--surface-dim);
  border-radius: var(--radius-DEFAULT);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  background-color: var(--secondary);
  color: #fff;
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
  justify-items: center;
}

.footer-logo img {
  max-width: 300px;
  filter: brightness(0) invert(1);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: var(--light-grey);
  transition: color 0.3s;
}

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

.footer-social h3,
.footer-nav h3 {
  color: #fff;
}

.social-icons {
  display: flex;
  gap: 16px;
}

.social-icons a {
  color: #fff;
  font-size: 24px;
  width: 32px;
  height: 32px;
}

.social-icons a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  color: var(--surface-dim);
  font-size: 14px;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
}

.whatsapp-btn {
  background-color: var(--whatsapp);
  color: #fff;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-menu {
  position: absolute;
  bottom: 100px;
  left: 0;
  background: #fff;
  border-radius: 30px;
  /* Bordes muy redondeados como la imagen */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  width: 350px;
  max-width: 95vw;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
  /* overflow: hidden; Removed to allow QR popover to show */
}

.whatsapp-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.whatsapp-menu-header {
  background: var(--primary);
  /* Azul marino profundo de la imagen */
  color: #fff;
  padding: 24px 20px;
  font-weight: 800;
  font-size: 22px;
  text-align: center;
  border-radius: 30px 30px 0 0;
  /* Match menu radius */
}

.advisor-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 450px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #f0f0f0;
}

.advisor-list::-webkit-scrollbar {
  width: 6px;
}

.advisor-list::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.advisor-list::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

.advisor-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* align-items: center; */
  padding: 15px;
  background: #f8f9fa;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #eee;
}

.advisor-item:hover {
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: var(--primary);
}

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

.advisor-details {
  display: flex;
  flex-direction: column;
}

.advisor-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #eee;
}

.advisor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;  
}

.advisor-item strong {
  display: block;
  font-size: 18px;
  color: #333;
  font-weight: 700;
  line-height: 1.2;
}

.advisor-item small {
  color: #777;
  font-size: 13px;
  font-weight: 500;
}
.avatar-qr {
  display: none;  
}
.advisor-item:hover .avatar-qr {
  width: 80%;
  height: 80%;
  background: #fff;
  padding: 5px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}


.avatar-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



/* Tabs */
.tabs-header {
  display: flex;
  border-bottom: 2px solid var(--surface-container-high);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 16px 24px;
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

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

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

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

/* Status Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  /* Totalmente oculto por defecto */
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.status-modal-content {
  background: #fff;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.status-icon-success {
  width: 70px;
  height: 70px;
  background: #E8F5E9;
  color: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.status-icon-success svg {
  width: 40px;
  height: 40px;
}

.status-modal-content h3 {
  color: var(--secondary);
  font-size: 24px;
  margin-bottom: 12px;
}

.status-modal-content p {
  color: #666;
  margin-bottom: 30px;
}


.leaflet-touch .leaflet-control-attribution{
  display: none;
}

/* Responsiveness */
@media (max-width: 992px) {
  .header-top {
    flex-direction: column;
    gap: 16px;
  }

  .header-contact {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 25px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .carousel-item {
    flex: 0 0 calc(50% - 12px);
  }

  .category-grid>div:nth-child(1) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .nav-toggle {
    display: flex;
    margin: 10px 0;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    background-color: var(--secondary);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    padding: 0;
  }

  .main-nav ul.active {
    display: flex;
  }

  .main-nav li {
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav a {
    width: 100%;
    padding: 15px 0;
  }
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 10px;
    ;
  }

  .whatsapp-btn {
    width: 75px;
    height: 75px;
    font-size: 24px;
  }

  .whatsapp-menu {
    bottom: 70px;
    width: 315px;
  }



  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }
  

  .carousel-item {
    flex: 0 0 100%;
  }

  .featured-header {
    flex-direction: column;
    text-align: center;
  }

  .featured-header h2 {
    text-align: center;
    font-size: 40px;
  }

  #main-featured-desc {
    margin: 0 auto 32px;
  }

  .featured-carousel .carousel-item {
    flex: 0 0 100%;
  }

  /* Mobile Overflow Fix */
  .container {
    width: 100%;
    overflow-x: clip;
    /* Usar clip en lugar de hidden para evitar problemas de posicionamiento */
  }

  .site-header {
    z-index: 1001;
    /* Asegurar que el header esté sobre el contenido */
  }

  .nav-toggle {
    display: flex !important;
    /* Forzar visibilidad en móvil */
    margin: 15px auto;
  }

  .footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}