/* Global Variables */
:root {
  --primary: #302E2B;
  /* Dark premium brown/grey */
  --secondary: #F8F7F5;
  /* Premium off-white */
  --accent: #A89984;
  /* Premium gold/beige */
  --dark: #201E1D;
  /* Darker shade */
  --light: #ffffff;
  /* White */
  --text-main: #302E2B;
  --text-light: #F8F7F5;
  --border-color: rgba(255, 255, 255, 0.15);

  --font-primary: 'Manrope', sans-serif;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Base Styles */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: var(--font-primary);
  color: var(--text-main);
  background-color: var(--primary);
}

::selection {
  background-color: var(--accent);
  color: var(--secondary);
}

::-moz-selection {
  background-color: var(--accent);
  color: var(--secondary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-light);
  line-height: 1.2;
}

strong,
b {
  font-weight: var(--weight-bold);
}

.text-accent {
  color: var(--accent) !important;
}

.bg-primary-custom {
  background-color: var(--primary) !important;
}

.bg-secondary-custom {
  background-color: var(--secondary) !important;
}

.bg-dark-custom {
  background-color: var(--dark) !important;
}

/* Typography Helpers */
.font-weight-light {
  font-weight: var(--weight-light);
}

.font-weight-regular {
  font-weight: var(--weight-regular);
}

.font-weight-medium {
  font-weight: var(--weight-medium);
}

.font-weight-bold {
  font-weight: var(--weight-bold);
}

/* Buttons */
.btn-custom {
  border: 1px solid var(--light);
  color: var(--light);
  background-color: transparent;
  border-radius: 50px;
  padding: 12px 35px;
  transition: all 300ms ease;
  font-weight: var(--weight-medium);
  letter-spacing: 0.5px;
}

.btn-custom:hover {
  background-color: var(--light);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-custom-dark {
  border: 1px solid var(--primary);
  color: var(--light);
  background-color: var(--primary);
  border-radius: 50px;
  padding: 10px 30px;
  transition: all 150ms ease-in-out;
  font-weight: var(--weight-medium);
}

.btn-custom-dark:hover {
  background-color: var(--accent);
  color: var(--light);
  border-color: var(--accent);
}

/* Navbar & Fullscreen Menu */
.navbar {
  transition: all 0.3s ease-in-out;
  z-index: 1030;
}

.nav-glass {
  background-color: rgba(255, 255, 255, 0.388);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-width: 420px;
  max-width: 90vw;
}

.nav-logo-img {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
}

.navbar.scrolled {
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.navbar.scrolled .container {
  max-width: 100%;
  padding: 0;
  transition: all 0.3s ease;
}

.navbar.scrolled .nav-glass {
  width: 100%;
  max-width: 100%;
  background: rgba(45, 43, 42, 0.9);
  border-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  padding-top: 0.8rem !important;
  padding-bottom: 0.8rem !important;
}

.navbar.scrolled .nav-logo-img {
  height: 35px;
}

.navbar.scrolled .nav-glass .logo-text,
.navbar.scrolled .nav-glass span {
  color: var(--light) !important;
}

.navbar.scrolled .nav-glass i {
  color: var(--accent) !important;
}

.logo-text {
  font-weight: var(--weight-light);
  letter-spacing: 5px;
  color: var(--light);
  text-decoration: none;
}

.logo-text:hover {
  color: var(--light);
}

.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 65vh;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  background-color: #2D2B2A;
  /* Exact dark from image */
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  transform: translateY(-10px);
}

.fullscreen-menu.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.menu-list {
  padding: 0;
}

.menu-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--light);
  font-size: 1.8rem;
  font-weight: var(--weight-light);
  padding: 15px 0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.menu-link:hover {
  color: var(--accent);
}

