﻿/* =========================================================
   KEPSAŞ - ORGANİZASYON ŞEMASI
   ========================================================= */

:root {
    --org-primary: #1a4c6b;
    --org-primary-dark: #12394f;
    --org-text: #17232c;
    --org-muted: #687680;
    --org-border: #dfe6ea;
    --org-line: #cbd6dc;
    --org-surface: #ffffff;
    --org-background: #f8f9fa;
    --org-shadow: 0 7px 20px rgba(20, 43, 56, 0.055);
    --org-shadow-hover: 0 14px 30px rgba(20, 43, 56, 0.10);
}


/* =========================================================
   SAYFA
   ========================================================= */

.org-page {
    min-height: 70vh;
    overflow-x: hidden;
    padding-bottom: 55px;
    background: var(--org-background);
}


/* =========================================================
   HERO
   ========================================================= */

.org-hero {
    position: relative;
    overflow: hidden;
    padding: 38px 0 46px;
    text-align: center;
}


.org-hero-container {
    position: relative;
    z-index: 2;
}


/* =========================================================
   HERO ETİKET
   ========================================================= */

.org-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    color: #0d6efd;
    background: #ffffff;
    border: 1px solid rgba(13, 110, 253, 0.08);
    border-radius: 999px;
    box-shadow: 0 5px 15px rgba(20, 43, 56, 0.06);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}


/* =========================================================
   HERO BAŞLIK
   ========================================================= */

.org-hero h1 {
    margin: 0 0 1rem;
    color: #212529;
    font-size: clamp( 35px, 4vw, 52px );
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.4px;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.org-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}


    .org-breadcrumb span {
        color: #0d6efd;
    }


/* =========================================================
   ORGANİZASYON ŞEMASI
   ========================================================= */

.org-chart-section {
    position: relative;
    z-index: 5;
    margin-top: -16px;
}


.org-chart {
    position: relative;
    padding: 0 4px;
}


/* =========================================================
   TEPE YÖNETİCİ
   ========================================================= */

.org-root {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
}


/* =========================================================
   ORTAK KART
   ========================================================= */

.org-card {
    position: relative;
    overflow: hidden;
    background: var(--org-surface);
    border: 1px solid var(--org-border);
    border-radius: 12px;
    box-shadow: var(--org-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}


    .org-card:hover {
        transform: translateY(-3px);
        border-color: rgba(26, 76, 107, 0.25);
        box-shadow: var(--org-shadow-hover);
    }


/* =========================================================
   TEPE YÖNETİCİ KARTI
   ========================================================= */

.org-card-lead {
    width: min(100%, 470px);
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    align-items: center;
    padding: 12px;
    border-top: 3px solid var(--org-primary);
}


    .org-card-lead .org-info {
        padding: 9px 22px;
        text-align: left;
    }


/* =========================================================
   FOTOĞRAFLAR
   ========================================================= */

.org-image-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #edf1f3;
    border-radius: 8px;
}


/* 274 x 300 oranındaki üst yönetici fotoğrafı */

.org-image-lead {
    width: 155px;
    aspect-ratio: 274 / 300;
}


/* Müdür fotoğrafları */

.org-image-manager {
    width: 100%;
    aspect-ratio: 274 / 300;
    border-radius: 9px 9px 0 0;
}


.org-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}


/* =========================================================
   ANA BAĞLANTI ÇİZGİSİ
   ========================================================= */

.org-main-connector {
    width: 2px;
    height: 32px;
    margin: 0 auto;
    background: linear-gradient( to bottom, var(--org-primary), var(--org-line) );
}


/* =========================================================
   MÜDÜRLER
   ========================================================= */

.org-managers {
    position: relative;
    display: grid;
    grid-template-columns: repeat( 6, minmax(0, 1fr) );
    gap: 18px;
    padding-top: 31px;
}


    /* Ana yatay bağlantı */

    .org-managers::before {
        content: "";
        position: absolute;
        top: 0;
        right: 8.33%;
        left: 8.33%;
        height: 2px;
        background: var(--org-line);
        border-radius: 20px;
    }


/* =========================================================
   NODE
   ========================================================= */

.org-node {
    position: relative;
    min-width: 0;
}


    /* Karta inen dikey çizgi */

    .org-node::before {
        content: "";
        position: absolute;
        top: -31px;
        left: 50%;
        width: 2px;
        height: 31px;
        background: var(--org-line);
        transform: translateX(-50%);
    }


    /* Bağlantı noktası */

    .org-node::after {
        content: "";
        position: absolute;
        top: -3px;
        left: 50%;
        z-index: 2;
        width: 7px;
        height: 7px;
        background: var(--org-surface);
        border: 2px solid var(--org-primary);
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }


/* =========================================================
   MÜDÜR KARTI
   ========================================================= */

