/* ============================================================
   STYLE.CSS — Ηλεκτρολόγος Ιωάννινα
   Design inspired by professional corporate electrical companies.
   Color palette: navy blue / white / gray / amber accent
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES (design tokens)
   ============================================================ */
:root {
  /* Colors */
  --clr-primary:        #1e3a5f;   /* dark navy */
  --clr-primary-mid:    #2855a0;   /* mid blue */
  --clr-primary-light:  #3b82f6;   /* bright blue */
  --clr-primary-dark:   #122640;   /* footer dark */
  --clr-accent:         #e8981e;   /* amber / gold */
  --clr-accent-dark:    #c47e10;
  --clr-white:          #ffffff;
  --clr-light:          #f0f4f8;
  --clr-light-2:        #dce4ef;
  --clr-gray:           #64748b;
  --clr-gray-light:     #94a3b8;
  --clr-dark:           #1e293b;
  --clr-text:           #334155;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --fw-light:   300;
  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-black:   800;

  /* Layout */
  --container:  1200px;
  --section-py: 90px;

  /* Header heights */
  --header-top-h: 38px;
  --navbar-h:     72px;
  --header-h:     calc(var(--header-top-h) + var(--navbar-h));

  /* Spacing */
  --radius:     8px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow:     0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 12px 40px rgba(0, 0, 0, 0.14);
  --shadow-xl:  0 20px 60px rgba(0, 0, 0, 0.18);

  /* Transitions */
  --ease:       0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:  0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: var(--fw-normal);
  color: var(--clr-text);
  line-height: 1.65;
  background: var(--clr-white);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Scroll margin offset for sticky header */
section[id] {
  scroll-margin-top: var(--header-h);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: var(--section-py) 0;
}

/* First section on pages with no hero above it — clears the fixed header */
.section--page-top {
  padding-top: calc(var(--section-py) + var(--header-h));
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 55px;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 10px;
}

.section-label--light {
  color: rgba(255, 255, 255, 0.55);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--fw-black);
  color: var(--clr-primary);
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.75;
}

/* White text variants */
.section-header--white .section-title {
  color: var(--clr-white);
}

.section-header--white .section-subtitle {
  color: rgba(255, 255, 255, 0.68);
}

