@font-face {
  font-family: 'New York';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/NewYork.otf') format('opentype');
}

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

:root {
  --primary: #82358b;
  --primary-light: #f8eff9;
  --primary-dark: #63236b;
  --accent: #d8a0dd;
  --dark: #252026;
  --muted: #746d76;
  --light-gray: #fbf7fc;
  --border-color: #e9e3ea;
  --white: #ffffff;
  --max-width: 1200px;
  --shadow: 0 10px 30px rgba(130, 53, 139, 0.05);
  --shadow-lg: 0 15px 45px rgba(130, 53, 139, 0.1);
  --font-serif: 'New York', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--dark);
  font-weight: normal;
  line-height: 1.2;
}

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

/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  padding: 16px 0;
  transition: var(--transition);
}

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

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 42px;
  width: auto;
}

.logo-txt {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(130, 53, 139, 0.15);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(130, 53, 139, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(130, 53, 139, 0.3);
}

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

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

/* Hero Section */
.hero {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--light-gray) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

/* YouTube Video Background Styling */
.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-video-wrapper iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: none;
  pointer-events: none;
  /* Maintain aspect ratio cover */
  width: 177.77vh; /* 16:9 Aspect Ratio */
  height: 56.25vw;
}

@media (min-aspect-ratio: 16/9) {
  .hero-video-wrapper iframe {
    width: 100vw;
    height: 56.25vw;
  }
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Deep dark overlay for premium readability */
  z-index: 2;
}

/* White Texts & Contrast Enhancements for Video Background */
.hero.has-video-bg {
  padding: 120px 0;
  color: var(--white);
  background: #0c0d12; /* Premium dark background fallback */
}

.hero.has-video-bg .hero-title {
  color: var(--white);
}

