/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #e8620a;
  --color-primary-dark: #c44f00;
  --color-dark: #1a1a2e;
  --color-dark-light: #16213e;
  --color-gray: #64748b;
  --color-gray-light: #f1f5f9;
  --color-white: #ffffff;
  --font: 'Inter', sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--color-dark);
  line-height: 1.7;
  background: var(--color-white);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 98, 10, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

.btn--full {
  width: 100%;
}

/* ===== Header / Nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(26, 26, 46, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-white);
  flex-shrink: 0;
}

.nav__logo-icon {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.nav__logo-text span {
  color: var(--color-primary);
}

.nav__contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__contact-item {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.nav__contact-item:hover {
  color: var(--color-primary);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
}

.nav__link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav__link--cta {
  background: var(--color-primary);
  color: var(--color-white) !important;
  margin-left: 8px;
}

.nav__link--cta:hover {
  background: var(--color-primary-dark);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-shrink: 0;
}

.nav__mobile-contact {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav__mobile-contact-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 6px;
  transition: var(--transition);
}

.nav__mobile-contact-link:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.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 {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.85) 0%,
    rgba(22, 33, 62, 0.7) 50%,
    rgba(26, 26, 46, 0.8) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero__tag {
  display: inline-block;
  background: rgba(232, 98, 10, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(232, 98, 10, 0.3);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero__scroll span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: scrollBounce 1.8s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* ===== Stats ===== */
.stats {
  background: var(--color-dark);
  padding: 48px 0;
}

.stats__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 32px;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.stats__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stats__number::after {
  content: '+';
  font-size: 0.7em;
}

.stats__item:last-child .stats__number::after {
  content: '%';
}

.stats__label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== Section Header ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header__tag {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-header__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 16px;
}

.section-header__desc {
  color: var(--color-gray);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-header--light .section-header__title {
  color: var(--color-white);
}

.section-header--light .section-header__desc {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Services ===== */
.services {
  padding: 100px 0;
  background: var(--color-gray-light);
}

.services__list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.service-card {
  display: flex;
  align-items: stretch;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card.visible:hover {
  transform: translateY(-4px);
}

.service-card--reverse {
  flex-direction: row-reverse;
}

.service-card__image {
  flex: 0 0 45%;
  min-height: 320px;
  overflow: hidden;
}

.service-card__image--natural {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px 0;
  min-height: 337px;
}

#grubi-radovi.service-card,
#fasaderski-radovi.service-card,
#krovopokrivacki-radovi.service-card,
#izrada-bazena.service-card,
#inzenjering.service-card,
#obnova.service-card,
#knauf.service-card,
#estrih.service-card {
  min-height: 390px;
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
  backface-visibility: hidden;
}

.service-card__image--natural img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.service-card:hover .service-card__image img {
  transform: scale(1.05);
}

.service-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.service-card__number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.service-card__title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 16px;
  line-height: 1.3;
  text-transform: uppercase;
}

.service-card__text {
  color: var(--color-gray);
  font-size: 1rem;
  line-height: 1.8;
}

/* ===== About ===== */
.about {
  padding: 100px 0;
  background: var(--color-white);
}

.about__inner {
  display: flex;
  align-items: center;
  gap: 64px;
}

.about__content {
  flex: 1;
}

.about__text {
  color: var(--color-gray);
  margin: 20px 0 32px;
  font-size: 1.05rem;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--color-dark);
}

.about__features li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(232, 98, 10, 0.12);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.about__image {
  flex: 0 0 45%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ===== Contact ===== */
.contact {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-light) 100%);
}

.contact__form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__row {
  display: flex;
  gap: 20px;
}

.contact__field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__field label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
}

.contact__field input,
.contact__field select,
.contact__field textarea {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  font-family: var(--font);
  font-size: 16px;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact__field input:focus,
.contact__field select:focus,
.contact__field textarea:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.1);
}

.contact__field select option {
  background: var(--color-dark);
  color: var(--color-white);
}

.contact__field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact__botcheck {
  display: none;
}

.contact__success {
  text-align: center;
  color: #4ade80;
  font-weight: 500;
  padding: 12px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: 8px;
}

