/* ========================================
   SWS Electronics Inc — Global Styles
   ======================================== */

/* 1. CSS Reset / Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Brand colors */
:root {
  --primary: #0a1628;
  --secondary: #00d4ff;
  --accent: #ff6b35;
  --light: #f8f9fa;
  --dark: #1a1a2e;
  --text: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --border: #e2e8f0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

p {
  margin-bottom: 1rem;
}

/* 2. Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  color: var(--primary);
}

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

/* 3. Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  background: var(--primary);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
}

.logo span {
  color: var(--secondary);
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--white);
  font-weight: 500;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--secondary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* 4. Mobile responsive nav */
@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    display: none;
  }

  .main-nav.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* 5. Hero section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.75);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* 6. Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  border: 2px solid currentColor;
}

/* 7. Sections */
.section-alt {
  background: var(--white);
}

/* 8. Grid systems */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 9. Cards */
.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* 10. Service cards */
.service-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

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

.service-card .card-body {
  padding: 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.price-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
}

/* 11. Product categories */
.product-category {
  margin-bottom: 3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* 12. Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--secondary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2.5rem;
  margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-year {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: var(--white);
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 1.6rem;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--secondary);
}

.timeline-item:nth-child(odd)::after {
  right: -8px;
}

.timeline-item:nth-child(even)::after {
  left: -8px;
}

/* 13. Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
}

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

.team-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.team-member h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.team-member .role {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.team-member .bio {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* 14. Contact page layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* 15. Forms */
.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
}

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

/* 16. Footer */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer-grid h4 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.footer-grid a {
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.85;
  transition: opacity 0.3s, color 0.3s;
}

.footer-grid a:hover {
  opacity: 1;
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* 17. Policy sections */
.policy-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.policy-section:last-child {
  border-bottom: none;
}

/* 18. Price tables / badges */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.price-table th,
.price-table td {
  padding: 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.price-table th {
  background: var(--primary);
  color: var(--white);
  font-family: 'Rajdhani', sans-serif;
}

.price-table tr:nth-child(even) {
  background: var(--light);
}

/* 19. Awards section */
.awards-section {
  background: var(--primary);
  color: var(--white);
}

.awards-section .section-title {
  color: var(--white);
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.award-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s, background 0.3s;
}

.award-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.award-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.award-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.award-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 0;
}

/* 20. Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 21. Responsive utilities */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 3rem;
    text-align: left !important;
  }

  .timeline-item::after {
    left: 12px !important;
    right: auto !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .team-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.25rem;
  }

  .awards-grid {
    grid-template-columns: 1fr;
  }

  .grid {
    gap: 1rem;
  }
}