/* Scroll-triggered fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-slow), transform 0.65s var(--ease-slow);
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-weight: var(--fw-semi);
  line-height: 1;
  transition: all var(--ease);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--clr-accent-dark);
  border-color: var(--clr-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 152, 30, 0.38);
}

.btn-outline {
  background: transparent;
  color: var(--clr-white);
  border-color: rgba(255, 255, 255, 0.55);
}

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

.btn-full {
  width: 100%;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--clr-white);
}

/* Top bar */
.header-top {
  background: var(--clr-primary-dark);
  height: var(--header-top-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-top-contacts {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-top-info {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: var(--fw-medium);
  transition: color var(--ease);
}

.header-top-info:hover {
  color: var(--clr-accent);
}

.header-top-info svg {
  width: 13px;
  height: 13px;
  fill: var(--clr-accent);
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-switcher span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
}

.lang-btn {
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--ease);
  cursor: pointer;
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--clr-accent);
  color: var(--clr-white);
  border-color: var(--clr-accent);
}

/* Main navbar */
.navbar {
  background: var(--clr-white);
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  transition: box-shadow var(--ease);
}

.header.scrolled .navbar {
  box-shadow: 0 3px 24px rgba(0, 0, 0, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  text-decoration: none;
}

/* Actual logo image (ION PATH) */
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Footer version: invert to white on dark background */
.logo-img--footer {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 6px 10px;
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 1px;
}

.logo-text strong {
  font-size: 1.1rem;
  font-weight: var(--fw-black);
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.logo-text small {
  font-size: 0.65rem;
  color: var(--clr-gray);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: var(--fw-medium);
}

.logo--white .logo-text strong,
.logo--white .logo-text small {
  color: var(--clr-white);
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  color: var(--clr-dark);
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--clr-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease);
  border-radius: 2px;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: var(--clr-accent);
  color: var(--clr-white);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  transition: all var(--ease);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-call svg {
  fill: var(--clr-white);
}

.btn-call:hover {
  background: var(--clr-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 152, 30, 0.35);
}

/* Mobile-only items hidden on desktop */
.mobile-lang-item,
.mobile-call-item {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
  transition: background var(--ease);
}

.hamburger:hover {
  background: var(--clr-light);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition: all var(--ease);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

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

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 580px;
  max-height: 960px;
  overflow: hidden;
}

/* Slider */
.hero-slider {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}

.slide.active {
  opacity: 1;
}

/* Fallback gradient backgrounds when images are not loaded */
.slide-1 {
  background-image: url('../assets/images/hero-1.jpg');
  background-color: var(--clr-primary);
}

.slide-2 {
  background-image: url('../assets/images/hero-2.jpg');
  background-color: var(--clr-primary-mid);
}

.slide-3 {
  background-image: url('../assets/images/hero-3.jpg');
  background-color: #1a4a7a;
}

/* Gradient overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(18, 38, 64, 0.88) 0%,
    rgba(18, 38, 64, 0.60) 50%,
    rgba(18, 38, 64, 0.35) 100%
  );
  z-index: 1;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: var(--header-h);
}

.hero-text {
  max-width: 680px;
  animation: heroFadeIn 1s ease 0.3s both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 152, 30, 0.9);
  color: var(--clr-white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: var(--fw-black);
  color: var(--clr-white);
  line-height: 1.12;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 16px 34px;
  font-size: 1rem;
  box-shadow: 0 8px 28px rgba(232, 152, 30, 0.4);
}

/* Slider navigation */
.slider-nav {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-prev,
.slider-next {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--clr-white);
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  cursor: pointer;
  padding-bottom: 2px;
}

.slider-prev:hover,
.slider-next:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  transform: scale(1.08);
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  padding: 0;
}

.slider-dot.active {
  background: var(--clr-accent);
  width: 26px;
  border-radius: 4px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.scroll-indicator-wheel {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 11px;
  position: relative;
}

.scroll-indicator-wheel::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--clr-white);
  border-radius: 2px;
  animation: scrollWheel 2s ease infinite;
}

@keyframes scrollWheel {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--clr-primary);
  padding: 28px 0;
  position: relative;
  z-index: 1;
}

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

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.stat-item:last-child {
  border-right: none;
}

.stat-item strong {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: var(--fw-black);
  color: var(--clr-accent);
  line-height: 1;
}

.stat-item span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--fw-medium);
}

/* ============================================================
   PROFILE / ABOUT
   ============================================================ */
.profile {
  background: var(--clr-white);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
}

/* Image side */
.profile-image-wrap {
  position: relative;
}

.profile-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* Fallback when no image is provided */
.profile-image-wrap:not(:has(img[src]))::before,
.profile-img[src="assets/images/about.jpg"]:not([naturalWidth]) {
  display: block;
  content: '';
  width: 100%;
  height: 500px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-mid) 100%);
}

.profile-experience-badge {
  position: absolute;
  bottom: -22px;
  right: -22px;
  background: var(--clr-accent);
  color: var(--clr-white);
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.badge-number {
  font-size: 2rem;
  font-weight: var(--fw-black);
  line-height: 1;
}

.badge-label {
  font-size: 0.72rem;
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

/* Content side */
.profile-content .section-label,
.profile-content .section-title {
  text-align: left;
}

.profile-text {
  font-size: 1.05rem;
  color: var(--clr-gray);
  line-height: 1.85;
  margin-bottom: 32px;
}

.profile-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-bottom: 38px;
}

.profile-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--clr-dark);
}

.feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--clr-accent);
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: var(--fw-black);
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: var(--clr-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid transparent;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--clr-accent);
}

.service-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.service-card:hover .service-img-wrap img {
  transform: scale(1.07);
}

.service-card-body {
  padding: 22px 22px 24px;
  text-align: left;
  flex: 1;
}

