:root {
  --red: #ff0000;
  --red-soft: #f7465b;
  --dark: #2a2933;
  --product-dark: #20232a;
  --gray: #565656;
  --gray-muted: #6d737f;
  --light: #f8f8f8;
  --white: #ffffff;
  --max-width: 1170px;
  --bg-dark-image: url("../images/sections/bg-dark.jpg");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans Pro", Arial, sans-serif;
  color: var(--gray);
  line-height: 1.6;
  background: var(--white);
}

h1,
h2,
h3 {
  font-family: "Roboto Slab", Georgia, serif;
  color: var(--dark);
  line-height: 1.25;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 2rem;
}

.text-justify {
  text-align: justify;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: var(--red);
  border-bottom: 0;
  box-shadow: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
  padding: 0.35rem 0;
}

.brand img {
  height: 56px;
  width: auto;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--white);
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--white);
  padding: 0.35rem 0.85rem;
  border-radius: 0;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--white);
  opacity: 0.85;
  text-decoration: none;
}

/* Hero slider */
.hero {
  margin-top: 72px;
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  display: none;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin: 0 auto;
}

.hero-slide.active {
  display: block;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: transparent;
  cursor: pointer;
}

.hero-dot.active {
  background: var(--red);
  border-color: var(--red);
}

/* Intro */
.intro {
  background: var(--white);
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
}

.intro h1 {
  text-align: center;
  font-size: 2rem;
  margin-top: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-image {
  border: 1px solid #ddd;
  padding: 0.5rem;
}

/* Reparto tabs */
.reparto {
  background: var(--dark) var(--bg-dark-image);
  background-size: cover;
  color: var(--white);
  padding: 2.2rem 0 4rem;
}

.reparto .section-title {
  color: var(--white);
}

.tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-btn {
  border: 0;
  background: rgba(42, 41, 47, 0.34);
  box-shadow: inset 0 0 0 1px rgba(18, 17, 27, 0.28), 0 0 0 1px rgba(43, 45, 48, 0.15);
  color: var(--white);
  padding: 0.85rem 0.5rem;
  font: inherit;
  font-weight: 300;
  font-size: 1.05rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--red);
}

.tab-panel {
  display: none;
  background: var(--white);
  color: var(--gray);
  padding: 2rem;
  border-radius: 2px;
}

.tab-panel.active {
  display: block;
}

.tab-panel h3 {
  margin-top: 0;
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.install-grid img {
  margin: 0 auto 1rem;
  max-width: 280px;
}

.pdf-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.pdf-list li {
  margin-bottom: 0.75rem;
}

.pdf-list a {
  font-weight: 600;
}

/* Services */
.services-image {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid #ddd;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: var(--product-dark);
  color: var(--white);
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  min-height: 100%;
  border-radius: 5px;
}

.product-card h2 {
  color: var(--white);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.product-card img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  background: var(--white);
  border-radius: 4px;
  padding: 0.5rem;
}

.product-photo-square {
  object-fit: cover;
  padding: 0;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white) !important;
  padding: 0.65rem 1.25rem;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--red-soft);
  text-decoration: none;
}

/* Contact */
.contact {
  background: var(--dark) var(--bg-dark-image);
  background-size: cover;
  color: var(--white);
}

.contact .section-title,
.contact h3 {
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-info p {
  margin: 0.35rem 0;
}

.contact-cta {
  background: rgba(255, 255, 255, 0.06);
  padding: 2rem;
  border-radius: 4px;
}

.contact-cta p {
  margin-top: 0;
}

/* Footer */
.site-footer {
  background: var(--dark) var(--bg-dark-image);
  background-size: cover;
  color: #bbb;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.95rem;
  border-top: 1px solid #121214;
}

.site-footer a {
  color: #ddd;
}

/* Legal pages */
.legal-page {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.legal-page h1 {
  margin-top: 0;
}

.legal-page ol {
  padding-left: 1.25rem;
}

.legal-page li {
  margin-bottom: 1.25rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: #222;
  color: #eee;
  padding: 1rem;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-banner .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner button {
  background: var(--red);
  color: var(--white);
  border: 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font: inherit;
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid,
  .install-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--red);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

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

  .tabs-nav {
    grid-template-columns: 1fr 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.65rem;
  }
}
