/* Estonian Web3 Chamber - Main Styles */

/* --------- Design tokens --------- */
:root {
  --bg: #0b0d12;
  --bg-2: #0f121a;
  --text: #e6ecff;
  --muted: #9aa3b2;
  --card: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.08);
  --primary: #7aa2ff; /* base for gradients */
  --accent: #8affc1;
  --maxw: 1200px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --text: #111827;
  --muted: #374151;
  --card: rgba(255,255,255,0.95);
  --stroke: rgba(0,0,0,0.06);
  --primary: #2563eb;
  --accent: #059669;
  --shadow: 0 2px 15px rgba(0,0,0,0.06);
}

/* --------- Base --------- */
html, body { height: 100%; }
body {
  margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: 
    radial-gradient(800px 400px at 90% 0%, rgba(122,162,255,0.12), transparent),
    radial-gradient(600px 300px at 10% 50%, rgba(0,195,137,0.10), transparent),
    radial-gradient(700px 350px at 80% 100%, rgba(122,162,255,0.08), transparent),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* Light theme background adjustments */
[data-theme="light"] body {
  background: 
    radial-gradient(800px 400px at 90% 0%, rgba(37,99,235,0.03), transparent),
    radial-gradient(600px 300px at 10% 50%, rgba(5,150,105,0.02), transparent),
    radial-gradient(700px 350px at 80% 100%, rgba(37,99,235,0.015), transparent),
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.grid { display: grid; gap: 24px; }

/* --------- Header --------- */
header {
  position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(160%) blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  border-bottom: 1px solid var(--stroke);
}

[data-theme="light"] header {
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent);
}

.nav {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
  gap: 20px;
}

.nav > div {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .2px; }
.logo {
  width: 28px; 
  height: 28px; 
  object-fit: contain;
}
nav ul { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
nav a { color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--text); }
.cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); color: #0b0d12;
  font-weight: 700; border: 0; cursor: pointer; box-shadow: var(--shadow);
  font-size: 14px; white-space: nowrap; text-decoration: none;
  height: 38px; /* Explicitly set height for reference */
  box-sizing: border-box; /* Include padding in height calculation */
  min-width: auto; max-width: fit-content;
}

[data-theme="light"] .cta {
  color: #ffffff;
}

/* --------- Theme Toggle Switch --------- */
.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  top: 4px; /* Adjust vertical position to align with other elements */
}

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.theme-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  position: relative;
  top: 1px; /* Align icons with the toggle */
}

.sun-icon {
  opacity: 1;
}

.moon-icon {
  opacity: 0.4;
}

[data-theme="dark"] .sun-icon {
  opacity: 0.4;
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
  color: var(--accent);
}

[data-theme="light"] .sun-icon {
  color: var(--primary);
}

.toggle-switch-inner {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  vertical-align: middle;
  position: relative;
  top: 1px; /* Fine-tune vertical alignment */
}

.toggle-switch-inner input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch-inner input:checked + .toggle-slider {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-color: var(--primary);
}

.toggle-switch-inner input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background: #ffffff;
}

.toggle-switch-inner:hover .toggle-slider {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(122, 162, 255, 0.2);
}

[data-theme="light"] .toggle-switch-inner:hover .toggle-slider {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* --------- Hero --------- */
.hero { padding: 96px 0 64px; position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 12px; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.05; margin: 10px 0 16px; }
.lead { font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-actions .btn {
  flex-shrink: 0;
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 1;
}

[data-theme="light"] .glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  backdrop-filter: blur(10px);
}

.card {
  padding: 24px;
  box-sizing: border-box;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .card {
  background: rgba(255,255,255,0.8);
}

.hero-image {
  aspect-ratio: 16/12; 
  border-radius: var(--radius); 
  position: relative; 
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: var(--bg-2);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,162,255,0.1) 0%, rgba(0,195,137,0.05) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

[data-theme="light"] .hero-image::after {
  background: linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(5,150,105,0.03) 100%);
}

/* --------- Sections --------- */
section { 
  padding: 72px 0; 
  position: relative;
}

/* Section background overlays for consistency */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 13, 18, 0.3);
  pointer-events: none;
  z-index: 0;
}

