/* 
 * Wint Law International - Main Stylesheet
 * Design System: Navy (#0f172a), Gold (#f59e0b), Blue (#3b82f6)
 * Fonts: Sarabun (Thai), Inter (English)
 */

:root {
  /* Colors */
  --primary: #0f172a;
  --primary-light: #1e293b;
  --secondary: #f59e0b;
  --secondary-hover: #d97706;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text-main: #334155;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #22c55e;
  --error: #ef4444;

  /* Typography */
  --font-th: 'Sarabun', sans-serif;
  --font-en: 'Inter', sans-serif;

  /* Spacing */
  --container-padding: 1.5rem;
  --border-radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Header */
  --header-height: 80px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-th);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-th);
  color: var(--primary);
  line-height: 1.2;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-accent {
  color: var(--accent);
}

.text-white {
  color: var(--white);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-light {
  background-color: var(--bg-light);
}

.bg-white {
  background-color: var(--white);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-th);
  gap: 0.5rem;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* Header & Nav */
.header {
  height: var(--header-height);
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  line-height: 1.2;
  margin-right: 2rem;
  /* Add minimum gap between logo and nav */
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-sub {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  flex: 1;
  /* Take up remaining space */
  align-items: center;
}

/* Center Links Logic: Push first link from left, and button from links */
.nav-links .nav-link:first-child {
  margin-left: auto;
}

.nav-links .btn {
  margin-left: 0;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Increase font size slightly for Thai to improve readability */
.nav-link:lang(th),
[lang="th"] .nav-link {
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary);
  /* Dark background matching theme */
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 1rem 1.5rem;
  color: #cbd5e1;
  /* Text light */
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  transition: background 0.2s;
  white-space: nowrap;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--secondary);
}

/* Highlighted Header Item */
.dropdown-header {
  display: block;
  padding: 1rem 1.5rem;
  background-color: var(--secondary);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
}

.dropdown-header:hover {
  background-color: var(--secondary-hover);
  color: var(--white);
}

/* Rotating Chevon - Removed by user request to keep it pointing down */
.dropdown .fa-chevron-down {
  transition: transform 0.3s ease;
}

/* .dropdown:hover .fa-chevron-down {
  transform: rotate(180deg);
} */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
}

/* Hero Section */
.hero {
  background-image: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8)), url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 8rem 0 6rem;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Services Cards */
.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--secondary);
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: #ecfeff;
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Stats Section */
.stats-section {
  background-color: var(--primary);
  color: var(--white);
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: #cbd5e1;
  padding: 4rem 0 1rem;
}

.footer-brand h3 {
  color: white;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: white;
  transition: all 0.3s ease;
}

.footer-social-icon:hover {
  background: white;
  color: var(--primary);
  border-color: white;
}

/* Counter Animation Style */
.counter {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 1em;
}

/* Scroll Animations (Legacy/Cleanup) */
/* .reveal { opacity: 0; ... } can be removed or kept as fallback. 
   Since we use AOS, we can ignore or remove them to avoid conflicts.
   I will comment them out to prevent interference.
*/
/*
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }
*/

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s ease-out;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger Delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

.delay-400 {
  transition-delay: 0.4s;
}

.delay-500 {
  transition-delay: 0.5s;
}

/* Enhanced Hero Animation */
.hero h1,
.hero p,
.hero .btn {
  animation: fadeUp 1s ease-out forwards;
  opacity: 0;
}

.hero h1 {
  animation-delay: 0.2s;
}

.hero p {
  animation-delay: 0.4s;
}

.hero .btn {
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--secondary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Floating Action Buttons */
/* FABs */
/* FABs */
.fab-container {
  /* Fixed position at bottom right */
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column-reverse;
  /* Stack upwards from toggle */
  align-items: center;
  gap: 1rem;
  z-index: 1000;
}

.fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  color: var(--white);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 2px solid var(--white);
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  position: absolute;
  bottom: 0;
}

/* Toggle Button (Always visible) */
.fab-toggle {
  background-color: #000000;
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 1001;
  cursor: pointer;
}

.fab-toggle i {
  transition: transform 0.3s ease;
}

/* Active State - Show Buttons */
.fab-container.active .fab-line {
  opacity: 1;
  visibility: visible;
  transform: translateY(-4.5rem);
}

.fab-container.active .fab-phone {
  opacity: 1;
  visibility: visible;
  transform: translateY(-9rem);
}

.fab-container.active .fab-email {
  opacity: 1;
  visibility: visible;
  transform: translateY(-13.5rem);
}

.fab-container.active .fab-toggle i {
  transform: rotate(45deg);
}

.fab:hover {
  transform: scale(1.1);
}

/* Keep position when hovered and active */
.fab-container.active .fab-line:hover {
  transform: translateY(-4.5rem) scale(1.1);
}

.fab-container.active .fab-phone:hover {
  transform: translateY(-9rem) scale(1.1);
}

