/* public/css/style.css */
/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f5f7fa; color: #1a1a2e; line-height: 1.6; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
.header { background: #0b3b2c; color: white; padding: 14px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.header .logo { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5px; }
.header .logo span { font-weight: 300; color: #7ddfb0; }
.header nav { display: flex; gap: 28px; flex-wrap: wrap; }
.header nav a { color: #d4ede1; font-weight: 500; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; transition: 0.3s; }
.header nav a:hover { color: white; border-bottom-color: #7ddfb0; }
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; }

@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .header nav { display: none; width: 100%; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid #2d6b4f; }
    .header nav.open { display: flex; }
    .header .logo { font-size: 1.1rem; }
    .header nav a { font-size: 1rem; padding: 8px 0; }
}

.hero {
    background-color: #0b3b2c;
    background-image: url('/public/uploads/hero.jpg');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 60px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11,59,44,0.3) 0%, rgba(26,110,74,0.3) 100%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* ===== SECTION ===== */
.section { padding: 48px 0 40px; border-bottom: 1px solid #e8ecf1; }
.section:last-of-type { border-bottom: none; }
.section-title { font-size: 1.8rem; font-weight: 700; color: #0b3b2c; margin-bottom: 20px; }

/* ===== NEWS + CALENDAR LAYOUT ===== */
.news-layout { display: flex; gap: 28px; align-items: flex-start; }
.news-layout .calendar-wrap { flex: 0 0 260px; min-width: 200px; }
.news-layout .news-wrap { flex: 1; min-width: 0; }
@media (max-width: 900px) { .news-layout { flex-direction: column; align-items: stretch; } .news-layout .calendar-wrap { flex: none; max-width: 320px; margin: 0 auto; width: 100%; } }

/* ===== CALENDAR ===== */
.calendar-sidebar { background: white; border-radius: 12px; padding: 16px 16px 20px; border: 1px solid #eef2f6; box-shadow: 0 2px 8px rgba(0,0,0,0.04); overflow: hidden; width: 100%; }
.calendar-sidebar .title { font-weight: 700; color: #0b3b2c; font-size: 1rem; margin-bottom: 8px; text-align: center; }
.calendar-sidebar .title small { font-weight: 400; font-size: 0.7rem; color: #5a6a7a; display: block; }
.calendar-sidebar .month-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.calendar-sidebar .month-nav button { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #0b3b2c; padding: 0 10px; font-weight: 700; line-height: 1; }
.calendar-sidebar .month-nav button:hover { color: #1a6e4a; }
.calendar-sidebar .month-nav .month-label { font-weight: 600; font-size: 0.95rem; color: #0b3b2c; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; width: 100%; }
.calendar-grid .day { text-align: center; padding: 5px 0; font-size: 0.78rem; border-radius: 50%; cursor: default; position: relative; font-weight: 500; background: transparent; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; width: 100%; transition: 0.15s; border: 2px solid transparent; line-height: 1; }
.calendar-grid .day.weekday { font-weight: 600; color: #94a3b8; font-size: 0.6rem; text-transform: uppercase; cursor: default; background: transparent !important; border-radius: 0; border: none; aspect-ratio: auto; padding: 4px 0; }
.calendar-grid .day.empty { cursor: default; background: transparent !important; border: none; }
.calendar-grid .day.today { border-color: #0b3b2c; font-weight: 700; background: #f0f7f3; }
.calendar-grid .day.has-event { cursor: pointer; position: relative; }
.calendar-grid .day.has-event .event-dot { position: absolute; bottom: 1px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: #dc2626; border: 1px solid white; }
.calendar-grid .day.has-event:hover { background: #fef2f2; transform: scale(1.08); border-color: #dc2626; }
.calendar-grid .day .event-tooltip { display: none; position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 8px 12px; border-radius: 8px; font-size: 0.7rem; max-width: 190px; white-space: normal; z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,0.35); text-align: center; font-weight: 400; pointer-events: none; line-height: 1.4; }
.calendar-grid .day .event-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1e293b; }
.calendar-grid .day.has-event:hover .event-tooltip, .calendar-grid .day.has-event:active .event-tooltip, .calendar-grid .day.has-event.show-tooltip .event-tooltip { display: block; }
.calendar-grid .day.has-event.show-tooltip { background: #fef2f2; border-color: #dc2626; }
@media (max-width: 480px) { .calendar-grid .day { font-size: 0.65rem; padding: 3px 0; } .calendar-grid .day .event-tooltip { font-size: 0.6rem; max-width: 140px; padding: 5px 8px; } .calendar-grid .day.has-event .event-dot { width: 5px; height: 5px; bottom: 1px; right: 1px; } }

/* ===== NEWS FEED ===== */
.news-feed { display: flex; flex-direction: column; gap: 18px; }
.news-item { background: white; border-radius: 10px; padding: 20px 24px; border-left: 4px solid #0b3b2c; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid #eef2f6; border-left-width: 4px; }
.news-item .date { font-size: 0.78rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.news-item h3 { font-size: 1.05rem; font-weight: 600; color: #0b3b2c; margin: 4px 0 6px; }
.news-item p { font-size: 0.92rem; color: #2d3748; line-height: 1.6; }
.news-item .link { display: inline-block; margin-top: 8px; color: #0b3b2c; font-weight: 600; font-size: 0.85rem; border-bottom: 2px solid transparent; transition: 0.3s; }
.news-item .link:hover { border-bottom-color: #0b3b2c; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.about-grid .text p { color: #2d3748; margin-bottom: 12px; line-height: 1.7; }
.about-grid .text strong { color: #0b3b2c; }
.about-grid .text .history-title { font-weight: 700; font-size: 1.1rem; color: #0b3b2c; margin: 16px 0 8px; border-bottom: 2px solid #e8ecf1; padding-bottom: 6px; }
.about-sidebar { display: flex; flex-direction: column; gap: 14px; }
.about-sidebar .card { background: white; border-radius: 10px; padding: 20px; border: 1px solid #eef2f6; box-shadow: 0 2px 6px rgba(0,0,0,0.03); transition: 0.3s; cursor: pointer; }
.about-sidebar .card:hover { border-color: #0b3b2c; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.about-sidebar .card .icon { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.about-sidebar .card h4 { font-size: 1rem; font-weight: 600; color: #0b3b2c; }
.about-sidebar .card p { font-size: 0.82rem; color: #5a6a7a; margin-top: 2px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* ===== DOCUMENTS ===== */
.doc-folders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 600px; }
.doc-folder { background: white; border-radius: 12px; padding: 24px 20px; text-align: center; border: 1px solid #eef2f6; transition: 0.3s; box-shadow: 0 2px 6px rgba(0,0,0,0.03); cursor: pointer; display: block; }
.doc-folder:hover { border-color: #0b3b2c; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.doc-folder .icon { font-size: 2.8rem; display: block; margin-bottom: 8px; }
.doc-folder .name { font-weight: 600; font-size: 1rem; color: #0b3b2c; }
.doc-folder .count { font-size: 0.78rem; color: #94a3b8; margin-top: 2px; }
@media (max-width: 480px) { .doc-folders { grid-template-columns: 1fr; } }

/* ===== MODAL ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 16px; max-width: 700px; width: 100%; max-height: 80vh; padding: 32px 36px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; overflow-y: auto; }
.modal .close-btn { position: absolute; top: 16px; right: 20px; font-size: 1.6rem; background: none; border: none; cursor: pointer; color: #94a3b8; transition: 0.3s; }
.modal .close-btn:hover { color: #1a1a2e; transform: rotate(90deg); }
.modal h2 { font-size: 1.4rem; color: #0b3b2c; margin-bottom: 16px; border-bottom: 2px solid #e8ecf1; padding-bottom: 10px; }
.modal .file-list { list-style: none; padding: 0; }
.modal .file-list li { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 12px; transition: 0.2s; border-radius: 6px; flex-wrap: wrap; }
.modal .file-list li:hover { background: #f8fafc; }
.modal .file-list li .file-icon { font-size: 1.2rem; }
.modal .file-list li .file-name { font-weight: 500; font-size: 0.92rem; color: #1a1a2e; }
.modal .file-list li .file-size { font-size: 0.75rem; color: #94a3b8; margin-left: auto; }
.modal .file-list li .file-link { color: #0b3b2c; font-weight: 600; font-size: 0.8rem; border-bottom: 2px solid transparent; transition: 0.3s; }
.modal .file-list li .file-link:hover { border-bottom-color: #0b3b2c; }
.modal .file-list li .example-badge { background: #fef08a; color: #854d0e; font-size: 0.6rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.3px; }
@media (max-width: 600px) { .modal { padding: 24px 20px; max-height: 90vh; } .modal .file-list li { flex-wrap: wrap; gap: 6px; } .modal .file-list li .file-size { margin-left: 0; width: 100%; } }

/* ===== CONTACTS ===== */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contacts-grid .left { display: flex; flex-direction: column; gap: 18px; }
.contacts-grid .left .block { background: white; padding: 20px 24px; border-radius: 10px; border: 1px solid #eef2f6; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.contacts-grid .left .block h3 { font-size: 1rem; font-weight: 700; color: #0b3b2c; margin-bottom: 8px; }
.contacts-grid .left .block p { font-size: 0.92rem; color: #2d3748; margin: 3px 0; }
.contacts-grid .left .block .label { color: #5a6a7a; font-size: 0.82rem; }
.contacts-grid .left .block .icon-link { display: inline-flex; align-items: center; gap: 8px; background: #f1f5f9; padding: 6px 14px; border-radius: 8px; color: #0b3b2c; font-weight: 500; font-size: 0.9rem; transition: 0.3s; margin: 4px 6px 4px 0; }
.contacts-grid .left .block .icon-link:hover { background: #e2e8f0; transform: translateY(-2px); }
.contacts-grid .left .block .icon-link.max { background: #0b3b2c; color: white; }
.contacts-grid .left .block .icon-link.max:hover { background: #1a6e4a; }
.contacts-grid .left .block .bus-schedule { font-size: 0.85rem; color: #2d3748; margin-top: 4px; }
.contacts-grid .left .block .bus-schedule strong { color: #0b3b2c; }
.contacts-grid .right .map { background: #e2e8f0; border-radius: 10px; overflow: hidden; height: 320px; border: 1px solid #eef2f6; }
.contacts-grid .right .map iframe { width: 100%; height: 100%; border: none; }
@media (max-width: 820px) { .contacts-grid { grid-template-columns: 1fr; } .contacts-grid .right .map { height: 240px; } }

/* ===== FOOTER ===== */
.footer { background: #0f1e18; color: #94a3b8; padding: 32px 0 24px; margin-top: 12px; }
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer .copy { font-size: 0.85rem; }
.footer .links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer .links a { color: #b0c4d0; font-size: 0.85rem; transition: 0.3s; }
.footer .links a:hover { color: white; }
@media (max-width: 600px) { .footer .links { gap: 14px; } .footer .links a { font-size: 0.78rem; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) { .container { padding: 0 14px; } .section { padding: 28px 0 24px; } .section-title { font-size: 1.4rem; } .news-item { padding: 16px 18px; } .news-item h3 { font-size: 0.95rem; } .news-item p { font-size: 0.85rem; } }