﻿/* =========================================================
   KEPSAŞ GLOBAL CSS
   Base theme, shared utilities and page-level common styles.

   Header / footer / navigation / search / cookie / floating UI
   deliberately live in layout.css.
   ========================================================= */


/* =========================================================
   ROOT / THEME
   ========================================================= */

:root {
    --kepsas-red: #ec1c24;
    --kepsas-green: #a7cf45;
    --kepsas-blue: #109bd7;
    --kepsas-teal: #2fb7b8;
    --kepsas-orange: #f7941d;
    --kepsas-navy: #155e8a;
    --kepsas-ink: #142033;
    --kepsas-layer-page: 1;
    --kepsas-layer-social: 9990;
    --kepsas-layer-header: 10020;
    --kepsas-layer-dropdown: 10030;
    --kepsas-layer-cookie: 10050;
}


/* =========================================================
   RESPONSIVE BASE
   ========================================================= */

html {
    width: 100%;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: "Inter", sans-serif;
    background-color: #f8f9fc;
}


/*
   Flex / Grid içerisinde çocukların içerik yüzünden
   ekran genişliğini zorlamasını engeller.
*/
main,
main section,
main article,
main aside,
main nav,
main div {
    min-width: 0;
}


/* =========================================================
   RESPONSIVE MEDIA
   ========================================================= */

img,
video,
canvas {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

svg {
    max-width: 100%;
}

iframe {
    max-width: 100%;
    border: 0;
}


/* =========================================================
   RESPONSIVE TEXT
   ========================================================= */

main p,
main li,
main a,
main span,
main strong,
main small,
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
    overflow-wrap: break-word;
}


/* =========================================================
   FORM ELEMENTLERİ
   ========================================================= */

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

textarea {
    resize: vertical;
}


/* =========================================================
   TABLE
   ========================================================= */

table {
    max-width: 100%;
}


/* =========================================================
   MAIN LAYER
   ========================================================= */

body > main {
    position: relative;
    z-index: var(--kepsas-layer-page);
}


/* =========================================================
   UTILITIES
   ========================================================= */

.z-index-10 {
    z-index: 10;
}


/* =========================================================
   OUTLINE PRIMARY BUTTON
   ========================================================= */

.btn-outline-primary {
    color: #1a4c6b;
    border-color: #1a4c6b;
}

    .btn-outline-primary:hover {
        color: #ffffff;
        background-color: #1a4c6b;
    }


/* =========================================================
   HOVER LIFT
   ========================================================= */

.hover-lift {
    transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {

    .hover-lift:hover {
        transform: translateY(-3px);
    }
}


/* =========================================================
   MAP CARD
   ========================================================= */

.map-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {

    .map-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
    }
}


/* =========================================================
   CUSTOM DROPDOWN
   ========================================================= */

.custom-dropdown {
    min-width: 250px;
    animation: fadeInDropdown 0.3s ease;
}

    .custom-dropdown .dropdown-item {
        color: #495057;
        font-size: 14px;
        font-weight: 500;
        transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    }

@media (hover: hover) and (pointer: fine) {

    .custom-dropdown .dropdown-item:hover {
        color: #1a4c6b;
        background-color: rgba(26, 76, 107, 0.08);
        transform: translateX(2px);
    }
}