/* Light theme section overlays - much lighter */
[data-theme="light"] section::before {
  background: rgba(255, 255, 255, 0.02);
}

section > .container {
  position: relative;
  z-index: 1;
}

.hero::before {
  background: rgba(11, 13, 18, 0.1);
}

[data-theme="light"] .hero::before {
  background: rgba(255, 255, 255, 0.01);
}

#about::before {
  background: rgba(11, 13, 18, 0.2);
}

[data-theme="light"] #about::before {
  background: rgba(255, 255, 255, 0.015);
}

#initiatives::before {
  background: rgba(11, 13, 18, 0.25);
}

[data-theme="light"] #initiatives::before {
  background: rgba(255, 255, 255, 0.02);
}

#members::before {
  background: rgba(11, 13, 18, 0.3);
}

[data-theme="light"] #members::before {
  background: rgba(255, 255, 255, 0.025);
}

#events::before {
  background: rgba(11, 13, 18, 0.35);
}

[data-theme="light"] #events::before {
  background: rgba(255, 255, 255, 0.03);
}

#join::before {
  background: rgba(11, 13, 18, 0.4);
}

[data-theme="light"] #join::before {
  background: rgba(255, 255, 255, 0.035);
}

.section-head { 
  display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; 
}
.section-head h2 { 
  margin: 0; font-size: clamp(22px, 3vw, 32px); flex: 1;
}
.muted { color: var(--muted); }
.cards { 
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; 
}
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

.chip { 
  display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--stroke); 
  padding: 6px 10px; border-radius: 999px; background: var(--card); 
  font-weight: 600; font-size: 13px; color: var(--muted); 
  margin-bottom: 12px;
}

/* --------- Members carousel --------- */
.members-container {
  position: relative;
  overflow: hidden;
  margin: 24px 0;
}

.members-track {
  display: flex;
  gap: 18px;
  animation: scroll-members 30s linear infinite;
  width: fit-content;
}

