/* ==========================================
   ICCIT Modular Component Design System
   ========================================== */

/* 1. Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--border-brand);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-outline-green {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--border-brand);
}

.btn-outline-green:hover {
  background: var(--color-primary-light);
  color: var(--green-900);
}

/* 2. Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-green {
  background: var(--color-primary-light);
  color: var(--green-800);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.badge-amber {
  background: var(--amber-100);
  color: var(--amber-900);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-ieee {
  background: rgba(30, 58, 138, 0.08);
  color: #1E3A8A;
  border: 1px solid rgba(30, 58, 138, 0.2);
}

/* 3. Cards & Container Surfaces */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
}

/* 4. Top Live Countdown Banner */
.countdown-banner {
  background: linear-gradient(90deg, #14532D 0%, #166534 50%, #064E3B 100%);
  color: #FFFFFF;
  padding: 0.6rem 0;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.countdown-timer .unit {
  color: var(--lime-400);
}

/* 5. Floating Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(253, 252, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo-iccit {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.brand-logo-adi {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand-ampersand {
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1rem;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
}

.navbar-brand-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-900);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.navbar-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

/* Dropdown Menu Styling */
.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-dropdown-toggle:hover {
  color: var(--color-primary);
}

.nav-chevron {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .nav-chevron,
.nav-item-dropdown.open .nav-chevron,
.nav-item-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.nav-item-dropdown.active .nav-dropdown-toggle {
  color: var(--color-primary);
  font-weight: 700;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #FAF8F5;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  min-width: 270px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--color-primary-light);
}

.dropdown-item-icon {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

.dropdown-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-item-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-main);
  cursor: pointer;
}

/* 6. Hero Section */
.hero {
  padding: 5rem 0 4rem;
  background: radial-gradient(circle at 50% 0%, rgba(22, 163, 74, 0.06) 0%, rgba(253, 252, 248, 0) 70%);
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--green-950);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.trust-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 2.5rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trust-number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-900);
}

.trust-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 7. Footer Layout */
.footer {
  background: var(--green-950);
  color: #F0FDF4;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--lime-400);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  flex-wrap: wrap;
  gap: 1rem;
}

/* 8. Language Switcher Dropdown (EN / ID / ZH) */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-brand);
  color: var(--color-primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #FAF8F5;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  padding: 0.4rem;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

.lang-switcher:hover .lang-dropdown,
.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  background: none;
  border: none;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  width: 100%;
}

.lang-option:hover {
  background: var(--color-primary-light);
  color: var(--green-900);
}

/* 9. Ultra-Smooth Relevant Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #052E16 0%, #14532D 50%, #064E3B 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 380px;
  padding: 2rem;
}

.preloader-logo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader-logo {
  width: 60px;
  height: auto;
  z-index: 2;
  animation: preloaderPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.preloader-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #4ADE80;
  border-right-color: #F59E0B;
  border-radius: 50%;
  animation: preloaderSpin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.preloader-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

.preloader-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.preloader-bar {
  width: 160px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.preloader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22C55E 0%, #F59E0B 100%);
  border-radius: 99px;
  animation: preloaderProgress 1.4s ease-out forwards;
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 6px 18px rgba(74, 222, 128, 0.4)); }
}

@keyframes preloaderProgress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* Mobile responsive drawer */
@media (max-width: 1100px) {
  .navbar-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.75rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }

  .navbar-nav.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }
}
