/* ============================================
   Parketarstvo Aleš Bratovž - Styles
   Sage green accent palette
   ============================================ */

:root {
  --primary: #6d7f5e;
  --primary-light: #8a9e78;
  --primary-dark: #1a1a1a;
  --accent: #9ab88a;
  --accent-light: #e1ead9;
  --bg: #ffffff;
  --bg-alt: #f7f5f0;
  --text: #2a2a2a;
  --text-light: #555555;
  --text-muted: #888888;
  --white: #FFFFFF;
  --shadow: 0 4px 24px rgba(61, 81, 49, 0.08);
  --shadow-lg: 0 8px 40px rgba(61, 81, 49, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--primary-dark);
}

address {
  font-style: normal;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: 60px;
}

.section__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.section__line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 0 auto 20px;
  border-radius: 2px;
}

.section__desc {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

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

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ---- Navigation ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(135deg, rgba(90, 107, 75, 0.98) 0%, rgba(109, 127, 94, 0.97) 50%, rgba(128, 148, 112, 0.96) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, rgba(85, 102, 70, 0.99) 0%, rgba(104, 122, 89, 0.98) 50%, rgba(120, 140, 104, 0.97) 100%);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--white);
}

.nav__logo-icon {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
}

.nav__logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-top: -4px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav__link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav__link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.nav__link--cta {
  background: var(--white);
  color: var(--primary) !important;
  padding: 8px 24px;
  font-weight: 600;
}

.nav__link--cta:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--primary-dark) !important;
}

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

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero__pattern {
  display: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__title span {
  display: block;
  font-size: 4.5rem;
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #8a9e78;
  font-size: 1.3rem;
}

.hero__rating-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- About ---- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-dark);
  margin-bottom: 20px;
  line-height: 1.6;
}

.about__content p {
  margin-bottom: 16px;
  color: var(--text-light);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat {
  text-align: center;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.stat__number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.about__image {
  display: flex;
  justify-content: center;
}

.about__photo {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

/* ---- Services ---- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid rgba(109, 127, 94, 0.06);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--primary);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.service-card__desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---- Gallery ---- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  aspect-ratio: 4/3;
  background: var(--bg-alt);
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(45, 27, 14, 0.85));
  color: var(--white);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-text {
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery__cta {
  text-align: center;
}

.gallery__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.gallery__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.gallery__empty p {
  margin-bottom: 16px;
}

/* ---- Reviews ---- */
.reviews__summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.reviews__rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews__rating-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.reviews__rating .stars {
  font-size: 1.5rem;
}

.reviews__count {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.review-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid rgba(109, 127, 94, 0.06);
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.review-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.review-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.review-card__name {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

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

.review-card__stars {
  margin-bottom: 12px;
}

.review-card__stars .star {
  font-size: 1rem;
}

.review-card__text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.reviews__cta {
  text-align: center;
}

/* ---- Contact ---- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact__card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.contact__icon svg {
  width: 22px;
  height: 22px;
}

.contact__item h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact__item a,
.contact__item p,
.contact__item address {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.contact__item a:hover {
  color: var(--primary);
}

.contact__hours h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.contact__hours table {
  width: 100%;
  border-collapse: collapse;
}

.contact__hours td {
  padding: 8px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--accent-light);
}

.contact__hours td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--primary);
}

.contact__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 400px;
}

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__logo .nav__logo-icon {
  color: var(--accent);
}

.footer__brand p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.footer__links h4,
.footer__contact h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer__links ul {
  list-style: none;
}

.footer__links li {
  margin-bottom: 8px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer__contact p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer__contact a {
  color: rgba(255, 255, 255, 0.8);
}

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

.footer__social {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.footer__social:hover {
  background: rgba(255, 255, 255, 0.2);
}

.footer__social svg {
  fill: var(--white);
}

.footer__bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer__legal {
  margin-top: 4px;
  font-size: 0.8rem;
}

/* ---- Spinner ---- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: 2rem;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
    z-index: 110;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
  }

  .nav__menu.active {
    right: 0;
  }

  .nav__link {
    width: 100%;
    font-size: 1.05rem;
    padding: 12px 16px;
  }

  .nav__link--cta {
    margin-top: 16px;
    text-align: center;
    display: block;
  }

  /* Mobile toggle animation */
  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero__title {
    font-size: 2.2rem;
  }

  .hero__title span {
    font-size: 2.8rem;
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .hero__rating {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    text-align: center;
    justify-content: center;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__image {
    order: -1;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat {
    padding: 16px 8px;
  }

  .stat__number {
    font-size: 1.6rem;
  }

  /* Services */
  .services__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Gallery */
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Reviews */
  .reviews__grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__map {
    min-height: 300px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .hero__title span {
    font-size: 2.2rem;
  }

  .section__title {
    font-size: 1.7rem;
  }

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

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