/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

.language-switcher {
    position: relative;
}

.lang-btn {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: none;
    min-width: 150px;
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.lang-option:hover {
    background: #f1f5f9;
}

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #64748b;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.filter-section .filter-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 0.3rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
    flex: 1 1 auto;
}

.filter-section .search-box {
    position: relative;
    max-width: 340px;
    width: 100%;
    flex: 0 0 340px;
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #2563eb;
    border-color: rgba(255, 255, 255, 0.9);
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

/* News Content Section */
.news-content {
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.news-item.hidden {
    display: none;
}

.news-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.category-label {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-label.events {
    background: #10b981;
}

.category-label.reports {
    background: #f59e0b;
}

.category-label.success {
    background: #ec4899;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-content p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.read-more-btn {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more-btn:hover {
    gap: 0.75rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.page-btn.next {
    padding: 0.5rem 1rem;
}

/* Video Section */
.video-section {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 3rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: #2563eb;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button i {
    color: white;
    font-size: 1.8rem;
    margin-left: 3px;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.video-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Financial Reports Section */
.financial-reports {
    padding: 4rem 0;
    background: white;
}

.financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.summary-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.summary-card.total-raised {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
}

.summary-card.total-spent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.summary-card.remaining {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.summary-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.amount span {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.8;
}

.period {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Expense Breakdown */
.expense-breakdown {
    margin-bottom: 4rem;
}

.expense-breakdown h3 {
    text-align: center;
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 3rem;
}

.breakdown-grid {
    display: grid;
    gap: 2rem;
}

.expense-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expense-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.expense-icon {
    width: 60px;
    height: 60px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.expense-info h4 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.expense-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.expense-percentage {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #10b981);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Monthly Statistics */
.monthly-stats {
    margin-bottom: 4rem;
}

.monthly-stats h3 {
    text-align: center;
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 3rem;
}

.stats-chart {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
}

.chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#monthlyChart {
    max-width: 100%;
    height: auto;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Detailed Reports */
.detailed-reports {
    margin-bottom: 2rem;
}

.detailed-reports h3 {
    text-align: center;
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 3rem;
}

.reports-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.table-header {
    display: grid;
    grid-template-columns: 120px 150px 1fr 150px 120px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.header-cell {
    display: flex;
    align-items: center;
}

.table-row {
    display: grid;
    grid-template-columns: 120px 150px 1fr 150px 120px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 1rem;
    align-items: center;
    transition: background 0.3s ease;
}

.table-row:hover {
    background: #f8fafc;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.table-cell.amount {
    font-weight: 700;
    color: #2563eb;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.category-badge.treatment {
    background: #2563eb;
}

.category-badge.equipment {
    background: #10b981;
}

.category-badge.family {
    background: #f59e0b;
}

.category-badge.rehab {
    background: #8b5cf6;
}

.document-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s ease;
}

.document-link:hover {
    gap: 0.5rem;
}

.reports-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn,
.export-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn {
    background: #2563eb;
    color: white;
}

.download-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.export-btn {
    background: #10b981;
    color: white;
}

.export-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Responsive Design for Financial Section */
@media (max-width: 768px) {
    .financial-summary {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .amount {
        font-size: 2rem;
    }
    
    .expense-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .expense-icon {
        margin: 0 auto;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
    
    .header-cell,
    .table-cell {
        padding: 0.5rem 0;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .header-cell::before,
    .table-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        margin-right: 0.5rem;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    .table-cell::before {
        display: inline-block;
        min-width: 100px;
    }
    
    .table-cell.amount::before {
        content: "Сумма:";
    }
    
    .table-cell:first-child::before {
        content: "Дата:";
    }
    
    .table-cell:nth-child(2)::before {
        content: "Категория:";
    }
    
    .table-cell:nth-child(3)::before {
        content: "Описание:";
    }
    
    .table-cell:last-child::before {
        content: "Документы:";
    }
    
    .reports-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn,
    .export-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .financial-reports {
        padding: 3rem 0;
    }
    
    .summary-card {
        padding: 1.5rem;
    }
    
    .amount {
        font-size: 1.8rem;
    }
    
    .expense-item {
        padding: 1rem;
    }
    
    .expense-amount {
        font-size: 1.3rem;
    }
    
    .stats-chart {
        padding: 1.5rem;
    }
}

/* Footer */
footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Улучшение расположения элементов в мобильной навигации */
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    .logo {
        flex: 1;
    }
    
    .language-switcher {
        flex-shrink: 0;
        margin-right: 1rem;
    }
    
    .mobile-menu {
        flex-shrink: 0;
        margin-left: 0.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .filter-section .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-section {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    .filter-section .filter-buttons {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .filter-section .search-box {
        max-width: 100%;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .news-content,
    .video-section,
    .gallery-section {
        padding: 3rem 0;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .video-info,
    .news-content {
        padding: 1rem;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i {
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .page-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .filter-section {
        padding: 2rem 0;
    }
    
    .search-container {
        margin-top: 1rem;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .news-item {
        margin-bottom: 1.5rem;
    }
    
    .news-content h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .news-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .news-date {
        font-size: 0.8rem;
    }
    
    .news-meta {
        font-size: 0.8rem;
    }
    
    .video-info h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .video-info p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .video-meta {
        font-size: 0.8rem;
    }
    
    .load-more {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Financial reports mobile */
    .summary-card {
        padding: 1.5rem;
    }
    
    .summary-card h3 {
        font-size: 1rem;
    }
    
    .summary-card .amount {
        font-size: 1.5rem;
    }
    
    .summary-card .period {
        font-size: 0.85rem;
    }
    
    .expense-item {
        padding: 1rem;
    }
    
    .expense-item h4 {
        font-size: 0.95rem;
    }
    
    .expense-amount {
        font-size: 1.1rem;
    }
    
    .expense-percentage {
        font-size: 0.85rem;
    }
    
    .table-header,
    .table-row {
        padding: 0.75rem 0.5rem;
    }
    
    .table-cell {
        font-size: 0.85rem;
    }
    
    .table-cell.amount {
        font-weight: 600;
    }
    
    .document-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .download-btn,
    .export-btn {
        width: 100%;
        margin-bottom: 1rem;
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .export-btn {
        margin-bottom: 0;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-content h3 {
        font-size: 1rem;
    }
    
    .news-content p {
        font-size: 0.85rem;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-info h3 {
        font-size: 0.95rem;
    }
    
    .video-info p {
        font-size: 0.8rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .summary-card .amount {
        font-size: 1.3rem;
    }
    
    .expense-item {
        padding: 0.75rem;
    }
    
    .expense-item h4 {
        font-size: 0.9rem;
    }
    
    .expense-amount {
        font-size: 1rem;
    }
    
    .table-cell {
        font-size: 0.75rem;
    }
    
    .document-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Touch optimizations for mobile */
@media (hover: none) and (pointer: coarse) {
    .news-item:hover,
    .video-card:hover,
    .gallery-item:hover,
    .filter-btn:hover,
    .load-more:hover,
    .download-btn:hover,
    .export-btn:hover {
        transform: none;
    }
    
    .news-item:active,
    .video-card:active,
    .gallery-item:active {
        transform: scale(0.98);
    }
    
    .filter-btn:active,
    .load-more:active,
    .download-btn:active,
    .export-btn:active {
        transform: scale(0.98);
    }
    
    /* Increase touch targets */
    .filter-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .load-more,
    .download-btn,
    .export-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .document-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lang-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .lang-option {
        min-height: 44px;
        padding: 1rem;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .filter-section {
        padding: 1.5rem 0;
    }
    
    .news-content,
    .video-section,
    .gallery-section {
        padding: 2rem 0;
    }
    
    .financial-reports {
        padding: 2rem 0;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .financial-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .news-item,
    .video-card,
    .gallery-item,
    .filter-btn,
    .summary-card,
    .expense-item {
        border-width: 1px;
    }
    
    .load-more,
    .download-btn,
    .export-btn {
        border-width: 1px;
    }
}

/* Chart mobile optimization */
@media (max-width: 480px) {
    .chart-container {
        height: 200px;
    }
    
    .chart-legend {
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .legend-item {
        font-size: 0.85rem;
    }
}

/* Language switcher mobile optimization */
@media (max-width: 480px) {
    .language-switcher {
        margin-top: 0.5rem;
    }
    
    .lang-dropdown {
        right: -50px;
        min-width: 150px;
    }
}

/* Navigation mobile optimization */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: #1e293b;
    }
}

/* Additional mobile improvements */
@media (max-width: 480px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .filter-section .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .search-container {
        position: static;
        width: 100%;
    }
    
    .news-grid,
    .video-grid {
        gap: 1rem;
    }
    
    .gallery-grid {
        gap: 0.75rem;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button i {
        font-size: 1.2rem;
    }
    
    .expense-breakdown {
        padding: 1.5rem;
    }
    
    .monthly-stats {
        padding: 1.5rem;
    }
    
    .detailed-reports {
        padding: 1.5rem;
    }
    
    .reports-actions {
        flex-direction: column;
        gap: 1rem;
    }
}
