/* ============================================================
   DİNÇ GRUP — TASARIM SİSTEMİ (tema bağımsız, tek merkez)
   Marka: --marka (#D23C20) ic-sayfa.css :root'ta tanımlı.
   ============================================================ */
:root {
    --dg-font: "Poppins", "Lato", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --dg-ink: #14181d;          /* ana metin/koyu */
    --dg-ink-2: #232a30;        /* ikincil metin — koyu (soluk gri YOK) */
    --dg-ink-3: #3c454e;        /* üçüncül — yine koyu, okunur */
    --dg-line: #e7ebef;         /* çizgi/kenar */
    --dg-bg: #ffffff;
    --dg-bg-2: #f5f7f9;         /* açık zemin */
    --dg-bg-ink: #14181d;       /* koyu bölüm */
    --dg-radius: 14px;
    --dg-radius-sm: 10px;
    --dg-shadow: 0 10px 30px rgba(20,24,29,.08);
    --dg-shadow-hover: 0 18px 44px rgba(20,24,29,.14);
    --dg-ease: cubic-bezier(.22,.61,.36,1);
    --dg-dur: .45s;
    --dg-sec-y: 96px;           /* bölüm dikey ritmi */
    --dg-header-h: 76px;
}

/* ---------- BÖLÜM RİTMİ ---------- */
.dg-section { padding: var(--dg-sec-y) 0; }
.dg-section--tight { padding: calc(var(--dg-sec-y) * .62) 0; }
.dg-section--ink { background: var(--dg-bg-ink); color: #fff; }
.dg-section--alt { background: var(--dg-bg-2); }

/* ---------- BAŞLIK BLOĞU ---------- */
.dg-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.dg-head--left { text-align: left; margin-left: 0; }
.dg-pretitle {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .82rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--marka); margin-bottom: 14px;
}
.dg-pretitle::before { content: ""; width: 26px; height: 2px; background: var(--marka); }
.dg-title { font-family: var(--dg-font); font-weight: 800; color: var(--dg-ink); line-height: 1.12; margin: 0 0 14px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.dg-section--ink .dg-title { color: #fff; }
.dg-lead { color: var(--dg-ink-2); font-size: 1.03rem; line-height: 1.7; margin: 0; }
.dg-section--ink .dg-lead { color: rgba(255,255,255,.72); }

/* ---------- BUTON ---------- */
.dg-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 30px; border-radius: 999px; font-weight: 700; font-size: .95rem;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
    transition: transform var(--dg-dur) var(--dg-ease), background .3s, color .3s, box-shadow .3s;
}
.dg-btn--primary { background: var(--marka); color: #fff; }
.dg-btn--primary:hover { background: var(--marka-koyu); color: #fff; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(210,60,32,.32); }
.dg-btn--ghost { background: transparent; color: var(--dg-ink); border-color: var(--dg-line); }
.dg-btn--ghost:hover { background: var(--marka); border-color: var(--marka); color: #fff; transform: translateY(-3px); }
.dg-btn--light { background: #fff; color: var(--dg-ink); }
.dg-btn--light:hover { background: var(--marka); color: #fff; transform: translateY(-3px); }

/* ---------- KART (EŞİT YÜKSEKLİK) ---------- */
.dg-grid { display: grid; gap: 26px; }
.dg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.dg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.dg-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 991px) { .dg-grid--3, .dg-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .dg-grid--2, .dg-grid--3, .dg-grid--4 { grid-template-columns: 1fr; } }

.dg-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--dg-line); border-radius: var(--dg-radius);
    overflow: hidden; transition: transform var(--dg-dur) var(--dg-ease), box-shadow var(--dg-dur) var(--dg-ease);
}
.dg-card:hover { transform: translateY(-6px); box-shadow: var(--dg-shadow-hover); }
.dg-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--dg-bg-2); }
.dg-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--dg-ease); }
.dg-card:hover .dg-card-media img { transform: scale(1.07); }
.dg-card-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; }
.dg-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.dg-card-title { font-weight: 700; font-size: 1.08rem; line-height: 1.35; color: var(--dg-ink); margin: 0 0 10px; }
.dg-card-title a { color: inherit; text-decoration: none; }
.dg-card-title a:hover { color: var(--marka); }
.dg-card-text { color: var(--dg-ink-2); font-size: .94rem; line-height: 1.6; margin: 0; }
.dg-card-foot { margin-top: auto; padding-top: 16px; }

