/* ============================================
   ESPATECH GmbH - Main Stylesheet
   ============================================ */

/* 1. RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0052a3;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2. COLOR PALETTE & TYPOGRAPHY */
:root {
  --primary-color: #0093dd;    /* Bright blue */
  --secondary-color: #da251d;  /* Red accent */
  --text-dark: #1f1a17;        /* Dark brown */
  --text-light: #666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success: #28a745;
  --error: #dc3545;
  --warning: #ffc107;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* 3. HEADER & NAVIGATION */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background-color: white;
  border-radius: 8px;
  padding: 4px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.logo img {
  height: 45px;
  width: auto;
  margin: 0;
  display: block;
}

.logo span {
  color: var(--secondary-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: white;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 4. CONTAINER & LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section.alternate {
  background-color: var(--bg-light);
}

/* 5. HERO SECTION */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #005ba3 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  color: #e0e0e0;
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 6. BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: transparent;
  color: var(--secondary-color);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* 7. CARDS & GRIDS */
.grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

/* 8. PRODUCT PAGE STYLES */
.product-hero {
  background-color: var(--bg-light);
  padding: 3rem 0;
  border-bottom: 3px solid var(--secondary-color);
}

.product-title {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.product-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

.product-image-container {
  background-color: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info {
  padding: 1rem 0;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: white;
}

.specs-table th {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.specs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.specs-table tr:nth-child(even) {
  background-color: var(--bg-light);
}

.specs-list {
  list-style-position: inside;
  margin-left: 1rem;
}

.specs-list li {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

/* 9. FORMS */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.error-message {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid #c3e6cb;
  margin-bottom: 1rem;
}

/* 10. FOOTER */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section a {
  color: #e0e0e0;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  color: #b0b0b0;
}

/* 11. UTILITY CLASSES */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.breadcrumb {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.breadcrumb li::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--border-color);
}

.breadcrumb li:last-child::after {
  content: '';
}

.breadcrumb a {
  color: var(--primary-color);
}

.breadcrumb li:last-child {
  color: var(--text-light);
}

/* 12. RESPONSIVE DESIGN */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .mobile-menu-btn {
    display: block;
  }

  nav {
    display: none;
  }

  nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    padding: 1rem;
    flex-direction: column;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-image-container {
    min-height: 250px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }

  .hero {
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  nav.active ul {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}

/* 13. ACCESSIBILITY */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* 14. LOADING & ANIMATIONS */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