.members-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-members {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-tile { 
  height: 80px; 
  min-width: 160px;
  border-radius: 12px; 
  border: 1px solid var(--stroke); 
  background: rgba(255,255,255,0.5) !important; 
  display: flex; 
  align-items: center;
  justify-content: center;
  font-weight: 700; 
  color: var(--muted); 
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 20px;
  text-align: center;
}

.member-logo:hover, .member-logo:focus {
  background: rgba(255,255,255,0.65) !important;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

[data-theme="light"] .logo-tile {
  background: rgba(0,0,0,0.65) !important;
}

[data-theme="light"] .member-logo:hover, [data-theme="light"] .member-logo:focus {
  background: rgba(0,0,0,0.75) !important;
  border-color: var(--primary);
}

/* Duplicate the members for seamless loop */
.members-track::after {
  content: '';
  display: flex;
  gap: 18px;
}

/* --------- Modal Styles --------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

[data-theme="light"] .modal-content {
  background: var(--bg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover, .modal-close:focus {
  background: var(--card);
  color: var(--text);
}

.modal-content h2 {
  margin: 0 0 16px 0;
  color: var(--text);
}

.modal-content h3 {
  margin: 24px 0 12px 0;
  color: var(--text);
}

.modal-content p {
  margin: 0 0 16px 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-content ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  color: var(--muted);
}

.modal-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.member-profile {
  text-align: center;
}

.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--stroke);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
}

.member-quote {
  font-style: italic;
  color: var(--text);
  margin: 16px 0;
  padding: 16px;
  background: var(--card);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.pricing-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 20px;
}

.pricing-card h4 {
  margin: 0 0 8px 0;
  color: var(--text);
}

.pricing-card .price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0;
}

.pricing-card .description {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

/* --------- Footer --------- */
footer { border-top: 1px solid var(--stroke); padding: 28px 0 48px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.small { font-size: 13px; }

/* --------- Buttons --------- */
.btn { 
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; 
  border: 1px solid var(--stroke); background: var(--card); color: var(--text); font-weight: 600; 
  cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap;
  min-width: auto; max-width: fit-content;
}
.btn:hover { border-color: rgba(255,255,255,0.22); }

[data-theme="light"] .btn:hover { 
  border-color: rgba(0,0,0,0.15); 
}

.btn.primary { 
  background: linear-gradient(90deg, var(--primary), var(--accent)); 
  color: #0b0d12; border: 0; font-weight: 700;
}

[data-theme="light"] .btn.primary {
  color: #ffffff;
}

/* --------- Form Elements --------- */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

input, textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--stroke); 
  background: var(--bg-2); color: var(--text); font-family: inherit;
  box-sizing: border-box; margin: 0;
}

[data-theme="light"] input, [data-theme="light"] textarea {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
}

label {
  display: block; margin-bottom: 6px; font-weight: 600; color: var(--text);
  margin-top: 0;
}

.card h3 { 
  margin: 0 0 12px 0; font-size: 18px; 
}

.card p {
  margin: 0 0 16px 0;
}

/* --------- Contact Actions --------- */
.contact-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-actions .btn {
  flex-shrink: 0;
}

/* --------- Nice details --------- */
.divider { height: 1px; background: var(--stroke); margin: 8px 0 18px; }
.kbd { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 
  font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 6px; 
  border: 1px solid var(--stroke); background: var(--card); color: var(--muted); 
}

/* --------- Responsive Design --------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .col-4, .col-6, .col-12 { grid-column: span 2; }
  .logo-row { grid-template-columns: repeat(3, 1fr); }
  nav ul { display: none; }
  
  /* Hide "Estonian Web3 Chamber" text on mobile */
  .brand span,
  footer .brand span {
    display: none;
  }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .col-4, .col-6, .col-12 { grid-column: span 1; }
  .logo-row { grid-template-columns: repeat(2, 1fr); }
  
  /* Mobile layout adjustments for section headers */
  .section-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .section-head h2 {
    text-align: center;
    margin-bottom: 8px;
  }
  
  .section-head .muted {
    order: 2;
    margin-bottom: 16px;
  }
  
  /* Move buttons below section content on mobile */
  .section-head .btn {
    display: none; /* Hide the button in the header */
  }
  
  /* Show mobile buttons */
  .mobile-btn {
    display: block !important;
    margin: 24px auto 0;
    max-width: 200px;
  }
}


/* --------- Enhanced Modal Button Styling --------- */
.btn[onclick*="openModal"] {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0b0d12;
  border: 0;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(122, 162, 255, 0.3);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .btn[onclick*="openModal"] {
  color: #ffffff;
}

.btn[onclick*="openModal"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 162, 255, 0.4);
}

.btn[onclick*="openModal"]:active {
  transform: translateY(0);
}

.btn[onclick*="openModal"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn[onclick*="openModal"]:hover::before {
  left: 100%;
}

/* Member logo tiles as buttons */
.member-logo {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--stroke);
  background: linear-gradient(135deg, var(--card), rgba(255,255,255,0.08));
  font-weight: 600;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.member-logo:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(122, 162, 255, 0.2);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
}

.member-logo:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.member-logo::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) translateX(20px);
  opacity: 0;
  transition: all 0.3s ease;
  font-weight: bold;
}

.member-logo:hover::after {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

[data-theme="light"] .btn[onclick*="openModal"] {
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .btn[onclick*="openModal"]:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .member-logo:hover {
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}


/* --------- Contact Information Styling --------- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item strong {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.company-address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font-size: 14px;
}

.legal-info {
  color: var(--muted);
  line-height: 1.5;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font-size: 14px;
}

.registry-code {
  color: var(--muted);
  font-size: 13px;
  opacity: 0.8;
}

.contact-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-block;
}

.contact-item a:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .contact-item a:hover {
  color: #ffffff;
}

/* Responsive adjustments for contact info */
@media (max-width: 560px) {
  .contact-info {
    gap: 16px;
  }
  
  .company-address,
  .legal-info {
    padding: 10px 12px;
    font-size: 13px;
  }
}


/* --------- Enhanced Member Logo Button Styling --------- */
.member-logo {
  position: relative;
  overflow: hidden;
}

.member-logo::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) translateX(20px);
  opacity: 0;
  transition: all 0.3s ease;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}

