/* ==========================================================================
   Topp och Knopp - Huvudstilmall
   Arborist & Trädgårdsmästare i Skåne

   FÄRGER ATT ÄNDRA: Se :root nedan
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS VARIABLER - Ändra färger här för hela sidan
   -------------------------------------------------------------------------- */
:root {
  /* Primärfärger */
  --color-primary: #a4d633;          /* Lime-grön bakgrund */
  --color-primary-dark: #8bc22a;     /* Mörkare lime för hover */
  --color-text: #3d4a2c;             /* Mörk oliv - rubriker & text */
  --color-text-light: #4a5a35;       /* Ljusare textfärg */
  --color-white: #ffffff;
  --color-button: #2d3a1f;           /* Mörkgrön knappfärg */
  --color-button-hover: #3d4a2c;
  --color-about-bg: #f5e6d3;         /* Varm persika för Om oss */

  /* Typografi */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: 80px;
  --container-width: 1200px;

  /* Border radius */
  --radius-small: 8px;
  --radius-medium: 16px;
  --radius-large: 24px;
}

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-primary);
}

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

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

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   LAYOUT & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: var(--section-padding) 0;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: var(--color-button-hover);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   NAVIGATION (fixed header)
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(164, 214, 51, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-logo img {
  height: 50px;
  width: auto;
  border-radius: var(--radius-small);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.7;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

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

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
}

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

.hero-logo {
  max-width: 280px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-medium);
}

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

.hero-tagline {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.hero-images img {
  border-radius: var(--radius-medium);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   SERVICES SECTION
   -------------------------------------------------------------------------- */
.services {
  background-color: var(--color-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  padding: 1.5rem;
}

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

.service-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   SERVICE AREA SECTION
   -------------------------------------------------------------------------- */
.service-area {
  background-color: var(--color-primary);
  text-align: center;
}

.service-area-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.location-pill {
  background-color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-small);
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

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

.benefit-icon {
  font-size: 1.5rem;
  color: var(--color-text);
}

.benefit-item h4 {
  margin-bottom: 0.5rem;
}

.benefit-item p {
  font-size: 0.9rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   GALLERY SECTION
   -------------------------------------------------------------------------- */
.gallery {
  background-color: var(--color-primary);
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-medium);
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius-medium);
  object-fit: cover;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* --------------------------------------------------------------------------
   ABOUT SECTION
   -------------------------------------------------------------------------- */
.about {
  background-color: var(--color-about-bg);
}

.about-content {
  max-width: 900px;
}

.about h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.about-highlights {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-text);
}

.about-highlights li {
  margin-bottom: 0.5rem;
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.about-highlights li::before {
  content: '\2714';
  position: absolute;
  left: 0;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   CONTACT SECTION
   -------------------------------------------------------------------------- */
.contact {
  background-color: var(--color-primary);
  text-align: center;
}

.contact-info {
  margin: 2rem 0;
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-info a {
  font-weight: 600;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-button);
  color: var(--color-white);
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 992px) {
  :root {
    --section-padding: 60px;
  }

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

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 50px;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    text-align: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

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

  .nav-toggle {
    display: flex;
  }

  /* Hero */
  .hero-images {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

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

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Benefits */
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --section-padding: 40px;
  }

  .hero-logo {
    max-width: 200px;
  }

  .gallery-grid {
    gap: 0.5rem;
  }

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

/* --------------------------------------------------------------------------
   UTILITY CLASSES
   -------------------------------------------------------------------------- */
.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
