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

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dark: #334155;
  --primary: #f97316;
  --primary-light: #fb923c;
  --primary-dark: #ea580c;
  --border: #e2e8f0;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

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

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

/* Layout */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  transition: color 0.3s;
}

.logo-text span {
  color: var(--primary);
}

.header.scrolled .logo-text {
  color: var(--text);
}

/* Desktop Nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s;
}

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

.header.scrolled .nav-link {
  color: var(--text-muted);
}

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

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

/* Language Picker */
.lang-picker {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.lang-link {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: color 0.3s, background 0.3s;
  color: rgba(255,255,255,0.7);
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
}

.lang-link:hover {
  color: #fff;
}

.lang-link.active {
  background: var(--primary);
  color: #fff;
}

.header.scrolled .lang-link {
  color: var(--text-muted);
}

.header.scrolled .lang-link:hover {
  color: var(--text);
}

.header.scrolled .lang-link.active {
  color: #fff;
}

/* Right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.header.scrolled .menu-btn {
  color: var(--text);
}

@media (max-width: 767px) {
  .menu-btn { display: block; }
}

.menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.mobile-menu.open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

.mobile-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav .nav-link {
  font-size: 1rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
}

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

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-alt);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.4;
}

.hero-bg-top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to bottom, rgba(15,23,42,0.5), transparent);
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.5), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-top: 5rem;
}

.hero-title {
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
  animation: fade-up 0.8s ease-out 0.2s both;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-dark);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  animation: fade-up 0.8s ease-out 0.5s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 0.5rem;
  transition: background 0.3s;
  box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.25);
  animation: fade-up 0.8s ease-out 0.8s both;
}

.hero-cta:hover {
  background: var(--primary-dark);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  transition: color 0.3s;
  animation: fade-in 1s ease-out 1.2s both;
}

.scroll-indicator:hover {
  color: var(--text);
}

.scroll-indicator span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-indicator svg {
  width: 1.5rem;
  height: 1.5rem;
  animation: bounce-slow 2s ease-in-out infinite;
}

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
  .hero-subtitle { font-size: 1.25rem; }
}

@media (min-width: 768px) {
  .hero-title { font-size: 3.75rem; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: 4.5rem; }
}

/* ========== ABOUT ========== */
.about {
  padding: 5rem 0;
  background: var(--bg-alt);
}

@media (min-width: 1024px) {
  .about { padding: 7rem 0; }
}

.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.about-image-wrap {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.about-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-label {
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-weight: 700;
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
}

.about-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== SERVICES ========== */
.services {
  padding: 5rem 0;
  background: var(--bg);
}

@media (min-width: 1024px) {
  .services { padding: 7rem 0; }
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto;
}

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

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

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 7rem 1fr;
  grid-template-rows: auto 1fr;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.service-icon {
  grid-row: 1 / -1;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  min-height: 5rem;
}

.service-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card:hover .service-icon img {
  transform: scale(1.08);
  transition: transform 0.4s;
}

.service-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0;
  color: var(--text);
  padding: 1.25rem 1.25rem 0.25rem;
  align-self: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 0 1.25rem 1.25rem;
  align-self: start;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .service-card {
    grid-template-columns: 12rem 1fr;
  }
}

@media (min-width: 1024px) {
  .service-card {
    grid-template-columns: 1fr;
    grid-template-rows: 10rem auto auto;
  }
  .service-icon {
    grid-row: auto;
    height: 10rem;
  }
}

/* ========== PORTFOLIO ========== */
.portfolio {
  padding: 5rem 0;
  background: var(--bg-alt);
}

@media (min-width: 1024px) {
  .portfolio { padding: 7rem 0; }
}

/* Filter buttons */
.portfolio-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 639px) {
  .portfolio-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .portfolio-filters::-webkit-scrollbar { display: none; }
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Horizontal scroll mosaic — 2 rows */
.portfolio-grid {
  display: grid;
  grid-template-rows: repeat(2, 200px);
  grid-auto-flow: column dense;
  grid-auto-columns: 260px;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 0.5rem;
}
.portfolio-grid.centered {
  justify-content: center;
}
.portfolio-grid::-webkit-scrollbar { display: none; }

.portfolio-item {
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  scroll-snap-align: start;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Every 5th item spans both rows — tall mosaic accent */
.portfolio-item:nth-child(5n+1) {
  grid-row: span 2;
}

@media (min-width: 640px) {
  .portfolio-grid { grid-template-rows: repeat(2, 240px); grid-auto-columns: 300px; }
}

@media (min-width: 1024px) {
  .portfolio-grid { grid-template-rows: repeat(2, 280px); grid-auto-columns: 340px; }
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-item.filtering-out {
  opacity: 0;
  transform: scale(0.9);
}

.portfolio-item.portfolio-hidden {
  display: none;
}

/* Hover overlay */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-overlay svg {
  color: #fff;
  transform: scale(0.8);
  transition: transform 0.3s;
}

.portfolio-item:active .portfolio-overlay { opacity: 1; }

@media (min-width: 1024px) {
  .portfolio-item:hover .portfolio-overlay { opacity: 1; }
  .portfolio-item:hover .portfolio-overlay svg { transform: scale(1); }
  .portfolio-item:hover img { transform: scale(1.05); }
}

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

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

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.lightbox-counter {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-heading);
  font-weight: 500;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-prev:active,
.lightbox-next:active { background: rgba(255,255,255,0.25); }

@media (min-width: 768px) {
  .lightbox-prev { left: 2rem; }
  .lightbox-next { right: 2rem; }
  .lightbox-prev:hover,
  .lightbox-next:hover { background: rgba(255,255,255,0.2); }
}

/* ========== CONTACTS ========== */
.contacts {
  padding: 5rem 0;
  background: var(--bg);
}

@media (min-width: 1024px) {
  .contacts { padding: 7rem 0; }
}

.contacts-grid {
  display: grid;
  gap: 3rem;
}

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

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(249, 115, 22, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.contact-label {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.contact-value {
  color: var(--text-muted);
}

.phone-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
}

.phone-number {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

.phone-number:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--bg-surface);
  color: var(--text-dark);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.social-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.social-icon.whatsapp:hover { background: #16a34a; color: #fff; }
.social-icon.viber:hover { background: #7360F2; color: #fff; }
.social-icon.telegram:hover { background: #0284c7; color: #fff; }

.map-wrap {
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  position: relative;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
  padding: 0.75rem 1rem;
  pointer-events: none;
  text-align: center;
}

.map-label p {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-social-icons {
  display: flex;
  gap: 0.5rem;
}

.footer-social-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--bg-surface);
  color: var(--text-dark);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.footer-social-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.footer-social-icon.whatsapp:hover { background: #16a34a; color: #fff; }
.footer-social-icon.viber:hover { background: #7360F2; color: #fff; }
.footer-social-icon.telegram:hover { background: #0284c7; color: #fff; }
.footer-social-icon.instagram:hover { background: #e1306c; color: #fff; }
.footer-social-icon.facebook:hover  { background: #1877f2; color: #fff; }
.footer-social-icon.tiktok:hover    { background: #010101; color: #fff; }

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

/* ========== ANIMATIONS ========== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Reveal */
.reveal {
  opacity: 0;
}

.reveal.visible {
  animation: var(--reveal-animation, fade-up 0.6s ease-out forwards);
}

/* ========== LANGUAGE TOGGLE ========== */
html.lang-ru .ro { display: none; }
html.lang-ro .ru { display: none; }

/* ========== UTILITY ========== */
.hidden {
  display: none !important;
}

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