/* ISG-SEN Corporate Styles - Dynamic Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========== CSS Variables (defaults, overridden by PHP) ========== */
:root {
    --primary-color: #1a3a5c;
    --secondary-color: #0d6efd;
    --bg-color: #ffffff;
    --accent-color: #e74c3c;
    --section-gap: 100px;
    --border-radius: 12px;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --surface-color: #f8fafc;
}

/* ========== General ========== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.8;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    line-height: 1.85;
    margin-bottom: 1rem;
}

section {
    padding-top: var(--section-gap);
    padding-bottom: var(--section-gap);
}

.section-title {
    color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 14px;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
    line-height: 1.7;
}

/* Smooth section transitions */
section + section {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ========== Top Bar ========== */
.top-bar {
    font-size: 0.82rem;
    background-color: var(--primary-color);
    color: #fff;
    letter-spacing: 0.01em;
    padding: 8px 0;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}

.top-bar a:hover {
    color: #fff;
}

.top-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 2px;
    font-size: 0.78rem;
    transition: all 0.25s;
    text-decoration: none;
}

.top-social a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ========== Navbar ========== */
.site-navbar {
    background-color: var(--bg-color);
    padding: 10px 0;
}

.site-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-navbar .navbar-brand {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 800;
    white-space: nowrap;
}

.site-navbar .nav-link {
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.2s;
    color: var(--primary-color);
    white-space: nowrap;
}

.site-navbar .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Dropdown menu styling */
.site-navbar .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 220px;
}

.site-navbar .dropdown-item {
    font-size: 0.88rem;
    padding: 0.55rem 1.25rem;
    color: var(--text-primary);
    transition: background 0.15s, color 0.15s;
}

.site-navbar .dropdown-item:hover {
    background: var(--surface-color);
    color: var(--secondary-color);
}

.site-navbar .dropdown-item i {
    width: 18px;
    text-align: center;
}

/* Compact search toggle */
.navbar-search-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-search-toggle {
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.navbar-search-toggle:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.navbar-search-form {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    z-index: 1050;
    width: 260px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
}

.navbar-search-form.show {
    display: block;
}

.navbar-search-form .form-control {
    border-radius: 8px 0 0 8px;
    border-color: #e2e8f0;
    font-size: 0.85rem;
}

.navbar-search-form .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: none;
}

.navbar-search-form .btn {
    border-radius: 0 8px 8px 0;
}

/* ========== Buttons (themed) ========== */
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

/* ========== Hero Carousel ========== */
.hero-section {
    padding: 0;
}
.carousel-bg {
    height: 480px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
}

.carousel-caption-custom {
    color: #fff;
    max-width: 600px;
}

.carousel-caption-custom h2 {
    font-size: 2rem;
    font-weight: 700;
}

.carousel-caption-custom p {
    font-size: 1.1rem;
}

.carousel-caption-custom .badge {
    background-color: var(--accent-color) !important;
}

/* ========== News Cards ========== */
.news-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.news-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ========== Partners Scroll ========== */
.partners-scroll {
    overflow: hidden;
    position: relative;
}

.partners-track {
    display: flex;
    animation: scrollPartners 20s linear infinite;
    gap: 40px;
}

.partner-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.partner-item img {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(80%);
    transition: filter 0.3s;
}

.partner-item img:hover {
    filter: grayscale(0%);
}

@keyframes scrollPartners {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ========== President Message ========== */
.president-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding-top: var(--section-gap);
    padding-bottom: var(--section-gap);
}

.president-photo-wrapper {
    position: relative;
    display: inline-block;
}

.president-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.president-photo:hover {
    transform: scale(1.03);
}

.president-photo-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 5px solid var(--secondary-color);
}

.president-thumbnail {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.president-thumbnail:hover {
    transform: scale(1.03);
}

/* Responsive images inside rich-text president content */
.president-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.president-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.president-content p.lead {
    color: #555;
    border-left: 3px solid var(--secondary-color);
    padding-left: 16px;
}

/* ---- President Carousel Controls ---- */
#presidentCarousel {
    position: relative;
    padding: 0 40px;
}

#presidentCarousel .carousel-item {
    transition: opacity 0.6s ease;
}