.contact__error {
  text-align: center;
  color: #f87171;
  font-weight: 500;
  padding: 12px;
  background: rgba(248, 113, 113, 0.1);
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ===== Footer ===== */
.footer {
  background: #0f0f1a;
  padding-top: 64px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-bottom: 48px;
}

.footer__brand {
  flex: 1;
  min-width: 220px;
}

.footer__desc {
  color: rgba(255, 255, 255, 0.5);
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer__links h4,
.footer__contact h4,
.footer__company h4 {
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__contact p,
.footer__company p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer__company {
  min-width: 220px;
  max-width: 280px;
}

.footer__company strong {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  text-align: center;
}

.footer__bottom p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .container {
    padding: 0 20px;
  }

  .service-card__body {
    padding: 40px;
  }
}

@media (max-width: 1024px) {
  .nav__contact {
    display: none;
  }

  .nav__brand {
    gap: 16px;
  }

  .services,
  .about,
  .contact {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }
}

@media (max-width: 900px) {
  .service-card,
  .service-card--reverse {
    flex-direction: column;
  }

  .service-card__image {
    flex: none;
    width: 100%;
    min-height: auto;
  }

  .service-card__image--natural {
    min-height: auto;
    padding: 24px 16px;
  }

  #grubi-radovi.service-card,
  #fasaderski-radovi.service-card,
  #krovopokrivacki-radovi.service-card,
  #izrada-bazena.service-card,
  #inzenjering.service-card,
  #obnova.service-card,
  #knauf.service-card,
  #estrih.service-card {
    min-height: unset;
  }

  .service-card__body {
    padding: 32px 28px;
  }

  .about__inner {
    flex-direction: column;
    gap: 40px;
  }

  .about__image {
    flex: none;
    width: 100%;
  }

  .about__image img {
    height: auto;
    min-height: 260px;
    max-height: 420px;
  }

  .footer__inner {
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .header {
    background: rgba(26, 26, 46, 0.97);
    backdrop-filter: blur(12px);
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav {
    height: 64px;
  }

  .nav__logo {
    font-size: 1.1rem;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__mobile-contact {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0;
    width: 100%;
    max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    background: rgba(26, 26, 46, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    z-index: 999;
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .nav__link--cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .hero__content {
    padding: calc(100px + env(safe-area-inset-top, 0px)) 20px 72px;
  }

  .hero__subtitle {
    margin-bottom: 32px;
  }

  .hero__scroll {
    display: none;
  }

  .stats {
    padding: 40px 0;
  }

  .stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }

  .stats__item {
    min-width: 0;
  }

  .services {
    padding: 64px 0;
  }

  .services__list {
    gap: 32px;
  }

  .service-card__title {
    font-size: 1.15rem;
  }

  .service-card__text {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .about {
    padding: 64px 0;
  }

  .contact {
    padding: 64px 0;
  }

  .contact__form {
    max-width: 100%;
  }

  .contact__row {
    flex-direction: column;
  }

  .footer {
    padding-top: 48px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 28px;
    padding-bottom: 32px;
  }

  .footer__brand,
  .footer__company {
    min-width: 100%;
    max-width: 100%;
  }

  .footer__desc {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .nav__brand {
    gap: 0;
    max-width: calc(100% - 48px);
  }

  .nav__logo {
    font-size: 1rem;
  }

  .nav__logo-icon {
    font-size: 1.25rem;
  }

  .hero__content {
    padding: calc(88px + env(safe-area-inset-top, 0px)) 16px 64px;
  }

  .hero__tag {
    font-size: 0.75rem;
    padding: 5px 14px;
    margin-bottom: 16px;
  }

  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
    margin-bottom: 16px;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }

  .btn {
    width: 100%;
    max-width: none;
    padding: 14px 24px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-header__title {
    font-size: clamp(1.5rem, 6vw, 1.8rem);
  }

  .section-header__desc {
    font-size: 0.95rem;
  }

  .service-card__body {
    padding: 24px 20px;
  }

  .service-card__image--natural {
    padding: 20px 12px;
  }

  .service-card__image--natural img {
    max-width: min(236px, 100%);
  }

  .about__text {
    font-size: 0.95rem;
  }

  .about__features li {
    font-size: 0.95rem;
  }

  .footer__bottom {
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .footer__company p,
  .footer__contact p {
    word-break: break-word;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .nav__logo-text {
    font-size: 0.9rem;
  }

  .stats__grid {
    grid-template-columns: 1fr;
  }

  .stats__item {
    padding: 8px 0;
  }
}

@media (hover: none) {
  .service-card:hover,
  .service-card.visible:hover {
    transform: none;
  }

  .service-card:hover .service-card__image img {
    transform: none;
  }

  .btn--primary:hover {
    transform: none;
  }
}
