/* Site-wide improvements: mobile nav, accessibility, detail views */

.skip-link {
    position: absolute;
    top: -100px;
    right: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: var(--accent, #feee7d);
    color: var(--text-dark, #2c3e50);
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid #2c3e50;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #2c3e50;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: white;
    z-index: 1002;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    padding: 1.5rem 0 2rem;
}

.mobile-nav-drawer.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
}

.mobile-nav-header span {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f7fa;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    color: #2c3e50;
    line-height: 1;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links > li > a {
    display: block;
    padding: 0.9rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, padding-right 0.2s ease;
}

.mobile-nav-links > li > a:hover,
.mobile-nav-links > li > a:focus {
    background: rgba(254, 238, 125, 0.25);
    padding-right: 1.5rem;
}

.mobile-nav-links .mobile-submenu {
    list-style: none;
    padding: 0;
    background: #f8fafc;
}

.mobile-nav-links .mobile-submenu a {
    display: block;
    padding: 0.7rem 1.25rem 0.7rem 2rem;
    color: #5a6c7d;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-nav-links .mobile-submenu a:hover {
    color: #2c3e50;
    background: rgba(186, 209, 227, 0.3);
}

.mobile-nav-actions {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mobile-nav-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
}

.mobile-nav-donate {
    background: linear-gradient(135deg, #feee7d 0%, #fef99b 100%);
    color: #2c3e50;
}

.mobile-nav-login {
    background: #f5f7fa;
    color: #2c3e50;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    header nav .nav-links {
        display: none !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #bad1e3;
    outline-offset: 2px;
}

/* Detail view (news & projects) */
.detail-view-container {
    max-width: 900px;
    margin: 2rem auto 4rem;
    padding: 0 5%;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #5a6c7d;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.detail-back-link:hover {
    color: #2c3e50;
}

.detail-hero-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.detail-meta {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 900;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.detail-content {
    font-size: 1.1rem;
    line-height: 2;
    color: #444;
}

.detail-content p {
    margin-bottom: 1rem;
}

.project-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #bad1e3, #feee7d);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.project-stat {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.project-stat-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: #2c3e50;
}

.project-stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.detail-donate-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #feee7d 0%, #fef99b 100%);
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 238, 125, 0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .partners-track {
        animation: none !important;
    }
}


/* Language Switcher Button Style */
.lang-switcher {
    margin: 0 5px;
    display: flex;
    align-items: center;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    background: #f8f9fa;
    border: 1.5px solid rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-family: inherit;
}
.lang-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
@media (max-width: 991px) {
    .lang-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}
