/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1f3559;
  --secondary-color: #33a0a7;
  --accent-color: #f5a697;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header styles */
.top-header {
  background: var(--secondary-color);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.9rem;
}

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

.contact-info a {
  margin-right: 15px;
  color: var(--white) !important; /* ensure phone/email remain white */
}

.contact-info a:hover {
  color: var(--white) !important; /* keep white on hover for readability */
}

/* Contact icons in top header */
.top-header .contact-info a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.top-header .contact-info a .icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 18px;
  color: var(--white);
}

.top-header .contact-info a .contact-text {
  display: inline-block;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--white);
  display: flex;
  align-items: center;
}

.social-links a:hover {
  color: var(--accent-color);
}

/* Main navigation */
.main-nav {
  background: var(--primary-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.main-nav.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.faq-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.faq-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* FAQ modal */
.faq-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
}
.faq-modal[hidden] {
  display: none;
}
.faq-modal-content {
  width: 90%;
  max-width: 720px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;

  color: white;
}
.faq-modal-body {
  padding: 18px 22px;
  max-height: 60vh;
  overflow-y: auto;
}
.faq-item {
  margin-bottom: 16px;
}

.faq-item h3 {
  color: var(--primary-color);
  margin-bottom: 6px;
}
.faq-close {
  background: transparent;
  color: var(--primary-color);
  font-size: 18px;
  border: none;
}

#google_translate_element {
  margin-right: 10px;
  position: relative; /* allow overlaying replacement text */
}

/* Replace the Google Translate visible text with a static "English" label while
   keeping the original widget clickable. We make the widget text transparent
   and use a pseudo-element to show our custom label. Pointer-events are left
   to the underlying widget so clicks still open the translator. */
#google_translate_element * {
  color: transparent !important;
  text-shadow: none !important;
}

#google_translate_element {
  margin-right: 10px;
  position: relative; /* allow overlaying replacement text */
  display: inline-block;
  min-width: 120px; /* give area to center the label */
  padding: 6px 12px;
  background: transparent;
}

/* Custom Google Translate limited dropdown styles */
.google-translate-custom {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}
.google-translate-custom .gt-selected {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.google-translate-custom .gt-caret {
  margin-left: 6px;
}
.google-translate-custom .gt-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  color: var(--primary-color);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  min-width: 180px;
  z-index: 2500;
}
.google-translate-custom .gt-list li {
  padding: 10px 14px;
  cursor: pointer;
}
.google-translate-custom .gt-list li:hover {
  background: rgba(0, 0, 0, 0.03);
}
.google-translate-custom .gt-list li:active {
  background: rgba(0, 0, 0, 0.06);
}

#google_translate_element::after {
  content: "English";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #1e66d6; /* blue label per request */
  font-weight: 600;
  pointer-events: none; /* let clicks reach the real widget underneath */
}

/* Hide the small Google logo that the widget often injects so the label appears centered. */
#google_translate_element img,
#google_translate_element .goog-te-gadget-icon {
  display: none !important;
}

/* Adjust the injected select/button so it doesn't push our centered label */
#google_translate_element .goog-te-gadget-simple {
  opacity: 0 !important; /* keep it interactive but visually hidden */
  position: relative;
  z-index: 1;
}

/* Ensure the replacement label adapts on small screens */
@media (max-width: 768px) {
  #google_translate_element::after {
    color: #1e66d6;
  }
}

/* Google Translate dropdown/menu styling: target known classes inserted by the widget.
   We constrain its size and make it scrollable to avoid a full-screen takeover. Note:
   the widget injects an iframe with class 'goog-te-menu-frame' and a .goog-te-menu2 element.
   We apply safe constraints; if Google changes markup, this may need adjustment. */
.goog-te-menu-frame {
  max-height: 320px !important;
  width: 250px !important;
  overflow: auto !important;
}

.goog-te-menu2 {
  max-height: 320px !important;
  overflow-y: auto !important;
  width: 250px !important;
}

