/* Custom styles for Bastide de la Comtesse luxury rental website */

/* Import Google Fonts for elegant French chateau aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lato:wght@300;400;700&display=swap');

/* Custom CSS Variables - Refined French chateau palette */
:root {
  --primary-color: #6B5B4A;
  --secondary-color: #C9A961;
  --accent-color: #8B7A6B;
  --text-dark: #1A1A1A;
  --text-light: #5A5A5A;
  --text-muted: #8A8A8A;
  --background-light: #FBFBF9;
  --background-cream: #FAF8F5;
  --border-color: #E8E6E3;
  --gold-accent: #D4AF37;
  --stone: #D4C4B0;
}

/* Typography - Elegant French aesthetic */
body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-dark);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.03em;
}

h2 {
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
}

h4, h5, h6 {
  font-weight: 400;
  font-style: italic;
}

/* Hero Section Enhancements - Elegant French chateau style */
.page__hero--overlay {
  background-color: rgba(0, 0, 0, 0.25);
}

.page__hero--overlay .page__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: #FFFFFF;
}

/* Homepage hero title - ensure it uses Cormorant Garamond italic - Override inline styles */
/* Maximum specificity to override inline styles in index.html */
/* This must come AFTER any inline styles in index.html, so footer CSS will also override */
html body .hero-title,
html body h1.hero-title,
html body .hero-content h1,
html body .hero-content .hero-title,
html body .hero-content h1.hero-title,
html body .hero-image-container .hero-title,
html body .hero-image-container h1.hero-title,
html body .hero-overlay .hero-title,
html body .hero-overlay h1.hero-title,
html body .hero-overlay .hero-content h1,
html body .hero-overlay .hero-content .hero-title,
body .hero-title,
body h1.hero-title,
body .hero-content h1,
body .hero-content .hero-title,
.hero-title,
h1.hero-title,
.hero-content h1,
.hero-content .hero-title,
.hero-content h1.hero-title,
.hero-image-container .hero-title,
.hero-image-container h1.hero-title,
.hero-overlay .hero-title,
.hero-overlay h1.hero-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  letter-spacing: -0.04em !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Booking page and other pages with hero overlay - ensure h1 uses Cormorant Garamond italic */
.page__hero--overlay h1,
.page__hero--overlay .page__title,
.page__hero--overlay h1.page__title,
.page__hero--overlay h1#page-title,
#page-title,
h1#page-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  letter-spacing: -0.02em !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.page__hero--overlay .page__meta {
  font-family: 'Lato', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

/* Button Styling - Refined French elegance */
.btn--primary {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: white;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn--primary:hover {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 1);
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn--outline {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(107, 91, 74, 0.25);
}

/* Card Styling - Elegant minimalism */
.feature__item {
  background: var(--background-light);
  border-radius: 0;
  padding: 3rem 2.5rem;
  box-shadow: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  border-top: none;
}

.feature__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--stone);
}

/* Gallery Enhancements */
.gallery__item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.gallery__item:hover {
  transform: scale(1.02);
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: 500;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1rem 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
  left: 0;
  border-radius: 0 3px 3px 0;
}

.carousel-btn.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.carousel-dots {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: white;
}

/* Table Styling */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

th {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  background-color: white;
}

tr:hover td {
  background-color: var(--background-light);
}

/* Form Styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* Quote Styling */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  background-color: var(--background-light);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
}

/* Amenities List */
.amenities-list {
  list-style: none;
  padding: 0;
}

.amenities-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.amenities-list li:before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Contact Information */
.contact-info {
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

/* Additional French chateau refinements */
/* CRITICAL: Target page__title and #page-title with maximum specificity */
.page__title,
h1.page__title,
h1#page-title,
#page-title,
h1#page-title.page__title,
.initial-content h1#page-title,
.initial-content .page__title,
.initial-content h1.page__title,
.page h1,
article h1,
h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  letter-spacing: -0.02em !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.page__title,
h1.page__title,
h1#page-title,
.page h1,
article h1 {
  font-size: 2.5rem !important;
}

/* All page headers should use Cormorant Garamond italic - Match site title style */
/* Maximum specificity to override theme defaults */
h1:not(.site-title):not(.masthead h1),
h2:not(.site-title):not(.masthead h2),
h3:not(.site-title):not(.masthead h3),
h4:not(.site-title),
h5:not(.site-title),
h6:not(.site-title),
.page h1:not(.site-title),
.page h2:not(.site-title),
.page h3:not(.site-title),
article h1:not(.site-title),
article h2:not(.site-title),
article h3:not(.site-title),
.page__content h1,
.page__content h2,
.page__content h3,
.page__content h2#book-your-luxury-stay,
.page__content h2[id],
.page__content h3,
#main h1:not(.site-title),
#main h2:not(.site-title),
#main h3:not(.site-title),
#main .page h2,
#main .page h3,
#main .page__content h2,
#main .page__content h3,
#main article h2,
#main article h3 {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  letter-spacing: -0.02em !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Sidebar author name - use Cormorant Garamond italic */
.sidebar .author__name,
.sidebar h3.author__name,
.sidebar .author__name a,
.sidebar h3.author__name a,
#main .sidebar .author__name,
#main .sidebar h3.author__name,
#main .sidebar .author__name a,
#main .sidebar h3.author__name a {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  letter-spacing: -0.02em !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.page__lead {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* Refined quote styling */
blockquote {
  border-left: 2px solid var(--stone);
  padding-left: 2rem;
  margin: 3rem 0;
  font-style: italic;
  background-color: transparent;
  padding: 2rem 0 2rem 2rem;
  border-radius: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--text-dark);
}

