/**
 * ProTechnologies Component Library
 * Polished, high-contrast UI components with subtle borders, restrained glows, and accessible controls.
 */

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }
}

.nav-link {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text-main);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--color-primary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* ==========================================================================
   Mobile Navigation Drawer
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 85vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
}

.mobile-drawer.is-active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-nav .nav-link {
  font-size: var(--text-lg);
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
}

.drawer-nav .nav-link:hover {
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2F6BFF 0%, #1D52DF 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(47, 107, 255, 0.3);
}

.btn-primary:hover {
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(47, 107, 255, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--color-primary);
  color: var(--text-main);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-portal {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(47, 107, 255, 0.15) 100%);
  border: 1px solid var(--border-highlight);
  color: var(--color-secondary);
}

.btn-portal:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25) 0%, rgba(47, 107, 255, 0.25) 100%);
  border-color: var(--color-secondary);
  color: #FFFFFF;
}

.btn-sm { padding: 0.45rem 0.85rem; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: var(--text-base); border-radius: var(--radius-lg); }

/* ==========================================================================
   Badges, Eyebrows & Chips
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.badge-live {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-in-development,
.badge-active {
  background: var(--color-info-bg);
  color: var(--color-info);
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-concept {
  background: var(--color-concept-bg);
  color: var(--color-concept);
  border-color: rgba(168, 85, 247, 0.3);
}

.badge-planned {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(47, 107, 255, 0.4);
  box-shadow: var(--shadow-card);
}

.card-glass {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(8px);
}

.card-interactive {
  cursor: pointer;
}

/* Icon Box */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
  border: 1px solid var(--border-subtle);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Interactive Idea Starter Chips
   ========================================================================== */
.idea-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.idea-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.idea-chip:hover {
  border-color: var(--color-primary);
  color: var(--text-main);
  background: var(--bg-surface-subtle);
}

.idea-chip.is-active {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.2) 0%, rgba(34, 211, 238, 0.2) 100%);
  border-color: var(--color-secondary);
  color: var(--text-main);
  font-weight: 600;
}

.idea-preview-box {
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: inherit;
  font-size: var(--text-base);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form-control.is-invalid {
  border-color: #EF4444;
}

.form-error {
  color: #EF4444;
  font-size: var(--text-xs);
  margin-top: 0.35rem;
}

.form-help {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  margin-top: 0.35rem;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Project Tracking Portal Dashboard Styles
   ========================================================================== */
.portal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.portal-header-bar {
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.1) 0%, rgba(34, 211, 238, 0.05) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Milestone Timeline */
.milestones-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.milestones-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  width: 2px;
  background: var(--border-subtle);
}

.milestone-item {
  position: relative;
}

.milestone-node {
  position: absolute;
  left: -2rem;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.milestone-item.is-completed .milestone-node {
  border-color: var(--color-success);
  background: var(--color-success);
}

.milestone-item.is-active .milestone-node {
  border-color: var(--color-secondary);
  background: var(--bg-surface);
  box-shadow: 0 0 10px var(--color-secondary);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--border-highlight);
}

.faq-summary {
  padding: 1.15rem 1.5rem;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-secondary);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Floating WhatsApp Quick-Contact Widget
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #25D366;
  color: #FFFFFF;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-whatsapp:hover {
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp-icon {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Alerts & Toast Messages
   ========================================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
  line-height: 1.6;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

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

.footer-heading {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-subtle);
}