.service-card h3 {
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.service-card p {
  font-size: 0.84rem;
  color: var(--clr-gray);
  line-height: 1.65;
}

.section-subtitle + .section-subtitle {
  margin-top: 16px;
}

.services-emphasis {
  margin-top: 40px;
  margin-bottom: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   AUTOMATION / SUPERVISION — icon card grid
   ============================================================ */
.automation {
  background: var(--clr-white);
}

.supervision {
  background: var(--clr-light);
}

.automation-intro {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.automation-intro h3 {
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
  margin-bottom: 14px;
}

.automation-intro p {
  font-size: 0.97rem;
  color: var(--clr-gray);
  line-height: 1.8;
  margin-bottom: 14px;
}

.automation-intro p:last-child {
  margin-bottom: 0;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.icon-grid--compact {
  grid-template-columns: repeat(4, 1fr);
}

.icon-card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid transparent;
  transition: all var(--ease);
  cursor: default;
}

.icon-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--clr-accent);
}

.icon-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--clr-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.icon-card h3 {
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
  line-height: 1.35;
}

.icon-card p {
  font-size: 0.84rem;
  color: var(--clr-gray);
  line-height: 1.6;
  margin-top: 8px;
}

/* ============================================================
   PROJECTS / GALLERY
   ============================================================ */
.projects {
  background: var(--clr-white);
}

/* Filter buttons */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 38px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 9px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: var(--fw-semi);
  color: var(--clr-gray);
  background: var(--clr-light);
  transition: all var(--ease);
  border: 2px solid transparent;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
  transform: translateY(-1px);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--clr-light-2);
  display: block;
}

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

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-slow);
  display: block;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.07);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 58, 95, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--ease);
  color: var(--clr-white);
  backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: var(--fw-light);
  line-height: 1;
  transition: all var(--ease);
}

.gallery-item:hover .gallery-zoom {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  transform: scale(1.1);
}

.gallery-overlay p {
  font-size: 0.8rem;
  font-weight: var(--fw-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.96);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 88vh;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--ease);
  backdrop-filter: blur(6px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  transform: scale(1.08);
}

.lightbox-close {
  top: 22px;
  right: 22px;
  font-size: 2rem;
  line-height: 0.8;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.08);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
}

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
.why-us {
  background: var(--clr-primary);
  position: relative;
  overflow: hidden;
}

/* Decorative background circles */
.why-us::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.why-us::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
  z-index: 1;
}

.why-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  transition: all var(--ease);
}

.why-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-6px);
  border-color: rgba(232, 152, 30, 0.3);
}

.why-card h3 {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.why-card p {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.72;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--clr-light);
}

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

/* Contact info cards */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--clr-white);
  padding: 18px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid transparent;
  transition: all var(--ease);
}

.contact-card:hover {
  border-left-color: var(--clr-accent);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.contact-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: var(--clr-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contact-card-body strong {
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  color: var(--clr-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-card-body a,
.contact-card-body span {
  font-size: 0.95rem;
  color: var(--clr-primary);
  font-weight: var(--fw-medium);
}

.contact-card-body a:hover {
  color: var(--clr-accent);
}

/* Map */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
  box-shadow: var(--shadow);
  line-height: 0;
}

/* Contact form */
.contact-form-wrap {
  background: var(--clr-white);
  padding: 44px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  color: var(--clr-dark);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--clr-light-2);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.93rem;
  color: var(--clr-dark);
  background: var(--clr-white);
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  resize: vertical;
  line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--clr-gray-light);
}

.form-message {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  display: none;
  border-left: 3px solid;
}

.form-message.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #22c55e;
  display: block;
}

.form-message.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #ef4444;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--clr-primary-dark);
}

.footer-main {
  padding: 70px 0 44px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}

/* Brand column */
.footer-brand p {
  margin-top: 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.78;
  max-width: 280px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  text-decoration: none;
}

.social-link:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: var(--clr-white);
  transform: translateY(-2px);
}

