/* =========================================================
   Grupo Dental — landing page
   ========================================================= */
:root {
  --primary: #00c2c9;      /* teal */
  --primary-dark: #00aab0;
  --secondary: #39364e;    /* navy / heading color */
  --text: #696969;
  --bg-light: #f1f1f4;
  --footer-bg: #14121c;
  --white: #fff;
  --container: 1200px;
  --shadow: 0 25px 50px -12px rgba(57, 54, 78, .18);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s; }
h1, h2, h3, h4, h5, h6 { color: var(--secondary); margin: 0; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 30px;
  height: 55px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  border-radius: 0;
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
  white-space: nowrap;
}
.btn i { font-size: 12px; transition: transform .3s; }
.btn-dark { background: var(--secondary); }
.btn-dark:hover { background: var(--white); color: var(--secondary); }
.btn-teal { background: var(--primary); }
.btn-teal:hover { background: var(--secondary); }
.btn-teal:hover .fa-chevron-right { transform: translateX(4px); }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s, box-shadow .35s;
}
.topbar {
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  font-size: 12px;
  font-weight: 600;
  color: #222;
  transition: max-height .35s, opacity .35s;
  max-height: 40px;
  overflow: hidden;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: stretch; height: 40px; }
.topbar-hours {
  display: flex; align-items: center; gap: 8px;
  padding: 0 15px;
  border-left: 1px solid rgba(0, 0, 0, .08);
  border-right: 1px solid rgba(0, 0, 0, .08);
}
.topbar-hours i { font-size: 13px; }
.topbar-socials { list-style: none; margin: 0; padding: 0; display: flex; }
.topbar-socials li { border-left: 1px solid rgba(0, 0, 0, .08); }
.topbar-socials li:last-child { border-right: 1px solid rgba(0, 0, 0, .08); }
.topbar-socials a { display: flex; align-items: center; justify-content: center; width: 50px; height: 100%; font-size: 13px; }
.topbar-socials a:hover { color: var(--primary); }

.menubar-inner { display: flex; align-items: center; justify-content: space-between; height: 85px; transition: height .35s; }
.logo { position: relative; display: block; width: 210px; }
.logo img { width: 210px; height: auto; transition: opacity .3s; }
.logo .logo-color { position: absolute; top: 0; left: 0; opacity: 0; }