/* Elegant form styling */
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  padding: 14px;
  transition: all 0.3s ease;
  background: var(--background-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
  background: white;
}

/* Gallery refinements */
.gallery__item {
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__item:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--stone);
}

/* Responsive Design */
@media (max-width: 768px) {
  .page__hero--overlay .page__title {
    font-size: 2.5rem;
  }
  
  .btn--primary,
  .btn--outline {
    padding: 12px 24px;
    font-size: 0.8rem;
  }
  
  .feature__item {
    padding: 2rem 1.5rem;
  }
  
  .carousel-wrapper {
    height: 300px;
  }
  
  .carousel-btn {
    padding: 0.5rem 0.25rem;
    font-size: 1rem;
  }
  
  .carousel-caption {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  .page__content {
    padding: 3rem 1.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* Luxury Accents */
.luxury-accent {
  color: var(--secondary-color);
  font-weight: 600;
}

.highlight-box {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin: 2rem 0;
}

/* Footer Enhancements - Refined elegance */
.page__footer {
  background-color: var(--text-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page__footer a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.page__footer a:hover {
  color: var(--gold-accent);
  letter-spacing: 0.08em;
}

/* Masthead/Navigation - Elegant French style */
.masthead {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.greedy-nav .site-title,
#site-nav .site-title,
nav.greedy-nav .site-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  font-size: 2rem !important;
  letter-spacing: -0.02em !important;
  color: var(--text-dark) !important;
  text-transform: none !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  font-variant: normal !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.masthead__menu-item a {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dark);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

.masthead__menu-item a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-color);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.masthead__menu-item a:hover {
  color: var(--primary-color);
  letter-spacing: 0.18em;
}

.masthead__menu-item a:hover::after {
  width: 100%;
}

/* Site Title - Override theme styles with more specific selectors - Match hero title style */
.site-title,
.site-title a,
a.site-title,
.greedy-nav .site-title,
.greedy-nav a.site-title,
.masthead .site-title,
.masthead a.site-title,
.masthead__menu .site-title,
.masthead__menu a.site-title,
#site-nav .site-title,
#site-nav a.site-title,
nav.greedy-nav .site-title,
nav.greedy-nav a.site-title,
.masthead__inner-wrap .site-title,
.masthead__inner-wrap a.site-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  font-size: 2rem !important;
  letter-spacing: -0.02em !important;
  color: var(--text-dark) !important;
  text-transform: none !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  transition: color 0.3s ease !important;
}

.site-title:hover,
.site-title a:hover,
a.site-title:hover,
.masthead .site-title:hover,
.masthead a.site-title:hover,
.greedy-nav .site-title:hover,
.greedy-nav a.site-title:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
}

/* Site Logo */
.site-logo,
.greedy-nav .site-logo,
.masthead .site-logo {
  opacity: 1;
  transition: opacity 0.3s ease;
  display: inline-block;
  margin-right: 1rem;
}

.site-logo img,
.greedy-nav .site-logo img,
.masthead .site-logo img {
  max-height: 60px !important;
  width: auto !important;
  display: block;
}

.site-logo:hover,
.greedy-nav .site-logo:hover {
  opacity: 0.85;
}

.site-subtitle,
.masthead .site-subtitle,
.greedy-nav .site-subtitle,
#site-nav .site-subtitle,
.masthead__menu .site-subtitle,
.masthead__inner-wrap .site-subtitle,
.masthead .masthead__inner-wrap .masthead__menu nav.greedy-nav .site-subtitle,
.masthead .masthead__inner-wrap .masthead__menu #site-nav .site-subtitle,
html body .masthead .site-subtitle,
html body .greedy-nav .site-subtitle,
html body #site-nav .site-subtitle,
body .masthead .site-subtitle,
body .greedy-nav .site-subtitle,
body #site-nav .site-subtitle {
  font-family: 'Lato', sans-serif !important;
  font-weight: 300 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #8A8A8A !important;
  margin-top: 0.25rem !important;
  display: block !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  opacity: 0.8 !important;
}

/* Content spacing - Generous French elegance */
.page__content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.page__content p {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 2rem;
  color: var(--text-light);
  font-weight: 300;
}

/* Section spacing */
.section {
  padding: 5rem 0;
}

/* Refined table styling */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 3rem 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

th {
  background-color: var(--background-cream);
  color: var(--text-dark);
  padding: 1.5rem;
  text-align: left;
  font-weight: 400;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.05em;
}

td {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: white;
  font-weight: 300;
}

tr:hover td {
  background-color: var(--background-light);
}

/* FINAL OVERRIDE - Maximum specificity for site title to ensure it displays correctly */
html body .masthead .masthead__inner-wrap .masthead__menu nav.greedy-nav a.site-title,
html body .masthead .masthead__inner-wrap .masthead__menu #site-nav a.site-title,
html body .masthead .masthead__inner-wrap .masthead__menu .greedy-nav a.site-title,
html body .masthead a.site-title,
html body .greedy-nav a.site-title,
html body #site-nav a.site-title,
body .masthead .masthead__inner-wrap .masthead__menu nav.greedy-nav a.site-title,
body .masthead .masthead__inner-wrap .masthead__menu #site-nav a.site-title,
body .masthead .masthead__inner-wrap .masthead__menu .greedy-nav a.site-title,
body .masthead a.site-title,
body .greedy-nav a.site-title,
body #site-nav a.site-title,
.masthead .masthead__inner-wrap .masthead__menu nav.greedy-nav a.site-title,
.masthead .masthead__inner-wrap .masthead__menu #site-nav a.site-title,
.masthead .masthead__inner-wrap .masthead__menu .greedy-nav a.site-title,
.masthead a.site-title,
.greedy-nav a.site-title,
#site-nav a.site-title,
a.site-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-style: italic !important;
  font-size: 2rem !important;
  letter-spacing: -0.02em !important;
  color: #1A1A1A !important;
  text-transform: none !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  font-variant: normal !important;
  font-stretch: normal !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.site-title:hover,
.masthead .site-title:hover,
.greedy-nav .site-title:hover,
html body .masthead a.site-title:hover,
html body .greedy-nav a.site-title:hover {
  color: var(--primary-color) !important;
} 

/* Mobile: keep site title on one line */
@media (max-width: 768px) {
  .site-title,
  .site-title a,
  a.site-title,
  .greedy-nav .site-title,
  .greedy-nav a.site-title,
  .masthead .site-title,
  .masthead a.site-title,
  .masthead__inner-wrap .site-title,
  .masthead__inner-wrap a.site-title,
  #site-nav .site-title,
  #site-nav a.site-title,
  nav.greedy-nav .site-title,
  nav.greedy-nav a.site-title,
  html body .masthead a.site-title,
  html body .greedy-nav a.site-title {
    font-size: 1.5rem !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
  }
}

/* Language Switcher Styles */
.language-switcher {
  position: relative;
  display: inline-block;
  font-size: 0.8em; /* 20% smaller */
}

.language-switcher__btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
  line-height: 1;
  border-radius: 2px;
}

.language-switcher__btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

#current-lang-flag,
#current-lang-flag-masthead {
  font-size: 1.2rem;
  line-height: 1;
}

