/* ============================================================
   Sister Cities Subsite Styles
   Uses the same color palette as the main TDBB site
   ============================================================ */

/* Back to main site button */
.header-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s;
    flex-shrink: 0;
}
.header-back-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Hero Section */
.sc-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--turquoise) 100%);
    padding: 80px 0;
    color: #fff;
}
.sc-hero-content {
    max-width: 700px;
}
.sc-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.sc-hero-content .lead {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}
.sc-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Section Headers */
.sc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.sc-section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.sc-section-header h2 i {
    color: var(--navy);
    margin-right: 0.5rem;
}
.sc-section-alt {
    background: var(--light-blue-secondary);
}

/* ============================================================
   Calendar Wrap
   ============================================================ */
.sc-calendar-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* ============================================================
   Announcements
   ============================================================ */
.sc-announcements-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sc-announcement-item {
    display: flex;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}
.sc-announcement-item:first-child {
    padding-top: 0;
}
.sc-announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sc-announcement-item:hover {
    background: var(--light-blue-secondary);
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 8px;
}
.sc-announcement-date {
    flex-shrink: 0;
    width: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sc-ann-day {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}
.sc-ann-month {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sc-announcement-body {
    flex: 1;
    min-width: 0;
}
.sc-announcement-body h6 {
    margin: 0 0 0.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sc-announcement-body p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sc-announcement-item:hover .sc-announcement-body h6 {
    color: var(--navy);
}

/* ============================================================
   Sister City Cards (Light theme)
   ============================================================ */
.sc-city-card-light {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    transition: all 0.25s;
}
.sc-city-card-light:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: var(--navy);
    transform: translateY(-2px);
}
.sc-city-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sc-city-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.sc-city-arrow-light {
    color: var(--navy);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.sc-city-date-light {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}
.sc-city-date-light i {
    margin-right: 0.2rem;
}

/* ============================================================
   News Section — Featured + Compact
   ============================================================ */
.sc-news-featured {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.sc-news-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.sc-news-featured .card-img-top {
    height: 260px;
    object-fit: cover;
}
.sc-news-featured .card-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.sc-news-featured .card-title a:hover {
    color: var(--navy);
}
.sc-news-compact {
    display: flex;
    gap: 0.85rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.sc-news-compact:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--turquoise);
}
.sc-news-compact-img {
    flex-shrink: 0;
    width: 90px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
}
.sc-news-compact-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sc-news-compact-body {
    flex: 1;
    min-width: 0;
}
.sc-news-compact-body h6 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
}
.sc-news-compact-body h6 a {
    color: var(--text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sc-news-compact-body h6 a:hover {
    color: var(--navy);
}

/* ============================================================
   Event Cards
   ============================================================ */
.sc-event-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.sc-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.sc-event-card .card-img-top {
    height: 160px;
    object-fit: cover;
}
.sc-event-card .card-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.sc-event-card .card-title a:hover {
    color: var(--navy);
}

/* Cards (legacy) */
.sc-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.sc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.sc-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.sc-card .card-title a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}
.sc-card .card-title a:hover {
    color: var(--rose);
}

/* Card Placeholder */
.sc-card-placeholder-wrap {
    display: block;
    text-decoration: none;
}
.sc-card-placeholder {
    height: 200px;
    background: var(--light-blue-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-card-placeholder img {
    height: 60px;
    opacity: 0.3;
}

/* CTA Section */
.sc-cta {
    background: var(--light-blue-secondary);
}
.sc-cta h2 {
    font-weight: 600;
}

/* Footer (legacy — now using main site footer) */
.sc-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 0;
}
.sc-footer h5, .sc-footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}
.sc-footer-logo {
    height: 48px;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}
.sc-footer-links { list-style: none; padding: 0; }
.sc-footer-links li { margin-bottom: 0.5rem; }
.sc-footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.sc-footer-links a:hover { color: var(--turquoise); }
.sc-footer-contact { list-style: none; padding: 0; }
.sc-footer-contact li { margin-bottom: 0.5rem; color: rgba(255,255,255,0.7); }
.sc-footer-contact i { color: var(--turquoise); margin-right: 0.5rem; }
.sc-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding: 1.25rem 0; text-align: center; }
.sc-footer-bottom p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .header-back-btn {
        display: none;
    }
}
@media (max-width: 768px) {
    .sc-hero {
        padding: 50px 0;
    }
    .sc-hero-content h1 {
        font-size: 1.75rem;
    }
    .sc-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .sc-news-featured .card-img-top {
        height: 200px;
    }
    .sc-calendar-wrap {
        padding: 0.85rem;
    }
}
@media (max-width: 575.98px) {
    .sc-news-compact-img {
        width: 70px;
        height: 52px;
    }
    .sc-announcement-date {
        width: 40px;
    }
    .sc-ann-day {
        font-size: 1.1rem;
    }
}

/* ============================================================
   Country Filter Button + Popup (News Index)
   ============================================================ */
.news-country-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.news-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--text, #333);
    border: 1px solid var(--border, #dee2e6);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.news-filter-btn:hover {
    border-color: var(--navy, #0d3880);
    color: var(--navy, #0d3880);
}
.news-filter-btn-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}
.news-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #888;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.75rem;
}
.news-filter-clear:hover {
    background: #e74c3c;
    color: #fff;
}

/* Overlay */
.news-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1040;
}
.news-filter-overlay.open {
    display: block;
}

