/* ==========================================================================
   Coast & Soul Agadir — Multi-Language Selector & RTL Styling
   Brand Colors:
     Teal: #1B382B / #10241B
     Gold: #C9962E / #8E6315
     Surface: #FCFAF3 / #F8F3E8
   ========================================================================== */

/* Modern Luxury Arabic Font Stack (Cairo + Tajawal: clean, zero line-collision, high legibility) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Tajawal:wght@500;700;800&display=swap');

/* Language Selector Dropdown Container */
.lang-selector-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 60;
  font-family: var(--font-body, "Archivo", system-ui, sans-serif);
}

/* Language Button Trigger */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface, #FCFAF3);
  color: var(--teal-deep, #10241B);
  border: 1.5px solid var(--line, rgba(201, 150, 46, 0.22));
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(27, 56, 43, 0.04);
}

.lang-btn:hover,
.lang-selector-dropdown.open .lang-btn {
  background: #FFFFFF;
  border-color: var(--gold, #C9962E);
  color: var(--teal, #1B382B);
  box-shadow: 0 4px 14px rgba(201, 150, 46, 0.18);
  transform: translateY(-1px);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--gold, #C9962E);
  outline-offset: 2px;
}

.lang-btn .globe-ic {
  display: inline-block;
  color: var(--gold-deep, #8E6315);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.lang-btn:hover .globe-ic {
  transform: rotate(20deg);
}

.lang-btn .chevron-ic {
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.25s ease;
  color: var(--ink2, #4E594A);
}

.lang-selector-dropdown.open .lang-btn .chevron-ic {
  transform: rotate(180deg);
  color: var(--gold, #C9962E);
}

/* Dropdown Menu */
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--surface, #FCFAF3);
  border: 1px solid var(--line, rgba(201, 150, 46, 0.25));
  border-radius: 6px;
  box-shadow: 0 14px 34px -4px rgba(27, 56, 43, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s ease;
  z-index: 100;
}

.lang-selector-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dropdown Option Items */
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #232B24);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.lang-option:hover {
  background: var(--surface2, #EFE4CA);
  color: var(--teal, #1B382B);
}

.lang-option.active {
  background: var(--teal, #1B382B);
  color: #FAF5E8;
  font-weight: 600;
}

.lang-option .lang-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep, #8E6315);
  margin-left: 8px;
}

.lang-option.active .lang-code {
  color: var(--gold, #C9962E);
}

/* Mobile Drawer Language Row */
.mobile-lang-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line, rgba(201, 150, 46, 0.22));
  flex-wrap: wrap;
}

.mobile-lang-btn {
  flex: 1;
  min-width: 48px;
  padding: 8px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--surface2, #EFE4CA);
  border: 1px solid var(--line, rgba(201, 150, 46, 0.22));
  color: var(--ink, #232B24);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-lang-btn.active {
  background: var(--teal, #1B382B);
  color: #FAF5E8;
  border-color: var(--teal);
}

@media (max-width: 768px) {
  .nav-in .lang-selector-dropdown {
    display: none;
  }
}

/* ==========================================================================
   RTL (Right-to-Left) Styles & Modern Arabic Typography
   ========================================================================== */

[dir="rtl"],
body.ar-lang {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.9 !important;
}

[dir="rtl"] body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important;
}

/* Luxury Arabic Headings: Tajawal + Cairo (clean editorial style, zero line collisions) */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] .hero-text h1,
[dir="rtl"] .hero-text h2,
[dir="rtl"] .sec-head h2,
[dir="rtl"] .page-head h1,
[dir="rtl"] .svc-body h3,
[dir="rtl"] .about-card h3,
[dir="rtl"] .final-in h2,
[dir="rtl"] .serif,
[dir="rtl"] .eyebrow,
[dir="rtl"] .art-date {
  font-family: 'Tajawal', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: normal !important;
  line-height: 1.55 !important;
}

[dir="rtl"] .hero-text h1,
[dir="rtl"] .page-head h1 {
  line-height: 1.45 !important;
  font-size: clamp(34px, 5vw, 56px) !important;
}

[dir="rtl"] .sec-head h2 {
  line-height: 1.4 !important;
}

/* Generous line-height for body and descriptions in Arabic to prevent line collisions */
[dir="rtl"] p,
[dir="rtl"] .lead,
[dir="rtl"] .card-desc,
[dir="rtl"] .trust-desc,
[dir="rtl"] .service-desc,
[dir="rtl"] .step p,
[dir="rtl"] .svc-body p,
[dir="rtl"] .foot p,
[dir="rtl"] .form-card p,
[dir="rtl"] .about-card p,
[dir="rtl"] .why-item p,
[dir="rtl"] .faq-panel p,
[dir="rtl"] .closer,
[dir="rtl"] .italic-tag {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.95 !important;
  letter-spacing: normal !important;
}

/* Service chips and compact cards in RTL */
[dir="rtl"] .style-desc-txt,
[dir="rtl"] .chip-desc {
  line-height: 1.7 !important;
}

[dir="rtl"] .chip-name {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

/* Button font in RTL */
[dir="rtl"] .btn {
  font-family: 'Cairo', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
}

/* ==========================================================================
   HEADER RTL FIX:
   In Arabic, Logo is on the RIGHT, Navigation links in the CENTER,
   and Language Dropdown + "Plan Your Stay" CTA button are on the LEFT.
   ========================================================================== */
[dir="rtl"] .nav-in {
  flex-direction: row !important; /* Natural RTL: items flow from Right to Left */
}

[dir="rtl"] .logo {
  order: 1 !important; /* Rightmost */
}

[dir="rtl"] .nav-links {
  order: 2 !important; /* Center */
  margin-right: 0 !important;
  margin-left: auto !important;
}

[dir="rtl"] .lang-selector-dropdown {
  order: 3 !important; /* Beside CTA */
}

[dir="rtl"] .nav-in .btn {
  order: 4 !important; /* Leftmost */
}

[dir="rtl"] .nav-burger {
  order: 5 !important;
}

/* Dropdown alignment in RTL */
[dir="rtl"] .lang-menu {
  right: auto !important;
  left: 0 !important;
  transform-origin: top left !important;
}

[dir="rtl"] .lang-option {
  text-align: right !important;
}

[dir="rtl"] .lang-option .lang-code {
  margin-left: 0 !important;
  margin-right: 8px !important;
}

[dir="rtl"] .lang-btn .chevron-ic {
  margin-left: 0 !important;
  margin-right: 4px !important;
}

/* Alignments & paddings in RTL */
[dir="rtl"] .hero-text {
  text-align: right !important;
}

[dir="rtl"] .hero-cta {
  justify-content: flex-start !important;
}

[dir="rtl"] .trust-item {
  text-align: right !important;
}

[dir="rtl"] .sec-head:not(.center) {
  text-align: right !important;
}

[dir="rtl"] .style-card {
  text-align: right !important;
}

[dir="rtl"] .svc-body {
  text-align: right !important;
}

[dir="rtl"] .step {
  text-align: right !important;
}

[dir="rtl"] .reviews .form-card,
[dir="rtl"] .reviews .empty-card {
  text-align: right !important;
}

[dir="rtl"] .faq button {
  text-align: right !important;
}

[dir="rtl"] .footer .foot {
  text-align: right !important;
}

[dir="rtl"] .about-card {
  text-align: right !important;
}

[dir="rtl"] .why-item {
  text-align: right !important;
}

/* Arrow flip for RTL links */
[dir="rtl"] .arrow-link,
[dir="rtl"] a[href*="→"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
