/* ============================================
   ADVEA - CNC Obrada & Serijska Proizvodnja
   Professional Website Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #1a1a2e;
  --primary-light: #2d2d44;
  --secondary: #3a3a5c;
  --accent: #cc2222;
  --accent-hover: #e03030;
  --steel: #b0b8c8;
  --steel-light: #e2e6ec;
  --text: #222222;
  --text-light: #555555;
  --white: #ffffff;
  --bg-light: #f8f9fb;
  --bg-section: #f0f2f5;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.10);
  --transition: all 0.3s ease;
  --radius: 8px;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section.section-compact {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-compact .section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-header p {
  max-width: 600px;
  margin: 1.5rem auto 0;
  font-size: 1.05rem;
}

.bg-light {
  background: var(--bg-light);
}

.bg-dark {
  background: var(--primary);
  color: var(--white);
}

.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--white);
}

.bg-dark p {
  color: rgba(255,255,255,0.75);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.35);
}

.btn-outline {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 1rem 0;
}

.header.scrolled {
  background: rgba(26, 26, 46, 0.97);
  backdrop-filter: blur(10px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Arial Black', 'Impact', sans-serif;
  text-decoration: none;
  transition: var(--transition);
  font-style: italic;
  padding: 6px 4px;
  line-height: 1;
  overflow: visible;
}

.logo .logo-a1 {
  font-weight: 900;
  font-size: 1.55rem;
  background: linear-gradient(180deg, #f04040 0%, #cc1818 45%, #991010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 4px;
}

.logo .logo-dv {
  font-weight: 900;
  font-size: 2.1rem;
  background: linear-gradient(180deg, #f04040 0%, #cc1818 40%, #991010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  padding-bottom: 6px;
}

.logo .logo-ea {
  font-weight: 900;
  font-size: 1.55rem;
  background: linear-gradient(180deg, #f04040 0%, #cc1818 45%, #991010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 4px;
}

.header.scrolled .logo .logo-dv {
  font-size: 1.8rem;
}

.header.scrolled .logo .logo-a1,
.header.scrolled .logo .logo-ea {
  font-size: 1.3rem;
}

/* Footer logo */
.footer .logo .logo-a1,
.footer .logo .logo-ea {
  background: linear-gradient(180deg, #f04040 0%, #cc1818 45%, #991010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer .logo .logo-dv {
  background: linear-gradient(180deg, #f04040 0%, #cc1818 40%, #991010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.lang-switch a {
  padding: 3px 8px;
  border-radius: 3px;
  color: rgba(255,255,255,0.5) !important;
  font-style: normal;
}

.lang-switch a.active {
  color: var(--white) !important;
  background: rgba(255,255,255,0.12);
}

.lang-switch a:hover {
  color: var(--white) !important;
}

.lang-switch .divider {
  color: rgba(255,255,255,0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.3rem 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links .btn {
  padding: 0.6rem 1.5rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 40%, #1a1a2e 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(204, 34, 34, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(45, 45, 68, 0.4) 0%, transparent 50%);
}

/* Animated grid pattern for industrial feel */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(198, 40, 40, 0.15);
  border: 1px solid rgba(198, 40, 40, 0.3);
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 550px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Statistics */
.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat h3 {
  color: var(--accent);
  font-size: 2.2rem;
  font-weight: 800;
}

.hero-stat p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* Hero image */
.hero-visual {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: grayscale(30%);
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--white);
}

.service-card h3 {
  margin-bottom: 0.8rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.service-card .machines {
  background: var(--bg-light);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

.service-card .machines h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.service-card .machines ul {
  list-style: none;
}

.service-card .machines li {
  font-size: 0.88rem;
  color: var(--text-light);
  padding: 0.25rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.service-card .machines li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: var(--bg-light);
  border-radius: 6px;
}

.about-feature .icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.about-feature span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

/* ============================================
   MACHINE PARK
   ============================================ */
.machines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.machine-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
}

.machine-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
  padding: 0.75rem;
  box-sizing: border-box;
}

.machine-card .machine-card-text {
  padding: 1.2rem 1.5rem 1.5rem;
}

.machine-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.machine-card .machine-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.machine-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.machine-card p {
  font-size: 0.85rem;
  margin: 0;
}

/* ============================================
   WHY US / ADVANTAGES
   ============================================ */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.advantage-card {
  text-align: center;
  padding: 2rem;
}

.advantage-card .number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.advantage-card h3 {
  margin-bottom: 0.5rem;
  color: var(--white);
}

.advantage-card p {
  font-size: 0.92rem;
}

/* ============================================
   INDUSTRIES SECTION
   ============================================ */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.industry-card {
  position: relative;
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.industry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.09);
  border-color: rgba(204,34,34,0.12);
}

.industry-card:hover::before {
  transform: scaleX(1);
}

.industry-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.85rem;
  background: rgba(204,34,34,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.industry-card:hover .industry-icon {
  background: var(--accent);
  transform: scale(1.05);
}

.industry-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  transition: stroke 0.3s ease;
}

.industry-card:hover .industry-icon svg {
  stroke: var(--white);
}

.industry-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.industry-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
}

.industry-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(204,34,34,0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* ============================================
   SPEC TABLE
   ============================================ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

.spec-table caption {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 0 0 0.6rem;
}

.spec-table thead th {
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.8rem;
  text-align: left;
  white-space: nowrap;
}

.spec-table tbody td {
  padding: 0.55rem 0.8rem;
  color: var(--text-light);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.02);
}

.spec-table tbody td:first-child {
  font-weight: 600;
  color: var(--primary);
}

@media (max-width: 768px) {
  .spec-table {
    font-size: 0.78rem;
  }
  .spec-table thead th,
  .spec-table tbody td {
    padding: 0.45rem 0.55rem;
  }
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, #cc2222, #a01a1a);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-outline {
  border-color: var(--white);
  color: var(--white);
  font-size: 1rem;
  padding: 1rem 2.5rem;
}

.cta-section .btn-outline:hover {
  background: var(--white);
  color: var(--accent);
}

/* ============================================
   GALLERY
   ============================================ */

/* --- Filter buttons --- */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn-filter {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-filter:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-filter.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.filter-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(0,0,0,0.15);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  min-width: 1.3rem;
  text-align: center;
}

.btn-filter.active .filter-count {
  background: rgba(255,255,255,0.25);
}

/* --- Gallery grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  height: 280px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hiding {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(10,22,40,0.92));
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Zoom icon hint on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center / 20px no-repeat;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

.overlay h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.overlay p {
  color: var(--steel);
  font-size: 0.85rem;
  margin: 0;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  color: var(--white);
}

.lightbox-caption h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.lightbox-caption p {
  font-size: 0.9rem;
  color: var(--steel);
  margin: 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  padding-right: 2rem;
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-info > p {
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.contact-item p {
  font-size: 0.9rem;
  margin: 0;
}

.contact-item a {
  color: var(--accent);
}

.contact-item a:hover {
  color: var(--accent-hover);
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--steel-light);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.form-group textarea {
  height: 130px;
  resize: vertical;
}

.form-group input[type="file"] {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================
   BLOG SECTION
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-size: 3rem;
}

.blog-card-content {
  padding: 1.8rem;
}

.blog-card .blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.blog-card .blog-category {
  background: rgba(198, 40, 40, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  transition: var(--transition);
}

.blog-card:hover h3 {
  color: var(--accent);
}

.blog-card p {
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}

.blog-card .read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-card .read-more:hover {
  gap: 0.8rem;
}

/* --- Blog Article Page --- */
.blog-article {
  max-width: 780px;
  margin: 0 auto;
}

.blog-article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--steel-light);
}