.fab-container.active .fab-email:hover {
  transform: translateY(-13.5rem) scale(1.1);
}


/* Icon Resets */
.fab i,
.fab svg {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
}

/* Specific background colors */
.fab-line {
  background-color: #06c755;
}

.fab-email {
  background-color: #fca311;
  /* Yellow */
}

.fab-phone {
  background-color: #fca311;
  /* Yellow */
}

/* Remove old style or keep for legacy if needed (we're replacing structure) */
.fab-top {
  display: none !important;
  /* Remove scroll to top from this stack if not requested, or move it separate */
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    height: 70px;
  }

  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    position: fixed;
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow-md);
    padding: 1rem;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
    max-height: 80vh;
    /* Allow scrolling if menu is long */
    overflow-y: auto;
  }

  /* Mobile Dropdown */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background-color: rgba(248, 250, 252, 0.5);
    /* Subtle background */
    border: none;
    /* Remove border for cleaner look */
    border-left: 2px solid var(--secondary);
    /* Indent indicator */
    display: block;
    /* Always block for animation */
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;

    /* Accordion Animation */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    padding: 0;
    /* Clear padding when closed */
    margin: 0;
  }

  .dropdown.active .dropdown-menu {
    display: block;
    max-height: 500px;
    /* Large enough to fit content */
    margin-top: 0.5rem;
    padding-left: 1rem;
    /* Indent content */
  }

  .dropdown-item,
  .dropdown-header {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .dropdown-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
}

/* Language Switcher */
.lang-switcher-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.lang-switcher-btn:hover {
  background: var(--light-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.lang-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lang-switcher-btn[data-lang="th"] .lang-icon {
  /* background-image: url('../img/flag-th.png'); */
  background-color: #ef4444;
  /* Placeholder red */
}

.lang-switcher-btn[data-lang="en"] .lang-icon {
  /* background-image: url('../img/flag-en.png'); */
  background-color: #3b82f6;
  /* Placeholder blue */
}

@media (max-width: 768px) {
  .lang-switcher-btn {
    margin: 0 auto 1rem;
    /* Center in mobile menu */
  }

  .nav-links .nav-link:first-child,
  .nav-links .btn {
    margin-left: 0;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* Typewriter Effect */
.typing-text {
  border-right: 3px solid transparent;
  white-space: nowrap;
}

.typing-text.cursor-active {
  border-right-color: #ffffff;
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent
  }

  50% {
    border-color: #ffffff;
  }
}

@media (max-width: 768px) {
  .typing-text {
    white-space: normal;
    border-right: none;
  }
}

/* Gallery & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  aspect-ratio: 4/3;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.lightbox-close:hover {
  transform: scale(1.1);
}

/* Team Modal */
.team-card {
  cursor: pointer;
}

.team-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.team-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.team-modal-content {
  background: white;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--border-radius);
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}

.team-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.team-modal-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.team-modal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.team-modal-profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.modal-profile-img {
  width: 200px;
  height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
  background-color: #cbd5e1;
}

.team-modal-gallery h4 {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.modal-gallery-item {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.modal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.modal-gallery-item:hover img {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .team-modal-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Language Switcher */
.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid #e2e8f0;
  background: var(--white);
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
  height: 40px;
  margin-left: 0.5rem;
}

.lang-switcher-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: #f8fafc;
}

.lang-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #e2e8f0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* Default Icon for TH (Thai Flag) */
  background-image: linear-gradient(180deg, #ef4444 0%, #ef4444 16.66%, #fff 16.66%, #fff 33.33%, #1e40af 33.33%, #1e40af 66.66%, #fff 66.66%, #fff 83.33%, #ef4444 83.33%, #ef4444 100%);
  background-size: cover;
}

[data-lang="en"] .lang-icon {
  /* USA Flag Style */
  background-color: white;
  background-image:
    /* Blue Canton (Top Left) */
    linear-gradient(#3c3b6e, #3c3b6e),
    /* Red Stripes */
    repeating-linear-gradient(180deg, #b22234 0, #b22234 2px, #ffffff 2px, #ffffff 4px);
  background-size: 50% 48%, 100% 100%;
  background-position: top left, top left;
  background-repeat: no-repeat;
}

/* Team Image Fix */
.team-img {
  width: 100%;
  height: 400px;
  /* Fixed height for consistency */
  object-fit: cover;
  /* Focus on faces */
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

/* Cookie Consent Banner */
#cookie-banner {
  position: fixed;
  bottom: -100%;
  /* Hidden initially */
  left: 0;
  width: 100%;
  background-color: var(--white);
  color: var(--text-main);
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: bottom 0.5s ease-in-out;
  border-top: 4px solid var(--secondary);
  display: flex;
  justify-content: center;
  align-items: center;
}

#cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cookie-text h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.cookie-text p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 0;
}

.cookie-text a {
  color: var(--secondary);
  text-decoration: underline;
}

.cookie-text a:hover {
  color: var(--primary);
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}