/* metin kırpma (line-clamp) — kart yükseklik dengesi */
.dg-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dg-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- HİZMET KARTI (ikon) ---------- */
.dg-feature { text-align: center; padding: 34px 24px; }
.dg-feature-icon {
    width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(210,60,32,.10); color: var(--marka); font-size: 1.7rem;
    transition: background .35s, color .35s, transform var(--dg-dur) var(--dg-ease);
}
.dg-card:hover .dg-feature-icon { background: var(--marka); color: #fff; transform: rotate(-6deg) scale(1.06); }
.dg-feature .dg-card-title { font-size: 1.02rem; }

/* ============================================================
   NAVBAR (logo SOL, sticky-shrink, mobil drawer)
   ============================================================ */
.dg-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
    background: #fff; box-shadow: 0 1px 0 var(--dg-line);
    transition: box-shadow .3s, background .3s;
}
.dg-header.scrolled { box-shadow: 0 6px 22px rgba(20,24,29,.10); }
.dg-header-inner {
    max-width: 1300px; margin: 0 auto; padding: 0 24px;
    height: var(--dg-header-h); display: flex; align-items: center; gap: 28px;
    transition: height .3s var(--dg-ease);
}
.dg-header.scrolled .dg-header-inner { height: 64px; }
.dg-logo { flex: 0 0 auto; display: flex; align-items: center; }
/* Item 6: logo büyütüldü (oran korunur; scroll-shrink ile uyumlu). */
.dg-logo img { height: 62px; width: auto; transition: height .3s var(--dg-ease); display: block; }
.dg-header.scrolled .dg-logo img { height: 48px; }

.dg-nav { margin-left: auto; }
.dg-menu { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.dg-menu > li { position: relative; }
.dg-menu > li > a {
    display: flex; align-items: center; gap: 6px; height: var(--dg-header-h);
    padding: 0 14px; color: var(--dg-ink); font-weight: 600; font-size: .93rem;
    text-decoration: none; letter-spacing: .01em; transition: color .25s;
}
.dg-menu > li > a::after { /* aktif/hover alt çizgi */
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 20px; height: 2px;
    background: var(--marka); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--dg-ease);
}
.dg-menu > li:hover > a, .dg-menu > li.active > a { color: var(--marka); }
.dg-menu > li:hover > a::after, .dg-menu > li.active > a::after { transform: scaleX(1); }
.dg-has-sub > a > .dg-caret { font-size: .7rem; transition: transform .3s; }
.dg-has-sub:hover > a > .dg-caret { transform: rotate(180deg); }

/* dropdown */
.dg-sub {
    position: absolute; top: calc(100% - 6px); left: 0; min-width: 230px;
    list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--dg-line);
    border-radius: var(--dg-radius-sm); box-shadow: var(--dg-shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .28s var(--dg-ease), transform .28s var(--dg-ease), visibility .28s;
    z-index: 1200;
}
.dg-menu > li:hover > .dg-sub { opacity: 1; visibility: visible; transform: translateY(0); }
.dg-sub li a, .dg-sub .rd-dropdown-link {
    display: block; padding: 10px 14px; border-radius: 8px; color: var(--dg-ink-2);
    text-decoration: none; font-size: .9rem; font-weight: 500; transition: background .2s, color .2s;
}
.dg-sub li a:hover, .dg-sub .rd-dropdown-link:hover { background: var(--dg-bg-2); color: var(--marka); }

/* hamburger */
.dg-burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.dg-burger span { display: block; width: 26px; height: 2px; background: var(--dg-ink); margin: 0 auto; transition: transform .3s, opacity .3s; }
/* Item 8: overlay, HEADER'ın (z:1100) ALTINDA kalmalı; aksi halde drawer'ın üstüne binip
   menü linklerini tıklanamaz yapıyordu (görünmez katman). Header bir stacking-context; drawer
   header'ın içinde olduğundan header'ın z'i > overlay olunca drawer linkleri tıklanabilir olur. */
.dg-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(20,24,29,.5); z-index: 1090; opacity: 0; transition: opacity .3s; }
.dg-nav-overlay.show { display: block; opacity: 1; }

/* içerik header'ın altında başlasın */
body.dg-has-fixed-header { padding-top: var(--dg-header-h); }
body.dg-hero-home { padding-top: 0; }               /* anasayfa hero header altından başlar */
body.dg-hero-home .dg-header { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.2) blur(6px); }

/* ---------- MOBİL ---------- */
@media (max-width: 991px) {
    .dg-burger { display: flex; }
    .dg-nav {
        position: fixed; top: 0; right: 0; height: 100vh; width: min(84vw, 340px);
        background: #fff; margin: 0; padding: 84px 0 30px; overflow-y: auto;
        transform: translateX(100%); transition: transform .38s var(--dg-ease); z-index: 1160; box-shadow: -10px 0 40px rgba(0,0,0,.15);
    }
    .dg-nav.open { transform: translateX(0); }
    .dg-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .dg-menu > li > a { height: auto; padding: 15px 26px; min-height: 50px; border-bottom: 1px solid var(--dg-line); justify-content: space-between; }
    .dg-menu > li > a::after { display: none; }
    .dg-sub {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
        border-radius: 0; background: var(--dg-bg-2); padding: 0; max-height: 0; overflow: hidden; transition: max-height .35s var(--dg-ease);
    }
    .dg-has-sub.open > .dg-sub { max-height: 600px; }
    .dg-sub li a, .dg-sub .rd-dropdown-link { padding: 12px 40px; }
    .dg-has-sub:hover > .dg-sub { opacity: 1; visibility: visible; } /* hover devre dışı; tıklama ile */
    .dg-has-sub.open > a > .dg-caret { transform: rotate(180deg); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    .dg-card:hover { transform: none; }
}

/* ---------- scroll-reveal ---------- */
.dg-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--dg-ease), transform .7s var(--dg-ease); }
.dg-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dg-reveal { opacity: 1; transform: none; } }
.dg-sub:empty { display: none !important; }
.dg-grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .dg-grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .dg-grid--5 { grid-template-columns: repeat(2, 1fr); } }