.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.nav-menu a { font-size: 15px; font-weight: 600; color: #222; position: relative; padding: 6px 0; }
.nav-menu a:hover { color: var(--primary); }

.nav-search { position: relative; }
.search-toggle { font-size: 16px; color: #222; padding: 6px; }
.search-toggle:hover { color: var(--primary); }
.search-form {
  position: absolute; right: 0; top: calc(100% + 18px);
  background: var(--white); box-shadow: var(--shadow);
  padding: 12px; width: 260px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s;
}
.search-form.open { opacity: 1; visibility: visible; transform: none; }
.search-form input { width: 100%; padding: 10px 12px; border: 1px solid #e5e5e5; font: inherit; outline-color: var(--primary); }

.navbar-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.navbar-toggle span { display: block; width: 24px; height: 2px; background: #222; transition: transform .3s, opacity .3s; }
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sticky (scrolled) state */
.navbar.scrolled { background: var(--white); box-shadow: 0 5px 30px rgba(0, 0, 0, .08); }
.navbar.scrolled .topbar { max-height: 0; opacity: 0; border-color: transparent; }
.navbar.scrolled .menubar-inner { height: 70px; }
.navbar.scrolled .logo-white { opacity: 0; }
.navbar.scrolled .logo-color { opacity: 1; }
.navbar.scrolled .nav-menu a { color: var(--secondary); }
.navbar.scrolled .nav-menu a:hover { color: var(--primary); }

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: #f4b91f;
}
.slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex; align-items: center;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-content { padding-top: 60px; }
.slide-content h2 {
  color: var(--white);
  font-size: 55px;
  line-height: 70px;
  font-weight: 700;
  max-width: 400px;
  letter-spacing: -.5px;
}
.slide-content p {
  color: var(--white);
  font-size: 17px;
  line-height: 27px;
  max-width: 440px;
  margin: 4px 0 40px;
}
.slide-content > * { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s; }
.slide.active .slide-content > * { opacity: 1; transform: none; }
.slide.active .slide-content p { transition-delay: .2s; }
.slide.active .slide-content .btn { transition-delay: .4s, .4s, 0s, 0s, 0s; }

.hero-arrow {
  position: absolute; top: 50%; z-index: 5;
  width: 40px; height: 40px; margin-top: -20px;
  background: rgba(0, 0, 0, .5);
  color: var(--white); font-size: 14px;
  transition: background .3s;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 1); }
.hero-arrow.prev { left: 50px; }
.hero-arrow.next { right: 50px; }
.hero-dots { position: absolute; bottom: 30px; left: 0; right: 0; z-index: 5; display: flex; justify-content: center; gap: 10px; }
.hero-dots button { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: background .3s; }
.hero-dots button.active, .hero-dots button:hover { background: var(--white); }

/* =========================================================
   INTRO
   ========================================================= */
.intro {
  position: relative;
  background: var(--bg-light);
  padding: 70px 0 100px;
  text-align: center;
  overflow: hidden;
}
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.intro-title { position: relative; z-index: 1; }
.intro-title h1 {
  color: var(--primary);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -.5px;
  margin-bottom: 25px;
}
.intro-title h6 {
  font-size: 17px; line-height: 27px; font-weight: 400; color: var(--text);
  max-width: 1000px; margin: 0 auto;
}
.row-separator { position: absolute; bottom: -1px; left: 0; right: 0; height: 40px; }
.row-separator svg { width: 100%; height: 100%; display: block; fill: #fafafb; }

/* =========================================================
   CTA
   ========================================================= */
.cta { background: linear-gradient(#fafafb 0, var(--bg-light) 120px); padding: 100px 0 50px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.cta-text h2 { font-size: 30px; line-height: 40px; margin-bottom: 15px; }
.cta-text p { font-size: 15px; line-height: 27px; }

/* =========================================================
   SLIDING BOXES
   ========================================================= */
.sliding-section { padding: 70px 0 130px; }
.sliding-boxes { display: flex; gap: 15px; height: 340px; }
.sliding-box {
  position: relative;
  flex: 1 1 0;
  display: flex;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: flex-grow .6s cubic-bezier(.4, 0, .2, 1), opacity .8s, transform .8s;
  cursor: pointer;
}
.sliding-box.active { flex-grow: 2.1; }
.sb-image { flex: 0 0 auto; height: 100%; aspect-ratio: 1 / 1.2; max-width: 100%; }
.sliding-box .sb-image { width: 100%; }
.sliding-box.active .sb-image { width: 47%; }
.sb-image img { width: 100%; height: 100%; object-fit: cover; }
.sb-content {
  flex: 1 1 auto;
  padding: 45px 38px;
  min-width: 0;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  width: 0;
}
.sliding-box.active .sb-content { opacity: 1; transform: none; transition-delay: .35s; width: auto; pointer-events: auto; }
.sb-content h4 { font-size: 20px; line-height: 28px; margin-bottom: 15px; }
.sb-content p { font-size: 14px; line-height: 24px; }

/* =========================================================
   REVIEWS
   ========================================================= */
.reviews { padding: 0 0 70px; }
.sep { border: 0; border-top: 1px solid rgba(0, 0, 0, .06); margin: 0; }
.section-title { font-size: 35px; line-height: 45px; text-align: center; margin: 0 0 50px; }
.reviews .section-title { margin-top: 0; }

.review-carousel { position: relative; }
.rc-track-wrap { overflow: hidden; padding: 0 0 70px; margin: 0 -15px; }
.rc-track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); align-items: flex-start; }
.review {
  flex: 0 0 calc(100% / 3);
  padding: 0 15px;
}
.review-inner {
  background: var(--white);
  padding: 50px 40px 45px;
  box-shadow: 0 30px 60px -10px rgba(57, 54, 78, .15);
  transition: transform .4s, box-shadow .4s;
}
.review-inner:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -10px rgba(57, 54, 78, .22); }
.rw-author h5 { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--secondary); }
.rw-author p { font-size: 14px; color: #a2a2a8; margin-bottom: 30px; }
.review h4 { font-size: 20px; line-height: 28px; font-weight: 500; margin-bottom: 20px; }
.rw-message { font-size: 15px; line-height: 27px; margin-bottom: 20px; }
.rw-rating { color: var(--primary); display: flex; align-items: center; gap: 4px; font-size: 14px; }
.rw-rating span { font-size: 17px; font-weight: 600; margin-right: 8px; }

.rc-dots { display: flex; justify-content: center; gap: 15px; }
.rc-dots button { width: 10px; height: 10px; border-radius: 50%; background: #a9a8b5; transition: background .3s, transform .3s; }
.rc-dots button.active { background: var(--secondary); }

/* =========================================================
   LOCATIONS
   ========================================================= */
.locations { background: var(--white); padding: 100px 0 100px; }
.locations-title { text-align: center; margin-bottom: 70px; }
.locations-title .section-title { margin-bottom: 20px; }
.locations-title h6 { font-size: 15px; line-height: 25px; font-weight: 400; color: var(--text); }

.tabs-list {
  list-style: none; margin: 0 0 60px; padding: 0;
  display: flex; justify-content: center; gap: 40px;
  border-top: 1px solid rgba(0, 0, 0, .1);
}
.tab {
  display: flex; align-items: center; gap: 12px;
  padding: 25px 10px 22px;
  font-size: 16px; font-weight: 600;
  color: var(--text);
  border-bottom: 3px solid transparent;
  transition: color .3s, border-color .3s;
}
.tab i { font-size: 17px; color: var(--secondary); }
.tab:hover { color: var(--secondary); }
.tab.active { color: var(--secondary); border-bottom-color: var(--secondary); }

.tab-panel { display: none; grid-template-columns: 1fr 3fr; gap: 30px; padding-bottom: 80px; }
.tab-panel.active { display: grid; animation: fadeIn .5s ease; }
.branch-photo { margin: 0 0 30px; box-shadow: 0 25px 20px -15px rgba(0, 0, 0, .3); }
.branch-photo img { width: 100%; height: auto; }
.branch-info h5 { font-size: 20px; line-height: 28px; margin-bottom: 15px; }
.branch-info h6 { font-size: 15px; line-height: 25px; font-weight: 400; color: var(--text); margin-bottom: 35px; }
.branch-info .btn { height: 50px; padding: 0 25px; font-size: 14px; }
.branch-info .btn i { font-size: 16px; }
.branch-map { height: 400px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); background: #e8eaed; }
.branch-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--footer-bg); color: rgba(255, 255, 255, .9); text-align: center; font-size: 13px; padding: 28px 0; }
.footer a { margin-left: 12px; position: relative; }
.footer a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: currentColor; transition: width .3s; }
.footer a:hover::after { width: 100%; }

