/* style.css – responsīvs dizains pēdu aprūpes mājaslapai */

/* =========================
   Vispārīgie stili
========================= */
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #fff;
  color: #222;
  scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
  margin-top: 0;
}

h1.center,
h2.center {
  text-align: center;
  margin-bottom: 1rem;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.section {
  padding: 3rem 0;
}

/* =========================
   Navigācija
========================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  background: rgba(0, 0, 0, 0.2); /* melns, 20% caurspīdība */
  color: #fff;

  z-index: 999;
  height: 120px;
  transition: background 0.4s ease, height 0.4s ease, backdrop-filter 0.4s ease;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding 0.4s ease;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.3s;
}

/* Kad lapa noritināta zem augsas — tumšāka josla, logo ar laidenu izzušanu */
.main-nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  height: 70px;
  backdrop-filter: blur(6px);
}

.main-nav.scrolled .container {
  padding-top: 0;
  padding-bottom: 0;
  height: 100%;
}

.main-nav .logo-item {
  overflow: hidden;
  transition: max-width 0.4s ease, opacity 0.4s ease, transform 0.4s ease, margin 0.4s ease;
  max-width: 200px;
  opacity: 1;
}

.main-nav.scrolled .logo-item {
  max-width: 0;
  opacity: 0;
  transform: scale(0.6);
  margin: 0;
  pointer-events: none;
}

nav ul li a:hover {
  opacity: 0.8;
}

/* Sadaļas nobīde dēļ fiksēta menu */
section {
  scroll-margin-top: 80px;
}

/* =========================
   Hero sadaļa
========================= */
.container h1{
    padding-top:150px;
}
.hero {
  position: relative;
  background-size: cover;
  background-position: center;

  color: #fff;
  text-align: center;

  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero .container {
  z-index: 2;
}

.logo {
  height: 80px;
  margin: 0;
  display: inline-block;
}

.btn {
  background: #f31f2c;
  color: #fff;

  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;

  margin: 0.5rem;
  display: inline-block;
}

/* =========================
   Par mums – 3 kolonnu izkārtojums
========================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 10px;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #222;
}

/* =========================
   Saraksti (pakalpojumi, aktuāli)
========================= */
ul {
  list-style: disc inside;
  margin-bottom: 1.5rem;
}

/* =========================
   Parallax sadaļa
========================= */
.parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;

  color: #fff;
  text-align: center;
  padding: 6rem 0 0 0;
}

/* Piezīme: šis overlay darbosies korekti, ja .parallax ir position: relative; */
.parallax .overlay {
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* =========================
   Cenas tabula
========================= */
.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  border: 1px solid #ccc;
  padding: 0.75rem;
  text-align: left;
}

.price-table th {
  background: #f31f2c;
  color: #fff;
}

.price-table tr:nth-child(even) td {
  background: #f8f8f8;
}

/* =========================
   Kontakti sadaļa
========================= */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;

  align-items: center;
  justify-content: space-between;
}

.split > div {
  flex: 1 1 45%;
}

/* =========================
   Forma
========================= */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input,
form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;

  font-size: 1rem;
}

form button {
  background: #f31f2c;
  color: #fff;

  border: none;
  padding: 1rem;
  border-radius: 5px;

  cursor: pointer;
  font-size: 1rem;
}

form button:hover {
  background: #c81322;
}

/* Vispārīgais body – nepieļaujam horizontālu scroll */
body {
  overflow-x: hidden;
}

/* Ekrāni ≤ 900 px — 2 rindu nav: logo augšā, menu zem. Noritinot logo pilnībā pazūd. */
@media (max-width: 900px) {
  nav {
    height: auto;
    min-height: 55px;
  }
  .main-nav.scrolled {
    height: auto;
    min-height: 55px;
  }
  .main-nav .container {
    background: rgba(0, 0, 0, 0.75);
    margin: 0;
    padding: 0.4rem 1rem;
    width: 100%;
    max-width: none;
    height: auto;
  }
  .main-nav.scrolled .container {
    padding: 0.35rem 1rem;
    height: auto;
  }
  nav ul {
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: space-between;
    row-gap: 0.3rem;
    padding-left: 0.5rem;
    padding-right: 3rem;
  }
  .main-nav .logo-item {
    width: 100%;
    flex-basis: 100%;
    max-width: none;
    max-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.15rem 0 0.35rem;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.35s ease, padding 0.4s ease, transform 0.4s ease, margin 0.4s ease;
  }
  .main-nav.scrolled .logo-item {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
    transform: scale(0.7);
  }
  .logo {
    height: 55px;
    width: auto;
    max-width: 230px;
  }
  nav ul li a {
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .hero {
    padding-top: 130px;
  }
}

/* =========================
   Papildu tuvinājumi šauriem telefoniem
========================= */
@media (max-width: 500px) {
  .main-nav .container {
    padding: 0.35rem 0.75rem;
  }
  .logo {
    height: 48px;
    max-width: 190px;
  }
  nav ul li a {
    font-size: 0.9rem;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .split {
    flex-direction: column;
  }
  .hero {
    padding: 105px 1rem 2rem;
  }
  .hero h1 {
    margin-top: 0;
  }
  .btn {
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 380px) {
  .main-nav .container {
    padding: 0.3rem 0.5rem;
  }
  .logo {
    height: 42px;
    max-width: 160px;
  }
  nav ul li a {
    font-size: 0.85rem;
  }
  nav ul {
    gap: 0.3rem;
  }
}