.language-switcher__arrow {
  font-size: 0.56rem;
  transition: transform 0.3s ease;
}

.language-switcher__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  /* Prevent layout shift - always use display: block, toggle visibility/opacity */
  display: block;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0s;
  pointer-events: auto;
}

.language-switcher__dropdown--hidden {
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(-5px) !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s !important;
}

.language-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: #1a1a1a;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 0.9rem;
}

.language-switcher__flag {
  font-size: 1.2rem;
  line-height: 1;
}

.language-switcher__text {
  flex: 1;
}

.language-switcher__option:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Language Switcher in Masthead */
.masthead .language-switcher {
  margin-left: 0.5rem;
  display: inline-block;
}

.masthead .masthead__menu-item:has(.language-switcher) {
  margin-left: 0.5rem;
}

/* Ensure nav links container can accommodate switcher */
.masthead__menu .visible-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible !important;
}

/* Prevent language dropdown from being clipped by nav wrappers */
.greedy-nav,
.greedy-nav .visible-links,
.masthead__menu,
.masthead__menu .greedy-nav {
  overflow: visible !important;
}

.masthead .language-switcher {
  position: relative;
  z-index: 1001;
}

@media (max-width: 768px) {
  .masthead .language-switcher {
    margin-left: 0.25rem;
  }
  
  .masthead .language-switcher__btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }
  
  #current-lang-flag,
  #current-lang-flag-masthead {
    font-size: 1rem;
  }
}