/* ========================================
   Основные стили сайта Конференций МГУ
   ======================================== */

:root {
    --primary: #003366;
    --primary-light: #004d99;
    --accent: #0088cc;
    --dark: #222;
    --light: #f5f5f5;
    --white: #fff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #f4f6f7;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--accent);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    margin-top: 0;
}

.container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
#sp-header {
    background: var(--primary);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sp-logo a {
    display: block;
}

#sp-menu {
    flex: 1;
    margin-left: 30px;
}

.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu > .menu-item {
    position: relative;
}

.nav-menu > .menu-item > a {
    display: block;
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.nav-menu > .menu-item > a:hover,
.nav-menu > .menu-item:hover > a {
    background: var(--primary-light);
    text-decoration: none;
    color: #fff;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item.has-children:hover > .sub-menu {
    display: block;
}

.sub-menu .menu-item a {
    display: block;
    padding: 10px 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.sub-menu .menu-item a:hover {
    background: #f8f9fa;
    color: var(--primary);
    text-decoration: none;
}

.sub-sub-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 1001;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item.has-sub:hover > .sub-sub-menu {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-header-action {
    display: inline-block;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.btn-header-action:hover {
    opacity: 1;
}

.header-login .btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 13px;
}
.header-login .btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Offcanvas */
#offcanvas-menu {
    display: none;
}

/* Banners */
.banners-strip {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0;
}
.banners-strip .container {
    display: flex;
    flex-wrap: wrap;
}
.info-banner {
    padding: 12px 20px;
    text-align: center;
    flex: 1;
    min-width: 100%;
}
.info-banner a {
    color: inherit;
    text-decoration: none;
    display: block;
}

/* Breadcrumbs */
.breadcrumbs {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    font-size: 13px;
}
.breadcrumbs-sep {
    margin: 0 8px;
    color: #999;
}
.breadcrumbs-current {
    color: #666;
    font-weight: 600;
}

/* Main content */
.main-content {
    padding: 30px 0;
    min-height: 500px;
}

/* Home hero */
.home-hero {
    margin-top: 20px;
}

/* Sidebar */
.sidebar-block {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.sidebar-search .input-group {
    width: 100%;
}

.calendar-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.calendar-header .sidebar-title {
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
}
.cal-arrow:hover {
    background: #004d99;
    color: #fff;
    text-decoration: none;
}
.cal-month {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    min-width: 92px;
    text-align: center;
}

.calendar-table {
    margin-bottom: 0;
    font-size: 11px;
    text-align: center;
    table-layout: fixed;
    width: 100%;
}
.calendar-table th {
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    padding: 4px 2px;
    font-size: 11px;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.calendar-table td {
    padding: 4px 2px;
    vertical-align: middle;
    white-space: nowrap;
}
.calendar-date {
    display: inline-block;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}
.curr-day .calendar-date {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.weekend .calendar-date {
    color: #dc3545;
}
.has-event {
    background: #fff8e1;
}
.event-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
}
.event-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff9800;
    text-decoration: none;
}
.event-dot:hover {
    background: #f57c00;
}
.prev-month, .next-month {
    color: #ccc;
}

.upcoming-events {
    list-style: none;
    padding: 0;
    margin: 0;
}
.upcoming-events li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.upcoming-events li:last-child {
    border-bottom: none;
}
.upcoming-events li a {
    display: block;
    text-decoration: none;
}
.upcoming-events .event-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
}
.upcoming-events .event-title {
    font-size: 14px;
    color: var(--primary);
}
.upcoming-events li a:hover .event-title {
    color: var(--accent);
}
.no-events {
    color: #888;
    font-style: italic;
    font-size: 13px;
}

.important-block {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}
.important-block .sidebar-title {
    color: #856404;
    border-bottom-color: #ffc107;
}
.important-block p {
    margin-bottom: 8px;
    font-size: 14px;
}

.home-btn {
    text-align: center;
    font-weight: 600;
}

.banner-block {
    padding: 10px;
    text-align: center;
}

/* Content */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}

.content-block {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.news-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.news-card-image {
    overflow: hidden;
    height: 180px;
}
.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 15px;
}
.news-card-body h3 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.3;
}
.news-card-body h3 a {
    color: var(--primary);
}
.news-card-body h3 a:hover {
    color: var(--accent);
}