@keyframes fadeInDropdown {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   MAIN TYPOGRAPHY NORMALIZATION
   ========================================================= */

main .tracking-wider,
main .display-1,
main .display-2,
main .display-3,
main .display-4,
main .display-5,
main .display-6 {
    letter-spacing: 0 !important;
}

main [style*="letter-spacing"] {
    letter-spacing: 0 !important;
}


/* =========================================================
   SHARED HERO STYLE
   ========================================================= */

main .subs-hero,
main .policy-hero,
main .cert-hero,
main .team-hero,
main .org-hero,
main .news-hero {
    background: linear-gradient( 180deg, #ffffff 0%, #f7f9fc 100% );
    border-bottom: 1px solid rgba(20, 32, 51, 0.06);
}

    main .subs-hero .badge,
    main .policy-hero .badge,
    main .cert-hero .badge,
    main .team-hero .badge,
    main .org-hero .badge,
    main .news-hero .badge {
        border: 1px solid rgba(26, 76, 107, 0.1);
        box-shadow: 0 10px 24px rgba(20, 32, 51, 0.06) !important;
    }


/* =========================================================
   SHARED BORDER RADIUS
   ========================================================= */

main .rounded-5:not(.rounded-circle):not(.rounded-pill),
main .rounded-4:not(.rounded-circle):not(.rounded-pill) {
    border-radius: 8px !important;
}


/* =========================================================
   SHARED SHADOW
   ========================================================= */

main .shadow-lg,
main .shadow-sm {
    box-shadow: 0 14px 34px rgba(20, 32, 51, 0.08) !important;
}


/* =========================================================
   MAIN BUTTONS
   ========================================================= */

main .btn-primary,
main .btn-dark {
    border: 0;
}

main .btn-primary {
    background: linear-gradient( 135deg, var(--kepsas-navy), var(--kepsas-blue) ) !important;
    box-shadow: 0 12px 28px rgba(16, 155, 215, 0.18) !important;
}

@media (hover: hover) and (pointer: fine) {

    main .btn-primary:hover {
        background: linear-gradient( 135deg, var(--kepsas-blue), var(--kepsas-teal) ) !important;
    }
}


/* =========================================================
   DARK BACKGROUND
   ========================================================= */

main .bg-dark {
    background: linear-gradient( 135deg, #121f31, #173e53 ) !important;
}


/* =========================================================
   TABLE / ACCORDION SAFETY
   ========================================================= */

main .table-responsive,
main .accordion {
    width: 100%;
    max-width: 100%;
}


/* =========================================================
   BORDER NORMALIZATION
   ========================================================= */

main .border-start.border-4,
main .border-start.border-5 {
    border-left-width: 1px !important;
    border-color: rgba(20, 32, 51, 0.1) !important;
}


/* =========================================================
   ICON CIRCLE
   ========================================================= */

main .icon-circle {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    border: 1px solid rgba(20, 32, 51, 0.08);
    border-radius: 50% !important;
    box-shadow: 0 14px 30px rgba(20, 32, 51, 0.08);
}


/* =========================================================
   E-DEVLET LOGO
   ========================================================= */

.edevlet-logo-frame {
    position: relative;
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    background: linear-gradient( 135deg, #ffffff, #fff5f6 ) !important;
    border: 1px solid rgba(236, 28, 36, 0.16);
    border-radius: 50% !important;
    box-shadow: 0 12px 26px rgba(236, 28, 36, 0.1);
}


.edevlet-logo-frame-sm {
    width: 62px;
    height: 62px;
}


.edevlet-logo-img {
    position: relative;
    z-index: 2;
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
}


.edevlet-logo-fallback {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #d71920;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}


    .edevlet-logo-fallback span {
        font-size: 1.25rem;
        letter-spacing: 0;
    }


    .edevlet-logo-fallback strong {
        font-size: 0.72rem;
        letter-spacing: 0;
    }


.edevlet-logo-frame.is-fallback .edevlet-logo-img {
    display: none !important;
}


.edevlet-logo-frame.is-fallback .edevlet-logo-fallback {
    display: flex;
}


/* =========================================================
   E-DEVLET BANNER
   ========================================================= */

.e-devlet-banner {
    border-color: rgba(236, 28, 36, 0.12) !important;
    box-shadow: 0 16px 38px rgba(20, 32, 51, 0.08) !important;
}


.e-devlet-btn {
    border-color: rgba(236, 28, 36, 0.42) !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 767.98px) {

    /*
       Bootstrap container boşluklarını mobilde
       kontrollü tutuyoruz.
    */
    main .container,
    main .container-fluid {
        --bs-gutter-x: 1.5rem;
    }


    /*
       Büyük ikonları biraz küçült.
    */
    main .icon-circle {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }


    .edevlet-logo-frame {
        width: 64px;
        height: 64px;
    }


    .edevlet-logo-frame-sm {
        width: 58px;
        height: 58px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

    /*
       Bootstrap row yatay boşlukları.
    */
    main .row {
        --bs-gutter-x: 1.25rem;
    }


    /*
       Çok büyük Bootstrap display başlıklarının
       telefonda ekranı domine etmesini engeller.
    */
    main .display-4 {
        font-size: 2.2rem;
        line-height: 1.12;
    }


    main .display-5,
    main .display-6 {
        font-size: 1.95rem;
        line-height: 1.15;
    }


    /*
       Mobilde dekoratif watermark'lar içerikten
       daha fazla yer kaplamasın.
    */
    main .watermark-icon,
    main .watermark-number,
    main .watermark-year,
    main .watermark-math,
    main .policy-watermark,
    main .cert-watermark,
    main .card-watermark,
    main .identity-watermark-icon,
    main i.position-absolute.opacity-10,
    main i.position-absolute.opacity-5 {
        display: none !important;
    }


    /*
       Ortak ikon boyutları.
    */
    main .icon-circle {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }


    /*
       E-Devlet ortak alanları.
    */
    .edevlet-logo-frame {
        width: 60px;
        height: 60px;
    }


    .edevlet-logo-frame-sm {
        width: 54px;
        height: 54px;
    }


    /*
       Mobil dropdown ekran dışına taşmasın.
       Header dropdownları buna dahil değil;
       onlar layout.css tarafından yönetiliyor.
    */
    main .custom-dropdown {
        min-width: 0;
        width: min(100%, 320px);
        max-width: calc(100vw - 24px);
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    main .display-4 {
        font-size: 2rem;
    }


    main .display-5,
    main .display-6 {
        font-size: 1.8rem;
    }


    main .container,
    main .container-fluid {
        --bs-gutter-x: 1.25rem;
    }
}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) {

    .hover-lift {
        transform: none;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }


    .hover-lift,
    .map-card,
    .custom-dropdown .dropdown-item {
        transition: none;
    }


    .custom-dropdown {
        animation: none;
    }
}


/* =========================================================
   SHARED COLORS
   ========================================================= */

.text-orange {
    color: #fd7e14 !important;
}


.border-orange {
    border-color: #fd7e14 !important;
}
