/* Основни стилове */
body { font-family: Arial, sans-serif; margin:0; padding:0; background:#fff; color:#222; line-height:1.6; }
h1,h2{margin:0 0 15px 0;color:#111;}
p{margin:0 0 10px 0;}
a{color:#005;text-decoration:none;}
a:hover{text-decoration:underline;}

/* Header и навигация */
header {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:#222;
    color:#fff;
}
header h1 { margin:0 20px 0 0; font-size:1.5rem; flex-shrink:0; }
header nav { display:flex; gap:15px; flex-wrap:wrap; justify-content:center; }
header nav a { color:#fff; text-decoration:none; font-weight:500; }

/* Hero секция */
.hero { background:#e0e0ff; padding:40px 20px; text-align:center; }
.hero-image { display:block; width:100%; max-width:400px; height:auto; border-radius:50%; margin:0 auto; }

/* Основни секции */
.about, .useful, .contests, .math { background:#f9f9f9; padding:30px; margin:20px auto; max-width:900px; border-radius:8px; }

/* Footer */
footer { background:#222; color:#fff; text-align:center; padding:20px; }

/* Animations */
.fade-in { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from {opacity:0; transform:translateY(8px);} to {opacity:1; transform:none;} }

/* Gallery */
.gallery-grid { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.gallery-grid img { width:220px; height:150px; object-fit:cover; border-radius:8px; cursor:pointer; box-shadow:0 6px 20px rgba(0,0,0,0.12); transition:transform .15s; }
.gallery-grid img:hover { transform:translateY(-6px); }

/* Admin */
.btn{display:inline-block;padding:8px 12px;background:#0b5bd7;color:#fff;border-radius:6px;border:none;cursor:pointer;text-decoration:none;}
.notice{padding:10px;border-radius:6px;}
.notice.success{background:#e6ffed;border:1px solid #bff0c7;}
.notice.error{background:#ffecec;border:1px solid #ffbdbd;}
article{animation:fadeUp .35s ease both;}
/* Математически новини */

.math-news ul.aggregated-news {
    list-style: disc;
    padding-left:20px;
}

.math-news ul.aggregated-news li {
    margin-bottom:8px;
}

.math-news ul.aggregated-news a {
    color:#0b5bd7;
    text-decoration:none;
}

.math-news ul.aggregated-news a:hover {
    text-decoration:underline;
}
/* Touch targets за мобилни устройства */
@media (max-width: 768px) {
    /* Линкове в навигацията */
    header nav a {
        padding: 12px 18px;      /* достатъчно големи за натискане */
        font-size: 16px;
        display: inline-block;
        margin: 5px 8px;         /* разстояние между линковете */
    }

    /* Линкове в секция Полезно */
    .useful a {
        padding: 10px 14px;
        font-size: 16px;
        display: inline-block;
        margin-bottom: 12px;     /* вертикално разстояние */
    }

    /* Линкове в Галерия (ако имат линкове към изображения) */
    .gallery-grid a {
        padding: 6px;            /* малко padding за всяка снимка */
        display: inline-block;
    }
}
