* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #401338;
    --secondary-color: #252e00;
    --accent-color: #006bd6;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --border-color: #e1e8ed;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: #f2f2f2;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.header-logo {
    height: 130px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header-logos a:hover .header-logo {
    transform: scale(1.05);
    opacity: 0.9;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.btn-learn-more {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-learn-more:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 107, 214, 0.3);
}

.filters {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d0a26 100%);
    color: white;
}

.filters-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.btn-toggle-filters {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s;
    display: none;
}

.btn-toggle-filters:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-icon {
    display: block;
    transition: transform 0.3s;
}

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

.filters-content {
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 500px;
    overflow: hidden;
}

.filters.collapsed .filters-content {
    max-height: 0;
    padding: 0 30px;
}

.search-box {
    flex: 1 1 100%;
    min-width: 250px;
    position: relative;
    order: -1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--text-light);
    pointer-events: none;
    z-index: 1;
    transition: color 0.3s;
}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.05rem;
    transition: all 0.3s;
    background-color: var(--bg-light);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.search-box input:focus ~ .search-icon {
    color: var(--primary-color);
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.clear-search:hover {
    background: var(--text-dark);
    transform: translateY(-50%) scale(1.1);
}

.clear-search.visible {
    display: flex;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group select {
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
    font-weight: 500;
}

.filter-group select:hover {
    border-color: var(--primary-color);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.toggle-group {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.toggle-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.btn-reset {
    padding: 12px 24px;
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-weight: 600;
    align-self: flex-end;
    white-space: nowrap;
}

.btn-reset:hover {
    background-color: var(--bg-light);
    border-color: var(--text-dark);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 0;
    transition: min-height 0.3s ease;
}

.active-filters:empty {
    display: none;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.filter-badge-label {
    opacity: 0.9;
    font-size: 0.85rem;
}

.filter-badge-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    transition: background 0.3s;
}

.filter-badge-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

.stats {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.loading-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.loading-indicator.active {
    display: flex;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-text {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stats-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.stats-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeIn 0.3s ease-in;
}

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

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--primary-color);
}

.card-badges-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.badge-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.badge-label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.region-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-country-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: #7a9a01;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-region-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.4;
    min-height: 4.2rem;
    display: flex;
    align-items: center;
}

.card-domain {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.meta-item .icon {
    font-weight: bold;
}

.card-body {
    flex: 1;
}

.card-overview {
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-overview.expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

.card {
    align-self: start;
}

.focus-section {
    margin: 15px 0;
}

.focus-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.focus-tag {
    padding: 4px 10px;
    background-color: #236e8c;
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
}

.card-info-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-top: 15px;
    background-color: #fff3cd;
    border-left: 4px solid #f39c12;
    border-radius: 6px;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text {
    color: #856404;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2d0a26;
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-expand {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 5px;
    transition: color 0.3s;
}

.btn-expand:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.card-overview.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.flagged-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f39c12;
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.no-results::before {
    content: '🔍';
    display: block;
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-logos {
        gap: 20px;
    }

    .header-logo {
        height: 90px;
    }

    header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .btn-toggle-filters {
        display: block;
    }

    .filters-content {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        min-width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 25px 30px;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-bottom: 3px solid var(--secondary-color);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 15px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.detail-value {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
}

.detail-value.empty {
    color: var(--text-light);
    font-style: italic;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.detail-tag {
    padding: 6px 14px;
    background-color: #236e8c;
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 25px 0;
}

.modal-footer {
    padding: 20px 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 10px 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Footer Styling */
.footer {
    background: var(--primary-color);
    color: white;
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.3s, padding-left 0.3s;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    margin: 5px 0;
    opacity: 0.85;
    font-size: 0.9rem;
}

.footer-credit {
    font-weight: 600;
}

.footer-bottom a {
    color: white;
    text-decoration: underline;
    font-weight: 700;
    transition: opacity 0.3s;
}

.footer-bottom a:hover {
    opacity: 0.8;
}

.back-to-top {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s;
    text-decoration: none !important;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* About Modal Styling */
.about-hero {
    margin-bottom: 25px;
}

.about-hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.about-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.about-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.about-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.about-content p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.about-actions .btn {
    flex: 1;
    max-width: 200px;
    text-align: center;
    text-decoration: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d0a26;
}