.org-card-manager {
    width: 100%;
    max-width: 168px;
    height: 100%;
    margin: 0 auto;
}


    .org-card-manager .org-info {
        min-height: 93px;
        padding: 14px 12px 16px;
        text-align: center;
    }


/* =========================================================
   YAZILAR
   ========================================================= */

.org-role {
    display: block;
    min-height: 30px;
    margin-bottom: 7px;
    color: var(--org-muted);
    font-size: 9px;
    font-weight: 750;
    line-height: 1.45;
    letter-spacing: 0.65px;
    text-transform: uppercase;
}


.org-role-primary {
    min-height: auto;
    margin-bottom: 8px;
    color: var(--org-primary);
    font-size: 10px;
}


.org-name {
    margin: 0;
    color: var(--org-text);
    font-weight: 720;
    line-height: 1.25;
    letter-spacing: -0.25px;
}


.org-card-lead .org-name {
    font-size: 22px;
}


.org-card-manager .org-name {
    font-size: 15px;
}


/* =========================================================
   ALT VURGU ÇİZGİSİ
   ========================================================= */

.org-card-manager::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    background: rgba(26, 76, 107, 0.45);
    border-radius: 10px 10px 0 0;
    transform: translateX(-50%);
    transition: width 0.22s ease, background-color 0.22s ease;
}


.org-card-manager:hover::after {
    width: 52px;
    background: var(--org-primary);
}

/* =========================================================
   RESPONSIVE - KÜÇÜK MASAÜSTÜ / TABLET / MOBİL
   Desktop (1200px+) görünümü aynen korunur.
   ========================================================= */

@media (max-width: 1199.98px) {

    .org-chart {
        padding-inline: 8px;
    }

    .org-managers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(16px, 2.5vw, 28px);
        padding-top: 10px;
    }

        /* 3x2 düzende organizasyon çizgileri yerine temiz kart gridi kullanılır. */
        .org-main-connector,
        .org-managers::before,
        .org-node::before,
        .org-node::after {
            display: none;
        }

    .org-card-manager {
        max-width: 185px;
    }
}


@media (max-width: 767.98px) {

    .org-page {
        padding-bottom: 44px;
    }

    .org-hero {
        padding: 30px 0 36px;
    }

    .org-eyebrow {
        margin-bottom: 0.8rem;
        padding: 0.45rem 1.2rem;
        font-size: 0.7rem;
    }

    .org-hero h1 {
        margin-bottom: 0.8rem;
        font-size: clamp(30px, 7.5vw, 38px);
        letter-spacing: -1px;
    }

    .org-breadcrumb {
        flex-wrap: wrap;
        gap: 0.4rem;
        font-size: 11.5px;
        letter-spacing: 1.1px;
    }

    .org-chart-section {
        margin-top: -8px;
    }

    .org-chart {
        padding-inline: 4px;
    }

    .org-card-lead {
        width: min(100%, 430px);
        grid-template-columns: clamp(138px, 35vw, 160px) minmax(0, 1fr);
        padding: 10px;
    }

    .org-image-lead {
        width: 100%;
    }

    .org-card-lead .org-info {
        min-width: 0;
        padding: 9px 16px;
    }

    .org-role-primary {
        font-size: 9.5px;
    }

    .org-card-lead .org-name {
        font-size: 20px;
    }

    .org-managers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(12px, 3.5vw, 18px);
        margin-top: 22px;
    }

    .org-card-manager {
        max-width: 180px;
    }

        .org-card-manager .org-info {
            min-height: 86px;
            padding: 12px 10px 14px;
        }

    .org-role {
        min-height: 29px;
        font-size: 8.5px;
        letter-spacing: 0.5px;
    }

    .org-card-manager .org-name {
        font-size: 14.5px;
    }
}


