/* ==============================================
   AutoSerwis Kowalski — Main Stylesheet
   Design: Dark theme, orange accent, mobile-first
   ============================================== */

/* --- RESET & BASE --- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* offset for sticky nav */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* --- CSS VARIABLES --- */

:root {
  --bg-dark: #1A1A1A;
  --bg-card: #242424;
  --bg-card-hover: #2C2C2C;
  --accent: #E8711A;
  --accent-hover: #FF8C33;
  --text-primary: #F5F5F5;
  --text-muted: #A0A0A0;
  --border: #333333;
  --nav-height: 70px;
  --container-width: 1200px;
  --transition: 0.3s ease;
}

/* --- TYPOGRAPHY --- */
/* (will be expanded per section as needed) */

/* --- UTILITY CLASSES --- */

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

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

/* ==============================================
   SECTION 1: NAVIGATION
   ============================================== */

/* Sticky header bar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background-color var(--transition);
}

/* Add shadow when user scrolls */
#navbar.scrolled {
  background-color: rgba(20, 20, 20, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-logo-icon {
  display: inline-block;
  margin-right: 0.35rem;
  color: var(--accent);
  font-size: 1.3rem;
}

/* Nav links list */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--transition), background-color var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Active link — accent underline */
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* CTA-style contact link */
.nav-link--cta {
  color: var(--text-primary);
  background-color: var(--accent);
  border-radius: 6px;
  font-weight: 600;
  margin-left: 0.5rem;
}

.nav-link--cta:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

.nav-link--cta.active {
  color: #fff;
}

.nav-link--cta.active::after {
  display: none;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger open state — X shape */
.nav-hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- MOBILE NAV (hamburger + slide-in menu) --- */

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

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    pointer-events: none;
  }

  .nav-menu.open {
    transform: translateX(0);
    pointer-events: all;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 0.75rem 1.5rem;
  }

  .nav-link--cta {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* ==============================================
   SECTION 2: HERO
   ============================================== */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Placeholder background — dark with subtle texture pattern */
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")
    repeat,
    linear-gradient(160deg, #1A1A1A 0%, #0D0D0D 100%);
}

/* Dark overlay for when a real background image is used */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.85) 0%,
    rgba(13, 13, 13, 0.95) 100%
  );
  z-index: 1;
}

/* Content sits above the overlay */
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3rem;
}

/* Tagline above headline */
.hero-tagline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(232, 113, 26, 0.3);
  border-radius: 4px;
  background-color: rgba(232, 113, 26, 0.08);
}

/* Main headline */
.hero-headline {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

/* Subheadline */
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* CTA buttons row */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Shared button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-icon {
  flex-shrink: 0;
}

/* Primary button — filled accent */
.btn--primary {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 113, 26, 0.3);
}

/* Outline button */
.btn--outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Trust badges row */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-badge {
  display: flex;
  flex-direction: column;
}

.hero-badge-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero-badge-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero responsive tweaks */
@media (max-width: 480px) {
  .hero-content {
    padding-top: calc(var(--nav-height) + 2rem);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badges {
    gap: 1.5rem;
  }
}

/* ==============================================
   SECTION 3: O NAS (ABOUT)
   ============================================== */

/* Shared section spacing */
.section {
  padding: 5rem 0;
}

/* Reusable section label (small accent text above heading) */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Reusable section heading */
.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

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

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Image placeholder */
.about-image {
  position: relative;
}

.about-image-placeholder {
  aspect-ratio: 4 / 3;
  background-color: var(--bg-card);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.about-image-placeholder svg {
  color: var(--border);
}

/* Decorative accent corner behind image */
.about-image-accent {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 40%;
  height: 40%;
  border: 3px solid var(--accent);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.4;
}

/* Text side */
.about-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-description:last-of-type {
  margin-bottom: 2rem;
}

/* Stats grid */
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 480px) {
  .about-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.about-stat {
  display: flex;
  flex-direction: column;
}

.about-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.about-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==============================================
   SECTION 4: USŁUGI (SERVICES)
   ============================================== */

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

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 113, 26, 0.1);
  border-radius: 10px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.service-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==============================================
   SECTION 5: CENNIK (PRICING)
   ============================================== */

.pricing-table-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.pricing-table thead {
  background: rgba(232, 113, 26, 0.1);
}

.pricing-table th {
  text-align: left;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.pricing-table th:last-child {
  text-align: right;
}

.pricing-table td {
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.pricing-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.pricing-table tbody tr {
  transition: background 0.2s;
}

.pricing-table tbody tr:hover {
  background: rgba(232, 113, 26, 0.05);
}

.pricing-note {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==============================================
   SECTION 6: OPINIE (REVIEWS)
   ============================================== */

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

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-stars {
  display: flex;
  gap: 0.15rem;
}

.review-stars .star {
  color: #F5A623;
  font-size: 1.125rem;
}

.review-stars .star.half {
  color: var(--text-muted);
}

.review-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
  flex: 1;
}

.review-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.review-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================
   SECTION 7: GODZINY OTWARCIA (OPENING HOURS)
   ============================================== */

.hours-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .hours-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.hours-list {
  display: flex;
  flex-direction: column;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.hours-row:first-child {
  padding-top: 0;
}

.hours-day {
  font-size: 0.9375rem;
  color: var(--text);
}

.hours-time {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.hours-row--sat .hours-time {
  color: var(--accent);
}

.hours-row--closed .hours-time {
  color: var(--text-muted);
  font-weight: 400;
}

/* Google Maps embed */
.hours-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hours-map iframe {
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: block;
}

/* ==============================================
   SECTION 8: KONTAKT (CONTACT)
   ============================================== */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-checkbox label a {
  text-decoration: underline;
}

.contact-submit {
  align-self: flex-start;
}

/* Contact details */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: var(--accent);
}

.contact-item div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-item-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.contact-item-value {
  font-size: 0.9375rem;
  color: var(--text);
}

.contact-link {
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--accent);
}

/* ==============================================
   SECTION 9: FOOTER
   ============================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================
   ANIMATIONS & SCROLL EFFECTS
   ============================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children: cards, rows */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-children.visible > *:nth-child(6) { transition-delay: 0.5s; }

/* ==============================================
   MEDIA QUERIES
   ============================================== */
