/*
Theme Name: CarBank
Theme URI: https://carbank.ee
Author: NEFA Studio
Author URI: https://nefastudio.ee
Description: Custom WordPress theme for CarBank — autoliising ja autokeskus.
Version: 1.1.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: carbank
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ─────────────────────────────────────────────
   DESIGN TOKENS
   Container: 1280px
   ───────────────────────────────────────────── */

:root {
  /* Brand */
  --brand: #0AAED6;
  --brand-dark: #0891B2;
  --brand-light: #3DC4E3;
  --brand-bg: rgba(10,174,214,0.08);
  --brand-glow: 0 4px 14px rgba(10,174,214,0.35);

  /* Container */
  --container-max: 1280px;
  --container-padding: clamp(1rem, 4vw, 2rem);

  /* Sections */
  --section: clamp(4rem, 8vw, 7rem);
  --section-sm: clamp(3rem, 5vw, 5rem);
  --section-lg: clamp(5rem, 10vw, 10rem);

  /* Grid gaps */
  --gap-grid: clamp(0.75rem, 1.5vw, 1rem);
  --gap-grid-lg: clamp(1.25rem, 3vw, 1.5rem);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Light theme (default) */
  --bg: #fff;
  --bg-surface: #F8FAFB;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --text-subtle: #9CA3AF;
  --border-clr: #E5E8EB;
  --card-bg: #fff;
  --header-bg: rgba(255,255,255,0.95);
  --topbar-bg: #000000;
  --dark-bg: #111111;

  /* Transitions */
  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t-base: 250ms cubic-bezier(.4,0,.2,1);
  --t-slow: 400ms cubic-bezier(.19,1,.22,1);
}

/* Dark theme overrides */
.dark {
  --bg: #131718;
  --bg-surface: #1B1D1E;
  --text: #E8ECF1;
  --text-muted: #8B92A5;
  --text-subtle: #5A6178;
  --border-clr: #2A2D2F;
  --card-bg: #1B1D1E;
  --header-bg: rgba(19,23,24,0.95);
  --topbar-bg: #0E1112;
  --dark-bg: #131718;
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(.9rem, .85rem + .2vw, 1rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  transition: background .3s, color .3s;
}

img { display: block; max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-clr); border-radius: 3px; }

/* ─────────────────────────────────────────────
   SKIP LINK
   ───────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: .5rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ─────────────────────────────────────────────
   CONTAINER
   ───────────────────────────────────────────── */

.container-cb {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ─────────────────────────────────────────────
   SECTION SPACING
   ───────────────────────────────────────────── */

.section { padding-top: var(--section); padding-bottom: var(--section); }
.section-sm { padding-top: var(--section-sm); padding-bottom: var(--section-sm); }
.section-lg { padding-top: var(--section-lg); padding-bottom: var(--section-lg); }

/* ─────────────────────────────────────────────
   HEADER — scroll effect
   ───────────────────────────────────────────── */

/* Default state: transparent, over hero */
.header-main {
  background: transparent;
  border-bottom: 1px solid transparent;
}

/* Nav links: white text by default (over dark hero) */
.header-nav-link,
#header .menu-item a {
  color: rgba(255,255,255,0.75) !important;
  transition: color var(--t-fast);
  text-decoration: none;
}
.header-nav-link:hover,
#header .menu-item a:hover {
  color: var(--brand) !important;
}

/* WP nav menu reset — remove bullets and list styling */
#header nav ul,
#header nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
#header nav .menu-item {
  list-style: none;
  display: flex;
}
#header nav .menu-item a {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  padding: 8px 12px;
  white-space: nowrap;
  position: relative;
}
#header nav .menu-item a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--brand);
  margin-top: 2px;
  transition: width .3s cubic-bezier(.19,1,.22,1);
}
#header nav .menu-item a:hover::after,
#header nav .menu-item.current-menu-item a::after {
  width: 100%;
}

/* Topbar: inside header */
#topbar {
  max-height: 50px;
  transition: all 0.3s ease;
}

/* WP admin bar offset */
.admin-bar .header-main { top: 32px; }
.admin-bar .header-main.scrolled { top: 32px; }
.admin-bar #header-spacer { height: 112px; }

/* Header at top */
.header-main {
  top: 0;
}

/* Default state — fully transparent */
.header-main {
  background: transparent;
}

/* Scrolled state — 60% black with blur */
.header-main.scrolled {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  top: 0;
}

/* Topbar hides on scroll */
#topbar.hidden-bar {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

