/* =========================================
   AUTOPLUS POLEPY – STYLESHEET
   Design: Industrial/Utilitarian
   Barva: Červená #D32F2F, Černá #111, Bílá
   Fonts: Barlow Condensed (headings) + Barlow (body)
   ========================================= */

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

:root {
  --red: #D32F2F;
  --red-dark: #B71C1C;
  --red-light: #FFEBEE;
  --black: #111111;
  --dark: #1a1a1a;
  --gray-800: #2c2c2c;
  --gray-600: #555555;
  --gray-400: #888888;
  --gray-200: #e8e8e8;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --container: 1120px;
  --radius: 4px;
  --nav-height: 88px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- UTILITIES ---- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- BUTTONS ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn-nav {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  padding: 10px 20px;
  font-size: 14px;
}
.btn-nav:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.btn-white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-white:hover {
  background: var(--gray-200);
  border-color: var(--gray-200);
}

/* ---- SECTION LABELS ---- */

.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 8px;
}
.section-label.light {
  color: rgba(255,255,255,0.6);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 48px;
}
.section-title.light {
  color: var(--white);
}

.section-header {
  margin-bottom: 48px;
}

section {
  scroll-margin-top: var(--nav-height); 
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.logo-main {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--black);
}
.logo-sub {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--red);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a:not(.btn) {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
}
.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.2s ease;
}
.main-nav a:not(.btn):hover::after {
  width: 100%;
}
.main-nav a:not(.btn):focus {
  outline: none;
}
.main-nav a:not(.btn):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: transform 0.2s, opacity 0.2s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100% - var(--nav-height));
  margin-top: var(--nav-height);
  gap: 4px;
}

.overlay-link {
  display: block;
  width: 50%;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 10px 32px;
  transition: color 0.12s;
}
.overlay-link:hover,
.overlay-link:active {
  color: var(--white);
}

.overlay-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--white) !important;
  background: var(--red);
  border: 2px solid var(--red);
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: clamp(26px, 7vw, 38px);
  transition: background 0.12s, border-color 0.12s;
}
.overlay-phone:hover,
.overlay-phone:active {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white) !important;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  background: var(--white);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

/* Big number watermark */
.hero::before {
  content: "A+";
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-60%);
  font-family: var(--font-head);
  font-size: clamp(220px, 22vw, 320px);
  font-weight: 800;
  color: var(--gray-100);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.03em;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-bottom: 80px;
}

@media (max-width: 600px) {
  .hero {
    padding-top: 0;
    min-height: calc(100svh - var(--nav-height));
    display: flex;
    flex-direction: column;
  }
  .hero .container.hero-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .hero-line {
    margin-top: auto;
  }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 20px;
}

.hero-accent {
  color: var(--red);
}

.hero-sub {
  font-size: 18px;
  font-weight: 400;
  color: var(--gray-600);
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-line {
  width: 100%;
  height: 4px;
  background: var(--red);
}

/* ============================================
   SERVICES
   ============================================ */

.services {
  padding: 96px 0;
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--gray-200);
}

.service-card {
  padding: 40px 32px;
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  transition: background 0.2s;
}
.service-card:hover {
  background: var(--gray-100);
}

/* Last column: no right border */
.service-card:nth-child(3n) {
  border-right: none;
}
/* Last row: no bottom border – handled via JS or just let it show slightly */

.service-num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.service-icon {
  width: 40px;
  height: 40px;
  color: var(--black);
  margin-bottom: 16px;
}
.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.service-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* 5 items in 3-col grid: last item spans, or we just leave it */
.service-card:nth-child(4) {
  border-bottom: none;
}
.service-card:nth-child(5) {
  border-bottom: none;
  border-right: none;
}

/* ============================================
   WHY US
   ============================================ */

.why-us {
  background: var(--black);
  padding: 96px 0;
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.why-left {
  position: sticky;
  top: 100px;
}

.why-left .section-title {
  margin-bottom: 32px;
}

.why-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.why-item {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.why-item:first-child {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.why-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--red);
  color: var(--white);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.why-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.why-item p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
  padding: 96px 0;
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: stretch;
}

.contact-phone {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  color: var(--red);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  line-height: 1;
  transition: color 0.15s;
}
.contact-phone:hover {
  color: var(--red-dark);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--gray-600);
  font-size: 15px;
}
.contact-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--red);
}

.hours-row {
  display: flex;
  gap: 16px;
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.hours-row span {
  width: 40px;
  color: var(--gray-400);
}
.hours-row strong {
  color: var(--black);
  font-weight: 600;
}

.contact-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  height: 400px;
  border: 1px solid var(--gray-200);
}
.contact-map iframe {
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--black);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.06em;
}
.footer-logo span {
  color: var(--red);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }
  .burger {
    display: flex;
  }
  .mobile-overlay {
    display: flex;
  }

  .hero::before {
    font-size: 140px;
    right: -20px;
    top: 40%;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .service-card:nth-child(2n) {
    border-right: none;
  }
  .service-card:nth-child(3) {
    border-right: 1px solid var(--gray-200);
  }
  .service-card:nth-child(5) {
    border-right: none;
  }
  .service-card:nth-child(3),
  .service-card:nth-child(4) {
    border-bottom: 1px solid var(--gray-200);
  }
  .service-card:nth-child(5) {
    border-bottom: none;
  }

  .why-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .why-left {
    position: static;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-map {
    height: 280px;
  }
}

@media (max-width: 600px) {
  .hero::before {
    font-size: 100px;
    opacity: 0.6;
  }

  .services {
    padding: 64px 0;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-card {
    border-right: none !important;
    border-bottom: 1px solid var(--gray-200) !important;
  }
  .service-card:last-child {
    border-bottom: none !important;
  }

  .why-us,
  .contact {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }
}

/* ============================================
   PHONE MODAL
   ============================================ */

.phone-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.phone-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.phone-modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  margin: 24px;
  position: relative;
  border-top: 4px solid var(--red);
}

.phone-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s;
}
.phone-modal-close:hover {
  color: var(--black);
}

.phone-modal-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
}

.phone-modal-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-modal-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.phone-modal-contact:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.phone-modal-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.01em;
}

.phone-modal-number {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.02em;
}

/* Footer legal */
.footer-legal {
  text-align: right;
}
.footer-ico {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  margin-top: 4px;
}
