/* ============================================
   WINIHARTO — Component Styles (Light Theme)
   ============================================ */

/* ---- Navbar ---- */
/* ---- Header & Navbar ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  transition: all var(--transition-base);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.top-bar {
  transition: all 0.3s ease;
}

.site-header.scrolled .top-bar {
  display: none;
}

.navbar {
  height: 50px;
  display: flex;
  align-items: center;
  background: #272727;
  /* Dark background from design */
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.navbar-logo {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links>a,
.nav-dropdown-toggle {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  position: relative;
  padding: 0 2.5rem;
  /* Increased padding */
  height: 100%;
  display: flex;
  align-items: center;
  transition: color var(--transition-base);
  border-right: 1px solid #444;
  text-transform: uppercase;
}

.nav-links>a::after,
.nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-500);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.nav-links>a:hover,
.nav-links>a.active,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
  color: var(--primary-500);
}

.nav-links>a:hover::after,
.nav-links>a.active::after,
.nav-dropdown-toggle:hover::after,
.nav-dropdown-toggle.active::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  height: 100%;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-toggle svg,
.nav-dropdown-toggle i {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
}

.nav-dropdown.open .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle i {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #767676;
  border-bottom: 3px solid var(--primary-500);
  border-radius: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-base);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-dropdown-menu a {
  display: block;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  transition: all var(--transition-fast);
  border-bottom: 1px solid #333;
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-500);
}

.nav-dropdown-menu a::after {
  display: none;
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--navbar-height) + 2rem) 2rem 2rem;
    transition: right var(--transition-base);
    gap: var(--space-lg);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 0 var(--space-md);
    box-shadow: none;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-500);
  color: var(--dark-900);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(249, 115, 22, 0.35);
  background: var(--primary-400);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  border-color: var(--primary-500);
  color: var(--primary-700);
  background: var(--primary-50);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn svg,
.btn i {
  width: 18px;
  height: 18px;
}

/* Dark variant for hero sections with dark background */
.btn-primary-dark {
  background: var(--primary-500);
  color: var(--dark-900);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(249, 115, 22, 0.4);
  background: var(--primary-400);
}

.btn-secondary-dark {
  background: transparent;
  color: #dddddd;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-color: var(--dark-200);
}

.btn-secondary-dark:hover {
  border-color: var(--primary-400);
  color: var(--primary-400);
  background: rgba(255, 255, 255, 0.05);
}

/* ---- Cards ---- */
.card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--primary-300);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: var(--space-lg);
}

.card-body h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.card-body p {
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.card-footer {
  padding: 0 var(--space-lg) var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
  background: var(--dark-600);
  border-top: 3px solid var(--primary-500);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
}

.footer-brand p {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.6);
}

.footer .navbar-logo {
  color: #ffffff;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin-bottom: var(--space-lg);
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-socials {
  display: flex;
  gap: var(--space-md);
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  border-color: var(--primary-400);
  color: var(--primary-400);
  background: rgba(249, 115, 22, 0.1);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Form Styles ---- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-select option {
  background: #ffffff;
  color: var(--text-primary);
}

.form-error {
  font-size: 0.8rem;
  color: var(--error-500);
  margin-top: var(--space-xs);
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-textarea {
  border-color: var(--error-500);
}

.form-group.error .form-error {
  display: block;
}

/* ---- Toast / Success Message ---- */
.toast {
  position: fixed;
  top: calc(var(--navbar-height) + 1rem);
  right: 1rem;
  z-index: 2000;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform var(--transition-base);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.toast-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ---- Product-specific card enhancements ---- */
.product-link-list {
  margin-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
}

.product-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.product-link-item:hover {
  background: var(--primary-50);
}

.product-link-item .product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.product-link-item .product-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.product-link-item svg,
.product-link-item i {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.toggle-products {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--primary-700);
  cursor: pointer;
  margin-top: var(--space-sm);
  font-weight: 500;
  background: none;
  border: none;
}

.toggle-products svg,
.toggle-products i {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.toggle-products.expanded svg,
.toggle-products.expanded i {
  transform: rotate(180deg);
}

/* ---- Stat Card ---- */
.stat-card {
  text-align: center;
  padding: var(--space-xl);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-card .stat-number .text-gradient {
  font-size: inherit;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ---- Value Card ---- */
.value-card {
  padding: var(--space-xl);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.value-card:hover {
  border-color: var(--primary-300);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-md);
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
}

.value-icon svg,
.value-icon i {
  width: 28px;
  height: 28px;
  font-size: 1.5rem;
}

.value-card h4 {
  margin-bottom: var(--space-sm);
}

.value-card p {
  font-size: 0.875rem;
}

/* ---- Contact Info ---- */
.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--dark-700);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-400);
}

.contact-info-icon svg,
.contact-info-icon i {
  width: 22px;
  height: 22px;
  font-size: 1.25rem;
}

.contact-info-text h4 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.contact-info-text p {
  font-size: 0.875rem;
}

/* ---- Navbar Search ---- */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: var(--space-sm);
}

.nav-search-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-search-toggle:hover {
  border-color: var(--primary-500);
  color: var(--primary-700);
  background: var(--primary-50);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-base);
  z-index: 1100;
  overflow: hidden;
}

.search-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.search-input-wrapper svg,
.search-input-wrapper i {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.search-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.search-results {
  max-height: 320px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--space-lg);
  transition: background var(--transition-fast);
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-50);
}

.search-result-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-700);
  font-weight: 600;
}

.search-result-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.search-empty {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .search-panel {
    width: calc(100vw - 2rem);
    right: -60px;
  }
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }

  .top-contact-wrapper {
    justify-content: center;
    gap: 15px;
  }

  .top-bar .container {
    flex-direction: column;
    gap: 10px;
  }
}