.menu-arrow {
  color: var(--accent);
  font-size: 1.2rem;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.menu-link:hover .menu-arrow {
  transform: rotate(0deg) translateX(5px);
}

.menu-social a {
  color: var(--accent);
  font-size: 2.5rem;
  margin: 0 15px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.menu-social a:hover {
  color: var(--light);
}

/* Sections */
section {
  padding: 100px 0;
}

/* Hero Section */
.hero {
  min-height: 100dvh;
  padding-top: 160px;
  padding-bottom: 120px;
  display: flex;
  align-items: center;
  background-color: var(--primary);
  background-image: url('../img/bg_hero.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  position: relative;
  color: #e0e6ea;
  overflow: hidden;
}

.hero-tooth-img {
  position: absolute;
  bottom: 0;
  right: 5%;
  width: 50%;
  max-width: 800px;
  z-index: 1;
  pointer-events: none;
}

.parallax-banner {
  min-height: 70dvh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
}

.hero h1 {
  font-size: 2.4rem;
  max-width: 650px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

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

/* Acerca de Nosotros */
.acerca {
  background-color: #FEFBF6;
  color: var(--primary);
}

.nosotros-title-block {
  display: inline-block;
  margin-bottom: 2rem;
  margin-top: 5px;
}

.nosotros-title-block .line-1 {
  color: #9a8a7c;
  font-weight: 100;
  font-size: 1.35rem;
  letter-spacing: 1px;
  line-height: .9rem;
}

.nosotros-title-block .line-2 {
  color: #1a1a1a;
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #b09f8e;
  padding-bottom: 8px;
  display: inline-block;
}

.title-light .line-2 {
  color: #ffffff;
}

.dotted-ring-wrapper {
  position: relative;
  display: inline-block;
}

.dotted-ring-wrapper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -20px;
  right: 20px;
  bottom: -20px;
  border: 1.5px dashed #b09f8e;
  border-radius: 40px;
  z-index: 1;
  transition: all 0.5s ease;
}

.dotted-ring-wrapper:hover::before {
  transform: translate(-5px, 5px);
}

.dotted-ring-wrapper.circle::before {
  border-radius: 50%;
  border-style: dotted;
  border-width: 2.5px;
  top: -15px;
  bottom: 15px;
  left: -15px;
  right: 15px;
}

.dotted-ring-wrapper.circle:hover::before {
  transform: translate(5px, 5px);
}

.dotted-ring-wrapper img {
  position: relative;
  z-index: 2;
}

.acerca h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.acerca .check-list {
  list-style: none;
  padding-left: 0;
}

.acerca .check-list li {
  margin-bottom: 15px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.acerca .check-list li i {
  color: var(--accent);
  margin-right: 15px;
  font-size: 1.2rem;
}

.circular-img {
  width: 100%;
  max-width: 400px;
  border-radius: 50%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

/* Diferenciales */
.diferenciales {
  background-color: #2b2a29;
  color: var(--light);
}

.diferenciales h2 {
  font-size: 2.5rem;
}

.diferencial-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid #b09f8e;
  transition: all 0.3s ease;
  border-radius: 0;
}

.diferencial-item:hover {
  transform: translateX(0px);
  background: #3f3b39;
  border-bottom-color: transparent;
  border-radius: 12px;
}

.diferencial-item:last-child {
  border-bottom: none;
}

.diferencial-item img {
  font-size: 2rem;
  margin-right: 25px;
  object-fit: contain;
  width: 80px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  transition: all 0.3s ease;
}

.diferencial-item:hover img {
  transform: scale(110%);
}

.diferencial-item h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 300;
  color: #ffffff;
  transition: all 0.3s ease;
}

.diferencial-item:hover h4 {
  color: #ffffff;
  font-weight: 500;
}

/* Servicios */
.servicios {
  background-color: var(--secondary);
  color: var(--primary);
}

.service-card {
  position: relative;
  background-color: transparent;
  border-radius: 20px;
  border: none;
  padding-bottom: 0;
  transition: all 0.4s ease;
  overflow: hidden;
  box-shadow: 1px 3px 9px 4px rgba(0, 0, 0, 0.08)
}

.service-card img {
  border-radius: 0;
  height: auto;
  aspect-ratio: 231 / 224;
  width: 100%;
  object-fit: cover;
  box-shadow: none;
  display: block;
}

.service-card-text {
  background-color: white;
  border-radius: 20px 20px 0 0;
  position: relative;
  margin-top: -60px;
  padding: 25px 15px;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  z-index: 2;
}

.service-card h4 {
  font-size: 1.25rem;
  font-weight: 400;
  color: #222;
  line-height: 1.3;
}

.service-card:hover {
  transform: translateY(-8px);
}

/* Proceso */
.proceso {
  background-color: var(--secondary);
}

.proceso-img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
}

.step-cards-container {
  border-radius: 40px 40px 0 0;
  background-color: #F1F4F7;
}

.step-card {
  background-color: transparent;
  padding: 50px 30px;
  height: 100%;
  border-right: 1px solid #e2e6ea;
  transition: all 0.4s ease;
  position: relative;
}

.step-card:hover {
  background-color: #2b2a29;
}

.step-card:last-child {
  border-right: none;
}

.step-number {
  font-family: 'Manrope', sans-serif;
  font-size: 5.5rem;
  font-weight: 200;
  color: #222;
  display: block;
  margin-bottom: 20px;
  line-height: 1;
  transition: all 0.4s ease;
}

.step-card:hover .step-number {
  color: #b09f8e;
  font-size: 6.2rem;
}

.step-card h5 {
  font-weight: 600;
  font-size: 1.1rem;
  color: #222;
  transition: all 0.4s ease;
}

.step-card:hover h5 {
  color: #b09f8e;
}

.step-card p {
  font-size: 0.9rem;
  color: #666;
  transition: all 0.4s ease;
}

.step-card:hover p {
  color: rgba(255, 255, 255, 0.7);
}

/* Galería */
.galeria {
  background-color: #2b2a29;
  /* Darker than primary */
  color: var(--light);
}

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

.galeria-item {
  background-color: #3f3b39;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 1 / 1;
}

.galeria-item i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.1);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.galeria-item:hover img {
  transform: scale(1.05);
}

/* Servicios Slider */
.services-slider-wrapper {
  padding-bottom: 20px;
  position: relative;
}

.services-slider {
  display: block;
}

/* Evitar que Owl Carousel corte las sombras de las tarjetas */
.services-slider .owl-stage-outer {
  padding-top: 20px;
  padding-bottom: 40px;
  margin-top: -20px;
  margin-bottom: -40px;
  padding-left: 10px;
  margin-left: -10px;
}

.service-slide {
  width: 100%;
}

/* Experiencia */
.experiencia {
  background-color: var(--secondary);
  color: var(--primary);
}

.experiencia-list {
  list-style: none;
  padding: 0;
}

.experiencia-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  background-color: transparent;
  padding: 18px 25px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #b09f8e;
  box-shadow: none;
  transition: all 0.3s ease;
}