/* Hero extends behind header — pull up over spacer */
.hero-behind-header {
  margin-top: -140px;
  padding-top: 140px;
}
@media (max-width: 767px) {
  .hero-behind-header {
    margin-top: -80px;
    padding-top: 80px;
  }
}
.admin-bar .hero-behind-header {
  margin-top: -172px;
  padding-top: 172px;
}

/* Push hero content (breadcrumb + title) down from header — only subpages, not front page */
.hero-behind-header:not(.hero-front) > .container-cb {
  margin-top: 40px;
}
@media (max-width: 767px) {
  .admin-bar .hero-behind-header {
    margin-top: -112px;
    padding-top: 112px;
  }
}

/* Bottom border glow on scrolled header */
.header-main.scrolled::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

/* Theme toggle in header — white */
.header-main .theme-toggle {
  color: rgba(255,255,255,0.6);
}
.header-main .theme-toggle:hover {
  color: #fff;
}

/* Mobile hamburger */
#menu-toggle { color: rgba(255,255,255,0.8); }
.header-main.scrolled #menu-toggle { color: rgba(255,255,255,0.8); }

/* ─────────────────────────────────────────────
   NAV LINKS
   ───────────────────────────────────────────── */

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--brand);
  margin-top: 2px;
  transition: width .3s cubic-bezier(.19,1,.22,1);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ─────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: .8125rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
  box-shadow: var(--brand-glow);
  min-height: 44px;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-clr);
  color: var(--text);
  font-weight: 600;
  font-size: .8125rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
  min-height: 44px;
  text-decoration: none;
  background: transparent;
}
.btn-outline:hover { background: var(--bg-surface); }

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-weight: 600;
  font-size: .8125rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
  min-height: 44px;
  text-decoration: none;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}

/* ─────────────────────────────────────────────
   COMPONENTS
   ───────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .05em;
  background: var(--brand-bg);
  color: var(--brand);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-clr);
  border-radius: var(--radius-lg);
  transition: all .3s;
}
.card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.08); }

/* Spec grid — dark cells with borders between them */
.spec-grid {
  background: var(--dark-bg, #1A1A2E);
}
.spec-cell {
  text-align: center;
  padding: 10px 4px;
  border-right: 1px solid var(--border-clr);
  border-bottom: 1px solid var(--border-clr);
  background: var(--bg-surface);
}
.spec-cell:nth-child(3n) { border-right: none; }
.spec-cell:nth-child(n+4) { border-bottom: none; }

/* Spec grid icons — brand-color filter for SVGs loaded as <img> */
.spec-icon {
  filter: invert(58%) sepia(85%) saturate(1000%) hue-rotate(155deg) brightness(95%) contrast(90%);
}

.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-box svg { width: 1.25rem; height: 1.25rem; color: var(--brand); }

.icon-box-lg { width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); }
.icon-box-lg svg { width: 1.5rem; height: 1.5rem; }

/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */

.hero-overlay {
  background: linear-gradient(135deg,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,.25) 50%,
    rgba(0,0,0,.1) 100%
  );
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY HELPERS
   ───────────────────────────────────────────── */

.stars { color: #F59E0B; font-size: 1.1rem; letter-spacing: 2px; }

.service-number {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(5rem, 8vw, 8rem);
  color: rgba(10,174,214,.1);
  line-height: 1;
}

.stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  color: var(--brand);
  line-height: 1;
}

.stat-suffix {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  color: var(--brand);
  opacity: .7;
}

/* ─────────────────────────────────────────────
   LOGO LIGHT/DARK SWAP
   ───────────────────────────────────────────── */

.logo-light-mode { display: block !important; }
.logo-dark-mode  { display: none !important; }
.dark .logo-light-mode { display: none !important; }
.dark .logo-dark-mode  { display: block !important; }

/* ─────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────── */

.header-scrolled {
  background: var(--header-bg) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.mobile-menu.open { max-height: 100vh; }

/* ─────────────────────────────────────────────
   THEME TOGGLE
   ───────────────────────────────────────────── */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-clr);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { width: 18px; height: 18px; }
.dark .theme-toggle .icon-sun { display: block; }
.dark .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ─────────────────────────────────────────────
   SOCIAL ICONS
   ───────────────────────────────────────────── */

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  transition: all .25s;
}
.social-icon:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10,174,214,.3);
}
.social-icon svg { width: 16px; height: 16px; }

/* ─────────────────────────────────────────────
   FAQ
   ───────────────────────────────────────────── */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow);
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .3s; }

/* ─────────────────────────────────────────────
   RANGE SLIDERS
   ───────────────────────────────────────────── */

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-clr);
  border-radius: 3px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--brand);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(10,174,214,.4);
}

/* ─────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────── */

