/* ========================================
   Tema Degistirici - Dark/Light/Auto
   Diyafonum.com
   ======================================== */

/* Varsayilan (light) tema - mevcut degiskenler korunur */
:root,
[data-theme="light"] {
    --t-theme-color: #c31000;
    --t-title-color: #303030;
    --t-body-color: #4d5765;
    --t-smoke-color: #f3f7fb;
    --t-black-color: #000000;
    --t-white-color: #ffffff;
    --t-light-color: #72849b;
    --t-border-color: #ecf1f9;
    --t-bg-body: #ffffff;
    --t-card-bg: #ffffff;
    --t-text-muted: #6c757d;
}

/* Koyu tema */
[data-theme="dark"] {
    --t-theme-color: #e84040;
    --t-title-color: #e0e0e0;
    --t-body-color: #b0b8c4;
    --t-smoke-color: #1a1d23;
    --t-black-color: #ffffff;
    --t-white-color: #1e2127;
    --t-light-color: #8888aa;
    --t-border-color: #2d3139;
    --t-bg-body: #12141a;
    --t-card-bg: #1e2127;
    --t-text-muted: #888899;
}

/* CSS degiskenlerini tema degiskenlerine bagla */
[data-theme="dark"] {
    --theme-color: var(--t-theme-color);
    --title-color: var(--t-title-color);
    --body-color: var(--t-body-color);
    --smoke-color: var(--t-smoke-color);
    --black-color: var(--t-black-color);
    --white-color: var(--t-white-color);
    --light-color: var(--t-light-color);
    --border-color: var(--t-border-color);
}

/* Dark tema body arkaplani */
[data-theme="dark"] body {
    background-color: #12141a;
    color: #c8ccd4;
}

/* Dark tema kartlar ve icerik alanlari */
[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .th-blog,
[data-theme="dark"] .news-section,
[data-theme="dark"] .bg-light {
    background-color: #1e2127 !important;
    border-color: #2d3139 !important;
}

[data-theme="dark"] .card h5,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card .card-title,
[data-theme="dark"] .card-text,
[data-theme="dark"] .blog-content h4,
[data-theme="dark"] .blog-content h5 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .card-text,
[data-theme="dark"] .card p {
    color: #b0b8c4 !important;
}

/* Dark tema text renkleri */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: #e0e0e0;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span:not(.th-btn):not(.fa):not(.fas):not(.far):not(.fal):not(.fab) {
    color: #c8ccd4;
}

[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: #e84040;
}

/* Dark tema tablolar */
[data-theme="dark"] table,
[data-theme="dark"] .table {
    color: #c8ccd4;
    border-color: #2d3139;
}

[data-theme="dark"] table th,
[data-theme="dark"] .table th,
[data-theme="dark"] .thead-dark th {
    background-color: #2d3139 !important;
    color: #e0e0e0;
    border-color: #3d4149;
}

[data-theme="dark"] table td,
[data-theme="dark"] .table td {
    background-color: #1a1d23;
    border-color: #2d3139;
    color: #c8ccd4;
}

[data-theme="dark"] .table-bordered td,
[data-theme="dark"] .table-bordered th {
    border-color: #2d3139;
}

/* Dark tema footer */
[data-theme="dark"] .footer-wrapper {
    background-color: #0d0f13 !important;
}

[data-theme="dark"] .footer-widget,
[data-theme="dark"] .footer-widget a,
[data-theme="dark"] .footer-widget p {
    color: #a0a8b4;
}

/* Dark tema breadcrumb */
[data-theme="dark"] .breadcumb-wrapper {
    background-color: #1a1d23 !important;
}

[data-theme="dark"] .breadcumb-title {
    color: #ffffff;
}

[data-theme="dark"] .breadcumb-menu a {
    color: #a0a8b4;
}

/* Dark tema header */
[data-theme="dark"] .header-top {
    background-color: #1a1d23;
}

[data-theme="dark"] .header-links a {
    color: #a0a8b4;
}

[data-theme="dark"] .header-layout3 .menu-area {
    background-color: #1e2127;
}

[data-theme="dark"] .main-menu > ul > li > a {
    color: #c8ccd4;
}

/* Dark tema sidebar */
[data-theme="dark"] div.sidebar {
    background-color: #1e2127;
}
[data-theme="dark"] div.sidebar a.navTitle {
    background-color: #e84040;
    color: #ffffff;
}
[data-theme="dark"] div.sidebar ul li a {
    background-color: #2a2d35;
    color: #c8ccd4;
}
[data-theme="dark"] div.sidebar ul li a:hover {
    background-color: #e84040;
    color: #ffffff;
}
[data-theme="dark"] div.sidebar ul.subNav li a {
    background-color: #23262d;
    color: #a8b0bc;
    border-bottom-color: #2d3139;
}
[data-theme="dark"] div.sidebar ul.subNav li a:hover {
    background-color: #e84040;
    color: #ffffff;
}
[data-theme="dark"] div.sidebar ul.subNav li ul.subNav li a {
    background-color: #1c1f25;
    color: #959dab;
    border-bottom-color: #282c34;
}
[data-theme="dark"] div.sidebar ul.subNav li ul.subNav li a:hover {
    background-color: #e84040;
    color: #ffffff;
}
[data-theme="dark"] .menuplus {
    color: #c8ccd4;
    border-color: #2d3139;
}