.experiencia-item:hover {
  background-color: #e6e9ed;
  border-radius: 12px;
  border-bottom-color: transparent;
  transform: none;
  box-shadow: none;
}

.experiencia-item:last-child {
  border-bottom: none;
}

.experiencia-item img {
  margin-right: 20px;
  width: 50px;
  height: auto;
  object-fit: contain;
}

.experiencia-item span {
  font-size: 1.25rem;
  font-weight: 400;
  color: #333;
  transition: all 0.3s ease;
}

.experiencia-item:hover span {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Contacto */
.contacto {
  background-color: #2b2a29;
  color: var(--light);
}

.form-floating>label {
  color: #888;
  padding-left: 1.5rem;
}

.form-control {
  background-color: #e6e9ed;
  border: none;
  border-radius: 40px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  color: #333;
}

.form-control:focus {
  background-color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(176, 159, 142, 0.25);
}

textarea.form-control {
  border-radius: 20px;
}

.btn-contacto-submit {
  background-color: #b09f8e;
  color: #2b2a29;
  font-weight: 600;
  padding-top: 10px;
  padding-bottom: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-contacto-submit:hover {
  background-color: transparent;
  color: #b09f8e;
  border-color: #b09f8e;
  transform: translateY(-2px);
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(168, 153, 132, 0.3);
  background-color: #ffffff;
}

/* Floating Widget Container */
.floating-widget-container {
  position: fixed;
  z-index: 1050;
  right: 0;
  top: 55%;
  transform: translateY(-50%);
}

.floating-badge {
  background-color: #4a3831;
  /* Cafe / Dark Brown */
  color: var(--light);
  padding: 30px 10px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.floating-badge:hover {
  background-color: #3d2e28;
}

.floating-badge-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  font-weight: var(--weight-regular);
  text-transform: uppercase;
}

.floating-badge i {
  margin-bottom: 20px;
  font-size: 1.2rem;
  transform: rotate(-45deg);
  color: var(--light);
}

/* Floating Panel (The Popup) */
.floating-panel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(20px);
  /* Translate slightly instead of 120% to prevent iOS scroll bug */
  width: 320px;
  background-color: var(--light);
  border-radius: 20px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.4s;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.floating-widget-container.open .floating-panel {
  transform: translateY(-50%) translateX(-20px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.floating-widget-container.open .floating-badge {
  transform: translateX(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.floating-panel-header {
  background-color: #4a3831;
  color: var(--light);
  padding: 35px 25px 25px 25px;
  position: relative;
  border-radius: 20px 20px 0 0;
}

.floating-panel-body {
  padding: 25px;
  background-color: var(--light);
  border-radius: 0 0 20px 20px;
}

/* Button styles for the panel */
.btn-outline-brown {
  border: 3px solid #b0aba8;
  color: #8c7b70;
  font-weight: var(--weight-medium);
  font-size: 1.15rem;
  transition: all 0.3s ease;
  background-color: transparent;
}

.btn-outline-brown:hover {
  background-color: #4a3831;
  border-color: #4a3831;
  color: var(--light);
}

/* Footer */
footer {
  background-color: #2b2a29;
  color: var(--light);
  padding: 0;
}

.footer-content {
  border-top: 1px solid rgba(176, 159, 142, 0.4);
}

.footer-pattern {
  width: 100%;
  height: 80px;
  background-image: url('../img/pattern_footer.jpg');
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 100%;
}

.social-icons a {
  color: #948374;
  font-size: 2.5rem;
  margin-right: 20px;
  transition: color 0.3s;
}

.social-icons a:last-child {
  margin-right: 0;
}

.social-icons a:hover {
  color: var(--light);
}

.legal-link {
  color: #7e7064;
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--light);
}

/* Utility */
.mb-custom {
  margin-bottom: 50px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-tooth-img {
    width: 75%;
    bottom: 0;
    right: 2%;
    opacity: 0.8;
  }

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

  .step-card {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }

  .step-card:last-child {
    border-bottom: none;
  }
}

@media (max-width: 767px) {
  .hero {
    align-items: center;
    padding-top: 140px;
    padding-bottom: 100px;
    min-height: 100dvh;
  }

  .hero-tooth-img {
    width: 85%;
    right: -15%;
    bottom: 0;
    opacity: 1;
  }

  .floating-widget-container {
    right: 50%;
    top: auto;
    bottom: 20px;
    transform: translateX(50%);
  }

  .floating-badge {
    flex-direction: row;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }

  .floating-badge i {
    margin-bottom: 0;
    transform: none;
  }

  .floating-panel {
    right: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(50%) translateY(20px);
    width: 90vw;
    max-width: 350px;
  }

  .floating-widget-container.open .floating-panel {
    transform: translateX(50%) translateY(-20px);
  }

  .floating-widget-container.open .floating-badge {
    transform: translateX(50%) translateY(20px);
  }

  .step-card {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }

  .step-card:last-child {
    border-bottom: none;
  }
}

@media (max-width: 767px) {
  .galeria-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    margin-bottom: 20px;
  }

  section {
    padding: 60px 0;
  }

  .parallax-banner {
    background-attachment: scroll;
    min-height: 40dvh;
  }
}

/* Fix for background-attachment: fixed on iOS and Tablets */
@media (max-width: 1024px), (pointer: coarse) {
  .hero, .parallax-banner {
    background-attachment: scroll !important;
    background-position: center center !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero, .parallax-banner {
    background-attachment: scroll !important;
    background-position: center center !important;
  }
}