.blog-article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.blog-article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.blog-article h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.blog-article h3 {
  font-size: 1.1rem;
  margin: 1.8rem 0 0.8rem;
}

.blog-article p {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.blog-article ul, .blog-article ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-light);
  line-height: 1.85;
}

.blog-article li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.blog-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.blog-article th {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.blog-article td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--steel-light);
  color: var(--text-light);
}

.blog-article tr:hover td {
  background: var(--bg-light);
}

.blog-article blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

.blog-article .tip-box {
  background: #f0f7ff;
  border: 1px solid #c8ddf5;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.blog-article .tip-box strong {
  color: var(--primary);
}

.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--steel-light);
}

.blog-nav a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.blog-nav a:hover {
  color: var(--accent-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-about .logo {
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-about p {
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.footer-contact-item .fci-icon {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.footer-contact-item svg.fci-icon {
  stroke: var(--accent);
  width: 18px;
  height: 18px;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.about-feature .icon svg {
  width: 18px;
  height: 18px;
}

.contact-item .icon svg {
  width: 22px;
  height: 22px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   PAGE HERO (for inner pages)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, #1a1a2e, #2d2d44);
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.breadcrumb a {
  color: rgba(255,255,255,0.5);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .separator {
  color: rgba(255,255,255,0.3);
}

.breadcrumb .current {
  color: var(--accent);
}

/* ============================================
   ABOUT PAGE SPECIFICS
   ============================================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--steel-light);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 2rem 0;
  position: relative;
  width: 50%;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  justify-content: flex-start;
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 350px;
  position: relative;
}

.timeline-content .year {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.timeline-content h4 {
  margin-bottom: 0.4rem;
}

.timeline-content p {
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }

  .hero-stats {
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .industries-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
  }

  .nav-links.active {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    text-align: center;
    justify-content: center;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .machines-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-filters {
    gap: 0.4rem;
  }

  .btn-filter {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .industries-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 50px;
    justify-content: flex-start;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .machines-grid {
    grid-template-columns: 1fr;
  }

  .hero-stat h3 {
    font-size: 1.8rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(n+7) { transition-delay: 0.7s; opacity: 1; transform: translateY(0); }

/* Counter animation placeholder styling */
.counter {
  display: inline-block;
}
