html {
  scroll-behavior: smooth;
}

:root {
  --color-primary: #0B0909;
  --color-secondary: #44444C;
  --color-text: #111111;
  --color-background: #ffffff;
  --font-family-base: 'Kanit', sans-serif;
}

/* Global image reset to avoid distortion and overflow */
img {
  max-width: 100%;
  height: auto;
  display: block;
}


body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--color-text);
  background-color: var(--color-background);
  border-radius: 12px;
}

.main-nav {
  position: sticky;
  top: 0;
  background: var(--color-background);
  z-index: 5000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.nav-link {
  margin-right: 20px;
  text-decoration: none;
  color: var(--color-primary);
  white-space: nowrap;
}

.nav-link:last-child {
  margin-right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; /* bigger tap target */
  height: 36px;
  padding: 4px;
  position: relative;
  z-index: 1100; /* keep on top of sticky header */
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;
  margin: 5px 0;
  background-color: #111;
  box-shadow: 0 0 3px rgba(0,0,0,0.4);
  transition: 0.3s;
  pointer-events: none; /* ensure the button receives the click */
}

.hero {
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--color-background);
  padding: 0 20px 0 20px;
  margin-top: 0;
}

.hero-content {
  background: none;
  box-shadow: none;
  padding: 0;
  max-width: 700px;
}

.hero-content h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.3rem;
  color: var(--color-secondary);
  margin-bottom: 25px;
}

.hero-content .button {
  background: var(--color-primary);
  color: var(--color-background);
  padding: 10px 25px;
  border-radius: 8px;
}

.hero-content .button:hover {
  background: var(--color-secondary);
  transition: background 0.3s ease, transform 0.3s ease;
  transform: translateY(-2px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.about,
.gallery {
  background-color: var(--color-background);
  box-shadow: none;
}

.about {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: auto;
  text-align: center;
  border-radius: 12px;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 12px;
}

.gallery img {
  width: 300px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: border-radius 0.3s ease;
  cursor: pointer;
}

.company-info {
  background: #f4f7fa;
  padding: 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: #555;
  border-radius: 12px;
}

.company-info p {
  margin: 0.5rem 0;
}

.logo {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100px;
  box-shadow: none;
  border-radius: 4px;
}

.nav-link:hover {
  color: #555;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 0 16px 2rem;
    margin-top: 0;
    height: auto;
    gap: 1.5rem;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.2;
  }

  .hero-content p {
    font-size: clamp(1rem, 4vw, 1.2rem);
    line-height: 1.6;
  }

  .gallery img {
    width: 90%;
  }

  .about,
  .company-info {
    padding: 2rem 1rem;
  }

  .about {
    padding: 3rem 1rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-background);
    display: none;
    gap: 12px;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 1200; /* ensure it sits above hero and other content */
    pointer-events: auto; /* allow clicks inside */
  }

  .nav-links.active {
    display: flex;
    z-index: 1200;
  }

  .nav-link {
    margin-right: 0;
  }

  .nav-toggle {
    display: block;
  }
  .nav-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
}

@media (min-width: 769px) {
  .hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0 4rem;
    margin-top: 0;
    height: auto;
  }

  .hero-content {
    flex: 1;
    padding-right: 2rem;
  }

  .hero-image {
    flex: 1;
  }

  .hero-content h1 {
    font-size: 4.5rem;
  }

  .hero-content p {
    font-size: 1.3rem;
  }
}

/* Custom style for quote image */
.quote-img {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
}

.quote-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

#thankyou {
  display: none;
  background: #e6fff0;
  border: 1px solid #00b386;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  color: #0B0909;
  margin-top: 1rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 179, 134, 0.15);
}