.member-logo:hover::after,
.member-logo:focus::after {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

.member-logo:hover {
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.1), rgba(138, 255, 193, 0.1));
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .member-logo:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(5, 150, 105, 0.1));
  border-color: var(--primary);
  color: var(--primary);
}

/* --------- Enhanced Theme Toggle Button --------- */
.mode {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mode::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.1), transparent);
  transition: left 0.5s;
}

.mode:hover::before {
  left: 100%;
}

.mode:hover {
  border-color: var(--primary);
  background: rgba(122, 162, 255, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(122, 162, 255, 0.2);
}

[data-theme="light"] .mode:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* --------- Member Logo Images --------- */
.member-logo-img {
  max-width: 180px;
  max-height: 75px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0.9);
  transition: all 0.3s ease;
}

/* Specific styling for CoinsPaid logo to make it bigger */
.member-logo-img[src*="coinspaid"] {
  max-width: 360px;
  max-height: 150px;
}

.member-logo:hover .member-logo-img {
  filter: brightness(1);
  transform: scale(1.05);
}

/* Theme-specific logo visibility */
.light-logo {
  display: block;
}

.dark-logo {
  display: none;
}

[data-theme="dark"] .light-logo {
  display: none;
}

[data-theme="dark"] .dark-logo {
  display: block;
}

/* Ensure logos are centered in their containers */
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.logo-tile .member-logo-img {
  margin: 0;
}

/* --------- Form Status Messages --------- */
.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-weight: 500;
  display: none;
}

.form-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .form-status.success {
  background: rgba(34, 197, 94, 0.05);
  color: #16a34a;
}

[data-theme="light"] .form-status.error {
  background: rgba(239, 68, 68, 0.05);
  color: #dc2626;
}


/* --------- Card with Image Styling --------- */
.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 20px -20px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 0;
}

/* Responsive adjustments for card images */
@media (max-width: 768px) {
  .card-image {
    height: 150px;
    margin: -16px -16px 16px -16px;
  }
}


/* --------- Team Section Styling --------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.team-member {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.team-member:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(122, 162, 255, 0.2);
}

[data-theme="light"] .team-member:hover {
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.team-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--stroke);
  transition: all 0.3s ease;
}

.team-member:hover .team-photo {
  border-color: var(--primary);
  transform: scale(1.05);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.team-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.team-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.team-position {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-qr {
  margin-top: 16px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 8px;
  transition: all 0.3s ease;
}

.team-member:hover .team-qr {
  border-color: var(--primary);
  background: var(--card);
}

.team-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive adjustments for team section */
@media (max-width: 1024px) {
  .team-grid {
    gap: 24px;
  }
  
  .team-member {
    padding: 20px;
  }
  
  .team-photo {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
  }
  
  .team-name {
    font-size: 16px;
  }
  
  .team-qr {
    width: 70px;
    height: 70px;
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
  }
  
  .team-member {
    padding: 16px;
  }
  
  .team-photo {
    width: 90px;
    height: 90px;
    margin-bottom: 14px;
  }
  
  .team-name {
    font-size: 15px;
  }
  
  .team-position {
    font-size: 13px;
  }
  
  .team-qr {
    width: 60px;
    height: 60px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .team-grid {
    gap: 16px;
  }
  
  .team-member {
    padding: 14px;
  }
  
  .team-photo {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
  }
  
  .team-name {
    font-size: 14px;
  }
  
  .team-position {
    font-size: 12px;
  }
  
  /* Hide QR codes on mobile and show LinkedIn icons instead */
  .team-qr {
    display: none;
  }
  
  .team-linkedin {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
  }
  
  .team-linkedin a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
  }
  
  .team-linkedin a:hover {
    background: var(--accent);
    transform: scale(1.1);
  }
}

/* Animation for team section */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-member {
  animation: fadeInUp 0.6s ease forwards;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }

/* Hide mobile buttons on desktop by default */
.mobile-btn {
  display: none;
}

/* Wrapper for theme toggle to control vertical alignment */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  height: 38px; /* Match the CTA button height */
}