/* Back to top */
.back-to-top {
  position: fixed; right: 30px; bottom: 30px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--white); color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all .35s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary); color: var(--white); }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal { opacity: 0; transition: opacity .9s ease, transform .9s ease; transition-delay: var(--delay, 0s); }
.reveal.up { transform: translateY(50px); }
.reveal.zoom { transform: scale(.6); }
.reveal.visible { opacity: 1; transform: none; }
/* keep the flex-grow transition on sliding boxes after reveal */
.sliding-box.reveal.visible { transition: flex-grow .6s cubic-bezier(.4, 0, .2, 1), opacity .9s, transform .9s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .slide-content h2 { font-size: 46px; line-height: 58px; }
  .hero-arrow.prev { left: 15px; }
  .hero-arrow.next { right: 15px; }
  .review { flex-basis: 50%; }
  .sliding-boxes { height: 300px; }
  .sb-content { padding: 30px 25px; }
}

@media (max-width: 860px) {
  .navbar { background: var(--white); box-shadow: 0 5px 30px rgba(0, 0, 0, .08); }
  .topbar { display: none; }
  .menubar-inner, .navbar.scrolled .menubar-inner { height: 70px; }
  .logo, .logo img { width: 170px; }
  .logo-white { opacity: 0; }
  .logo .logo-color { opacity: 1; }
  .navbar-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white);
    border-top: 1px solid #eee;
    max-height: 0; overflow: hidden;
    transition: max-height .4s ease;
  }
  .nav-menu.open { max-height: 300px; box-shadow: 0 15px 30px rgba(0, 0, 0, .08); }
  .nav-menu a { display: block; padding: 15px 20px; color: var(--secondary); }
  .search-form { top: calc(100% + 22px); right: -50px; }

  .hero { height: 560px; margin-top: 70px; }
  .slide { background-position: 65% center; }
  .slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 75%); }
  .slide-content { position: relative; padding-top: 0; }
  .slide-content h2 { font-size: 38px; line-height: 46px; max-width: 320px; }
  .slide-content p { font-size: 15px; max-width: 320px; margin-bottom: 30px; }
  .hero-arrow { display: none; }

  .intro { padding: 50px 0 80px; }
  .intro-title h1 { font-size: 32px; }
  .intro-title h6 { font-size: 15px; line-height: 25px; }

  .cta { padding: 70px 0 30px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 30px; }
  .cta-text h2 { font-size: 24px; line-height: 32px; }

  .sliding-section { padding: 40px 0 80px; }
  .sliding-boxes { flex-direction: column; height: auto; gap: 20px; }
  .sliding-box, .sliding-box.active { flex-direction: column; }
  .sliding-box .sb-image, .sliding-box.active .sb-image { width: 100%; aspect-ratio: 16 / 10; height: auto; }
  .sb-content, .sliding-box.active .sb-content { opacity: 1; transform: none; width: auto; pointer-events: auto; padding: 30px 25px; }

  .section-title { font-size: 28px; line-height: 36px; margin-bottom: 35px; }
  .review { flex-basis: 100%; }
  .review-inner { padding: 40px 28px; }

  .locations { padding: 70px 0; }
  .locations-title { margin-bottom: 40px; }
  .tabs-list { gap: 10px; margin-bottom: 40px; }
  .tab { font-size: 14px; padding: 20px 6px 17px; }
  .tab-panel.active { grid-template-columns: 1fr; padding-bottom: 50px; }
  .branch-photo { max-width: 300px; }
  .branch-map { height: 320px; }

  .footer a { display: inline-block; margin: 6px 6px 0; }
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
