:root {
    --primary-color: #DC2626;
    --secondary-color: #EF4444;
    --accent-color: #FEE2E2;
    --dark-color: #1F2937;
    --dark-gray: #374151;
    --light-color: #F9FAFB;
    --text-color: #1F2937;
    --text-muted: #6B7280;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: visible;
    background: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.main-header {
    z-index: 1000;
    background: var(--white);
    overflow: visible;
}

.top-bar {
    background: var(--dark-gray);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.top-logo {
    font-size: 1.5rem;
    color: var(--white);
    display: flex;
}

.top-logo .site-logo {
    max-height: 40px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.top-org-name {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--white);
}

.flag-icon {
    font-size: 1.2rem;
    color: var(--white);
}

.header-banner {
    width: 100%;
    overflow: hidden;
    background: var(--light-color);
}

.center-ebu-ygn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-banner .banner-image {
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 120px;
}

.navbar {
    padding: 0.75rem 0;
    background: var(--primary-color) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

@media (min-width: 1200px) {
    .navbar-expand-xxl .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-xxl .navbar-toggler {
        display: none;
    }

    .navbar-expand-xxl .navbar-nav {
        flex-direction: row;
    }
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .navbar-expand-xxl .navbar-collapse {
        display: flex !important;
    }

    .navbar-expand-xxl .navbar-toggler {
        display: none !important;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.8rem;
    }

    .weather-info {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .weather-text {
        font-size: 0.8rem;
    }

    .search-box .form-control {
        width: 130px;
        font-size: 0.8rem;
    }

    .weather-info i {
        font-size: 0.95rem;
    }
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-utils {
    margin-left: auto;
}

.weather-info {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.weather-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.weather-info i {
    color: #ffd700;
    font-size: 1.1rem;
}

.weather-text {
    font-weight: 500;
    color: var(--white);
    font-size: 0.9rem;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box .form-control {
    width: 150px;
    font-size: 0.85rem;
}

.search-box .btn {
    padding: 0.25rem 0.5rem;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 400px;
    max-width: 500px;
    max-height: 500px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    padding: 0;
}

.search-results-header {
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
}

.search-results-header h6 {
    color: var(--white);
    font-weight: 600;
    margin: 0;
}

.search-results-body {
    padding: 0.5rem;
    max-height: 450px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--accent-color);
    text-decoration: none;
    color: var(--text-color);
}

.search-result-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-result-item-content {
    flex: 1;
    min-width: 0;
}

.search-result-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-item-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.search-result-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-item-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.search-result-item-type.news {
    background: #3B82F6;
}

.search-result-item-type.martyr {
    background: var(--primary-color);
}

.search-results-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.search-results-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.search-results-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.search-results-loading i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .search-results {
        min-width: 100%;
        max-width: 100%;
        right: 0;
        left: 0;
    }
}

.main-footer {
    background: var(--dark-color) !important;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--white);
    font-weight: 700;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--white);
}

.social-links {
    margin-top: 1rem;
}

.social-link {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    color: var(--white);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.fixed-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.fixed-contact-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
}

.fixed-contact-btn i {
    font-size: 1.1rem;
}

@media (max-width: 1201px) {
    .navbar-expand-xxl .navbar-collapse {
        display: none !important;
    }

    .navbar-expand-xxl .navbar-collapse.show {
        display: block !important;
    }

    .navbar-expand-xxl .navbar-toggler {
        display: block !important;
    }

    .navbar-expand-xxl .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .navbar-utils {
        flex-direction: column;
        gap: 0.5rem !important;
        width: 100%;
        margin-top: 1rem;
        margin-left: 0 !important;
    }

    .search-box {
        width: 100%;
    }

    .search-box .form-control {
        width: 100%;
    }

    .weather-info {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-org-name {
        font-size: 0.65rem;
    }

    .header-banner .banner-image {
        max-height: 80px;
    }

    .fixed-contact-btn {
        bottom: 20px;
        right: 20px;
        padding: 0.85rem 1.25rem;
        font-size: 0.85rem;
    }

    .fixed-contact-btn span {
        display: none;
    }

    .fixed-contact-btn i {
        margin: 0;
        font-size: 1.2rem;
    }
}