/* Prevent the translate panel from using fixed/fullscreen positioning in some implementations */
.goog-te-menu2,
.goog-te-menu-frame,
.goog-te-banner-frame {
  position: absolute !important;
  left: auto !important;
  right: 0 !important;
  top: 100% !important;
  transform: translateY(8px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
}

/* Make individual language items readable and allow scrolling */
.goog-te-menu2-item div,
.goog-te-menu2-item a {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.hamburger-line {
  height: 3px;
  width: 100%;
  background: var(--white);
  border-radius: 10px;
  transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-menu a {
  color: var(--white);
  font-weight: 500;
  position: relative;
}

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

.nav-menu a.cta-nav {
  background: var(--accent-color);
  color: var(--white);
  padding: 8px 15px;
  border-radius: 4px;
}

.nav-menu a.cta-nav:hover {
  background: var(--primary-color);
}

/* Hero section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center; /* center hero content horizontally */
  background: url("images/skaligners_main_02.jpg") no-repeat center center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(245, 166, 151, 0.7);
  backdrop-filter: blur(5px);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 800px;
  margin: 0 auto;
  text-align: center; /* center the headings/paragraph/button */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--white);
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 300;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* CTA Button */
.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 2px solid var(--accent-color);
}

.cta-button:hover,
.cta-button:focus {
  background: transparent;
  color: var(--white);
  transform: translateY(-3px);
}

/* Sections common styles */
section {
  padding: 80px 0;
}

section:nth-child(even) {
  background: var(--light-bg);
}

h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.subheading {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Benefits section */
.benefits-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.benefits-text h2 {
  text-align: left;
  font-size: 2.2rem;
}

.benefits-text p {
  font-size: 1.1rem;
  line-height: 1.7;
}

.benefits-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Why aligners section */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 40px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.feature-card {
  background: var(--white);
  padding: 30px 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-card img {
  height: 80px;
  margin-bottom: 20px;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Testimonials section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1;
}

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

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

/* How it works section */
.how-it-works-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.steps ol {
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  margin-bottom: 25px;
  padding-left: 40px;
  position: relative;
  font-size: 1.1rem;
  line-height: 1.6;
}

.steps li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--accent-color);
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.how-it-works-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* About section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Candidate section */
.candidate-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.candidate-list ul {
  margin-bottom: 30px;
}

.candidate-list li {
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  font-size: 1.1rem;
}

.candidate-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 1.5rem;
}

.candidate-image img {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Contact section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

.contact-form {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(245, 166, 151, 0.2);
}

.help-text {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-top: 5px;
}

.form-message {
  margin-top: 20px;
  padding: 10px;
  border-radius: 4px;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

.contact-info address {
  margin-bottom: 30px;
  font-style: normal;
}

.contact-info strong {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.contact-info a {
  color: var(--accent-color);
}

.contact-info a:hover {
  text-decoration: underline;
}

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

.instagram-grid img {
  border-radius: 8px;
  transition: var(--transition);
}

.instagram-grid img:hover {
  transform: scale(1.03);
}

/* Footer */
.main-footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  height: 60px;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

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

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

.footer-social {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.footer-social a {
  color: var(--white);
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  color: var(--accent-color);
}

.footer-info {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.footer-info p {
  margin-bottom: 10px;
}

/* Floating widgets */
.whatsapp-widget {
  position: fixed;
  /* move to the right side and above the chat toggle */
  right: 95px; /* aligned to sit to the left of chat-toggle when chat-toggle is at right:25px */
  bottom: 30px; /* place above the chat toggle */
  background: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1100; /* above chat toggle */
  transition: var(--transition);
}

.whatsapp-widget:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-widget .tooltip {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.whatsapp-widget:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Ensure the icon inside whatsapp-widget scales correctly and is centered */
.whatsapp-widget svg,
.whatsapp-widget img {
  width: 28px;
  height: 28px;
  display: block;
}

/* Position adjustments for small screens: keep widgets separated and accessible */
@media (max-width: 480px) {
  .whatsapp-widget {
    right: 95px;
    bottom: 25px;
    width: 50px;
    height: 50px;
  }

  .chat-toggle {
    right: 25px; /* ensure chat-toggle stays visible on the right */
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  /* Tablet: slightly reduce spacing so both widgets fit */
  .whatsapp-widget {
    right: 85px;
    bottom: 80px;
  }
}

.chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
}

.chat-toggle {
  background: var(--accent-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 350px;
  height: 450px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
}

.chat-panel.open {
  display: flex;
}

.chat-header {
  background: var(--primary-color);
  color: white;
  padding: 15px 20px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-close {
  color: white;
  background: none;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.message {
  margin-bottom: 15px;
  max-width: 80%;
}

.bot-message {
  align-self: flex-start;
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 0;
}

.user-message {
  align-self: flex-end;
  background: var(--accent-color);
  color: white;
  padding: 10px 15px;
  border-radius: 18px 18px 0 18px;
  margin-left: auto;
}

.chat-input {
  display: flex;
  padding: 15px;
  border-top: 1px solid #eee;
}

.chat-input input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  margin-right: 10px;
}

.send-button {
  background: var(--accent-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.open {
  display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-content p {
  color: white;
  text-align: center;
  margin-top: 10px;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .top-header .container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  /* Ensure nav links are readable on blue background */
  .nav-menu a {
    color: var(--white);
    padding: 12px 0;
    display: block;
  }

  .nav-menu a.cta-nav {
    background: var(--accent-color);
    color: var(--white);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 2rem;
  }

  .benefits-content,
  .how-it-works-content,
  .about-content,
  .candidate-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .features-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-nav ul {
    grid-template-columns: 1fr;
  }

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

  .chat-panel {
    width: 300px;
    height: 400px;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  section {
    padding: 60px 0;
  }

  .gallery-grid,
  .instagram-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    /* make the chat panel full-screen on mobile when opened */
    position: fixed;
    bottom: 0;
    right: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: none; /* remain hidden until .open */
  }

  .chat-panel.open {
    display: flex;
    z-index: 1200; /* above other UI elements */
  }

  .whatsapp-widget,
  .chat-toggle {
    width: 50px;
    height: 50px;
  }
}

/* Small-screen portrait sheet for Google Translate menu */
@media (max-width: 480px) {
  /* make translate widget label still visible and centered */
  #google_translate_element {
    min-width: 140px;
    padding: 8px 14px;
  }

  /* Target the injected iframe/menu and make it act like a portrait sheet under the header */
  .goog-te-menu-frame {
    position: fixed !important;
    top: 56px !important; /* just below header; adjust if header height changes */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100% - 56px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    z-index: 2000 !important;
    border-radius: 0 !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15) !important;
  }

  .goog-te-menu2 {
    position: relative !important;
    width: 100% !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* Ensure items wrap vertically and can be scrolled comfortably */
  .goog-te-menu2-item,
  .goog-te-menu2-item div {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
  }

  /* prevent body from scrolling when the sheet is open - requires JS to toggle a class,
     but we provide a safe CSS fallback to reduce jumpiness */
  body.translate-sheet-open {
    overflow: hidden;
  }
}

/* Desktop: center only the footer-info block (don't change footer-content layout) */
@media (min-width: 769px) {
  .footer-info {
    grid-column: 1 / -1; /* span all columns of the footer grid */
    justify-self: center; /* center the block within the grid */
    max-width: 900px;
    margin: 20px auto 0;
  }
}

/* Animation utilities - lightweight, accessible, and performant */
.animate-hidden {
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
}

.animate-show {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Variant: slide-from-left */
.animate-from-left.animate-hidden {
  transform: translateX(-12px);
}
.animate-from-left.animate-show {
  transform: translateX(0);
}

/* Variant: slide-from-right */
.animate-from-right.animate-hidden {
  transform: translateX(12px);
}
.animate-from-right.animate-show {
  transform: translateX(0);
}

/* Reduced motion preference: disable animations and show content immediately */
@media (prefers-reduced-motion: reduce) {
  .animate-hidden,
  .animate-show {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Utility to stagger children when required (use sparingly) */
.animate-stagger > * {
  transition-delay: calc(var(--index, 0) * 60ms);
}

/* Promotional modal (popup ad) */
.promo-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 4000;
}
.promo-modal[aria-hidden="false"] {
  display: flex;
}
.promo-modal-content {
  width: min(920px, 94%);
  max-width: 920px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 320px;
}
.promo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: none;
}
.promo-carousel {
  position: relative;
  background: #000;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.promo-slide {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}
.promo-slide.active {
  display: flex;
}
.promo-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* New overlay info card on slides */
.promo-slide-info {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(250, 250, 250, 0.95)
  );
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(22, 34, 60, 0.18);
  color: #111;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.promo-badge {
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--secondary-color)
  );
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
}

.promo-title {
  font-size: 1.15rem;
  margin: 0;
  color: var(--primary-color);
}

.promo-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
  opacity: 0.95;
}

.promo-price-cta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.promo-price {
  background: rgba(31, 53, 89, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 800;
  color: var(--primary-color);
}

.promo-inline-ctas {
  display: flex;
  gap: 8px;
}

.promo-inline-ctas .promo-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
}

.promo-inline-ctas .promo-shop {
  background: var(--primary-color);
  color: white;
}

.promo-inline-ctas .promo-product {
  background: var(--accent-color);
  color: #111;
}

/* Make sure overlay adapts on small screens */
@media (max-width: 720px) {
  .promo-slide-info {
    position: static;
    max-width: none;
    width: 100%;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
  }
  .promo-modal-content {
    grid-template-columns: 1fr;
  }
  .promo-carousel {
    padding: 12px;
  }
}
.promo-actions {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(250, 250, 250, 0.98)
  );
}
.promo-btn {
  display: inline-block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--white);
}
.promo-shop {
  background: var(--primary-color);
}
.promo-product {
  background: var(--accent-color);
  color: #111;
}

/* Carousel controls - small dots */
.promo-dots {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.promo-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
}
.promo-dots button.active {
  background: var(--accent-color);
}

/* Responsive: stack columns on small screens */
@media (max-width: 720px) {
  .promo-modal-content {
    grid-template-columns: 1fr;
  }
  .promo-actions {
    padding: 16px;
  }
  .promo-close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }
}