.president-arrow {
    width: 36px;
    height: 36px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--primary-color, #1e3a5f) !important;
    opacity: 0.85;
}

.president-arrow:hover {
    opacity: 1;
}

.president-arrow .carousel-control-prev-icon,
.president-arrow .carousel-control-next-icon {
    width: 16px;
    height: 16px;
}

.carousel-control-prev.president-arrow { left: -5px; }
.carousel-control-next.president-arrow { right: -5px; }

.president-indicators {
    position: relative;
    bottom: auto;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.president-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: none;
    opacity: 1;
    margin: 0 4px;
}

.president-indicators button.active {
    background-color: var(--primary-color, #1e3a5f);
    width: 28px;
    border-radius: 5px;
}

/* ========== Manşet (Featured News Card) ========== */
.manset-card {
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.manset-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

.manset-img {
    object-fit: cover;
    min-height: 300px;
    aspect-ratio: 16 / 9;
}

.manset-img-placeholder {
    min-height: 300px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

.manset-badge {
    background-color: var(--accent-color) !important;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* ========== News Section ========== */
.news-section {
    background-color: var(--surface-color);
}

/* ========== Sidebar ========== */
.sidebar .card {
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.sidebar .card-header {
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.85rem 1.15rem;
}

.sidebar .card-header h6 {
    margin: 0;
    font-weight: 600;
}

.sidebar .list-group-item {
    border-color: #f0f0f0;
    padding: 0.75rem 1.15rem;
    transition: background 0.15s;
}

.sidebar .list-group-item:hover {
    background: var(--surface-color);
}

.sidebar .list-group-item a {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar .list-group-item a:hover {
    color: var(--secondary-color);
}

.sidebar-search .form-control {
    border-radius: 8px 0 0 8px;
    border-color: #e2e8f0;
    font-size: 0.88rem;
}

.sidebar-search .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

.sidebar-search .btn {
    border-radius: 0 8px 8px 0;
}

.sidebar-quick-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s, padding-left 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-quick-links a:last-child {
    border-bottom: none;
}

.sidebar-quick-links a:hover {
    color: var(--secondary-color);
    padding-left: 6px;
}

.sidebar-quick-links a i {
    color: var(--secondary-color);
    font-size: 0.75rem;
    width: 16px;
}

/* ========== News Grid Cards ========== */
.news-grid-card {
    border-radius: var(--border-radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.news-grid-img-wrapper {
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.news-grid-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-grid-card:hover .news-grid-img {
    transform: scale(1.05);
}

.news-grid-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* Line-clamp for news titles (2 lines) */
.news-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Line-clamp for news descriptions (3 lines) */
.news-desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ========== Board Members Section ========== */
.board-section {
    background: #fff;
}

.board-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.board-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.75rem 1.25rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #e2e8f0;
    border-top: 3px solid transparent;
}

.board-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary-color);
}

/* ---- Board Hierarchy ---- */
.board-hierarchy {
    position: relative;
}

/* Tier sections */
.board-tier {
    position: relative;
    margin-bottom: 0;
}

.board-tier-label {
    text-align: center;
    margin-bottom: 1.25rem;
}

.board-tier-label span {
    display: inline-block;
    background: var(--surface-color);
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1.25rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Connector lines between tiers */
.board-connector {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.board-connector-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--secondary-color), #cbd5e1);
    border-radius: 1px;
}

/* President card — larger, highlighted */
.board-card-president {
    padding: 2.5rem 2rem 2rem;
    border-top: 4px solid var(--secondary-color);
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.board-card-president:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.board-president-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.board-avatar-lg {
    width: 120px;
    height: 120px;
    border-width: 4px;
}

.board-name-president {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.board-title-president {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Executive cards — medium */
.board-card-executive {
    border-top: 3px solid var(--secondary-color);
}

.board-avatar-md {
    width: 90px;
    height: 90px;
}

.board-name-executive {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Member cards — compact */
.board-card-member {
    padding: 1.25rem 0.75rem 1rem;
    border-top: 2px solid #e2e8f0;
}

.board-card-member:hover {
    border-top-color: var(--secondary-color);
}

.board-avatar-sm {
    width: 65px;
    height: 65px;
    border-width: 2px;
}

.board-name-member {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.board-title-sm {
    font-size: 0.72rem;
}

.board-avatar-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s;
    flex-shrink: 0;
}

.board-card:hover .board-avatar-wrapper {
    border-color: var(--primary-color);
}

.board-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.board-title {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
}

.board-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    margin: 0 3px;
    font-size: 0.78rem;
    transition: all 0.2s ease;
}

.board-social a:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-1px);
}

/* ========== e-Devlet Section ========== */
.edevlet-section {
    background: #fff;
    position: relative;
    overflow: hidden;
}

.edevlet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
}

.edevlet-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.edevlet-code-box {
    display: inline-block;
    background: var(--surface-color);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 24px;
}

.edevlet-code-box small {
    color: var(--text-secondary);
}

.edevlet-code {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.btn-edevlet {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-edevlet:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.edevlet-container {
    background: var(--surface-color);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 2.5rem;
}

.edevlet-summary-box {
    text-align: center;
}

@media (min-width: 992px) {
    .edevlet-summary-box {
        text-align: left;
        padding-right: 1.5rem;
    }
}

.edevlet-guide-box {
    background: var(--surface-color);
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
}

.edevlet-guide-intro {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.btn-edevlet-toggle {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-edevlet-toggle:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-edevlet-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.btn-edevlet-toggle[aria-expanded="true"] .toggle-text::after {
    content: '';
}

.btn-edevlet-toggle .fa-chevron-down {
    transition: transform 0.3s;
}

.edevlet-accordion .accordion-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.edevlet-accordion .accordion-item:last-child {
    margin-bottom: 0;
}

.edevlet-accordion .accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    box-shadow: none;
    gap: 12px;
}

.edevlet-accordion .accordion-button:not(.collapsed) {
    background: var(--surface-color);
    color: var(--primary-color);
}

.edevlet-accordion .accordion-button::after {
    filter: none;
}

.edevlet-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: #e2e8f0;
}

.edevlet-acc-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color), #3d8bfd);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);
}

.edevlet-acc-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    line-height: 1;
}

.edevlet-acc-title {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
}

.edevlet-accordion .accordion-body {
    padding: 0.75rem 1.25rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    border-top: 1px solid #e2e8f0;
}

.edevlet-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
}

/* ========== News Content ========== */
.news-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ========== News Detail ========== */
.news-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
}

.news-detail-meta {
    font-size: 0.9rem;
}

.news-detail-image img {
    border-radius: 8px;
    max-height: 500px;
    object-fit: cover;
}

.news-share .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ========== Documents (Tüzük ve Belgeler) ========== */
.document-category-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.document-card-header {
    background-color: var(--primary-color) !important;
    color: #fff;
}

.document-item {
    transition: background-color 0.2s;
    padding: 1rem 1.25rem;
}

.document-item:hover {
    background-color: #f8f9fa;
}

.document-icon {
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.document-actions {
    white-space: nowrap;
}

/* ========== Search ========== */
.navbar-search .form-control {
    border-radius: 20px 0 0 20px;
    border-color: #dee2e6;
    font-size: 0.85rem;
    width: 160px;
    transition: width 0.3s;
}

.navbar-search .form-control:focus {
    width: 220px;
    border-color: var(--secondary-color);
    box-shadow: none;
}

.navbar-search .btn {
    border-radius: 0 20px 20px 0;
    border-color: #dee2e6;
}

.search-result-card {
    border: none;
    border-radius: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.search-result-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.search-result-icon {
    color: var(--secondary-color);
    width: 30px;
    text-align: center;
}

/* ========== Breadcrumb ========== */
.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* ========== Footer ========== */
footer {
    background-color: var(--primary-color) !important;
    color: rgba(255, 255, 255, 0.85);
    padding-top: 60px !important;
    padding-bottom: 30px !important;
}

footer h5,
footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

footer a {
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}

footer a:hover {
    color: #fff !important;
    padding-left: 4px;
}

footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    margin: 0 4px;
    font-size: 0.9rem;
    transition: all 0.25s;
    padding-left: 0;
}

footer .footer-social a:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
    padding-left: 0;
}

footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* ========== Ad Banners ========== */
.ad-banner-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.ad-banner-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.ad-banner-between {
    background: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.ad-slot-sidebar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

/* ========== Top Bar Auth ========== */
.top-divider {
    color: rgba(255, 255, 255, 0.4);
}

.top-auth .btn-outline-light {
    font-size: 0.75rem;
    border-color: rgba(255, 255, 255, 0.5);
}

.top-auth .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* ========== Login Page ========== */
.login-card {
    border: none;
    border-radius: 12px;
}

.login-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========== Member-Only Page ========== */
.member-avatar {
    color: var(--secondary-color);
}

.member-card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* ========== Page Content (Hakkımızda, Legal) ========== */
.page-content {
    font-size: 1rem;
    line-height: 1.85;
    color: #333;
}
.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}
.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.page-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ========== Profile Dashboard ========== */
.profile-photo-placeholder {
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    color: #fff;
    font-size: 3rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.member-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ===== Homepage Org-Tree ===== */
.board-org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- Tier containers --- */
.org-tier {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center; /* centers inline-flex .org-row */
}

/* --- Connector between tiers — pure flexbox, no absolute --- */
.org-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
}

.org-vline {
    width: 2px;
    height: 32px;
    background: var(--primary-color, #1e3a5f);
    border-radius: 1px;
    flex-shrink: 0;
}

.org-hline {
    /* Legacy — no longer used; rail drawn by .org-row::before */
    display: none;
}

/* --- Base card — uniform border, shadow, sizing --- */
.org-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1rem 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.org-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

/* --- President — slightly larger, not overwhelming --- */
.org-card-president {
    width: 240px;
    max-width: 240px;
    padding: 1.5rem 1.25rem 1.25rem;
    border-top: 3px solid var(--secondary-color);
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    position: relative;
}

.org-card-president h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.org-crown {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

/* --- Secretary --- */
.org-card-secretary {
    width: 220px;
    max-width: 220px;
    border-top: 2px solid var(--secondary-color);
}

.org-card-secretary h5 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

/* --- Departmental row (Tier 3) --- */
.org-row {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    position: relative;
    padding-top: 2px; /* space for the rail pseudo-element */
}

/* Horizontal rail — auto-sizes to row content width, clipped to card centers */
.org-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(180px / 2);
    right: calc(180px / 2);
    height: 2px;
    background: var(--primary-color, #1e3a5f);
    pointer-events: none;
}

/* With only 1 item, hide the rail */
.org-row:has(.org-row-item:only-child)::before {
    display: none;
}

.org-row-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}

.org-branch-line {
    width: 2px;
    height: 16px;
    background: var(--primary-color, #1e3a5f);
    border-radius: 1px;
    flex-shrink: 0;
}

/* Hide branch stub when there's only 1 item */
.org-row-item:only-child .org-branch-line {
    display: none;
}

.org-card-dept {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    padding: 1rem 0.75rem 0.85rem;
    border-top: 2px solid var(--secondary-color);
}

.org-card-dept h6 {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

/* --- Tier 4 label --- */
.org-tier-label {
    text-align: center;
    margin-bottom: 1rem;
}

.org-tier-label span {
    display: inline-block;
    background: var(--bg-color, #f8f9fa);
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* --- Member card (Tier 4) — uniform sizing --- */
.org-card-member {
    padding: 0.85rem 0.5rem 0.7rem;
    border-top: 2px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.org-card-member:hover {
    border-top-color: var(--secondary-color);
}

/* --- Avatars --- */
.org-avatar {
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.org-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.org-avatar-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #94a3b8;
}

.org-avatar-xl { width: 88px;  height: 88px;  border-width: 3px; }
.org-avatar-lg { width: 72px;  height: 72px;  border-width: 2px; }
.org-avatar-md { width: 60px;  height: 60px; }
.org-avatar-sm { width: 48px;  height: 48px; }

/* --- Roles --- */
.org-role {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.3;
}

.org-role-accent {
    font-size: 0.85rem;
}

.org-role-sm { font-size: 0.75rem; font-weight: 500; }
.org-role-xs { font-size: 0.7rem; font-weight: 500; color: #64748b; }

/* Social icons inside org cards */
.org-card .board-social a {
    font-size: 0.8rem;
}

/* ===== Org-Tree Responsive ===== */
@media (max-width: 992px) {
    .org-row { gap: 20px; }
    .org-card-dept { width: 160px; min-width: 160px; max-width: 160px; }
    .org-row::before { left: calc(160px / 2); right: calc(160px / 2); }
}

@media (max-width: 768px) {
    .org-row::before { display: none; }
    .org-branch-line { display: none; }

    .org-row {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .org-card-dept {
        width: 220px;
        min-width: auto;
        max-width: 220px;
    }

    .org-avatar-xl { width: 76px; height: 76px; }
    .org-avatar-lg { width: 64px; height: 64px; }
    .org-vline { height: 24px; }
}

@media (max-width: 576px) {
    .org-card-president { width: 85%; max-width: none; padding: 1.25rem 1rem 1rem; }
    .org-card-secretary { width: 80%; max-width: none; }
    .org-card-dept { width: 80%; max-width: none; }
    .org-avatar-xl { width: 68px; height: 68px; }
    .org-avatar-lg { width: 56px; height: 56px; }
}

/* ========== Pagination ========== */
.page-link {
    color: var(--secondary-color);
}

.page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
    :root {
        --section-gap: 80px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-gap: 60px;
    }

    .carousel-bg {
        height: 300px;
    }

    .carousel-caption-custom h2 {
        font-size: 1.3rem;
    }

    .carousel-caption-custom p {
        display: none;
    }

    .top-bar {
        display: none !important;
    }

    .president-photo,
    .president-photo-placeholder {
        width: 160px;
        height: 160px;
    }

    .manset-img {
        min-height: 200px;
    }

    .manset-card .row {
        flex-direction: column;
    }

    .news-grid-img-wrapper {
        padding-top: 56.25%;
    }

    .news-detail-title {
        font-size: 1.3rem;
    }

    .document-actions {
        flex-direction: column;
        gap: 0.25rem;
    }

    .document-actions .btn {
        width: 100%;
    }

    .navbar-search .form-control {
        width: 120px;
    }

    .navbar-search .form-control:focus {
        width: 160px;
    }

    .board-avatar-wrapper {
        width: 80px;
        height: 80px;
    }

    .board-card {
        padding: 1.25rem 1rem 1rem;
    }

    .board-avatar-lg {
        width: 100px;
        height: 100px;
    }

    .board-card-president {
        padding: 2rem 1.25rem 1.5rem;
    }

    .board-name-president {
        font-size: 1.1rem;
    }

    .board-connector-line {
        height: 30px;
    }

    .board-section-badge {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .edevlet-section {
        text-align: center;
    }

    .edevlet-badge {
        width: 70px;
        height: 70px;
    }

    .edevlet-badge i {
        font-size: 2rem !important;
    }

    .edevlet-container {
        padding: 1rem;
    }

    .edevlet-guide-box {
        padding: 1rem 1.25rem;
    }

    .edevlet-summary-box {
        text-align: center;
    }

    .edevlet-accordion .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.88rem;
    }

    .edevlet-acc-icon {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .edevlet-code {
        font-size: 1.1rem;
    }

    .edevlet-code-box {
        padding: 12px 18px;
    }

    .btn-edevlet {
        width: 100%;
    }

    footer .row > div {
        text-align: center;
    }

    footer .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .board-card {
        padding: 1.25rem 0.75rem 1rem;
    }

    .board-avatar-wrapper {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }

    .board-card h6 {
        font-size: 0.9rem;
    }

    .board-avatar-lg {
        width: 85px;
        height: 85px;
    }

    .board-card-president {
        padding: 1.75rem 1rem 1.25rem;
    }

    .board-name-president {
        font-size: 1rem;
    }

    .board-name-executive {
        font-size: 0.9rem;
    }

    .board-avatar-sm {
        width: 55px;
        height: 55px;
    }

    .board-name-member {
        font-size: 0.82rem;
    }

    .board-connector-line {
        height: 24px;
    }

    .board-tier-label span {
        font-size: 0.7rem;
        padding: 0.25rem 1rem;
    }

    .edevlet-acc-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .edevlet-acc-title {
        font-size: 0.82rem;
    }

    .section-title {
        font-size: 1.15rem;
    }
}

/* Partners section - no large padding */
.partners-section {
    padding-top: 30px;
    padding-bottom: 30px;
}
