:root {
    --firat-red: #8B0000;
    --firat-red-hover: #660000;
    --neutral-gray: #6c757d;
    --neutral-gray-hover: #5a6268;
    --light-bg: #f8f9fa;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --box-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --box-shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}



/* Modern Header Styles */
.header {
    background: linear-gradient(135deg, var(--firat-red) 0%, var(--firat-red-hover) 100%);
    padding: 1.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .container {
    max-width: 1400px;
}

.header h2 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.header-logo {
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-title {
    position: relative;
    padding-bottom: 5px;
}

.header-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
}

.header-title:hover:after {
    width: 100%;
}

.quick-access-btn {
    background-color: #790A00;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.quick-access-btn:hover, .quick-access-btn:focus {
    background-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.quick-access-menu {
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: none;
    overflow: hidden;
    padding: 0.5rem;
}

.quick-access-menu .dropdown-item {
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
}

.quick-access-menu .dropdown-item:hover {
    background-color: rgba(139, 0, 0, 0.1);
    transform: translateX(5px);
}

/* Modern Search Box */
.search-container {
    margin: 3rem auto 2.5rem;
    max-width: 800px;
    padding: 0 15px;
    position: relative;
}

.search-container:before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--firat-red), var(--firat-red-hover));
    border-radius: 4px;
    opacity: 0.7;
}

.search-box {
    background: white;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.search-box:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--firat-red), var(--firat-red-hover));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.search-box:focus-within {
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.15);
    transform: translateY(-3px);
    border-color: rgba(139, 0, 0, 0.1);
}

.search-box:focus-within:before {
    transform: scaleX(1);
}

.search-input {
    flex-grow: 1;
    border: none !important;
    padding: 0.6rem 0.8rem !important;
    font-size: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    font-weight: 400;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
}

.search-input.loading {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px !important;
    padding-right: 35px !important;
}

.search-input::placeholder {
    color: #999;
    font-weight: 300;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.search-input:focus::placeholder {
    opacity: 0.5;
}

.search-button {
    border: none;
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem !important;
    font-size: 0.95rem !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    margin-left: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.15);
}

.search-button.loading {
    position: relative;
    color: transparent;
}

.search-button.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-button:hover {
    background: linear-gradient(135deg, var(--firat-red-hover), var(--firat-red));
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.25) !important;
}

/* Modern Category Buttons */
.filter-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.filter-section.collapsed {
    max-height: 80px;
    overflow: hidden;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-section-header:hover {
    background: rgba(139, 0, 0, 0.05);
}

.filter-section-header .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-section.collapsed .toggle-icon {
    transform: rotate(-180deg);
}

.document-count {
    background: var(--firat-red);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: auto;
    margin-right: 1rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--firat-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.kategori-baslik {
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.4rem;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
}

.kategori-baslik:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--firat-red), var(--firat-red-hover));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.kategori-baslik:hover:after {
    width: 100%;
}

.filter-buttons {
    margin: 1.5rem 0;
    gap: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.filter-buttons .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 0.9rem;
}

.filter-buttons .btn-outline-secondary {
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.filter-buttons .btn-outline-secondary:hover {
    border-color: var(--firat-red);
    background: var(--firat-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.15);
}

.filter-buttons .dropdown-toggle::after {
    margin-left: 8px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.filter-buttons .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.filter-buttons .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0.8rem;
    margin-top: 0.6rem;
    min-width: 200px;
    z-index: 9999 !important;
    position: absolute;
}

.filter-buttons .dropdown-item {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
    font-weight: 400;
}

.filter-buttons .btn-danger {
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover));
    border: 2px solid var(--firat-red);
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.15);
    position: relative;
}

.filter-buttons .btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--firat-red-hover), var(--firat-red));
}

.filter-buttons .btn-danger:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--firat-red-hover), var(--firat-red));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.filter-buttons .btn-danger:hover:before {
    opacity: 1;
}

/* Modern Table Styles */
.mevzuat-table {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.mevzuat-table:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--firat-red), var(--firat-red-hover));
}

