/* ========================================
   ШРИФТЫ
   ======================================== */
@font-face {
    font-family: 'PT Sans';
    src: url('/local/templates/webinars/fonts/PTSans/PTSans-Regular.eot');
    src: local('PT Sans'), local('PTSans-Regular'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Regular.eot?#iefix') format('embedded-opentype'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Regular.woff2') format('woff2'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Regular.woff') format('woff'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/local/templates/webinars/fonts/PTSans/PTSans-Bold.eot');
    src: local('PT Sans Bold'), local('PTSans-Bold'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Bold.eot?#iefix') format('embedded-opentype'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Bold.woff2') format('woff2'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Bold.woff') format('woff'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/local/templates/webinars/fonts/PTSans/PTSans-Italic.eot');
    src: local('PT Sans Italic'), local('PTSans-Italic'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Italic.eot?#iefix') format('embedded-opentype'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Italic.woff2') format('woff2'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Italic.woff') format('woff'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'PT Sans';
    src: url('/local/templates/webinars/fonts/PTSans/PTSans-BoldItalic.eot');
    src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-BoldItalic.woff2') format('woff2'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-BoldItalic.woff') format('woff'),
        url('/local/templates/webinars/fonts/PTSans/PTSans-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}


/* ========================================
   БАЗОВЫЕ СТИЛИ
   ======================================== */
body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.4em;
    color: #141b22;
    font-family: "PT Sans", sans-serif;
    background: #f5f7fa;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6, 
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #141b22;
}

h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }


/* ========================================
   HEADER
   ======================================== */
.page-header__socials-area {
    padding-top: 29px;
    text-align: right;
}

.page-header__socials-area strong {
    margin-bottom: 12px;
}

.page-header__social-list {
    position: relative;
    top: 8px;
    display: inline-block;
    margin-bottom: 10px;
    margin-left: 9px;
}

.page-header__social-item {
    display: inline-block;
    margin-right: 5px;
}

.page-header__social-item:last-child {
    margin-right: 0;
}

.page-header__social-item a {
    display: block;
    height: 25px;
    width: 25px;
}

.page-header__social-item--vk {
    width: 25px;
    height: 25px;
    background-image: url("/local/templates/webinars/img/sprite.png");
    background-position: -50px -91px;
}

.page-header__social-item--fb {
    width: 25px;
    height: 25px;
    background-image: url("/local/templates/webinars/img/sprite.png");
    background-position: -102px -91px;
}

.page-header__social-item--ok {
    width: 25px;
    height: 25px;
    background-image: url("/local/templates/webinars/img/sprite.png");
    background-position: -76px -91px;
}

.page-header__social-item--tg {
    width: 25px;
    height: 25px;
    background-image: url("/local/templates/webinars/img/icon-teleg.png");
}


/* ========================================
   FOOTER
   ======================================== */
.page-footer {
    padding-top: 39px;
    padding-bottom: 49px;
    color: #636c75;
    background-color: #e3e4e6;
}

.page-footer a {
    color: #636c75;
    text-decoration: underline;
}

.page-footer a:hover {
    color: #005fb0;
}

.page-footer__logo {
    display: block;
    margin-bottom: 15px;
}

.page-footer__info h4 {
    margin: 0 0 17px;
    text-transform: uppercase;
    font-size: 1em;
}

.page-footer__info-item {
    line-height: 2.1em;
}

.page-footer__search {
    position: relative;
    overflow: hidden;
    border: 1px solid #4d4d4d;
    border-radius: 2px;
}

.page-footer__search input[type="text"] {
    border: 1px solid #d3d3d3;
    border-radius: 2px;
    background: #fff;
    color: #656565;
    padding: 0 9px;
    height: 26px;
    line-height: 26px;
    font-size: 14px;
    font-family: Arial;
    outline: none;
    vertical-align: top;
    width: 100%;
}

.page-footer__search-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 28px;
    border: none;
    padding: 0 22px;
    background: url('/local/templates/webinars/img/icon-search.png') no-repeat center #d8d8d8;
}

.page-footer__developer {
    margin-top: 30px;
    line-height: 3rem;
}


/* ========================================
   СТРАНИЦА СОБЫТИЙ
   ======================================== */

/* Общие заголовки секций */
.upcoming-events h2,
.events h2 {
    font-size: 26px;
    color: #1f2937;
    margin: 0 0 25px;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 15px;
}

/* Обертка событий */
.events-wrapper {
    padding: 35px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e6e8eb;
}

/* Предстоящие события */
.upcoming-events {
    padding: 35px 0 0;
}

.upcoming-cards {
    display: none;
}

.upcoming-cards.current {
    display: block;
}

.upcoming-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upcoming-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.upcoming-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.upcoming-card-content {
    padding: 20px;
}

.upcoming-card-content h3 {
    font-size: 18px;
    margin: 0 0 10px;
    font-weight: 600;
}

.upcoming-card-content h3 a {
    color: #1f2937;
}

.upcoming-card-content p {
    line-height: 1.6;
    display: inline-block;
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 20px;
    width: fit-content;
}


/* Календарь */
.calendar-widget {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    height: fit-content;
}

.calendar-widget .pickmeup {
    width: 100%;
    background: transparent;
    border: none;
}

.calendar-widget nav:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.calendar-widget .pmu-month {
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.calendar-widget .pmu-prev,
.calendar-widget .pmu-next {
    background: #f3f4f6;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-widget .pmu-prev:hover,
.calendar-widget .pmu-next:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.calendar-widget .pmu-day-of-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-widget .pmu-day-of-week div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 0;
}

.calendar-widget .pmu-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-widget .pmu-days .pmu-button,
.calendar-widget .pmu-months .pmu-button,
.calendar-widget .pmu-years .pmu-button {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.calendar-widget .pmu-days .pmu-button:hover:not(.pmu-selected):not(.pmu-current),
.calendar-widget .pmu-months .pmu-button:hover,
.calendar-widget .pmu-years .pmu-button:hover {
    background: #f3f4f6;
}

.calendar-widget .pmu-days .pmu-today {
    background: #f3f4f6;
    font-weight: 700;
}

.calendar-widget .pmu-days .pmu-selected {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
}

.calendar-widget .pmu-days .pmu-current {
    background: #011b58;
    color: white;
    font-weight: 700;
}

.calendar-widget .pmu-not-in-month {
    opacity: 0.5;
}

.calendar-widget .pmu-months,
.calendar-widget .pmu-years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.calendar-widget .pickmeup:not(.pmu-view-days) .pmu-days, 
.calendar-widget .pickmeup:not(.pmu-view-days) .pmu-day-of-week, 
.calendar-widget .pickmeup:not(.pmu-view-months) .pmu-months, 
.calendar-widget .pickmeup:not(.pmu-view-years) .pmu-years {
    display: none;
}

/* Прошедшие события */
.events {
    padding: 30px 0 35px;
}

.event-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #d1d5db;
}

.event-image {
    width: 100%;
}

.event-image img {
    width: 100%;
}

.event-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    display: inline-block;
    background: #f3f4f6;
    color: #4b5563;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    width: fit-content;
}

.event-title {
    font-size: 18px;
    margin: 0 0 15px;
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
}

.event-title a {
    color: #1f2937;
}

.btn--event {
    background: #1f2937;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: fit-content;
}

.btn--event:hover {
    background: #374151;
    color: white;
    transform: translateX(3px);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%;
    clear: both;
    list-style: none;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: block;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-link:hover:not(.disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.page-item.active .page-link {
    background: #1f2937;
    border-color: #1f2937;
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}


/* ========================================
   СТРАНИЦА ВЕБИНАРА
   ======================================== */
.webinar-detail {
    padding: 35px 0;
}

.webinar-detail .page-title {
    font-size: 34px;
    color: #1f2937;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 20px;
}

.date-badge {
    background: linear-gradient(135deg, #011b58 0%, #022a7a 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
}

/* Видео секция */
.video-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.video-container {
    position: relative;
    width: 100%;
    background: #e5e7eb;
}

.video-actions {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tag-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-button.nmo {
    background: linear-gradient(135deg, #ea0b0d 0%, #b4080b 100%);
}

.tag-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.bell-button {
    color: #ff0202;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: auto;
}

.bell-button:hover {
    transform: scale(1.05);
}

/* Чат */
.chat-sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 504px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-content {
    flex: 1;
    background: #f9fafb;
    padding: 12px 15px;
    border-radius: 8px;
    position: relative;
}

.message-content p {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.message-options {
    position: absolute;
    top: 8px;
    right: 8px;
}

.admin_panel_menu {
    position: absolute;
    background: #fff;
    padding: 5px;
    border: 1px solid #ebebeb;
    border-radius: 5px;
    right: 27px;
    top: 8px;
    z-index: 2;
    display: none;
}

.admin_panel_menu a {
    color: #e60b0d;
    text-decoration: underline;
}

.more-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.more-btn:hover {
    background: #e5e7eb;
    color: #6b7280;
}

.comment-section {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.comment-section form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-box {
    min-height: 70px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
}

.comment-box:focus {
    outline: none;
    border-color: #667eea;
}

.btn--chat {
    background: #1f2937;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn--chat:hover {
    background: #374151;
}

/* Информация о вебинаре */
.webinar-info {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* Кнопка "Я здесь" */
.confirm-presence-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: 50px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
    height: max-content;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 20px 0px rgba(255, 0, 0, 0.7); }
}


/* ========================================
   МОДАЛЬНОЕ ОКНО
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 30px;
}

.modal-info-item {
    margin-bottom: 20px;
    color: #4b5563;
    line-height: 1.7;
    position: relative;
}

.modal-info-item:last-child {
    margin-bottom: 0;
}

.modal-info-item strong {
    color: #1f2937;
    font-weight: 600;
}

.nmo-registraion .reg-email {
    display: block;
    margin-bottom: 10px;
    padding: 12px 10px;
    width: calc(100% - 20px);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-message {
    margin-bottom: 10px;
    padding: 2px 5px;
    border-radius: 8px;
    font-size: 12px;
    display: inline-block;
    position: absolute;
    top: 9px;
    right: 9px;
}

.form-message--success {
    background: #D1FAE5;
    color: #065F46;
}

.form-message--error {
    background: #FEE2E2;
    color: #991B1B;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    /* Календарь */
    .calendar-widget {
        padding: 15px;
    }
    
    .calendar-widget .pmu-month {
        font-size: 16px;
    }
    
    .calendar-widget .pmu-button {
        font-size: 13px;
    }
    
    .calendar-widget .pmu-day-of-week div {
        font-size: 11px;
    }

    /* События */
    .upcoming-events h2,
    .events h2 {
        font-size: 22px;
    }

    .event-title {
        font-size: 17px;
    }

    .event-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .upcoming-card-content h3 {
        font-size: 17px;
    }

    .upcoming-card-image a,
    .upcoming-card-image img {
        width: 100%;
    }

    /* Вебинар */
    .webinar-detail .page-title {
        font-size: 28px;
    }

    .date-badge {
        font-size: 14px;
        padding: 8px 16px;
    }

    .video-actions {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .video-preview {
        width: 120px;
    }

    .lecturer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .chat-sidebar {
        height: 500px;
    }

    /* Модальное окно */
    .modal-content {
        width: 95%;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-info-item {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .page-header__socials-area {
        text-align: left;
        padding-top: 0;
    }

    .hidden-xs {
        display: none;
    }

    .page-footer {
        padding: 35px 0 20px;
    }

    .upcoming-events h2,
    .events h2 {
        font-size: 20px;
    }
    .upcoming-card-content p {
        font-size: 12px;
    }

    .upcoming-card-content h3 {
        font-size: 16px;
    }

    .event-date {
        font-size: 12px;
        padding: 6px 15px;
    }

    .events-wrapper {
        padding: 15px;
    }

    .event-title {
        font-size: 16px;
    }

    .webinar-detail .page-title {
        font-size: 22px;
    }

    .video-actions {
        padding: 15px;
        gap: 10px;
    }

    .tag-button {
        width: 100%;
    }

    .bell-button {
        margin-left: initial;
    }

    .chat-messages {
        padding: 15px;
    }

    .webinar-info {
        padding: 15px;
    }

    .modal-title {
        font-size: 20px;
    }
}