/* Dark tema form elemanlari */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .form-control {
    background-color: #2d3139;
    color: #c8ccd4;
    border-color: #3d4149;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
    background-color: #363a44;
    color: #ffffff;
}

/* Dark tema accordion */
[data-theme="dark"] .accordion .card,
[data-theme="dark"] .accordion .card-header {
    background-color: #1e2127 !important;
    border-color: #2d3139 !important;
}

[data-theme="dark"] .card-header h5 {
    color: #e0e0e0 !important;
}

/* Dark tema modal */
[data-theme="dark"] .modal-content {
    background-color: #1e2127;
    color: #c8ccd4;
}

/* Dark tema copyright */
[data-theme="dark"] .copyright-wrap {
    background-color: #0a0b10;
}

/* Dark tema custom */
[data-theme="dark"] .bg-light {
    background-color: #1a1d23 !important;
    color: #c8ccd4;
}

[data-theme="dark"] .bg-light h4,
[data-theme="dark"] .bg-light h5 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] hr {
    border-color: #2d3139;
}

[data-theme="dark"] .py-5 {
    background-color: #12141a;
}

[data-theme="dark"] .page_content_top,
[data-theme="dark"] section {
    background-color: #12141a;
}

/* ========================================
   Tema Degistirme Butonu Stili
   ======================================== */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #c3c8d0;
    background: transparent;
    color: #404550;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-right: 10px;
    position: relative;
}

.theme-toggle-btn:hover {
    background: rgba(0,0,0,0.06);
    border-color: #888;
    color: #c31000;
}

[data-theme="dark"] .theme-toggle-btn {
    border-color: rgba(255,255,255,0.35);
    color: #ffb539;
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
}

/* Tema iconlari */
.theme-toggle-btn .icon-sun,
.theme-toggle-btn .icon-moon,
.theme-toggle-btn .icon-auto {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle-btn .icon-sun { opacity: 0; transform: scale(0.5); }
.theme-toggle-btn .icon-moon { opacity: 1; transform: scale(1); }
.theme-toggle-btn .icon-auto { opacity: 0; transform: scale(0.5); }

[data-theme="dark"] .theme-toggle-btn .icon-sun { opacity: 1; transform: scale(1); }
[data-theme="dark"] .theme-toggle-btn .icon-moon { opacity: 0; transform: scale(0.5); }
[data-theme="auto"] .theme-toggle-btn .icon-sun { opacity: 0; transform: scale(0.5); }
[data-theme="auto"] .theme-toggle-btn .icon-moon { opacity: 0; transform: scale(0.5); }
[data-theme="auto"] .theme-toggle-btn .icon-auto { opacity: 1; transform: scale(1); }

/* Tema dropdown menusu */
.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 6px;
    min-width: 160px;
    z-index: 9999;
    display: none;
}

.theme-dropdown.show {
    display: block;
}

[data-theme="dark"] .theme-dropdown {
    background: #2d3139;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.theme-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #303030;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

[data-theme="dark"] .theme-dropdown button {
    color: #c8ccd4;
}

.theme-dropdown button:hover {
    background: #f3f7fb;
}

[data-theme="dark"] .theme-dropdown button:hover {
    background: #3d4149;
}

.theme-dropdown button.active {
    background: #f3f7fb;
    color: #c31000;
    font-weight: 600;
}

[data-theme="dark"] .theme-dropdown button.active {
    background: #3d4149;
    color: #e84040;
}

.theme-dropdown button i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

/* === DIYAFONUM OZEL: NAV MENU 3D VE ERISILEBILIR === */
.th-header .main-menu > ul > li > a,
.header-layout3 .main-menu > ul > li > a,
header .main-menu > ul > li > a {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 14px 22px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.2s ease !important;
    margin: 0 3px;
    line-height: 1.4 !important;
}
.th-header .main-menu > ul > li > a:hover,
.header-layout3 .main-menu > ul > li > a:hover,
header .main-menu > ul > li > a:hover {
    background: #1a56db !important;
    color: #fff !important;
    box-shadow: 0 4px 0 #0f3d8f, 0 8px 20px rgba(26,86,219,0.35) !important;
    transform: translateY(-2px) !important;
}
.th-header .main-menu > ul > li:hover > a,
.header-layout3 .main-menu > ul > li:hover > a,
header .main-menu > ul > li:hover > a {
    background: #1a56db !important;
    color: #fff !important;
}
.th-header .main-menu .sub-menu li a,
.header-layout3 .main-menu .sub-menu li a {
    font-size: 0.95rem !important;
    padding: 11px 24px !important;
    font-weight: 500;
}
@media (max-width: 991px) {
    .th-header .main-menu > ul > li > a,
    .header-layout3 .main-menu > ul > li > a {
        font-size: 1.15rem !important;
        padding: 15px 24px !important;
    }
}
