/* modern-features.css */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f9f9f9;
    --primary-color: #125b96; /* Using a generic blue, will check actual primary later */
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --primary-color: #4da3ff;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.elementor-widget-container, .card, .department-item {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 99999;
    transition: transform var(--transition-speed);
    display: flex;
    justify-content: center;
    align-items: center;
}
.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* Onboarding Modal */
.onboarding-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.onboarding-modal {
    background-color: var(--bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    color: var(--text-color);
}

.onboarding-step {
    display: none;
}
.onboarding-step.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.onboarding-modal h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--text-color);
}

.onboarding-modal p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-color);
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.onboarding-modal input {
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 8px;
    font-size: 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

.onboarding-modal input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.onboarding-modal button.primary-btn {
    width: 100%;
    padding: 15px 24px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.onboarding-modal button.primary-btn:hover {
    filter: brightness(1.1);
}

.onboarding-answer-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 12px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.onboarding-answer-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Multi-select category chips */
.ob-multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0;
    justify-content: center;
}
.ob-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 2px solid rgba(200, 83, 31, 0.3);
    border-radius: 24px;
    background: transparent;
    color: var(--text-color, #333);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ob-cat-chip:hover {
    border-color: var(--primary-color, #C8531F);
    background: rgba(200, 83, 31, 0.08);
}
.ob-cat-chip.selected {
    background: var(--primary-color, #C8531F);
    color: #fff;
    border-color: var(--primary-color, #C8531F);
    box-shadow: 0 2px 8px rgba(200, 83, 31, 0.3);
}

/* ── POPUP MOBİL DÜZELTMELER ── */
@media (max-width: 768px) {
    .onboarding-modal {
        padding: 24px 18px;
        max-width: 92%;
        max-height: 90vh;
        overflow-y: auto;
    }
    .onboarding-modal h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .onboarding-modal p {
        font-size: 14px;
        margin-bottom: 12px;
    }
    .onboarding-modal input {
        padding: 12px;
        font-size: 15px;
        margin: 10px 0;
    }
    .onboarding-modal button.primary-btn {
        padding: 13px 20px;
        font-size: 15px;
    }
    .onboarding-answer-btn {
        padding: 12px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    .ob-multi-select {
        max-height: 200px;
        gap: 6px;
    }
    .ob-cat-chip {
        padding: 6px 10px;
        font-size: 12px;
        gap: 3px;
    }
}

@media (max-width: 400px) {
    .onboarding-modal {
        padding: 20px 14px;
        width: 96%;
    }
    .onboarding-modal h2 {
        font-size: 18px;
    }
    .ob-multi-select {
        max-height: 170px;
        gap: 5px;
    }
    .ob-cat-chip {
        padding: 5px 8px;
        font-size: 11px;
        border-width: 1.5px;
    }
}

/* ============================================================ */
/* 🚀 GLOBAL STYLING & DESIGN SYSTEM OVERRIDES (KIBRIS REHBER) */
/* ============================================================ */

/* 1. TYPOGRAPHY FIX (Remove Cormorant Garamond / Serif Bleed) */
/* We enforce Roboto/Inter/Plus Jakarta Sans on all headings to keep the aesthetic modern. */
h1, h2, h3, h4, h5, h6, 
.entry-title, 
.site-title, 
.brand {
    font-family: 'Inter', 'Roboto', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em; /* Modern tight spacing */
}

/* Base text typography to match modern aesthetics */
body, p, span, a, div {
    font-family: 'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
}

/* 2. SEARCH BAR MOBILE FIX (Home Page / Global) */
/* Force wrapping on tiny screens so the "Ara" button isn't squished to 0px */
.elementor-search-form__container,
.site-search-form,
form.kadence-search-form,
.search-form {
    display: flex;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 10px;
}

@media screen and (max-width: 767px) {
    .elementor-search-form__container > div,
    .elementor-search-form__container input,
    .elementor-search-form__container button,
    .search-form input[type="search"],
    .search-form button[type="submit"] {
        flex: 1 1 100% !important; /* Stack columns fully below each other */
        width: 100% !important;
        margin: 0 !important;
        border-radius: var(--border-radius) !important;
    }
    
    /* Give button some height and clear visibility */
    button[type="submit"], .elementor-search-form__submit {
        height: 50px !important;
        font-weight: 600 !important;
        /* Slight emphasis */
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
}

/* 3. AESTHETIC POLISH (Cards & Buttons) */
/* Ensure generic cards maintain the glass/modern feel even if Elementor injects generic background */
.elementor-widget-wrap > .elementor-widget-image-box,
.kt-blocks-info-box-link-wrap,
.department-card {
    border-radius: var(--border-radius) !important;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease !important;
    border: 1px solid rgba(0,0,0,0.05); /* Very subtle outline */
}

.elementor-widget-wrap > .elementor-widget-image-box:hover,
.kt-blocks-info-box-link-wrap:hover,
.department-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

/* 4. UNIVERSITY & DEPARTMENT DETAIL PAGES (KIBRIS REHBER SPECIAL) */
.kb-detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d2b3e 100%);
    color: #fff;
    padding: 60px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    text-align: center;
}

.kb-detail-header h1 {
    color: #fff !important;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.kb-kunye-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.kb-kunye-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.kb-kunye-card i, .kb-kunye-card span.dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.kb-kunye-info label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.kb-kunye-info span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

/* Department Data Table styles */
.kb-data-box {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.kb-data-title {
    background: #f1f5f9;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.kb-data-table {
    width: 100%;
    border-collapse: collapse;
}

.kb-data-table tr td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.kb-data-table tr td:first-child {
    font-weight: 600;
    width: 40%;
    color: var(--primary-color);
}

.kb-data-table tr:last-child td {
    border-bottom: none;
}

/* Action Buttons */
.kb-action-bar {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.kb-btn {
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kb-btn-primary {
    background: var(--primary-color);
    color: #fff !important;
}

.kb-btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
}

.kb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

[data-theme="dark"] .kb-data-title {
    background: #1e293b;
}

[data-theme="dark"] .kb-kunye-card {
    border-color: rgba(255,255,255,0.1);
}

/* 5. ADVERTISING SLOTS (GOOGLE ADS READY) */
.kb-ad-slot {
    margin: 30px auto;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kb-ad-slot::before {
    content: "REKLAM ALANI / ADVERTISEMENT";
    margin-bottom: 5px;
    font-weight: 600;
}

[data-theme="dark"] .kb-ad-slot {
    background: #1e293b;
    border-color: #334155;
}

/* 6. PREMIUM HEADER & NAVIGATION */
#masthead, .site-header {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

[data-theme="dark"] #masthead, [data-theme="dark"] .site-header {
    background-color: rgba(18, 18, 18, 0.8) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

/* Menu Item Styling */
.main-navigation ul li a {
    position: relative;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    padding: 10px 15px !important;
    transition: color 0.3s ease;
}

/* Modern Underline Animation */
.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.main-navigation ul li a:hover::after,
.main-navigation ul li.current-menu-item a::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Menu Icons (CSS Based) */
.main-navigation ul li a[href*="universite"]::before { content: "🏛️ "; font-size: 14px; margin-right: 5px; }
.main-navigation ul li a[href*="rehber"]::before { content: "📚 "; font-size: 14px; margin-right: 5px; }
.main-navigation ul li a[href*="hakkimizda"]::before { content: "🤝 "; font-size: 14px; margin-right: 5px; }
.main-navigation ul li a[href*="94-2"]::before, 
.main-navigation ul li a[href*="iletisim"]::before { content: "✉️ "; font-size: 14px; margin-right: 5px; }

/* Sticky Header Polish */
.site-header.item-is-sticky {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

/* 7. HERO IMAGE STYLES */
.kb-hero-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.kb-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomEffect 20s infinite alternate linear;
}

.kb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

@keyframes zoomEffect {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.kb-single-header-content {
    position: relative;
    z-index: 2;
}
