body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

section {
    padding: 20px;
    margin: 20px;
}

h1, h2 {
    font-size: 24px;
    color: #000;
}

p {
    font-size: 16px;
    color: #777;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #999;
    text-decoration: underline;
}

a:active, a:visited {
    color: #f47059;
}

section:not(:last-child) {
    border-bottom: 2px solid #ddd;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

footer {
    background-color: #222;
    color: white;
    padding: 5px 0;
    text-align: center;
    font-size: 14px;
}

.footer-link {
    font-size: 14px;
}

footer a {
    color: inherit;
    text-decoration: underline;
}

footer a:hover {
    color: #dbdbdb;
}

.partner {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ad-label {
    font-size: 0.9em;
    color: #555;
    background-color: #f8f8f8;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

.donate-button {
    background-color: #ED1C24;
    color: white !important;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease;
    min-height: 44px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-sizing: border-box;
}

.donate-button:hover {
    background-color: #c8102e;
    color: white !important;
    text-decoration: none;
}

.donate-button:active {
    background-color: #a00d25;
    transform: scale(0.98);
}

/* Адаптивная сетка для партнеров */
.partners-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

/* Планшеты */
@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    section {
        padding: 30px;
        margin: 30px;
    }
    
    h1, h2 {
        font-size: 28px;
    }
    
    p {
        font-size: 18px;
    }
}

/* Десктоп */
@media (min-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Мобильные устройства */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    section {
        padding: 15px;
        margin: 10px;
    }
    
    h1 {
        font-size: 22px;
        text-align: center;
    }
    
    h2 {
        font-size: 20px;
        text-align: center;
    }
    
    p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .partner {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .donate-button {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        font-size: 16px;
        margin-top: 10px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .ad-label {
        font-size: 0.8em;
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    footer {
        padding: 10px 0;
    }
    
    .footer-link {
        font-size: 12px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    section {
        padding: 10px;
        margin: 5px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .partner {
        padding: 10px;
    }
    
    .donate-button {
        padding: 12px 16px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .partner:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .donate-button:hover {
        background-color: #ED1C24;
    }
    
    .donate-button:active {
        background-color: #c8102e;
        transform: scale(0.95);
    }
}

/* Анимации для плавности */
.partner {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Улучшенная типографика */
.partner strong {
    color: #333;
    font-weight: 600;
}

.partner p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Улучшенные ссылки */
.partner a {
    color: #ED1C24;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.partner a:hover {
    border-bottom-color: #ED1C24;
}