/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Titillium+Web:wght@400;600;700;900&display=swap');

:root {
  /* Brand Colors */
  --primary: #D32F2F;
  /* Foomak Red */
  --primary-dark: #B71C1C;
  --secondary: #2E7D32;
  /* Fresh Green */
  --accent: #FFC107;
  /* Amber */

  /* Neutrals */
  --dark: #0A0A0A;
  --dark-light: #1F1F1F;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --gray: #757575;
  --border: #E0E0E0;

  /* Typography */
  --font-heading: 'Titillium Web', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;
  --section-padding: 80px;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.text-secondary {
  color: var(--secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  background: var(--primary);
  color: var(--white);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* Header */
header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

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

/* Center Navigation Group */
nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  /* Keeps items to the right but we want center relative to logo? */
  /* User wants "other parts" (nav links) centered vertically with Foomak Tech? No, user said "foomak tech yazısının orta hizasında olsun" which implies vertical alignment, which is already set by align-items: center. 
     User also said "sağ köşeye alalım" for language switcher. 
     And "diğer hakkımızda... puntosunu büyütüp".
  */
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-links {
  display: flex;
  gap: 32px;
  /* User Request: Move Right ~30mm (~115px) & Down ~7mm (~26px) */
  margin-left: 115px;
  margin-top: 5px;
  /* margin: 0 auto; REMOVED to allow manual positioning */
}

.nav-links a {
  font-weight: 700;
  /* Increased weight */
  color: var(--dark);
  font-size: 22px;
  /* Increased from 17px */
  position: relative;
  font-family: var(--font-heading);
  /* Aligning font style if needed, or keep body */
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background-color: #000;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 800px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: block;
  opacity: 1;
  /* animation: fadeUp 0.8s ease forwards 0.2s; */
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 64px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 24px;
  opacity: 1;
  /* animation: fadeUp 0.8s ease forwards 0.4s; */
}

.hero-text {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 600px;
  opacity: 1;
  /* animation: fadeUp 0.8s ease forwards 0.6s; */
}

.hero-actions {
  display: flex;
  gap: 20px;
  opacity: 1;
  /* animation: fadeUp 0.8s ease forwards 0.8s; */
  position: relative;
  z-index: 500;
  pointer-events: auto;
}

/* About Section */
.about {
  padding: var(--section-padding) 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--dark);
}

.about-text {
  color: var(--gray);
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.stat-card {
  background: var(--light);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 14px;
  color: var(--gray);
  font-weight: 500;
}

.about-image-wrapper {
  position: relative;
}

.about-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.about-shape {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  z-index: 0;
}

/* Services Section */
.services {
  padding: var(--section-padding) 0;
  background: var(--light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.service-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(211, 47, 47, 0.1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(211, 47, 47, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: var(--white);
}

.service-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--gray);
  font-size: 15px;
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-info p {
  opacity: 0.7;
  margin-top: 20px;
}

.footer-heading {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  opacity: 0.7;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
  padding-left: 5px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  opacity: 0.5;
  font-size: 14px;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 992px) {

  /* ... existing styles ... */
  .hero-title {
    font-size: 48px;
  }

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

  .about-image-wrapper {
    order: -1;
    margin-bottom: 40px;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;



    /* Changed to FIXED to ensure full viewport coverage and reliable scrolling */
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;

    /* Revert to 100% to avoid scrollbar overflow issues */
    width: 100%;
    /* Use top/bottom anchoring instead of explicit height to avoidcalc issues */
    height: auto;

    margin: 0;
    max-height: none;

    background: var(--white);
    padding: 30px 20px 100px 20px;
    gap: 20px;

    box-shadow: none;
    border-top: 1px solid var(--border);

    /* Native smooth scrolling */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
  }

  .nav-links a {
    font-size: 20px;
    /* Larger text for 'wider' feel */
    display: block;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
  }

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

  .hero-title {
    font-size: 36px;
  }

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

  .product-item {
    grid-template-columns: 1fr !important;
  }

  .product-item.reverse .product-img-wrapper {
    order: -1 !important;
  }
}

/* Product Page Styles */
.product-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.product-item.reverse .product-content {
  order: -1;
}

.product-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.product-item:hover .product-img {
  transform: scale(1.02);
}

.product-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark);
}

.product-desc {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 16px;
}

.product-features {
  margin-bottom: 32px;
}

.product-features li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--dark-light);
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 8px;
  margin-left: 40px;
  /* Separator from nav */
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--dark);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .lang-switch {
    margin: 10px 0;
    justify-content: center;
  }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  z-index: 1000;
  top: 100%;
  left: 0;
  padding: 10px 0;
}

.dropdown-content a {
  color: var(--dark);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background-color: var(--light);
  color: var(--primary);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile Dropdown */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    padding-left: 20px;
    background: var(--light);
    display: none;
    /* Smooth expand transition could go here */
  }

  /* Support BOTH hover (for desktop resizing) and active class (for mobile click) */
  .dropdown:hover .dropdown-content,
  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* Body Scroll Lock */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

/* Global Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--light);
}

/* Global Header Fixes & Centering */
@media (min-width: 992px) {
  header .container {
    align-items: stretch !important;
  }

  nav {
    justify-content: center !important;
    height: 100%;
    align-items: stretch !important;
  }

  .nav-links {
    height: 100%;
    display: flex;
    align-items: stretch !important;
  }

  .nav-links li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
  }

  .dropdown-content {
    top: 100%;
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

/* Dropdown Scrollbar */
.dropdown-content {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #f1f1f1;
}

.dropdown-content::-webkit-scrollbar {
  width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dropdown-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dropdown-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* FORCE GLOBAL RED SCROLLBAR */
html,
body {
  scrollbar-color: #D32F2F #f1f1f1 !important;
  scrollbar-width: thin !important;
}

::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
}

::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
}

::-webkit-scrollbar-thumb {
  background-color: #D32F2F !important;
  border-radius: 6px !important;
  border: 3px solid #f1f1f1 !important;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #B71C1C !important;
}

/* FINAL LAYOUT FIXES */
html {
  overflow-y: scroll !important;
}

/* Force scrollbar always to prevent jumping */

@media (min-width: 992px) {
  header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: stretch !important;
  }

  nav {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    /* Horizontal Center */
    align-items: stretch !important;
  }

  .nav-links {
    display: flex !important;
    align-items: stretch !important;
    height: 100% !important;
  }

  .nav-links li {
    display: flex !important;
    align-items: center !important;
    /* Vertical Center Text */
    height: 100% !important;
  }

  .nav-links a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 15px;
    /* Clickable area */
  }

  .logo {
    display: flex !important;
    align-items: center !important;
  }
}


/* DYNAMIC HEADER BACKGROUND */
.page-header {
  background: linear-gradient(rgba(0, 0, 50, 0.6), rgba(0, 0, 50, 0.6)), url('/images/header-bg-water.jpg'), linear-gradient(135deg, #00b4db 0%, #0083b0 100%) !important;
  background-size: cover !important;
  background-position: center !important;
  color: white !important;
}

/* STRICT LAYOUT RESTORED */
html {
  overflow-y: scroll !important;
}

@media (min-width: 992px) {
  header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: stretch !important;
  }

  nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Nuclear Option for Recently Viewed */
.recently-viewed-section {
  display: none !important;
}

/* FORCE HIDE RECENTLY VIEWED */
.recently-viewed-section {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}