.reveal, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity .7s cubic-bezier(.19,1,.22,1), transform .7s cubic-bezier(.19,1,.22,1);
}
.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-scale { transform: scale(.95); }
.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
  opacity: 1;
  transform: translate(0,0) scale(1);
}

.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }
.stagger > *:nth-child(7) { transition-delay: 480ms; }
.stagger > *:nth-child(8) { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─────────────────────────────────────────────
   IMAGE UTILITIES
   ───────────────────────────────────────────── */

.img-placeholder {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--border-clr) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.img-placeholder svg { opacity: .25; }

.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform .6s cubic-bezier(.19,1,.22,1); }
.img-zoom:hover img { transform: scale(1.05); }

.carousel-hide-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.carousel-hide-scroll::-webkit-scrollbar { display: none; }

/* ─────────────────────────────────────────────
   DARK MODE OVERRIDES (Tailwind compatibility)
   ───────────────────────────────────────────── */

.dark .bg-white { background-color: var(--bg) !important; }
.dark .bg-surface, .dark .bg-gray-50 { background-color: var(--bg-surface) !important; }
.dark .border-gray-100, .dark .border-gray-200 { border-color: var(--border-clr) !important; }
.dark .text-dark, .dark .text-gray-900 { color: var(--text) !important; }
.dark .text-gray-600, .dark .text-gray-500 { color: var(--text-muted) !important; }
.dark .text-gray-400, .dark .text-gray-300 { color: var(--text-subtle) !important; }
.dark .shadow-card { box-shadow: 0 2px 8px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.15) !important; }
.dark .border-y { border-color: var(--border-clr) !important; }
.dark .mobile-menu { background-color: var(--bg) !important; }

/* ─────────────────────────────────────────────
   BLOG / POST CONTENT
   ───────────────────────────────────────────── */

.post-content { color: var(--text); line-height: 1.8; font-size: 1rem; }
.post-content h1 { font-family: 'DM Serif Display', serif; font-size: 2rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--text); }
.post-content h2 { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--text); border-bottom: 2px solid var(--brand); padding-bottom: .5rem; }
.post-content h3 { font-weight: 700; font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: .75rem; color: var(--text); }
.post-content h4 { font-weight: 600; font-size: 1.1rem; margin-top: 1.25rem; margin-bottom: .5rem; color: var(--text); }
.post-content p { margin-bottom: 1rem; color: var(--text-muted); }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--brand-dark, #088aab); }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 4px solid var(--brand);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-muted); }
.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }
.post-content li { margin-bottom: .5rem; }
.post-content li::marker { color: var(--brand); }
.post-content hr { border: none; border-top: 1px solid var(--border-clr); margin: 2rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.post-content th, .post-content td { padding: .75rem 1rem; border: 1px solid var(--border-clr); text-align: left; }
.post-content th { background: var(--bg-surface); font-weight: 700; color: var(--text); }
.post-content td { color: var(--text-muted); }

/* Brand prose — extra polish for legal/policy pages */
.prose-brand h2:first-child { margin-top: 0; }
.prose-brand > *:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────
   TRANSLATEPRESS LANGUAGE SWITCHER
   ───────────────────────────────────────────── */

/* Header switcher — pill button with flag + short code, NO background */
#header .trp-shortcode-switcher__wrapper {
  position: relative;
}

/* TP switcher container — transparent, no box, tight width */
#header .trp-language-switcher {
  display: inline-block !important;
  width: auto !important;
  max-width: fit-content !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible !important;
  position: relative;
}

/* Current language — pill button — ALWAYS visible, never changes on hover */
#header .trp-ls-shortcode-current-language,
#header div.trp-ls-shortcode-current-language,
#header .trp-language-switcher:hover .trp-ls-shortcode-current-language {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 9999px !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#header .trp-ls-shortcode-current-language a,
#header div.trp-ls-shortcode-current-language a,
#header .trp-language-switcher:hover .trp-ls-shortcode-current-language a {
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px !important;
  border: none !important;
  border-radius: 9999px !important;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none !important;
  transition: all var(--t-fast);
  white-space: nowrap;
  background: transparent !important;
  cursor: pointer;
}

#header .trp-ls-shortcode-current-language:hover {
  border-color: rgba(255,255,255,0.5) !important;
}

/* Chevron arrow on current language pill */
#header .trp-ls-shortcode-current-language a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 4px;
  opacity: .5;
  flex-shrink: 0;
}

/* Force the main switcher container to NOT change on hover */
#header .trp-language-switcher,
#header .trp-language-switcher:hover,
#header .trp-language-switcher:focus {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  width: auto !important;
  max-width: fit-content !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Dropdown container — positioned below pill, TP handles visibility */