.email-error {
  display: none;
  color: #d00000;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.thankyou-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.thankyou-actions button {
  background: var(--color-primary);
  color: var(--color-background);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.thankyou-actions button:hover {
  background: var(--color-secondary);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-close:focus {
  outline: 2px solid var(--color-primary);
}

/* Sticky Join bar */
.join-sticky {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 8px;
  display: none; /* appears via JS */
  z-index: 6000;
  max-width: calc(100vw - 24px);
}
.join-sticky-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.join-sticky-text { font-weight: 600; color: var(--color-primary); margin-left: 8px; }
.join-sticky input[type="email"] {
  width: 220px;
  box-sizing: border-box;
  height: 42px;
  line-height: 42px;
  font-weight: 400;
  padding: 0.55rem 0.8rem;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: none;
}
.join-sticky button[type="submit"] {
  height: 42px;
  line-height: 42px;
  padding: 0 0.9rem;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
}
.join-sticky input[type="email"]::placeholder {
  font-weight: 400;
  opacity: 0.6;
}

.join-sticky input[type="email"]:focus {
  border-color: #dcdcdc;
  padding: 0.55rem 0.8rem;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.join-sticky button[type="submit"]:hover { background: var(--color-secondary); }
.join-sticky .join-sticky-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: #666;
}

@media (max-width: 480px) {
  .join-sticky { width: calc(100% - 24px); border-radius: 16px; }
  .join-sticky-form { gap: 6px; }
  .join-sticky input[type="email"] { flex: 1; width: auto; }
}

@media (max-width: 768px) {
  .join-sticky {
    left: 12px;
    right: 12px;
    transform: none; /* stop centering transform on narrow screens */
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }
  .join-sticky-form { gap: 6px; }
  .join-sticky-text { display: none; } /* hide label to save space */
  .join-sticky input[type="email"] {
    flex: 1;
    width: auto;
    min-width: 0; /* allow shrinking */
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
  }
  .join-sticky button[type="submit"] {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 14px;
  }
  .join-sticky .join-sticky-close {
    padding: 0 6px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .join-sticky input[type="email"] {
    height: 40px;
    line-height: 40px;
    padding: 0.5rem 0.75rem;
  }
  .join-sticky button[type="submit"] {
    height: 40px;
    line-height: 40px;
    padding: 0 0.75rem;
  }
}

/* --- Fullscreen cover hero using arch_kapak.png (overrides previous hero styles) --- */
.hero {
  width: 100%;
  min-height: 100vh; /* fallback */
  height: 100svh;    /* stable mobile viewport height */
  margin: 0;
  padding: 0;
  background-image: url('/img/arch_kapak.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
}
/* In case old inner blocks remain in DOM somewhere */
.hero .hero-content,
.hero .hero-image { display: none !important; }

/* Mobile-specific hero background override */
@media (max-width: 768px) {
  .hero {
    position: relative;
    background-image: none !important;
    overflow: hidden;
    --mob-x: 45%;
    --mob-y: 65%;
    --mob-shift-x: -3%;
    --mob-shift-y: 0%;
    --mob-scale: 1;
  }
  .hero-img--mobile {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

/* === Floating transparent navbar over hero (scoped overrides; no unrelated edits) === */
.main-nav {
  position: absolute;   /* hero'nun üstüne otur */
  top: 0;
  left: 0;
  right: 0;
  background: transparent;  /* bar görünmez */
  box-shadow: none;         /* gölge yok */
  z-index: 6000;            /* hero'nun üzerinde */
}

/* Görseller üzerinde okunabilirlik */
.main-nav .nav-link { color: #000; }
.main-nav .nav-link:hover { color: #e6e6e6; text-decoration: underline; }
.nav-toggle .bar { background-color: #111; }

/* Mobil açılır menü de görselin üzerinde koyu dursun */
@media (max-width: 768px) {
  .nav-links {
    background: rgba(0, 0, 0, 0.9);
  }
  .nav-links .nav-link { color: #fff; }
}

/* === Navbar link visibility enhancements === */
.main-nav .nav-link {
  color: #000;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.main-nav .nav-link:hover {
  color: #e6e6e6;
}

/* === Scroll sonrası navbar sabit ve daha belirgin === */
.main-nav.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 7000;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Linkler scrolled durumda da okunaklı kalsın */
.main-nav.scrolled .nav-link {
  color: #222;
  text-shadow: none;
}

/* === Mobile menu toggle visibility when scrolled === */
.main-nav.scrolled .nav-toggle {
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.6));
}

/* === Mobile menu toggle icon when active === */
.nav-toggle.active,
.nav-toggle[aria-expanded="true"] {
  color: #fff;
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

/* === Hamburger icon contrast fixes (mobile) === */
/* When navbar is scrolled on light background, show dark bars by default */
.main-nav.scrolled .nav-toggle .bar {
  background-color: #222;
  box-shadow: 0 0 2px rgba(0,0,0,0.25);
}
/* When the menu is opened, force white bars with a stronger shadow for visibility */
/* === Ensure hamburger bars turn white when menu is open (override higher specificity) === */
.main-nav.scrolled .nav-toggle[aria-expanded="true"] .bar {
  background-color: #fff !important;
  box-shadow: 0 0 3px rgba(0,0,0,0.6);
}

/* === Mobile dropdown background when navbar is scrolled (light theme) === */
@media (max-width: 768px) {
  .main-nav.scrolled .nav-links {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .main-nav.scrolled .nav-links .nav-link {
    color: #222 !important;
    text-shadow: none !important;
  }
}

/* === Mobile dropdown background (always light) === */
@media (max-width: 768px) {
  .nav-links {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links .nav-link {
    color: #222 !important;
    text-shadow: none !important;
  }
}

/* === Mobile dropdown background (transparent before scroll) === */
@media (max-width: 768px) {
  .main-nav:not(.scrolled) .nav-links {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
  .main-nav:not(.scrolled) .nav-links .nav-link {
    color: #000 !important; /* testing black titles on transparent bg */
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  }
}

/* === Mobile menu: larger titles when open === */
@media (max-width: 768px) {
  .nav-links.active .nav-link {
    font-size: 1.15rem;
    letter-spacing: 0.2px;
  }
}
/* === Desktop hero alignment: 5% left of center === */
@media (min-width: 769px) {
  .hero {
    background-position: 80% center !important;
  }
}
/* === Fix: hide mobile hero image on desktop, show only on mobile === */
.hero-img--mobile { display: none !important; }
@media (max-width: 768px) {
  .hero { position: relative; }
  .hero-img--mobile {
    display: block !important;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}