/*
 * Global styles for AdBluehjelp.no
 *
 * The design uses a dark colour palette with blue accents and light
 * typography to convey professionalism and trust. Layouts are responsive
 * and accessible with semantic HTML structure.
 */

/* Colour variables */
:root {
  --bg-color: #0d1b2a;
  --bg-alt: #112240;
  --primary-color: #3182ce;
  --primary-hover: #2663a4;
  --accent-color: #c79a40;
  --text-color: #f1f5f9;
  --secondary-text: #cbd5e1;
  --card-bg: #112f4e;
  --card-border: #1e3a60;
}

/* Base reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover,
a:focus {
  color: var(--primary-hover);
}

/* Container for layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(13, 27, 42, 0.8);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

.tagline {
  margin-left: 1rem;
  font-size: 0.875rem;
  color: var(--secondary-text);
  white-space: nowrap;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--secondary-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--text-color);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone-link {
  font-size: 0.875rem;
  color: var(--secondary-text);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.4);
}

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

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.3);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px; /* account for sticky header */
  overflow: hidden;
  color: var(--text-color);
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(0.4);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(to right, rgba(13, 27, 42, 0.9) 30%, rgba(13, 27, 42, 0.4) 70%);
}

.hero-content {
  max-width: 600px;
  padding: 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.hero .subheadline {
  font-size: 1rem;
  color: var(--secondary-text);
  margin-bottom: 1rem;
}

.hero p {
  margin-bottom: 1rem;
}

.punchline {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.trust-line {
  font-size: 0.875rem;
  color: var(--secondary-text);
}

/* General Section Styles */
.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  color: var(--text-color);
}

.section h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

.problem ul,
.faults ul,
.symptom-list,
.contact-list,
.customer-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.problem-list li::before,
.faults .card ul li::before,
.symptom-list li::before,
.contact-list li::before,
.customer-card ul li::before {
  content: '•';
  color: var(--primary-color);
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  margin-right: 0.5em;
}

.emphasis {
  font-style: italic;
  color: var(--secondary-text);
}

/* Cards */
.cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.5rem;
  flex: 1 1 30%;
  min-width: 260px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.card ul li {
  margin-bottom: 0.3rem;
  color: var(--secondary-text);
  font-size: 0.875rem;
}

/* Symptom and closing lists */
.symptom-list li {
  margin-bottom: 0.35rem;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.closing {
  margin-top: 1rem;
  font-weight: 500;
  color: var(--secondary-text);
}

/* Process section */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.step-content p {
  margin-top: 0;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Work image section */
.work-image .image-section {
  padding: 0;
}

.responsive-image {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Customer section */
.customer-cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.customer-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.5rem;
  flex: 1 1 45%;
  min-width: 260px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.customer-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.customer-card ul li {
  margin-bottom: 0.3rem;
  color: var(--secondary-text);
}

.strong-line {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--secondary-text);
  font-style: italic;
}

/* Machinery section */
.machinery-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.machinery-item {
  flex: 1 1 30%;
  min-width: 260px;
}

.machinery-item img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Technical section (crystallization & sensor) */
.technical-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.technical-item {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.5rem;
  flex: 1 1 45%;
  min-width: 260px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.technical-item img {
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.technical-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.technical-item p {
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Legal section */
.legal {
  background-color: var(--bg-alt);
}

.legal p {
  color: var(--secondary-text);
  font-size: 0.95rem;
}

/* FAQ section */
.faq details {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 1rem;
  color: var(--secondary-text);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-color);
  outline: none;
}

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

.faq p {
  margin-top: 0.5rem;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Contact section */
.contact {
  background-color: var(--bg-alt);
}

.contact h2 {
  margin-bottom: 1rem;
}

.contact-list li {
  margin-bottom: 0.4rem;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.contact-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background-color: #081b2e;
  padding: 2rem 0;
  color: var(--secondary-text);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand strong {
  font-size: 1.25rem;
  color: var(--text-color);
}

.footer-brand p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.footer-contact p,
.footer-note p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--secondary-text);
}

.footer-contact a {
  color: var(--primary-color);
}

.footer-contact a:hover,
.footer-contact a:focus {
  text-decoration: underline;
}

/* Responsive breakpoints */
@media (max-width: 992px) {
  .hero-content {
    max-width: 80%;
  }
  .card,
  .customer-card,
  .technical-item,
  .machinery-item {
    flex: 1 1 45%;
  }
}

@media (max-width: 768px) {
  .site-header {
    position: static;
  }
  .header-content {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1rem;
    text-align: center;
  }
  .tagline {
    display: none;
  }
  .main-nav ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 0.8rem;
    width: 100%;
  }
  .main-nav {
    width: 100%;
  }
  .main-nav a {
    display: block;
    text-align: center;
    font-size: 0.78rem;
  }
  .header-cta {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero {
    min-height: auto;
    padding-top: 0;
  }
  .hero-content {
    max-width: 100%;
    padding: 2rem 1rem;
  }
  .hero h1,
  .hero p,
  .trust-line {
    overflow-wrap: anywhere;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero .subheadline {
    font-size: 0.9rem;
  }
  .section {
    padding: 3rem 0;
  }
  .cards,
  .customer-cards,
  .technical-grid,
  .machinery-grid {
    flex-direction: column;
  }
  .card,
  .customer-card,
  .technical-item,
  .machinery-item {
    flex: 1 1 100%;
  }
  .steps {
    gap: 1rem;
  }
  .step {
    align-items: flex-start;
  }
  .step-number {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.9rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-content,
  .main-nav ul,
  .header-cta,
  .contact-actions {
    justify-content: center;
  }
  .main-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-content {
    padding: 1.25rem;
  }
  .btn,
  .phone-link {
    width: 100%;
    max-width: 320px;
  }
}