@media (max-width: 479.98px) {

    .org-page {
        padding-bottom: 34px;
    }

    .org-hero {
        padding: 24px 0 30px;
    }

    .org-eyebrow {
        margin-bottom: 0.7rem;
        padding: 0.4rem 1rem;
        font-size: 0.66rem;
    }

    .org-hero h1 {
        margin-bottom: 0.7rem;
        font-size: clamp(28px, 8.8vw, 32px);
        letter-spacing: -0.8px;
    }

    .org-breadcrumb {
        gap: 0.35rem;
        font-size: 10.5px;
        letter-spacing: 0.85px;
    }

    .org-chart-section {
        margin-top: -4px;
    }

    .org-chart {
        padding-inline: 0;
    }

    .org-card {
        border-radius: 10px;
    }

    .org-card-lead {
        width: min(100%, 360px);
        grid-template-columns: clamp(132px, 40vw, 150px) minmax(0, 1fr);
        padding: 8px;
    }

    .org-image-lead {
        width: 100%;
    }

    .org-card-lead .org-info {
        min-width: 0;
        padding: 7px 11px;
    }

    .org-role-primary {
        margin-bottom: 7px;
        font-size: 8px;
        line-height: 1.4;
        letter-spacing: 0.35px;
    }

    .org-card-lead .org-name {
        font-size: 17.5px;
    }

    .org-managers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 18px;
    }

    .org-card-manager {
        max-width: none;
    }

    .org-image-manager {
        border-radius: 8px 8px 0 0;
    }

    .org-card-manager .org-info {
        min-height: 80px;
        padding: 10px 6px 12px;
    }

    .org-role {
        min-height: 27px;
        margin-bottom: 5px;
        font-size: clamp(7.2px, 2.15vw, 8px);
        line-height: 1.35;
        letter-spacing: 0.25px;
        overflow-wrap: anywhere;
    }

    .org-card-manager .org-name {
        font-size: clamp(12.5px, 3.6vw, 14px);
        overflow-wrap: anywhere;
    }

    .org-card-manager::after {
        width: 22px;
    }
}


/* Gerçekten dar ekranlarda tek kolon; kartlar yataylaşarak alanı verimli kullanır. */
@media (max-width: 359.98px) {

    .org-card-lead {
        width: 100%;
        grid-template-columns: minmax(128px, 42%) minmax(0, 1fr);
        padding: 7px;
    }

    .org-image-lead {
        width: 100%;
    }

    .org-card-lead .org-info {
        padding: 6px 9px;
    }

    .org-role-primary {
        font-size: 7.5px;
    }

    .org-card-lead .org-name {
        font-size: 16.5px;
    }

    .org-managers {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .org-card-manager {
        max-width: 290px;
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        align-items: stretch;
    }

    .org-image-manager {
        width: 88px;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 8px 0 0 8px;
    }

    .org-card-manager .org-info {
        min-height: 96px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 12px;
        text-align: left;
    }

    .org-role {
        min-height: auto;
        font-size: 7.5px;
    }

    .org-card-manager .org-name {
        font-size: 13.5px;
    }
}


/* =========================================================
   PROFİL TETİKLEYİCİ
   ========================================================= */

.org-profile-trigger {
    cursor: pointer;
}

    .org-profile-trigger:focus-visible {
        outline: 3px solid rgba(26, 76, 107, 0.22);
        outline-offset: 4px;
    }


/* =========================================================
   PROFİL DIALOG
   ========================================================= */

.org-profile-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: clamp(14px, 3vw, 34px);
    background: transparent;
    border: 0;
}

    .org-profile-dialog[open] {
        display: grid;
        place-items: center;
    }

    .org-profile-dialog::backdrop {
        background: rgba(10, 25, 36, 0.68);
        backdrop-filter: blur(4px);
    }


/* =========================================================
   POPUP ANA PANEL
   ========================================================= */

.org-profile-panel {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100dvh - 68px);
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    overflow: hidden;
    background: var(--org-surface);
    border: 1px solid rgba(26, 76, 107, 0.14);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(12, 32, 44, 0.28);
}


/* =========================================================
   KAPAT BUTONU
   ========================================================= */

.org-profile-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--org-primary-dark);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(26, 76, 107, 0.12);
    border-radius: 50%;
    box-shadow: 0 7px 20px rgba(20, 43, 56, 0.10);
    font-size: 17px;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    .org-profile-close:hover {
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(20, 43, 56, 0.15);
        transform: translateY(-1px);
    }

    .org-profile-close:focus-visible {
        outline: 3px solid rgba(26, 76, 107, 0.22);
        outline-offset: 3px;
    }


/* =========================================================
   SOL GÖRSEL ALANI
   ========================================================= */

.org-profile-visual {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 26px 0;
    background: linear-gradient( 180deg, #edf3f6 0%, #e6eef2 100% );
    border-right: 1px solid rgba(26, 76, 107, 0.10);
}

.org-profile-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 22px;
}

    .org-profile-brand strong {
        color: var(--org-primary);
        font-size: 18px;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: -0.4px;
    }

    .org-profile-brand span {
        color: var(--org-muted);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 1.2px;
        text-transform: uppercase;
    }

.org-profile-photo-wrapper {
    width: 100%;
    margin: 22px auto 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(26, 76, 107, 0.10);
    border-radius: 15px;
    aspect-ratio: 274 / 300;
}

.org-profile-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}


/* =========================================================
   SAĞ İÇERİK
   ========================================================= */

.org-profile-content {
    min-width: 0;
    overflow-y: auto;
    padding: 42px 46px 44px;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 76, 107, 0.28) transparent;
}

.org-profile-heading {
    padding-right: 38px;
}

