:root {
  --primary: #003d7a;
  --secondary: #00a8cc;
  --accent: #ff6b35;
  --background: #f8f9fa;
  --foreground: #1a1a1a;
  --muted: #6c757d;
  --border: #dee2e6;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.sticky-header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Improved mobile header layout with hamburger on right */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: bold;
  color: var(--primary);
  z-index: 1001;
  /* Logo on left, flexible */
  flex: 0 0 auto;
}

.logo a {
  color: var(--primary);
  text-decoration: none;
}

.logo img {
  height: 45px;
  width: auto;
}

/* Nav menu positioned in center on desktop, full screen on mobile */
.nav-menu {
  display: flex;
  gap: 2rem;
  /* Center navigation on desktop */
  flex: 1;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--secondary);
}

/* Desktop actions on right side */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Fixed width to prevent layout shift */
  flex: 0 0 auto;
}

/* Added language selector styles */
.language-selector {
  position: relative;
}

.language-selector select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--white);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.3s;
}

.language-selector select:hover {
  border-color: var(--secondary);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

.cta-btn {
  background-color: var(--secondary);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.cta-btn:hover {
  background-color: #0088a8;
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  /* Positioning hamburger on the right */
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  transition: all 0.3s;
  border-radius: 2px;
}

/* Hide mobile menu actions on desktop - CRITICAL FIX */
.mobile-menu-actions {
  display: none !important;
}

/* Hero Section with Form */
.hero {
  margin-top: 70px;
  padding: 60px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #002d5c 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-subtitle {
  color: var(--secondary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
}

.hero-description {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

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

.btn-primary:hover {
  background-color: #0088a8;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

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

.btn-light:hover {
  background-color: var(--background);
}

.btn-full {
  width: 100%;
}

.certifications {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cert-title {
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 10px;
}

/* Hero Form Styles */
.hero-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 450px;
}

.hero-form-card h2 {
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

.form-subtitle {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 25px;
}

.hero-query-form .form-group {
  margin-bottom: 15px;
}

.hero-query-form input,
.hero-query-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s;
  color: var(--foreground);
}

.hero-query-form input::placeholder,
.hero-query-form textarea::placeholder {
  color: var(--muted);
}

.hero-query-form input:focus,
.hero-query-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

/* Stats Section */
.stats {
  padding: 60px 0;
  background-color: var(--background);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-card {
  padding: 30px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-card p {
  color: var(--muted);
  font-size: 14px;
}

/* Featured Products Section */
.featured-products {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-label {
  color: var(--secondary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 10px;
}

.featured-products h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--primary);
}

.section-description {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--secondary);
}

.product-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  background-color: var(--background);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: var(--secondary);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.product-info {
  padding: 24px;
}

.product-info h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--primary);
}

.product-info p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.product-specs {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-specs p {
  font-size: 14px;
  margin: 8px 0;
  color: var(--foreground);
}

.product-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s;
}

.product-link:hover {
  gap: 12px;
}

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

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 42px;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.95;
}

/* Page Header */
.page-header {
  margin-top: 70px;
  padding: 60px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #002d5c 100%);
  color: var(--white);
  text-align: center;
}

.page-header h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.page-header p {
  font-size: 18px;
  opacity: 0.95;
}

/* Products Section */
.products-section {
  padding: 60px 0;
}

/* About Section */
.about-section {
  padding: 60px 0;
}

.about-content {
  margin-bottom: 60px;
}

.about-content h2 {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-content > p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.about-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--secondary);
}

.about-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 20px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.6;
}

.highlights {
  margin: 60px 0;
}

.highlights h2 {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 40px;
  text-align: center;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.highlight-item {
  text-align: center;
  padding: 30px;
}

.highlight-item h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 20px;
}

.highlight-item p {
  color: var(--muted);
  line-height: 1.6;
}

.certifications-section {
  background-color: var(--background);
  padding: 40px;
  border-radius: 8px;
  margin-top: 40px;
}

.certifications-section h2 {
  color: var(--primary);
  margin-bottom: 30px;
  font-size: 24px;
}

.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  list-style: none;
}

.cert-list li {
  color: var(--foreground);
  font-size: 16px;
  padding: 12px;
  background-color: var(--white);
  border-radius: 6px;
  border-left: 3px solid var(--secondary);
}

/* Contact Section */
.contact-section {
  padding: 60px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h2 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-info > p {
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 18px;
}

.contact-item p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-item a {
  color: var(--secondary);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-form-wrapper h2 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

.form-message {
  padding: 15px;
  border-radius: 6px;
  margin-top: 10px;
  display: none;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Better responsive breakpoints */
@media (max-width: 1024px) {
  .header-actions {
    gap: 0.5rem;
  }

  .language-selector select {
    padding: 8px 25px 8px 10px;
    font-size: 13px;
  }

  .cta-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* Start reducing nav menu gap on tablet */
  .nav-menu {
    gap: 1.5rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Completely redesigned mobile header - hamburger on right */
  .header-content {
    padding: 0.75rem 0;
  }

  .logo {
    flex: 1;
    /* Logo stays on left */
    order: 1;
  }

  .logo span {
    font-size: 16px;
  }

  .logo img {
    height: 35px;
  }

  /* Hide desktop actions on mobile */
  .header-actions {
    display: none !important;
  }

  /* Show hamburger on mobile, positioned on right */
  .hamburger {
    display: flex;
    order: 3;
    /* Hamburger on far right */
    margin-left: auto;
  }

  /* Full screen mobile menu overlay */
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    z-index: 1000;
    padding: 80px 20px 20px;
    overflow-y: auto;
    /* Reset flex properties for mobile overlay */
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
  }

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

  /* Mobile menu links styling - full width, touch friendly */
  .nav-link {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    font-size: 18px;
    display: block;
    width: 100%;
  }

  .nav-link.active::after {
    display: none;
  }

  /* Show mobile menu actions inside mobile menu only */
  .mobile-menu-actions {
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
  }

  .mobile-menu-actions .language-selector {
    width: 100%;
  }

  .mobile-menu-actions .language-selector select {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid var(--border);
  }

  .mobile-menu-actions .cta-btn {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 16px;
    display: block;
  }

  /* Improved mobile hero layout */
  .hero {
    padding: 40px 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    padding: 12px 24px;
  }

  /* Mobile contact grid */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Mobile form card */
  .hero-form-card {
    margin-top: 20px;
    padding: 25px 20px;
  }

  .hero-form-card h2 {
    font-size: 20px;
  }

  /* Mobile stats grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile products grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Mobile section headers */
  .section-header h2,
  .featured-products h2 {
    font-size: 28px;
  }

  .section-description {
    font-size: 16px;
  }

  /* Mobile about grid */
  .about-grid,
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer {
    padding: 40px 0 20px;
  }
}

@media (max-width: 640px) {
  /* Extra small mobile adjustments */
  .container {
    padding: 0 15px;
  }

  /* Hide logo text on very small screens to save space */
  .logo span {
    display: none;
  }

  .logo img {
    height: 32px;
  }

  .hero {
    margin-top: 60px;
    padding: 30px 0;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-description {
    font-size: 15px;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 15px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .page-header p {
    font-size: 16px;
  }

  .cta-section h2 {
    font-size: 28px;
  }

  .cta-section p {
    font-size: 16px;
  }

  .product-info h3 {
    font-size: 18px;
  }

  .stat-card h3 {
    font-size: 24px;
  }
}

/* Smooth hamburger animation to X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

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