.hero.has-video-bg .hero-title span {
  color: #e2a8eb; /* Radiant light orchid/purple for high contrast branding */
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero.has-video-bg .hero-text {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hero.has-video-bg .badge-apertura {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.hero.has-video-bg .badge-apertura svg {
  color: var(--white);
  fill: var(--white);
}

.hero.has-video-bg .badge-apertura span {
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hero.has-video-bg .meta-item {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero.has-video-bg .meta-item svg {
  color: #e2a8eb;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.hero.has-video-bg .btn-outline {
  border-color: var(--white);
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.05);
}

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

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 620px;
}

.badge-apertura {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-light);
  border: 1px solid rgba(130, 53, 139, 0.2);
  padding: 8px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.badge-apertura svg {
  color: var(--primary);
  fill: var(--primary);
}

.badge-apertura span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.hero-title {
  font-size: clamp(36px, 4.5vw, 56px);
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-title span {
  color: var(--primary);
  font-style: italic;
}

.hero-text {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.meta-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Image wrappers / placeholders */
.hero-image-wrap {
  position: relative;
}

.image-frame {
  border-radius: 24px;
  overflow: hidden;
  background-color: var(--light-gray);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-placeholder-info {
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

.image-placeholder-info svg {
  color: var(--primary);
  margin-bottom: 12px;
  opacity: 0.6;
}

/* Trust Bar */
.trust-bar {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--white);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.trust-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

/* Promo Banner Section */
.promo-section {
  padding: 80px 0;
  background-color: var(--light-gray);
}

.promo-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.promo-title-badge {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.promo-heading {
  font-size: 38px;
  margin-bottom: 20px;
}

.promo-text {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.price-box {
  background-color: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
}

.price-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.price-regular {
  font-size: 18px;
  text-decoration: line-through;
  color: var(--muted);
  margin-bottom: 4px;
}

.price-promo {
  font-family: var(--font-serif);
  font-size: 42px;
  color: var(--primary);
  font-weight: bold;
}

.promo-cta-btn {
  width: 100%;
  margin-top: 20px;
}

/* Services */
.services-section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 38px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(130, 53, 139, 0.2);
}

.service-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
}

.service-name {
  font-size: 22px;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.service-card .btn-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Section Doctora */
.doctor-section {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.doctor-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.doctor-info-card {
  max-width: 580px;
}

.doctor-name {
  font-size: 42px;
  margin-bottom: 6px;
}

.doctor-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.doctor-bio {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}

.doctor-credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.credential-item {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--dark);
  font-weight: 500;
}

.credential-item svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Steps */
.steps-section {
  padding: 100px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  position: relative;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
  font-style: italic;
}

.step-title {
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-sans);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
}

/* Map / Ubicación */
.location-section {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.location-info {
  max-width: 500px;
}

.location-meta {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-meta-item {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.location-meta-item svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.location-meta-item span strong {
  display: block;
  color: var(--dark);
  margin-bottom: 4px;
}

.map-container {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  height: 400px;
}

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

/* FAQ Split Layout */
.faq-section {
  padding: 100px 0;
  background-color: #fafafc; /* Light gray background to distinguish this section */
}

.faq-layout-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}

.faq-info-sidebar {
  position: sticky;
  top: 110px;
}

.faq-info-sidebar .section-eyebrow {
  display: block;
  margin-bottom: 8px;
}

.faq-info-sidebar .section-title {
  text-align: left;
  margin-bottom: 16px;
  font-size: clamp(32px, 3.5vw, 42px);
}

.faq-sidebar-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.sidebar-faq-cta {
  width: auto;
}

.faq-accordion-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
  border-color: rgba(130, 53, 139, 0.2);
  box-shadow: 0 6px 20px rgba(130, 53, 139, 0.04);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.faq-question h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  line-height: 1.4;
}

.faq-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.faq-icon {
  color: var(--primary);
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 0;
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(130, 53, 139, 0.06);
}

.faq-item.active .faq-answer {
  max-height: 300px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
}

.faq-item.active .faq-icon-box {
  background-color: var(--primary-light);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* CTA Final */
.cta-final {
  padding: 100px 0;
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
}

.cta-final h2 {
  color: var(--white);
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta-final p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-final .btn-white {
  background-color: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.cta-final .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background-color: var(--light-gray);
}

/* Debug panel for attribution (Hidden in prod but available for checking) */
.debug-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background-color: #fff8ff;
}

.debug-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.debug-field {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
}

.debug-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: bold;
}

.debug-value {
  font-family: monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 64px 0 24px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.5);
}

/* Chat embed container */
.chatbot-section {
  padding: 60px 0;
  text-align: center;
  background-color: var(--white);
}

/* Responsive & Mobile UX Optimization */
@media (max-width: 991px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-meta {
    align-items: center;
  }
  .promo-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .doctor-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .doctor-info-card {
    margin: 0 auto;
  }
  .location-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .location-info {
    margin: 0 auto;
    text-align: center;
  }
  .location-meta-item {
    text-align: left;
  }
  
  /* FAQ Responsive split layout */
  .faq-layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .faq-info-sidebar {
    position: static;
    text-align: center;
  }
  .faq-info-sidebar .section-title {
    text-align: center;
  }
  .faq-sidebar-text {
    margin-bottom: 20px;
  }
  .sidebar-faq-cta {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  /* Header Slim UX Optimization */
  .header {
    padding: 10px 0;
  }
  .header .container {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
  }
  .nav-links {
    display: none !important; /* Hide links on mobile to prevent clutter */
  }
  .header .btn-primary {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
  }
  .logo-txt {
    display: none !important; /* Hide "Lomas Verdes" tag to prioritize logo space */
  }
  .logo-img {
    height: 34px !important;
  }

  /* Hero Section adjustments */
  .hero.has-video-bg {
    padding: 80px 0 60px;
  }
  .hero-title {
    font-size: clamp(28px, 6vw, 36px);
    margin-bottom: 16px;
  }
  .hero-text {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 28px;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 12px;
  }
  .hero-ctas .btn {
    width: 100%;
    max-width: 340px;
    padding: 14px 20px;
  }
  .hero-meta {
    gap: 14px;
  }
  
  /* Trust Bar Layout */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .trust-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  /* Services Section */
  .services-section {
    padding: 60px 0;
  }
  .services-grid {
    gap: 20px;
  }
  .service-card {
    padding: 24px;
  }

  /* Doctor section image */
  .image-frame {
    max-width: 320px;
    margin: 0 auto;
  }

  /* Footer Layout */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
    text-align: center;
  }
  .footer-col {
    align-items: center !important;
  }
  
  /* Increase tap targets on mobile links */
  .faq-question, .btn-link {
    min-height: 48px;
  }
}
.scroll-to-top {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 12px rgba(130, 53, 139, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(130, 53, 139, 0.4);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
}

/* Gallery Section Styles */
.gallery-section {
  padding: 100px 0;
  background-color: var(--light-gray);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.gallery-carousel-container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 60px; /* Leave space for navigation arrows */
}

.gallery-carousel-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 24px;
}

.gallery-slider-track {
  display: flex;
  gap: 30px;
  width: 100%;
}

.gallery-item {
  background-color: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  aspect-ratio: 9 / 16;
  flex: 0 0 100%; /* Fallback for very small screens */
}

/* Responsive carousel layout widths */
@media (min-width: 480px) {
  .gallery-item {
    flex: 0 0 calc((100% - (1 * 30px)) / 2);
  }
}

@media (min-width: 768px) {
  .gallery-item {
    flex: 0 0 calc((100% - (2 * 30px)) / 3);
  }
}

@media (min-width: 1024px) {
  .gallery-item {
    flex: 0 0 calc((100% - (3 * 30px)) / 4);
  }
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.gallery-img-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(99, 35, 107, 0.85) 0%, rgba(99, 35, 107, 0.3) 60%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  z-index: 3;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 4px;
}

.gallery-item-category {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Play button for video items */
.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background-color: rgba(130, 53, 139, 0.9);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  z-index: 2;
  pointer-events: none;
}

.gallery-item:hover .video-badge {
  background-color: var(--primary-dark);
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 0.8;
}

.video-badge svg {
  width: 22px;
  height: 22px;
  fill: var(--white);
  margin-left: 2px;
}

/* Carousel Control Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 10;
}

.carousel-nav-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-52%) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.carousel-nav-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-nav-btn.prev {
  left: 0;
}

.carousel-nav-btn.next {
  right: 0;
}


/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(37, 32, 38, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
  background-color: #000;
}

.lightbox-content video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  aspect-ratio: 9 / 16;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 40px;
  cursor: pointer;
  transition: var(--transition);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 2001;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Filter Animation */
.gallery-item.hidden {
  display: none;
}


