:root {
  --color-bg: #0b0b0b;
  --color-card-bg: #111;
  --color-primary: #D62828;
  /* Slightly deeper luxury red */
  --color-text: #F1FAEE;
  --color-text-muted: #999;
  --font-main: 'Outfit', sans-serif;
  --section-padding: 6rem 2rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}

/* --- SEPARATORS --- */
.section-separator {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 20%, var(--color-primary) 80%, transparent 100%);
  position: relative;
  opacity: 0.8;
  margin-top: -1px;
  /* Align perfectly */
  z-index: 10;
}

.section-separator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 100px;
  height: 4px;
  background: var(--color-primary);
  transform: translate(-50%, -1px);
  /* Little thicker center */
  box-shadow: 0 0 10px var(--color-primary);
}

/* Technical "Angled" Line Element from Reference */
.tech-line-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
}

.tech-line {
  stroke: var(--color-primary);
  stroke-width: 1;
  fill: none;
  opacity: 0.6;
}


/* --- HERO SECTION --- */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}

#webgl {
  position: absolute;
  /* Changed from fixed to absolute so it scrolls with the page */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Lower z-index */
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 4rem;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.95);
  padding: 1rem 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: #fff;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 3rem;
  pointer-events: auto;
}

.nav-link {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #fff;
}

.nav-link.active {
  color: var(--color-primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}


/* --- BOTTOM NAV & CARD --- */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  z-index: 20;
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 1), transparent);
}

.nav-item {
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.8rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* More subtle */
  transition: all 0.4s ease;
  background: rgba(0, 0, 0, 0.6);
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  border-color: var(--color-primary);
  background: rgba(214, 40, 40, 0.1);
  box-shadow: 0 0 20px rgba(214, 40, 40, 0.2);
}

.info-card {
  position: absolute;
  top: 35%;
  right: 10%;
  width: 340px;
  background: #111;
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  border-bottom: 2px solid var(--color-primary);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 100;
  /* Tooltip on top */
}

.info-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.info-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.info-card p {
  font-size: 0.9rem;
  color: #999;
  line-height: 1.7;
  font-weight: 300;
}

/* SVG Lines */
#lines-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.connection-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1s ease;
}

.connection-line.visible {
  stroke-dashoffset: 0;
}

.connection-dot {
  fill: var(--color-primary);
  opacity: 0;
}

.connection-dot.visible {
  opacity: 1;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-primary);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  z-index: 200;
  pointer-events: none;
}


/* --- SECTIONS --- */
section:not(#hero) {
  padding: var(--section-padding);
  position: relative;
  background: transparent;
  /* Changed from variable to transparent to show BG if needed, or variable if solid */
  background: var(--color-bg);
  z-index: 10;
  /* Raise above webgl */
}

.section-header {
  margin-bottom: 5rem;
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #999);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: block;
}

/* --- SERVICES GRID REFINED --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.service-card {
  background: var(--color-card-bg);
  padding: 3rem 2rem;
  border-top: 2px solid transparent;
  transition: all 0.4s ease;
  position: relative;
  text-align: left;
  /* More elegant than center */
}

.service-card:hover {
  background: #161616;
  border-top-color: var(--color-primary);
  transform: translateY(-5px);
}

.service-icon-svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: #666;
  stroke-width: 1.5;
  margin-bottom: 2rem;
  transition: stroke 0.4s;
}

.service-card:hover .service-icon-svg {
  stroke: var(--color-primary);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-weight: 300;
}

.service-link {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.service-link:hover {
  opacity: 1;
  color: var(--color-primary);
}


/* --- ABOUT SECTION --- */
#about {
  padding: 0;
  background: #0b0b0b;
}

.about-container {
  display: flex;
  max-width: 100%;
}

.about-text {
  flex: 1;
  padding: 8rem 6rem;
  background: #0f0f0f;
}

.about-visual {
  flex: 1;
  background-image: url('https://images.unsplash.com/photo-1531297461137-8129d5025416?q=80&w=2670&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 500px;
}

.about-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  /* Fix: Allow interaction with canvas below */
}