/* Popup */
.news-filter-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    width: 340px;
    max-height: 70vh;
    overflow: hidden;
}
.news-filter-popup.open {
    display: flex;
    flex-direction: column;
}
.news-filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #eee;
}
.news-filter-popup-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.news-filter-popup-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: #888;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}
.news-filter-popup-close:hover {
    color: #333;
}
.news-filter-popup-body {
    overflow-y: auto;
    padding: 0.5rem 0;
    max-height: calc(70vh - 56px);
}
.news-filter-popup-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    text-decoration: none;
    color: var(--text, #333);
    font-size: 0.88rem;
    transition: background 0.15s;
}
.news-filter-popup-item:hover {
    background: var(--light-blue-secondary, #f0f4f8);
}
.news-filter-popup-item.active {
    background: var(--light-blue-secondary, #f0f4f8);
    font-weight: 600;
    color: var(--navy, #0d3880);
}
.news-filter-popup-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex-shrink: 0;
}
.news-filter-popup-flag img {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
}
.news-filter-popup-flag i {
    font-size: 1.1rem;
    color: #888;
}

@media (max-width: 575.98px) {
    .news-filter-popup {
        width: calc(100% - 2rem);
        max-height: 80vh;
    }
    .news-filter-popup-body {
        max-height: calc(80vh - 56px);
    }
}

/* ============================================================
   Global Country Filter (Header)
   ============================================================ */

/* Desktop header filter button */
.sc-country-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.13);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.sc-country-filter-btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
}
.sc-country-filter-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}
.sc-country-filter-chevron {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Mobile nav country button */
.sc-mobile-country-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--light-blue-secondary, #f0f4f8);
    border: 1px solid var(--border, #dee2e6);
    border-radius: 8px;
    color: var(--text, #333);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

/* Overlay */
.sc-country-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1060;
}
.sc-country-overlay.open {
    display: block;
}

/* Popup */
.sc-country-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1070;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    width: 340px;
    max-height: 70vh;
    overflow: hidden;
}
.sc-country-popup.open {
    display: flex;
    flex-direction: column;
}
.sc-country-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #eee;
}
.sc-country-popup-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.sc-country-popup-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: #888;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}
.sc-country-popup-close:hover {
    color: #333;
}
.sc-country-popup-body {
    overflow-y: auto;
    padding: 0.5rem 0;
    max-height: calc(70vh - 56px);
}
.sc-country-popup-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    text-decoration: none;
    color: var(--text, #333);
    font-size: 0.88rem;
    transition: background 0.15s;
}
.sc-country-popup-item:hover {
    background: var(--light-blue-secondary, #f0f4f8);
    color: var(--text, #333);
}
.sc-country-popup-item.active {
    background: var(--light-blue-secondary, #f0f4f8);
    font-weight: 600;
    color: var(--navy, #0d3880);
}
.sc-country-popup-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex-shrink: 0;
}
.sc-country-popup-flag img {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
}
.sc-country-popup-flag i {
    font-size: 1.1rem;
    color: #888;
}

@media (max-width: 991.98px) {
    .sc-country-filter-btn {
        display: none;
    }
}
@media (max-width: 575.98px) {
    .sc-country-popup {
        width: calc(100% - 2rem);
        max-height: 80vh;
    }
    .sc-country-popup-body {
        max-height: calc(80vh - 56px);
    }
}

/* ============================================================
   Country Flag Badges on News Cards
   ============================================================ */

/* Wrapper for card image area (needed for absolute positioning) */
.news-card-img-wrap {
    position: relative;
}

/* Flag badge overlay on card image (top-right corner) */
.news-flag-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 6px;
    padding: 4px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.news-flag-badge img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

/* Flag in meta line (mobile hero & compact cards) */
.news-flag-meta {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.news-flag-meta img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* Small inline flag for compact lists (homepage) */
.news-flag-inline {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 0.3rem;
}

/* ============================================================
   Country Badge on News Detail Page
   ============================================================ */
.nd-country-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--light-blue-secondary, #f0f4f8);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text, #333);
}
.nd-country-badge img {
    width: 24px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
}

/* ============================================================
   Projects List & Detail
   ============================================================ */
.section-projects-list {
    padding: 2.5rem 0 3rem;
}
.section-projects-list .news-empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #999;
}
.section-projects-list .news-empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 0.5rem;
}