.news-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}
.news-meta .badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
}
.badge-important {
    background: #d9534f;
    color: #fff;
}

.news-card-body p {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Footer */
#sp-footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 30px 0;
    margin-top: 40px;
}
#sp-footer h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}
#sp-footer p {
    font-size: 14px;
    margin-bottom: 8px;
}
#sp-footer a {
    color: #aaa;
}
#sp-footer a:hover {
    color: #fff;
}

/* Scroll to top */
#scrollToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 18px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#scrollToTop:hover {
    background: var(--primary-light);
    color: #fff;
    text-decoration: none;
}

/* News list */
.news-list-item {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.news-list-item h3 {
    margin-bottom: 8px;
}
.news-list-item .news-meta {
    margin-bottom: 10px;
}
.news-list-item img {
    max-width: 200px;
    float: left;
    margin-right: 15px;
    border-radius: 4px;
}

/* News detail */
.news-detail {
    background: #fff;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.news-detail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}
.news-detail .news-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Page */
.page-content {
    background: #fff;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.gallery-item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item .gallery-caption {
    padding: 10px 15px;
    font-size: 14px;
}

/* Contact */
.contact-block {
    background: #fff;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.contact-info dt {
    font-weight: 600;
    color: var(--primary);
}
.contact-info dd {
    margin-bottom: 15px;
}

/* Pagination */
.pagination-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 991px) {
    .header-inner {
        flex-wrap: wrap;
    }
    #sp-menu {
        order: 3;
        flex: 0 0 100%;
        margin-left: 0;
        margin-top: 15px;
    }
    .nav-menu {
        flex-direction: column;
    }
    .nav-menu > .menu-item > a {
        padding: 10px 0;
    }
    .sub-menu {
        position: static;
        box-shadow: none;
        background: #f8f9fa;
    }
    .sub-sub-menu {
        position: static;
        box-shadow: none;
        background: #f0f0f0;
    }
}

@media (max-width: 767px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .header-actions {
        margin-left: auto;
    }
}

@media (max-width: 400px) {
    .calendar-table th,
    .calendar-table td {
        padding: 2px 1px;
        font-size: 10px;
    }
    .calendar-date {
        padding: 1px 2px;
        font-size: 10px;
        white-space: nowrap;
    }
}

/* Conferences */
.conferences-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.conference-item {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.conference-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    padding: 10px 15px;
    min-width: 80px;
    text-align: center;
}
.conf-day {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.conf-month {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.conf-year {
    font-size: 12px;
    opacity: 0.8;
}
.conference-body {
    flex: 1;
}
.conference-body h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary);
}
.conference-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}
.conference-body p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}
.conference-files {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px 15px;
}
.conference-files ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.conference-files li {
    margin-bottom: 4px;
}

@media (max-width: 767px) {
    .conference-item {
        flex-direction: column;
        gap: 15px;
    }
    .conference-date {
        flex-direction: row;
        gap: 10px;
        min-width: auto;
        align-items: baseline;
    }
    .conf-day {
        font-size: 22px;
    }
}

.conferences-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.conferences-items li {
    border-bottom: 1px solid #eee;
}
.conferences-items li:last-child {
    border-bottom: none;
}
.conference-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 6px;
    text-decoration: none;
}
.conference-row:hover {
    background: #f4f8fc;
}
.conference-date-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 110px;
    padding: 8px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}
.conference-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
}
.conference-row:hover .conference-title {
    color: var(--primary);
}
.banners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}
.banner-item {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.banner-item:hover {
    opacity: 0.88;
}
.banner-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}
.banner-text {
    padding: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}
.event-full-text {
    margin-top: 15px;
    color: #444;
    line-height: 1.6;
}
.event-full-text p {
    margin-bottom: 12px;
}