/* --- STATS BAR --- */
#stats {
  background: linear-gradient(to right, #111, #1a1a1a);
  /* Darker elegant BG instead of full red */
  border-bottom: 1px solid #222;
  padding: 5rem 0;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4rem;
  text-align: center;
}

.stat-item {
  flex: 1;
  min-width: 200px;
}

.stat-icon-svg {
  width: 64px;
  height: 64px;
  stroke: var(--color-primary);
  /* Red accent */
  stroke-width: 1.2;
  margin-bottom: 1.5rem;
  display: inline-block;
  opacity: 0.9;
}

.stat-icon-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.stat-icon-img:hover {
  transform: scale(1.1);
}

.stat-item h2 {
  font-size: 3rem;
  font-weight: 600;
  /* Bolder as per image */
  color: #fff;
  margin-bottom: 0.5rem;
  font-family: var(--font-main);
}

.stat-item p {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
  /* Normal casing like "Çalışan Sayısı" */
  letter-spacing: 0.5px;
  color: #fff;
  /* White text as per image */
  opacity: 0.9;
}

/* --- NEWS --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.news-card {
  background: transparent;
  border: 1px solid #222;
  transition: border 0.3s;
}

.news-card:hover {
  border-color: #444;
}

.news-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.news-card:hover .news-img {
  opacity: 1;
}

.news-content {
  padding: 2rem;
}

.news-date {
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
  font-weight: 600;
  letter-spacing: 1px;
}

.news-card h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: #fff;
  font-weight: 500;
}

footer {
  background: #000;
  padding: 4rem 2rem;
  border-top: 1px solid #1a1a1a;
  text-align: center;
  color: #555;
  font-size: 0.8rem;
}

.footer-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
}

/* --- MOBILE RESPONSIVE --- */
@media screen and (max-width: 768px) {

  /* Navbar */
  .navbar {
    padding: 1rem 1.5rem;
    background: rgba(5, 5, 5, 0.98);
    /* Solid bg */
  }

  .logo {
    z-index: 102;
    /* Above menu */
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease;
    padding: 2rem;
    z-index: 99;
  }

  .nav-links.active {
    right: 0;
  }

  .menu-toggle {
    display: flex;
    cursor: pointer;
    z-index: 102;
  }

  .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 4px;
    transition: 0.4s;
  }

  /* Hamburger Animation */
  .menu-toggle.open .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  /* Hero */
  #hero {
    height: 100svh;
    /* Use Small Viewport Height to account for address bars */
    min-height: 500px;
    /* Safety */
  }

  .info-card {
    top: 90px;
    /* Moved up as requested */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    padding: 0.8rem;
    right: auto;
    border-bottom: none;
    border-top: 2px solid var(--color-primary);
  }

  .info-card.visible {
    transform: translateX(-50%);
  }

  .bottom-nav {
    position: absolute;
    bottom: 50px;
    /* Move up to be safe from bottom edge/browsers bars */
    left: 0;
    width: 100%;
    padding: 0.5rem;
    gap: 0.2rem;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    z-index: 200;
    background: none;
  }

  .nav-item {
    padding: 0.5rem 0.2rem;
    font-size: 0.7rem;
    flex: 1;
    text-align: center;
    min-width: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
  }

  .nav-item.active {
    color: #fff;
    background: transparent;
    box-shadow: none;
    border-bottom: 2px solid var(--color-primary);
    /* Minimal active state */
  }

  /* Typography & Spacing */
  :root {
    --section-padding: 4rem 1.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .stat-item h2 {
    font-size: 2.5rem;
  }

  .about-container {
    flex-direction: column;
  }

  .about-text {
    padding: 4rem 1.5rem;
  }

  .about-visual {
    min-height: 300px;
    flex: none;
    height: 300px;
  }

  /* Stats */
  .stats-container {
    gap: 2rem;
    justify-content: center;
  }

  .stat-item {
    width: 45%;
  }
}