/* ============================================================
   Ev Otomasyon - tasarım sistemi
   Bootstrap üzerine ince bir katman: renk paleti, tipografi,
   navbar/footer, hero, kart ve blog bileşenleri.
   ============================================================ */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --text: #1a1d29;
  --text-muted: #656b7a;
  --border: #e4e7ee;

  --primary: #3556d9;
  --primary-dark: #2740ab;
  --primary-soft: #ecefff;
  --accent: #f5c518;
  --accent-soft: #fff4e0;
  --success: #16a34a;

  /* İKOÇ marka paleti: siyah/ink zemin + altın vurgu (logo ile birebir) */
  --ink: #0e1016;
  --ink-2: #171a24;
  --ink-border: #2a2e3d;
  --gold: #f5c518;
  --gold-dark: #caa10a;
  --gold-soft: rgba(245, 197, 24, .14);

  --radius: 0.9rem;
  --radius-sm: 0.55rem;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 8px 24px rgba(20, 24, 40, .06);
  --shadow-hover: 0 4px 10px rgba(20, 24, 40, .06), 0 16px 32px rgba(20, 24, 40, .10);
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.site-main {
  flex: 1 0 auto;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.text-muted { color: var(--text-muted) !important; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem var(--primary-soft);
}
.btn-lg { border-radius: var(--radius-sm); padding: .7rem 1.5rem; font-weight: 600; }

/* ---------- Navbar ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--ink-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}
.site-header .navbar-brand {
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.site-header .brand-logo {
  height: 32px;
  width: auto;
  display: block;
}
.site-header .brand-sub {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
  border-left: 1px solid var(--ink-border);
  padding-left: .6rem;
  letter-spacing: .01em;
}
.site-header .nav-link {
  color: rgba(255, 255, 255, .65) !important;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: .4rem .8rem !important;
  transition: color .15s ease, background-color .15s ease;
}
.site-header .nav-link.active,
.site-header .nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .08);
}
.site-header .btn-link.nav-link {
  text-decoration: none;
}
.site-header .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
}
.site-header .btn-primary:hover,
.site-header .btn-primary:focus {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}
.site-header .navbar-toggler {
  border-color: var(--ink-border);
  filter: invert(1) grayscale(1);
}

/* ---------- Kaydırmada beliren (reveal) bölümler - tüm sayfalarda ortak ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}
.reveal.in-view { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  position: relative;
  background: var(--ink);
  color: rgba(255, 255, 255, .55);
  font-size: .9rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 20%, var(--gold) 50%, var(--gold-dark) 80%, transparent);
  opacity: .55;
}
.site-footer a { color: rgba(255, 255, 255, .75); }
.site-footer a:hover { color: var(--gold); }

.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}
.footer-col.reveal { transition-delay: .06s; }
.footer-col:nth-child(2).reveal { transition-delay: .12s; }
.footer-col:nth-child(3).reveal { transition-delay: .18s; }
.footer-col:nth-child(4).reveal { transition-delay: .24s; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff !important;
  margin-bottom: .9rem;
}
.footer-brand:hover { color: #fff !important; }
.brand-logo-sm {
  height: 24px;
  width: auto;
  display: block;
}
.footer-tagline {
  color: rgba(255, 255, 255, .5);
  line-height: 1.65;
  font-size: .87rem;
  max-width: 34ch;
  margin-bottom: 1.4rem;
}
.footer-social {
  display: flex;
  gap: .6rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ink-border);
  color: rgba(255, 255, 255, .7);
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.footer-social a:hover {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
}

.footer-heading {
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-links, .footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: color .2s ease, transform .2s ease;
}
.footer-links a::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--gold);
  margin-right: 0;
  transition: width .2s ease, margin-right .2s ease;
}
.footer-links a:hover {
  transform: translateX(2px);
}
.footer-links a:hover::before {
  width: 10px;
  margin-right: 6px;
}
.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255, 255, 255, .6);
}
.footer-contact-list svg {
  flex-shrink: 0;
  color: var(--gold);
}
.footer-contact-list a { color: rgba(255, 255, 255, .75); }

.footer-bottom {
  border-top: 1px solid var(--ink-border);
  padding: 1.1rem 0;
  font-size: .82rem;
  color: rgba(255, 255, 255, .4);
}
.footer-signature { color: rgba(255, 255, 255, .35); }

@media (max-width: 991.98px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.5rem;
  }
  .footer-col-brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .footer-top { grid-template-columns: 1fr; padding: 2.75rem 0 2rem; }
  .footer-bottom .container { flex-direction: column; align-items: flex-start; gap: .4rem; }
}

/* ---------- Eyebrow etiketi (sayfa üstü küçük başlık) ---------- */
.story-kicker {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

/* ---------- Altın / hayalet butonlar (koyu zeminlerde - hero, CTA banner) ---------- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
  font-weight: 700;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--ink); transform: translateY(-1px); }
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color .15s ease, background-color .15s ease;
}
.btn-ghost-light:hover { color: #fff; border-color: var(--gold); background: rgba(245, 197, 24, .08); }

/* ---------- CTA banner (koyu zeminli çağrı bandı - anasayfa, hizmetler...) ---------- */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 2.75rem;
}
.cta-banner .story-kicker { color: var(--gold); }
.cta-banner h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 800;
  margin: .4rem 0 .3rem;
}
.cta-banner p { color: rgba(255, 255, 255, .65); margin: 0; }
.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  flex-shrink: 0;
}

/* ---------- Sayfa içi bölüm boşluğu (tüm içerik sayfalarında ortak) ---------- */
.home-section { margin: 4.5rem 0; }
.home-section .text-center.mt-4,
.home-section > .text-center { margin-top: 2.25rem; }

