/*
 * Global Styles for the CutJet website
 *
 * This stylesheet defines the look and feel of the CutJet site. The design
 * takes inspiration from the structure and colour palette of the Water Jet
 * Sweden website but uses our own branding and imagery. The layout
 * includes a top notification bar, a primary navigation header, large
 * hero banners, content sections with cards and grids, contact forms,
 * and a simple footer. CSS variables make it easy to tweak colours
 * throughout the site.
 */

/* CSS Variables for colours and sizing */
:root {
  --primary-color: #0a4a83; /* deep blue reminiscent of waterjet branding */
  --secondary-color: #07406c; /* slightly darker shade for headers and footer */
  --accent-color: #009fe3; /* bright accent used for buttons and highlights */
  --light-bg: #f5f8fb; /* very light background for contrast */
  --dark-text: #1f2937; /* dark grey text for readability */
  --light-text: #ffffff; /* white text for dark sections */
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --max-width: 1200px;
}

/* Reset some default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* Top bar showing quick links and tagline */
.top-bar {
  background-color: var(--secondary-color);
  color: var(--light-text);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.top-bar .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.top-bar a:hover {
  color: var(--accent-color);
}

/* Primary navigation header */
header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 1rem;
  box-shadow: var(--shadow);
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--light-text);
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
}

header .contact-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

/* Hero sections */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--light-text);
  text-align: center;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--light-text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
}

/* Section styling */
section {
  padding: 4rem 1rem;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary-color);
}

/* Call-to-action boxes on home page */
.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cta-card {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cta-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.cta-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Product preview grid on home page */
.product-preview {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Grid layout for detailed pump products on KMT page */
.product-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Styling for lists inside product cards */
.product-card ul {
  margin: 0 0 1rem 1.25rem;
  font-size: 0.9rem;
  color: #555;
  padding-left: 0.5rem;
}
.product-card ul li {
  margin-bottom: 0.25rem;
  list-style: disc;
}

/* Spare parts table styling */
.spares-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.spares-table th,
.spares-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  font-size: 0.9rem;
}
.spares-table th {
  background-color: var(--primary-color);
  color: var(--light-text);
}
.spares-table tbody tr:nth-child(even) {
  background-color: #f5f8fb;
}

.product-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card .card-body {
  padding: 1.25rem;
}

.product-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.product-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #555;
}

/* Facility/Factory section */
.facility {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.facility img {
  flex: 1 1 400px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.facility .text {
  flex: 1 1 400px;
  font-size: 1rem;
  color: #444;
}

/* Contact section styling */
.contact-section {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 3rem 1rem;
}

.contact-section .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-section form {
  flex: 1 1 350px;
  display: grid;
  gap: 1rem;
}

.contact-section form input,
.contact-section form textarea,
.contact-section form select {
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.contact-section form button {
  background-color: var(--accent-color);
  color: var(--light-text);
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-section form button:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.contact-section .contact-info {
  flex: 1 1 300px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-section h3 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

/* Footer styles */
footer {
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 3rem 1rem;
  font-size: 0.9rem;
}

footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--accent-color);
}

footer ul {
  list-style: none;
  line-height: 1.6;
}

footer a {
  color: var(--light-text);
}

footer a:hover {
  color: var(--accent-color);
}

footer .bottom-bar {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
}

/* Utility classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* ===== Mobile Patch (non-breaking) ===================================== */
/* Genel medya kırılımları */
@media (max-width: 992px) {
  /* Container yan boşlukları biraz artır: taşmaları önler */
  .container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 768px) {
  /* NAV: menü maddeleri taşarsa sar ve akıt */
  header .container { flex-wrap: wrap; gap: .75rem 1rem; }
  nav ul { flex-wrap: wrap; gap: .75rem 1rem; }
  header .contact-info { width: 100%; justify-content: flex-start; }

  /* Hero: tipografiyi küçült, dikeyi kısalt */
  .hero { min-height: 48vh; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }

  /* Bölüm içi boşluklar: mobilde daha kompakt */
  section { padding: 2.5rem 1rem; }
}

/* Çok küçük ekranlar için ek dokunuşlar */
@media (max-width: 480px) {
  /* NAV yatay taşarsa kaydırılabilir olsun (yapıyı bozmadan) */
  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .5rem .75rem;
  }

  /* Kart görsellerini biraz kısalt – uzun dikdörtgenlerde taşmayı önler */
  .product-card img { height: 170px; }

  /* Başlık ve boşlukları biraz daha indir */
  .hero h1 { font-size: 1.6rem; }
  section h2 { font-size: 1.6rem; margin-bottom: 1.25rem; }
}

/* Tablolar: taşmayı önlemek için yatay kaydırma sarmalayıcısı */
.table-responsive { width: 100%; overflow-x: auto; }
.table-responsive .spares-table { min-width: 560px; }

/* Görsellerin güvenli davranışı — zaten max-width var, display:block da var */
/* (img kuralın dosyada mevcut, burada tekrara gerek yok) */

/* Kutu gölgeleri/yuvarlaklık aynı, sadece taşma riskini azaltmak için
   kartların keskin taşmalarında güvenli kutu modeli */
.product-card { overflow: hidden; }

/* Opsiyonel: iOS/Android’de metin zoom kaynaklı taşmaları azaltır */

/* KMT pompalar sayfası: mobil oran ve taşma düzeltmeleri */
#kmt-pumps, .kmt-pumps {
  overflow-x: hidden;
}

/* Olası grid/flex taşmalarını engelle */
#kmt-pumps * {
  box-sizing: border-box;
  min-width: 0;  /* flex/grid çocuklarında taşma önler */
}

/* Kartlar sabit yükseklik almasın */
#kmt-pumps .pump-card,
#kmt-pumps .kmt-pump-card {
  display: flex;
  flex-direction: column;
  height: auto !important;     /* sabit height varsa bastır */
}

/* Görsel KUTUSU: sabit oranlı alan (kırpma yok) */
#kmt-pumps .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;         /* istersen 1/1 veya 16/9 yapabilirsin */
  border-radius: 8px;
  overflow: hidden;
}

/* <img> tabanlı görseller: oran koru, kutuya sığdır */
#kmt-pumps img,
#kmt-pumps .thumb img,
#kmt-pumps img.kmt-pump-image {
  display: block;
  width: 100% !important;
  height: auto !important;      /* hem CSS hem HTML height’larını bastır */
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Eğer bazı img'ler yükseklikle zorlanıyorsa, thumb içindekileri kutuyu DOLDUR + contain */
#kmt-pumps .thumb > img {
  width: 100% !important;
  height: 100% !important;      /* aspect-ratio’lu kutuyu doldurur */
  object-fit: contain !important;
}

/* Inline style ile verilen sabit ölçüleri kır (gerekirse) */
#kmt-pumps [style*="width"] img,
#kmt-pumps [style*="height"] img {
  width: 100% !important;
  height: auto !important;
}

/* Arka plan görseli kullanan kutular için (img yerine background-image ise) */
#kmt-pumps .thumb.bg,
#kmt-pumps .kmt-pump-card .bg-thumb {
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;   /* oran koru, kırpma yok */
}

/* Eski tema sınıfları sabit genişlik veriyorsa kır */
#kmt-pumps .col,
#kmt-pumps [class*="col-"] {
  max-width: 100% !important;
  flex: 1 1 0% !important;
}

/* Küçük ekran grid: tek sütun (isteğe göre 2’ye çıkar) */
@media (max-width: 600px) {
  #kmt-pumps .kmt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.kmt-section .pump-img {
  height:auto !important;
  object-fit:contain !important;
}