#header .trp-ls-shortcode-language {
  position: absolute !important;
  top: calc(100% - 4px) !important;
  right: 0 !important;
  margin-top: 0 !important;
  min-width: 120px !important;
  z-index: 100 !important;
}

/* Dropdown visible state — dark translucent with backdrop blur */
#header .trp-language-switcher:hover .trp-ls-shortcode-language,
#header .trp-language-switcher:focus-within .trp-ls-shortcode-language {
  background: rgba(10, 12, 15, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  padding: 6px 0 !important;
  overflow: visible !important;
}

/* Dropdown items — white text on dark bg */
#header .trp-ls-shortcode-language a {
  display: flex !important;
  align-items: center;
  gap: 6px;
  border: none !important;
  border-radius: 0 !important;
  padding: 8px 16px !important;
  width: 100%;
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  font-size: .8125rem;
  font-weight: 600;
  background: transparent !important;
  transition: background var(--t-fast);
}

#header .trp-ls-shortcode-language a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Hide tooltips on language links */
#header .trp-ls-shortcode-language a[title] {
  title: none;
}

/* Hide current language duplicate in dropdown */
#header .trp-ls-shortcode-language .trp-ls-disabled-language {
  display: none !important;
}

/* Language name text */
#header .trp-language-item-name {
  font-size: .8125rem !important;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#header .trp-language-switcher > a .trp-language-item-name {
  color: #fff !important;
}

/* Flag icon */
#header .trp-flag-image {
  width: 22px !important;
  height: 14px !important;
  border-radius: 2px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.15);
}

#header .trp-ls-shortcode-language .trp-flag-image {
  border-color: rgba(0,0,0,.08);
}

/* Hide TP default SVG arrow */
#header .trp-shortcode-arrow,
#header svg.trp-shortcode-arrow {
  display: none !important;
}

/* Floater disabled in TranslatePress settings */

/* CF7 Form Styles */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-clr);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb, 0, 150, 136), 0.15);
}
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}
.wpcf7 .wpcf7-not-valid-tip {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.wpcf7 .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.wpcf7 .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--brand);
}
.wpcf7 input[type="submit"] {
  width: 100%;
  cursor: pointer;
}
@media (min-width: 640px) {
  .wpcf7 input[type="submit"] {
    width: auto;
  }
}

/* Hero heading tighter line-height */
.hero-behind-header h1.font-heading {
  line-height: 1.1;
}

/* Single auto page - dark header background */
body.single-auto .header-main {
  background: rgba(19, 23, 30, 0.9) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Badge position - right side */
.card .absolute.top-2.left-2 {
  left: auto !important;
  right: 10px;
}

/* Hero front-page heading - smaller and tighter */
.hero-front h1.font-heading {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  line-height: 1.05;
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  position: fixed !important;
  right: -999px !important;
}

/* reCAPTCHA text spacing before submit button */
.wpcf7-form p.text-xs:has(a[href*="policies.google"]) {
  margin-bottom: 1.5rem;
}
/* Fallback for browsers without :has */
.wpcf7-form p.text-xs + .wpcf7-form-control-wrap + input[type="submit"],
.wpcf7-form p.text-xs + p > input[type="submit"] {
  margin-top: 1.5rem;
}

/* Acceptance + reCAPTCHA + submit grouped together */
.wpcf7-form .wpcf7-acceptance {
  margin-bottom: 0.5rem;
}
.wpcf7-form input[type="submit"] {
  margin-top: 0.5rem;
}

/* Align acceptance, recaptcha text and submit to left edge */
.wpcf7-form .wpcf7-acceptance,
.wpcf7-form .wpcf7-acceptance + p,
.wpcf7-form .wpcf7-acceptance ~ p,

.wpcf7-form .wpcf7-acceptance label {
  padding-left: 0;
  margin-left: 0;
}

/* Fix: submit button text centered, not left */
.wpcf7-form input[type="submit"] {
  text-align: center !important;
}

/* Fix: tighten spacing between acceptance checkbox, recaptcha, and submit */
.wpcf7-form > .mb-3:last-of-type {
  margin-bottom: 0.5rem;
}
.wpcf7-form > p:has(.wpcf7-submit) {
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.wpcf7-form > p.text-xs {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Submit button text always centered */
.wpcf7-form .wpcf7-submit {
  text-align: center !important;
}

/* Card buttons always at bottom */
.card.rounded-lg {
  display: flex;
  flex-direction: column;
}
.card.rounded-lg > .p-3,
.card.rounded-lg > .sm\:p-3\.5 {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card.rounded-lg .grid.grid-cols-2.gap-1\.5 {
  margin-top: auto;
}