.mevzuat-table .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.mevzuat-table .table thead th {
    background: linear-gradient(135deg, #2b3035, #23272b);
    color: white;
    font-weight: 500;
    padding: 0.9rem 1rem;
    border: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.mevzuat-table .table thead th:first-child {
    border-top-left-radius: 12px;
}

.mevzuat-table .table thead th:last-child {
    border-top-right-radius: 12px;
}

.mevzuat-table .table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.mevzuat-table .table tbody tr:last-child {
    border-bottom: none;
}

.mevzuat-table .table tbody tr:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.mevzuat-table .table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mevzuat-table .table tbody tr:hover td {
    color: #000;
}

/* Modern PDF Button */
.btn-pdf {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
    border-radius: 50px !important;
    font-weight: 500;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover)) !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.15) !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-pdf:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--firat-red-hover), var(--firat-red));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.btn-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.25) !important;
}

.btn-pdf:hover:before {
    opacity: 1;
}

.btn-pdf i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-pdf:hover i {
    transform: translateX(3px);
}

/* Modern Pagination */
.pagination {
    margin-top: 2.5rem;
    gap: 0.6rem;
}

.page-link {
    border-radius: 50px !important;
    padding: 0.8rem 1.4rem;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.page-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 50px;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover));
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.15);
    color: white;
}

.page-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.1);
    color: white;
}

.page-link:hover:before {
    opacity: 1;
}

.page-item.disabled .page-link {
    background-color: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

.page-item.disabled .page-link:before {
    display: none;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    color: #aaa;
}

/* Modern Footer */
footer {
    background: #23272b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    font-size: 1.1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header h2 {
        font-size: 1.5rem;
    }

    .header-title {
        padding-bottom: 3px;
    }

    .header-logo img {
        height: 60px !important;
    }

    .quick-access-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .search-container {
        margin: 2rem auto;
    }

    .search-box {
        padding: 0.4rem 1rem;
    }

    .search-input {
        padding: 0.7rem 0.8rem !important;
        font-size: 1rem !important;
    }

    .search-button {
        padding: 0.7rem 1.2rem !important;
    }

    .filter-section {
        padding: 1.2rem;
        border-radius: 12px;
    }

    .kategori-baslik {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .mevzuat-table {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 12px;
    }

    .mevzuat-table .table thead th {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .mevzuat-table .table tbody td {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
        margin: 1rem 0;
    }

    .filter-buttons .btn {
        width: 100%;
        margin: 0.3rem 0;
        padding: 0.7rem 1.2rem;
    }

    .btn-pdf {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem !important;
    }

    .pagination {
        margin-top: 1.5rem;
        gap: 0.4rem;
    }

    .page-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .header .container {
        padding: 0 10px;
    }

    .header-logo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-logo img {
        height: 50px !important;
        margin-bottom: 10px;
    }

    .header-logo .ms-3 {
        margin-left: 0 !important;
    }

    .header h2 {
        font-size: 1.3rem;
    }

    .header .d-flex {
        flex-direction: column;
        gap: 15px;
    }

    .quick-access-btn {
        width: 100%;
    }

    .search-container {
        margin: 1.5rem auto;
    }

    .search-container:before {
        width: 40px;
    }

    .search-box {
        padding: 0.3rem 0.8rem;
    }

    .search-input {
        padding: 0.6rem 0.6rem !important;
        font-size: 0.95rem !important;
    }

    .search-button {
        padding: 0.6rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .filter-section {
        padding: 1rem;
        border-radius: 10px;
        margin-bottom: 1.5rem;
    }

    .kategori-baslik {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
    }

    .kategori-baslik:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .mevzuat-table {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 10px;
    }

    .mevzuat-table:before {
        height: 3px;
    }

    .mevzuat-table .table thead th {
        padding: 0.8rem 0.5rem;
        font-size: 0.75rem;
    }

    .mevzuat-table .table tbody td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }

    .btn-pdf {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    .pagination {
        flex-direction: row;
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        margin-bottom: -10px;
        gap: 0.3rem;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 30px;
        text-align: center;
    }

    .page-item {
        margin: 0;
    }
}

.filter-btn.active,
.filter-btn.active:focus {
    background: linear-gradient(135deg, var(--firat-red), var(--firat-red-hover)) !important;
    color: #fff !important;
    border-color: var(--firat-red) !important;
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.15) !important;
}
