/*
 * Custom Stylesheet for Reset Savunma
 *
 * This file defines the visual identity of the site. A dark primary color
 * paired with a warm accent delivers a trustworthy yet vibrant feel.
 * Responsive layouts use modern CSS features such as flexbox and grid
 * to ensure an elegant experience across devices.
 */

/* --------- Global Variables --------- */
:root {
  /* Brand colours updated to a more striking black and gold palette */
  --primary-color: #000000;      /* pure black for headers and backgrounds */
  --secondary-color: #f5c211;    /* clean metallic gold for highlights and buttons */
  --primary-dark: #070707;       /* slightly lighter black used for overlays */
  --text-light: #f5f5f5;         /* very light grey for primary text on dark backgrounds */
  --text-dark: #bdbdbd;          /* muted grey for secondary text */
  --background-light: #0f0f0f;   /* subtle dark grey for alternating sections */
  --font-family-base: 'Montserrat', 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/* --------- Base Styles --------- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.6;
}

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

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #d4a60b;
}

/* Utility containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --------- Header --------- */
.site-header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 20px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-header .logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-list li {
  position: relative;
}

.nav-list a {
  color: var(--text-light);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  display: block;
  position: relative;
}

.nav-list a:hover {
  background-color: rgba(241, 196, 15, 0.15);
  color: var(--secondary-color);
}

/* Animated underline for navigation links */
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

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

#langToggle {
  margin-left: 16px;
  padding: 6px 12px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#langToggle:hover {
  background-color: #d4a60b;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    right: 20px;
    top: 80px;
    flex-direction: column;
    background-color: var(--primary-color);
    padding: 10px 0;
    width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  }
  .nav-list.show {
    display: flex;
  }
  .nav-list li {
    margin: 0;
  }
  .nav-list a {
    padding: 12px 20px;
  }
  .menu-toggle {
    display: block;
  }
}

/* --------- Hero Section --------- */
#hero {
  position: relative;
  min-height: 85vh;
  /* Use our new black and gold hero graphic */
  background-image: url('../img/hero-bg2.c3fda8ca91.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: center;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* A semi-transparent overlay to soften the background and improve text contrast */
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

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

.hero-content h1 {
  font-size: 60px;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.hero-content .cta {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.hero-content .cta:hover {
  background-color: #d4a60b;
}

/* --------- Generic Section Styles --------- */
.section {
  padding: 80px 0;
  position: relative;
}

.section h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-light);
  text-align: center;
  position: relative;
  display: block;
}

.section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 8px auto 0;
  border-radius: 2px;
}

.section p {
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.7;
}

/* Alternate background colours to separate sections */
.section:nth-of-type(odd) {
  background-color: var(--background-light);
}

.section:nth-of-type(even) {
  background-color: #0f0f0f;
}

/* --------- Services Section --------- */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

/* Sadece Neler Yapıyoruz bölümünde */
#services h2 + p { 
  text-align: center; 
}

/* İmalat / Onarım / Özel Tedarik giriş paragraflarını ortala */
h2[data-key="production"] + p,
h2[data-key="repairs"] + p,
h2[data-key="specialsupplies"] + p {
  text-align: center;
}


.service-card {
  background-color: #1a1a1a;
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 12px;
  padding: 30px 20px;
  width: 260px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.service-card img {
  /* Restrict service icons to a consistent size and center them */
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 20px;
  /* Invert and colourize icons to appear light on dark background */
  filter: brightness(0) invert(1);
}

.service-card h3 {
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-size: 20px;
  font-weight: 600;
}

.service-card p {
  font-size: 14px;
  color: var(--text-dark);
}

/* Icon wrapper for service icons: golden ring with subtle background tint */
.icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background-color: rgba(245, 194, 17, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(245, 194, 17, 0.3);
}

.icon-wrapper img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin: 0;
}

/* --------- About Section --------- */
.about-section .about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 60px;
}

.about-section .about-image {
  flex: 1 1 300px;
}

.about-section .about-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.about-section .about-text {
  flex: 2 1 400px;
}

.about-section .about-text h2 {
  text-align: center;
}

.about-section .about-text p {
  margin-bottom: 16px;
  text-align: center;
}

@media (max-width: 768px) {
  .about-section .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-section .about-text h2 {
    text-align: center;
  }
  .about-section .about-text p {
    text-align: center;
  }
}

/* --------- Portfolio / Gallery Sections --------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.portfolio-item {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

/* --------- Supplies Section --------- */
.supply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* --------- Floating WhatsApp Button --------- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 24px;
  height: 24px;
}

/* --------- Button Utilities --------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #d4a60b;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* --------- Fade-in Animation --------- */
/* Keyframes for fade-in upward movement */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base fade-in section style */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  /* Always animate sections when page loads */
  animation: fadeInUp 0.8s ease forwards;
}

/* When IntersectionObserver toggles this class, ensure final state */
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.supply-card {
  background-color: #1a1a1a;
  border: 1px solid rgba(241, 196, 15, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.supply-card:hover {
  transform: translateY(-6px);
}

.supply-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 8px;
  filter: none;
}

.supply-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--secondary-color);
  font-weight: 600;
}

.supply-card p {
  font-size: 14px;
  color: var(--text-dark);
}

/* --------- Contact Section --------- */
.contact-section {
  /* Force dark background for the contact section to create contrast */
  background-color: var(--primary-color) !important;
  color: var(--text-light);
  padding: 80px 0;
}

.contact-section h2 {
  color: var(--text-light);
  text-align: center;
}

/* Wrapper: içeriği yatayda ortala */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  align-items: flex-start;
  justify-content: center; /* center the block itself */
}

/* Form bloğunu sayfada ortala */
.contact-form {
  flex: 0 1 520px;
  min-width: 300px;
  margin-inline: auto;      /* block merkez */
}

/* Form alanlarını ve düzeni */
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;           /* form içeriğini merkez */
}

/* Styled inputs and textareas within contact form */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(245, 194, 17, 0.4);
  background-color: #1a1a1a;
  color: var(--text-light);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Enhance focus state for contact form inputs */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(245, 194, 17, 0.4);
}

/* Butonu ortala */
.contact-form button {
  align-self: center;       /* <— merkez */
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* reCAPTCHA konteynerini de ortala */
.contact-form .g-recaptcha,
.contact-form .recaptcha {
  display: block;
  margin: 0 auto;
}

.contact-form button:hover {
  background-color: #d4a60b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .contact-wrapper {
    flex-direction: column;
  }
  /* Mobilde de merkezde kalsın */
  .contact-form button {
    align-self: center;
  }
}

/* --------- Footer --------- */
footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 40px 20px;
  text-align: center;
}

footer h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

footer p {
  margin: 8px 0;
  font-size: 15px;
}

footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

footer a:hover {
  color: #d4a60b;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
  .service-card,
  .supply-card {
    width: 100%;
  }
  .portfolio-item img {
    height: 180px;
  }
  #hero {
    min-height: 60vh;
  }
  .hero-content h1 {
    font-size: 28px;
  }
  .hero-content p {
    font-size: 16px;
  }
}

/* --------- Screen reader only (accessibility) --------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}