/* Tek haberde yatay öne-çıkan kart (ortada asılı kalmaz) */
@media (min-width: 768px) {
    .dg-card--row { flex-direction: row; align-items: stretch; }
    .dg-card--row .dg-card-media { flex: 0 0 46%; aspect-ratio: auto; min-height: 300px; }
    .dg-card--row .dg-card-body { justify-content: center; padding: 34px; }
}

/* ---------- MAKİNE PARKI TABLOSU ---------- */
.dg-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.dg-chip { padding: 9px 20px; border-radius: 999px; border: 1px solid var(--dg-line); background: #fff; color: var(--dg-ink); font-weight: 600; font-size: .9rem; text-decoration: none; transition: all .25s var(--dg-ease); }
.dg-chip:hover { border-color: var(--marka); color: var(--marka); }
.dg-chip.active { background: var(--marka); border-color: var(--marka); color: #fff; }
.dg-cat-block { margin-bottom: 44px; }
.dg-cat-head { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; font-weight: 800; color: var(--dg-ink); margin: 0 0 18px; padding-bottom: 14px; border-bottom: 2px solid var(--dg-line); }
.dg-cat-head i { color: var(--marka); }
.dg-cat-head .dg-cat-count { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--marka); background: rgba(210,60,32,.09); padding: 4px 12px; border-radius: 999px; }
.dg-table-wrap { overflow-x: auto; border: 1px solid var(--dg-line); border-radius: var(--dg-radius-sm); -webkit-overflow-scrolling: touch; }
.dg-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.dg-table th { background: var(--dg-bg-2); color: var(--dg-ink); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 14px 18px; white-space: nowrap; }
.dg-table td { padding: 13px 18px; border-top: 1px solid var(--dg-line); color: var(--dg-ink-2); font-size: .93rem; }
.dg-table tbody tr:hover { background: var(--dg-bg-2); }
.dg-table td.dg-t-ad { color: var(--dg-ink); font-weight: 600; }
.dg-table td.dg-t-adet { font-weight: 700; color: var(--marka); white-space: nowrap; }

/* ============================================================
   ITEM 19 — SOLUK GRİ TON YOK (yalnız public; admin ayrı layout, etkilenmez)
   Açık zeminde metin/ikon KOYU, koyu zeminde BEYAZ.
   ============================================================ */
main .text-muted, main .text-secondary,
.dg-section .text-muted, .dg-section .text-secondary { color: var(--dg-ink-2) !important; }
/* Koyu bölümlerde tersine: beyaz/açık */
.context-dark .text-muted, .context-dark .text-secondary,
.footer-classic .text-muted, .dg-section--ink .text-muted,
footer .text-muted { color: rgba(255,255,255,.82) !important; }
/* Tema griler (ic-sayfa/style.css muted) — public içerikte koyulaştır */
main .text-gray-500, main .text-gray-400, main small.text-muted { color: var(--dg-ink-2) !important; }

/* ============================================================
   ITEM 12 — YÜKLENEN GÖRSELLER KAPAKLARA SIĞSIN (kırpılmadan bozulmadan)
   Kart görselleri tutarlı en-boy oranı + object-fit:cover (esnemez/deforme olmaz).
   ============================================================ */
main .dg-card-media img,
main .blog-item > a img,
main .service-item img,
main .product-card img,
main .isotope-item img { object-fit: cover; width: 100%; display: block; }

/* ============================================================
   AŞAMA 2 — Footer yazılımXpress kredi LOGOSU (renkli logo, koyu footer'da
   beyaz hap içinde okunur; mobil dahil TEK SATIR, dikey hizalı)
   ============================================================ */
.footer-classic .rights .dg-footer-credit {
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap; vertical-align: middle;
}
.footer-classic .rights .dg-yx-logo {
    display: inline-flex; align-items: center; background: #fff;
    border-radius: 6px; padding: 4px 9px; line-height: 0;
    transition: transform .25s var(--dg-ease), box-shadow .25s;
}
.footer-classic .rights .dg-yx-logo:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.footer-classic .rights .dg-yx-logo img { height: 18px; width: auto; display: block; }
@media (max-width: 575px) {
    .footer-classic .rights .dg-yx-logo img { height: 16px; }
    .footer-classic .rights { line-height: 2; }
}