.org-profile-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--org-primary);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.org-profile-heading h2 {
    margin: 0;
    color: var(--org-text);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 760;
    line-height: 1.12;
    letter-spacing: -1px;
}

.org-profile-role {
    margin: 10px 0 0;
    color: var(--org-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.org-profile-divider {
    width: 100%;
    height: 1px;
    margin: 26px 0;
    background: var(--org-border);
}


/* =========================================================
   ÖZGEÇMİŞ
   ========================================================= */

.org-profile-biography h3 {
    margin: 0 0 16px;
    color: var(--org-text);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.3;
}

.org-profile-biography-text {
    color: #43515b;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.82;
}

    .org-profile-biography-text p {
        margin: 0;
    }

        .org-profile-biography-text p + p {
            margin-top: 15px;
        }

/* =========================================================
   PROFİL DIALOG - RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .org-profile-panel {
        width: min(860px, 100%);
        grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    }

    .org-profile-visual {
        padding: 26px 22px 0;
    }

    .org-profile-brand {
        margin-bottom: 18px;
    }

    .org-profile-photo-wrapper {
        margin-top: 18px;
    }

    .org-profile-content {
        padding: 36px 34px 38px;
    }

    .org-profile-heading h2 {
        font-size: clamp(27px, 4vw, 34px);
    }
}


@media (max-width: 767.98px) {

    .org-profile-dialog {
        padding: 10px;
    }

    .org-profile-panel {
        max-height: calc(100dvh - 20px);
        grid-template-columns: 1fr;
        overflow-y: auto;
        border-radius: 16px;
    }

    .org-profile-visual {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 132px;
        align-items: end;
        gap: 18px;
        padding: 20px 60px 0 22px;
        border-right: 0;
        border-bottom: 1px solid rgba(26, 76, 107, 0.10);
    }

    .org-profile-brand {
        align-self: center;
        margin: 0 0 18px;
    }

    .org-profile-photo-wrapper {
        width: 132px;
        margin: 0;
        justify-self: end;
        border-radius: 12px 12px 0 0;
    }

    .org-profile-content {
        overflow: visible;
        padding: 24px 22px 28px;
    }

    .org-profile-heading {
        padding-right: 34px;
    }

        .org-profile-heading h2 {
            font-size: 26px;
        }

    .org-profile-role {
        margin-top: 8px;
        font-size: 13.5px;
    }

    .org-profile-divider {
        margin: 20px 0;
    }

    .org-profile-biography h3 {
        margin-bottom: 13px;
        font-size: 16px;
    }

    .org-profile-biography-text {
        font-size: 13.8px;
        line-height: 1.72;
    }

        .org-profile-biography-text p + p {
            margin-top: 13px;
        }

    .org-profile-close {
        top: 13px;
        right: 13px;
        width: 38px;
        height: 38px;
    }
}


@media (max-width: 479.98px) {

    .org-profile-dialog {
        padding: 7px;
    }

    .org-profile-panel {
        max-height: calc(100dvh - 14px);
        border-radius: 14px;
    }

    .org-profile-visual {
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: 10px;
        padding: 16px 54px 0 16px;
    }

    .org-profile-brand {
        margin-bottom: 14px;
    }

        .org-profile-brand strong {
            font-size: 16px;
        }

        .org-profile-brand span {
            font-size: 9px;
            letter-spacing: 0.85px;
        }

    .org-profile-photo-wrapper {
        width: 96px;
        border-radius: 10px 10px 0 0;
    }

    .org-profile-content {
        padding: 20px 16px 24px;
    }

    .org-profile-heading {
        padding-right: 30px;
    }

    .org-profile-kicker {
        margin-bottom: 7px;
        font-size: 9.5px;
        letter-spacing: 1px;
    }

    .org-profile-heading h2 {
        font-size: 23px;
        letter-spacing: -0.7px;
    }

    .org-profile-role {
        font-size: 12.5px;
    }

    .org-profile-divider {
        margin: 17px 0;
    }

    .org-profile-biography h3 {
        margin-bottom: 11px;
        font-size: 15px;
    }

    .org-profile-biography-text {
        font-size: 13.2px;
        line-height: 1.68;
    }

    .org-profile-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}


/* =========================================================
   DOKUNMATİK / HAREKET AZALTMA
   ========================================================= */

@media (hover: none) {

    .org-card:hover {
        transform: none;
        border-color: var(--org-border);
        box-shadow: var(--org-shadow);
    }

    .org-card-manager:hover::after {
        width: 28px;
        background: rgba(26, 76, 107, 0.45);
    }
}


@media (prefers-reduced-motion: reduce) {

    .org-card,
    .org-card-manager::after,
    .org-profile-close {
        transition: none;
    }

        .org-card:hover {
            transform: none;
        }
}
