/* === BASE_URL: http://cihankenetcatikaplamaustasi.com.tr === */
/* Cihan İnşaat — Ankara Kenet Çatı
   Single stylesheet. Mobile-first. No frameworks.
   Font: Arial, Helvetica, sans-serif (system stack)
   -------------------------------------------------- */

/* 1. CSS Custom Properties
   -------------------------------------------------- */
:root {
  --bg:        #f4efe6;
  --bg-alt:    #e7e0d3;
  --text:      #202020;
  --dark:      #20262b;
  --dark-soft: #2b3338;
  --border:    #d2c7b8;
  --muted:     #67645f;
  --accent:    #a94f24;
  --accent-hv: #873d1b;
  --tile:      #8f3f24;
  --metal:     #3f484d;
  --wa:        #1d7a47;
  --wa-hv:     #165e36;
  --white:     #fbf8f2;
  --radius:    3px;
  --max-w:     1080px;
  --gap:       1.5rem;
}

/* 2. Reset / Base
   -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

ul, ol { padding-left: 1.4em; }

/* 3. Typography
   -------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; margin-bottom: .6rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .4rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* 4. Layout Utilities
   -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1rem;
}

.section { padding: 2.5rem 0; }
.section--dark { background: var(--dark-soft); color: var(--bg); }
.section--dark h2, .section--dark h3 { color: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section--metal { background: var(--metal); color: var(--bg); }
.section--metal h2, .section--metal h3 { color: var(--white); }

/* Utility spacing */
.mt-sm { margin-top: .8rem; }
.mt-md { margin-top: 1.2rem; }
.mt-lg { margin-top: 1.8rem; }
.text-muted { color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 5. Top Contact Bar
   -------------------------------------------------- */
.top-bar {
  background: var(--dark);
  color: var(--bg);
  font-size: .82rem;
  padding: .45rem 0;
  border-bottom: 1px solid #2a3138;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
}
.top-bar a {
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
}
.top-bar a:hover { color: var(--accent-hv); text-decoration: none; }
.top-bar__address { color: #9ea3a8; }

/* 6. Header / Navigation
   -------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--dark);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: .7rem;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--dark);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: var(--dark); }
.site-logo__name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--dark);
}
.site-logo__sub {
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: .1rem; }
.site-nav a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--dark);
  padding: .45rem .7rem;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: .45rem .6rem;
  border-radius: var(--radius);
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 7. Hero
   -------------------------------------------------- */
.hero {
  position: relative;
  background: var(--dark);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .65;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #20262b 0%,
    rgba(32, 38, 43, .55) 45%,
    rgba(32, 38, 43, .1) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1rem 3rem;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(1.4rem, 4.5vw, 2.3rem);
  margin-bottom: .8rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.hero__lead { color: #c8c2b8; font-size: 1rem; max-width: 560px; margin-bottom: 1.4rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; }

/* Page header (inner pages) */
.page-header {
  background: var(--dark);
  padding: 2rem 0;
  border-bottom: 3px solid var(--accent);
}
.page-header h1 { color: var(--white); margin-bottom: .4rem; }
.page-header__lead { color: #9ea3a8; font-size: .95rem; }

/* 8. Breadcrumb
   -------------------------------------------------- */
.breadcrumb {
  font-size: .8rem;
  color: var(--muted);
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.breadcrumb li::after { content: "›"; margin-left: .3rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* 9. Buttons
   -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: .88rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hv); border-color: var(--accent-hv); color: #fff; text-decoration: none; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--outline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); color: #fff; text-decoration: none; }
.btn--wa { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn--wa:hover { background: var(--wa-hv); border-color: var(--wa-hv); color: #fff; text-decoration: none; }
.btn--dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn--dark:hover { background: #161b1f; text-decoration: none; color: #fff; }

/* 10. Service Cards Grid
   -------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s;
}
.service-card:hover { border-color: var(--accent); }
.service-card__img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); }
.service-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.service-card__body { padding: .85rem; flex: 1; display: flex; flex-direction: column; }
.service-card__title {
  font-weight: 600;
  font-size: .93rem;
  color: var(--dark);
  margin-bottom: .3rem;
}
.service-card__text { font-size: .9rem; color: var(--muted); flex: 1; margin-bottom: .7rem; }
.service-card__link {
  font-size: .84rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.service-card__link::after { content: "→"; }
.service-card__link:hover { text-decoration: underline; }

/* Icon card variant */
.service-card--icon .service-card__icon {
  font-size: 1.8rem;
  padding: 1rem 1rem 0;
  line-height: 1;
}

/* 11. Editorial / Content Sections
   -------------------------------------------------- */
.content-block { max-width: 780px; }
.content-block h2 { margin-bottom: .8rem; }
.content-block p + h2 { margin-top: 1.8rem; }
.content-block h2 + p { margin-top: .4rem; }
.content-block ul { margin-bottom: 1rem; }
.content-block li { margin-bottom: .35rem; }

/* Technical box */
.tech-box {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.1rem 0;
  font-size: .92rem;
}
.tech-box h3 {
  font-size: .9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .35rem;
}

/* Comparison columns */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.compare-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.compare-col h3 { font-size: .95rem; border-bottom: 2px solid var(--accent); padding-bottom: .35rem; margin-bottom: .7rem; font-weight: 600; }
.compare-col ul { padding-left: 1.2em; font-size: .9rem; }
.compare-col li { margin-bottom: .3rem; }

/* Info list with labels */
.info-list { list-style: none; padding: 0; }
.info-list li {
  display: flex;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list__label { font-weight: 600; min-width: 110px; color: var(--dark); }

/* 12. Area Pills
   -------------------------------------------------- */
.area-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.area-pill {
  background: var(--metal);
  color: var(--bg);
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 2px;
  letter-spacing: .01em;
}

/* 13. CTA Block
   -------------------------------------------------- */
.cta-block {
  background: var(--metal);
  padding: 2.2rem 0;
}
.cta-block .container { display: flex; flex-direction: column; gap: 1.2rem; }
.cta-block__text h2 { color: var(--white); font-size: 1.3rem; margin-bottom: .4rem; }
.cta-block__text p { color: #b5babe; font-size: .9rem; margin: 0; }
.cta-block__actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-start; }
.cta-block__note { font-size: .8rem; color: #7d8285; margin-top: .4rem; }

/* 14. Related Services Block
   -------------------------------------------------- */
.related-services { margin: 1.8rem 0; }
.related-services h2 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .7rem;
}
.related-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.related-link {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--dark);
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .85rem;
  border-radius: var(--radius);
  transition: border-color .15s, color .15s;
}
.related-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* 15. FAQ
   -------------------------------------------------- */
.faq-section { padding: 1.8rem 0; }
.faq-section h2 { margin-bottom: .9rem; }
.faq-list { max-width: 780px; }

details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  background: var(--white);
}
details.faq-item[open] { border-color: var(--accent); }
details.faq-item summary {
  font-weight: 600;
  font-size: .92rem;
  padding: .72rem .95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .18s;
}
details.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-answer {
  padding: 0 .95rem .85rem;
  font-size: .9rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

/* 16. Footer
   -------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: #9ea3a8;
  padding: 2.5rem 0 1.5rem;
  font-size: .85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a3138;
  margin-bottom: 1.2rem;
}
.footer-brand__name { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: .4rem; }
.footer-brand__address { line-height: 1.7; margin-bottom: .8rem; }
.footer-brand__phone { font-size: 1rem; font-weight: 700; }
.footer-brand__phone a { color: var(--accent); }
.footer-brand__phone a:hover { color: var(--accent-hv); text-decoration: none; }
.footer-brand__wa a { color: var(--wa); font-weight: 600; }
.footer-brand__wa a:hover { color: #25a060; text-decoration: none; }

.footer-nav h3 {
  color: var(--white);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: .8rem;
}
.footer-nav ul { list-style: none; padding: 0; columns: 2; gap: 1rem; }
.footer-nav li { margin-bottom: .4rem; break-inside: avoid; }
.footer-nav a { color: #9ea3a8; font-size: .83rem; }
.footer-nav a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom { font-size: .78rem; color: var(--muted); }

/* 17. Mobile Sticky Bottom Bar
   -------------------------------------------------- */
.sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  z-index: 300;
  background: var(--dark);
  box-shadow: 0 -1px 0 rgba(0,0,0,.3);
}
.sticky-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .88rem;
  padding: .72rem .5rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .03em;
  transition: background .15s;
}
.sticky-bar a:first-child { background: var(--accent); }
.sticky-bar a:first-child:hover { background: var(--accent-hv); }
.sticky-bar a:last-child { background: var(--wa); }
.sticky-bar a:last-child:hover { background: var(--wa-hv); }
/* Mobile body offset */
body { padding-bottom: 50px; }

/* 18. Contact Page
   -------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.contact-card h2 {
  font-size: 1rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: .8rem;
}
.contact-card p { font-size: .92rem; margin-bottom: .5rem; }
.contact-card a { color: var(--accent); }
.contact-card strong { color: var(--dark); }
.map-placeholder {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: .8rem;
}
.map-placeholder p { color: var(--muted); font-size: .9rem; margin: 0; }
.map-placeholder a { font-weight: 700; }

/* 19. 404 Page
   -------------------------------------------------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
.error-page__code { font-size: 5rem; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.error-page h1 { font-size: 1.3rem; margin-bottom: 1rem; }
.error-page p { color: var(--muted); max-width: 420px; margin-bottom: 1.5rem; }

/* 20. Inline image sections
   -------------------------------------------------- */
.img-text-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}
.img-text-grid img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}
.img-caption { font-size: .77rem; color: var(--muted); margin-top: .3rem; }

/* ===================================================
   MEDIA QUERIES — mobile-first
   =================================================== */

/* 480px — small phones */
@media (min-width: 480px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 768px — tablets / landscape */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .sticky-bar { display: none; }

  .section { padding: 3rem 0; }

  .hero { min-height: 460px; }
  .hero__content { padding: 3rem 1rem 4rem; }

  /* Desktop-only subtle card image hover */
  .service-card__img-wrap img { transition: transform .3s; }
  .service-card:hover .service-card__img-wrap img { transform: scale(1.02); }
  .service-card { box-shadow: none; }
  .service-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }

  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .compare-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1.4fr 1fr; }

  .cta-block .container { flex-direction: row; align-items: center; justify-content: space-between; }
  .cta-block__text { flex: 1; }

  .img-text-grid { grid-template-columns: 1fr 1fr; }
  .img-text-grid--wide-text { grid-template-columns: 1.6fr 1fr; }

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

/* 1024px — desktop */
@media (min-width: 1024px) {
  .hero { min-height: 520px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }

  /* Center lone last card when it starts a new row in 3-col grid */
  .service-grid > *:last-child:nth-child(3n+1) {
    grid-column: 2;
  }

  .nav-toggle { display: none !important; }
  .site-nav { display: flex !important; }

  .footer-grid { grid-template-columns: 1.6fr 1fr; }
}

/* Mobile nav state (below 1024px) */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: .5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 199;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: .7rem 1.2rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a[aria-current="page"] { border-bottom: 1px solid var(--border); border-left: 3px solid var(--accent); }
  .site-header { position: relative; }
}