/* Instagram QR code thumbnail — square photo, not a masked circle */
.social-link--qr {
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

.social-link--qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-link--qr:hover {
  background: transparent;
  border-color: var(--clr-accent);
}

/* Footer columns */
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--clr-accent);
  display: inline-block;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-col li svg {
  flex-shrink: 0;
  margin-top: 3px;
  fill: var(--clr-accent);
  opacity: 0.8;
}

.footer-col li a,
.footer-col li span {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--ease);
  line-height: 1.5;
}

.footer-col li a:hover {
  color: var(--clr-accent);
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--clr-accent);
  color: var(--clr-white);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--ease);
  box-shadow: 0 6px 22px rgba(232, 152, 30, 0.45);
  cursor: pointer;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--clr-accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(232, 152, 30, 0.5);
}

/* ============================================================
   FOCUS STYLES (accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  :root {
    --section-py: 70px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .icon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .profile-img {
    height: 380px;
  }

  .profile-experience-badge {
    right: 0;
  }

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {

  :root {
    --header-top-h: 0px;
    --navbar-h:     62px;
    --header-h:     62px;
    --section-py:   60px;
  }

  /* Hide desktop top bar */
  .header-top {
    display: none;
  }

  /* Mobile nav menu — slide down from header
     top:0 + translateY(-100%) keeps it fully off-screen above the
     viewport regardless of its content height (a %-based transform
     relative to a shorter "top: navbar-h" origin could leave its
     bottom edge visible when the menu is short). */
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--clr-white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 24px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    transition: transform var(--ease);
    z-index: 850;
    border-top: 1px solid var(--clr-light-2);
  }

  .nav-menu.open {
    transform: translateY(var(--navbar-h));
  }

  .nav-link {
    padding: 13px 16px;
    font-size: 1rem;
    border-radius: var(--radius);
    width: 100%;
  }

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

  .nav-link:hover,
  .nav-link.active {
    background: var(--clr-light);
  }

  /* Show mobile-only nav items */
  .mobile-lang-item,
  .mobile-call-item {
    display: block;
  }

  .mobile-lang-item {
    padding: 8px 0 4px;
    border-top: 1px solid var(--clr-light-2);
    margin-top: 8px;
  }

  .lang-switcher--mobile {
    padding: 6px 16px;
  }

  .lang-switcher--mobile .lang-btn {
    color: var(--clr-gray);
    border-color: var(--clr-light-2);
    font-size: 0.85rem;
    padding: 6px 16px;
  }

  .lang-switcher--mobile .lang-btn.active {
    background: var(--clr-accent);
    color: var(--clr-white);
    border-color: var(--clr-accent);
  }

  .btn-call--mobile {
    margin: 8px 16px 0;
    width: calc(100% - 32px);
    justify-content: center;
    padding: 13px;
    font-size: 1rem;
  }

  /* Hide desktop call button */
  .nav-actions .btn-call {
    display: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    max-height: none;
    height: 100svh;
    min-height: 520px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

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

  .scroll-indicator {
    display: none;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Profile */
  .profile-img {
    height: 300px;
  }

  .profile-experience-badge {
    bottom: -16px;
    right: 16px;
    padding: 14px 20px;
  }

  .badge-number {
    font-size: 1.6rem;
  }

  .profile-features {
    grid-template-columns: 1fr;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Automation / Supervision */
  .icon-grid,
  .icon-grid--compact {
    grid-template-columns: 1fr;
  }

  /* Why us */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* Contact form */
  .contact-form-wrap {
    padding: 28px 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  /* Back to top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  /* Lightbox nav */
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {

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

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .stat-item:nth-child(odd) {
    border-right: none;
  }

  .gallery-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

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

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .header,
  .hero,
  .stats-bar,
  .slider-nav,
  .back-to-top,
  .gallery-filter,
  .gallery-overlay,
  .lightbox,
  .contact-form-wrap {
    display: none !important;
  }

  .section {
    padding: 20px 0;
  }

  .services-grid,
  .why-grid,
  .icon-grid,
  .icon-grid--compact {
    grid-template-columns: repeat(2, 1fr);
  }
}