/* ---------- Section heading ---------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-heading h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0;
}

/* ---------- Blog cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.blog-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: box-shadow .15s ease, transform .15s ease;
  height: 100%;
}
.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.blog-card .blog-emoji { font-size: 1.6rem; }
.blog-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p.summary {
  color: var(--text-muted);
  font-size: .93rem;
  margin: 0;
  flex: 1;
}
.blog-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent-soft);
  color: #9a5b00;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
}
.blog-meta {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ---------- Article (blog detail) ---------- */
.article-header {
  text-align: center;
  padding: 2rem 0 1rem;
  max-width: 720px;
  margin: 0 auto;
}
.article-header .blog-emoji { font-size: 2.2rem; }
.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: .75rem 0 .5rem;
}
.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body pre {
  background: #1a1d29;
  color: #e4e7ee;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: .88rem;
}
.article-body code {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: .1rem .35rem;
  border-radius: .35rem;
  font-size: .9em;
}
.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ---------- Auth cards ---------- */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}
.auth-split {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.auth-brand-panel {
  background: var(--ink);
  color: #fff;
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background-image: radial-gradient(60% 50% at 20% 15%, rgba(245, 197, 24, .1), transparent);
}
.auth-brand-panel img { height: 34px; width: auto; align-self: flex-start; margin-bottom: 1.5rem; }
.auth-brand-panel h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .6rem;
}
.auth-brand-panel p { color: rgba(255, 255, 255, .65); font-size: .95rem; margin-bottom: 1.75rem; }
.auth-brand-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.auth-brand-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  color: rgba(255, 255, 255, .8);
  font-size: .9rem;
}
.auth-brand-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 800;
  flex-shrink: 0;
}
.auth-card {
  width: 100%;
  background: var(--bg-alt);
  padding: 2.5rem;
}
@media (max-width: 767.98px) {
  .auth-split { grid-template-columns: 1fr; max-width: 420px; }
  .auth-brand-panel { display: none; }
}
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .25rem;
}
.auth-card .auth-sub {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 1.5rem;
}
.auth-card .form-label { font-weight: 600; font-size: .9rem; }
.auth-card .btn { width: 100%; }
.auth-card .auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .92rem;
}

/* ---------- Panel (Evim) yerleşim tuvali ---------- */
.floor-plan {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  background:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 5% 5%;
  background-color: var(--bg-alt);
  border-radius: var(--radius);
  touch-action: none;
}

.device-icon {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: grab;
  text-align: center;
  user-select: none;
  padding: 4px;
}
.device-icon:active { cursor: grabbing; }
.device-glyph { display: block; font-size: 2rem; line-height: 1; }
.device-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #adb5bd;
  border: 1px solid var(--bg-alt);
}
.device-badge.online { background: var(--success); }
.device-label { font-size: .75rem; white-space: nowrap; }
.device-icon { z-index: 2; }

/* ---------- Kat sekmeleri ---------- */
.floor-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}
.floor-tab {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.floor-tab:hover { border-color: var(--primary); }
.floor-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.floor-tab-add {
  color: var(--primary);
  border-style: dashed;
}
.floor-tab-icon {
  border: none;
  background: none;
  font-size: 1rem;
  line-height: 1;
  padding: .3rem .4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.floor-tab-icon:hover { background: var(--bg); }

/* ---------- Odalar (kullanicinin cizdigi dikdortgenler) ---------- */
.room-box {
  position: absolute;
  z-index: 1;
  border: 2px solid var(--primary);
  background: rgba(53, 86, 217, .07);
  border-radius: .5rem;
  cursor: move;
  touch-action: none;
}
.room-box .room-label {
  position: absolute;
  top: -1.6rem;
  left: -2px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: .1rem .5rem;
  border-radius: .3rem;
  white-space: nowrap;
  cursor: text;
}
.room-box .room-delete-btn {
  position: absolute;
  top: -1.6rem;
  right: -2px;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  border-radius: .3rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .1s ease;
}
.room-box:hover .room-delete-btn { opacity: 1; }
.room-box .room-delete-btn:hover { color: #dc3545; border-color: #dc3545; }
.room-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 2px solid var(--bg-alt);
  border-radius: 3px;
  cursor: nwse-resize;
  touch-action: none;
}
.room-draw-preview {
  position: absolute;
  z-index: 1;
  border: 2px dashed var(--accent);
  background: rgba(245, 165, 36, .12);
  border-radius: .5rem;
  pointer-events: none;
}
#floor.drawing { cursor: crosshair; }
#drawRoomBtn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Kaydırma ilerleme çubuğu (tüm sayfalarda) ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  z-index: 1040;
  transition: width .08s linear;
}

/* ---------- Buton parlama efekti (hover'da ışık geçişi) ---------- */
.btn-gold, .btn-ghost-light {
  position: relative;
  overflow: hidden;
}
.btn-gold::after, .btn-ghost-light::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn-gold:hover::after, .btn-ghost-light:hover::after { left: 130%; }

/* ---------- İmleç takip eden "spotlight" parıltısı (kart hover'ı) ---------- */
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(245, 197, 24, .16), transparent 72%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.spotlight:hover::before { opacity: 1; }

/* ---------- Yüzen WhatsApp butonu (tüm sayfalarda) ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
  z-index: 1030;
  transition: transform .15s ease, box-shadow .15s ease;
}
.whatsapp-float:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 26px rgba(37, 211, 102, .55);
}

/* ---------- Yukarı çık butonu ---------- */
.scroll-top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 5.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--ink-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.scroll-top-btn:hover { background: var(--ink-2); }

@media (max-width: 575.98px) {
  .whatsapp-float { right: 1rem; bottom: 1rem; width: 50px; height: 50px; }
  .scroll-top-btn { right: 1rem; bottom: 4.75rem; width: 40px; height: 40px; }
}

