/**
 * Стили Calendarolite — hero, календарь, демо, карточки.
 * Тема: theme.css. Базовые: base.css (section-dark, section-alt, block-title-calendar уже там).
 */

/* ——— Hero (календарь) ——— */
.hero-calendar {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at 50% 50%, rgba(var(--vt-theme-rgb), 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(var(--vt-accent-rgb), 0.08) 0%, transparent 40%),
                var(--vt-darker);
    position: relative;
    overflow: hidden;
}

.hero-calendar::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: radial-gradient(circle at 20% 30%, rgba(var(--vt-theme-rgb), 0.2) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(var(--vt-theme-rgb), 0.1) 0%, transparent 35%);
}

.hero-content-calendar {
    position: relative;
    z-index: 2;
    animation: vt-fadeInUp 1s ease-out;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Обёртка баннера — по центру hero */
.hero-badge-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
}

/* Баннер «VT Orbit Nexus» — основной цвет */
.hero-badge-calendar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(var(--vt-accent-rgb), 0.2);
    border: 1px solid rgba(var(--vt-accent-rgb), 0.4);
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.hero-badge-calendar span {
    color: var(--vt-accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Заголовок hero — два цвета: основной + тема */
.hero-title-calendar.gradient-text {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--vt-accent), var(--vt-theme));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle-calendar {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--vt-gray);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.hero-features .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-features .feature-icon {
    width: 18px;
    height: 18px;
    background: rgba(var(--vt-theme-rgb), 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--vt-theme);
    font-size: 11px;
}

.hero-features .feature-text {
    color: white;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
}

.hero-buttons-calendar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-buttons-calendar--cta {
    margin-top: 40px;
    justify-content: center;
}

/* Календарь (превью) — тема */
.calendar-preview {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(var(--vt-theme-rgb), 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-title {
    font-weight: 700;
    color: var(--vt-theme);
    font-size: 18px;
}

.calendar-actions {
    display: flex;
    gap: 8px;
}

.calendar-btn {
    width: 32px;
    height: 32px;
    background: rgba(var(--vt-theme-rgb), 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vt-theme);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-grid .weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
}

/* ——— Демо календарь (index.php) ——— */
.cal-demo-user {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cal-demo-user__avatar {
    width: 50px;
    height: 50px;
    background: var(--vt-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    font-size: 20px;
    color: white;
}
.cal-demo-user__name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 4px;
}
.cal-demo-user__email {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}
.cal-demo-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cal-demo-nav__item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 8px;
}
.cal-demo-nav__item--active {
    background: rgba(115, 186, 104, 0.15);
    color: var(--vt-green);
    font-weight: 600;
}
.cal-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.cal-demo-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cal-demo-header__right {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cal-demo-month {
    font-size: 24px;
    font-weight: 700;
    color: white;
}
.cal-demo-icon-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}
.cal-demo-icon-btn--ml {
    margin-left: 8px;
}
.cal-demo-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.cal-demo-weekday {
    text-align: center;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
}
.cal-demo-day {
    min-height: 100px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}
.cal-demo-day--current {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.cal-demo-day__num {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cal-demo-day__num--muted {
    color: rgba(255, 255, 255, 0.3);
}
.cal-demo-day__num--white {
    color: white;
}
.cal-demo-day__num-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cal-demo-day__badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ff4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.cal-demo-event {
    font-size: 11px;
    margin-top: 4px;
}
.cal-demo-event--dr {
    color: #ff4444;
}
.cal-demo-event__name {
    color: white;
}
.cal-demo-event__meta {
    color: rgba(255, 255, 255, 0.5);
}
.cal-demo-event--mb {
    margin-bottom: 2px;
}
.cal-demo-event--mb4 {
    margin-top: 4px;
    margin-bottom: 4px;
}
.cal-demo-event--meeting {
    background: var(--vt-green);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    margin-top: 4px;
    font-size: 11px;
}

/* Ячейки дней в превью календаря */
.calendar-grid .calendar-day {
    text-align: center;
    padding: 10px;
    color: white;
    font-weight: 500;
}

.calendar-grid .calendar-day-other {
    color: rgba(255, 255, 255, 0.3);
}

.calendar-grid .calendar-day-today {
    background: rgba(var(--vt-theme-rgb), 0.25);
    border-radius: 8px;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(var(--vt-theme-rgb), 0.5);
}

/* Орбиты — тема */
.orbit-animation-calendar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    opacity: 0.2;
}

.orbit-calendar {
    position: absolute;
    border: 1px dashed rgba(var(--vt-theme-rgb), 0.3);
    border-radius: 50%;
}

.orbit-1-calendar {
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    animation: vt-orbit-rotate 25s linear infinite;
}

.orbit-2-calendar {
    top: 50px;
    left: 50px;
    width: 300px;
    height: 300px;
    border-color: rgba(var(--vt-theme-rgb), 0.2);
    animation: vt-orbit-reverse 20s linear infinite;
}

.orbit-3-calendar {
    top: 100px;
    left: 100px;
    width: 200px;
    height: 200px;
    border-color: rgba(var(--vt-theme-rgb), 0.15);
    animation: vt-orbit-rotate 15s linear infinite;
}

.satellite-calendar {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--vt-theme);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(var(--vt-theme-rgb), 0.5);
    animation: vt-float 6s ease-in-out infinite;
}

.satellite-calendar:nth-child(1) { top: 15%; left: 15%; }
.satellite-calendar:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; background: var(--vt-theme-light); }
.satellite-calendar:nth-child(3) { bottom: 25%; left: 20%; animation-delay: 2s; }
.satellite-calendar:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 3s; background: var(--vt-accent); }

/* Карточки возможностей — тема */
.features-grid-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card-calendar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card-calendar:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--vt-theme-rgb), 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon-calendar {
    width: 60px;
    height: 60px;
    background: rgba(var(--vt-theme-rgb), 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon-calendar svg {
    width: 28px;
    height: 28px;
    color: var(--vt-theme);
    stroke: currentColor;
    fill: none;
}

.feature-title-calendar {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.feature-desc-calendar {
    color: var(--vt-gray);
    font-size: 15px;
    line-height: 1.6;
}

/* CTA — тема */
.cta-section-calendar {
    background: linear-gradient(135deg, rgba(var(--vt-theme-rgb), 0.1), rgba(var(--vt-theme-rgb), 0.06));
    border-radius: 30px;
    padding: 80px;
    text-align: center;
    margin: 100px auto;
    border: 1px solid rgba(var(--vt-theme-rgb), 0.2);
}

.cta-section-calendar__inner {
    text-align: center;
}

.cta-section-calendar__icon {
    width: 80px;
    height: 80px;
    background: rgba(var(--vt-theme-rgb), 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.cta-section-calendar__icon svg {
    stroke: var(--vt-theme);
    fill: none;
}

.cta-title-calendar {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.cta-subtitle-calendar {
    font-size: 18px;
    color: var(--vt-gray);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Нумерация шагов — основной цвет */
.instruction-number {
    background: var(--vt-accent) !important;
}

/* Download card — тема */
.download-card h3 {
    color: var(--vt-theme);
}

.download-card:hover {
    border-color: var(--vt-theme);
    box-shadow: 0 12px 32px rgba(var(--vt-theme-rgb), 0.25);
}

.instruction-card:hover {
    border-color: rgba(var(--vt-theme-rgb), 0.4);
}

/* Демо интерфейса календаря */
.interface-demo {
    position: relative;
    margin: 60px auto;
    max-width: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e1e1e;
}

.demo-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-buttons { display: flex; gap: 8px; }

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-dot.red { background: #ff5f57; }
.demo-dot.yellow { background: #ffbd2e; }
.demo-dot.green { background: #28ca42; }

.demo-title-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    margin-left: auto;
}

.demo-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 600px;
    background: #1e1e1e;
    transition: grid-template-columns 0.5s ease;
    overflow: hidden;
}

.demo-content.full-width {
    grid-template-columns: 0fr 1fr;
}

.demo-sidebar {
    background: #252527;
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease, opacity 0.5s ease, width 0.5s ease, padding 0.5s ease, margin 0.5s ease, border 0.5s ease;
}

.demo-sidebar.hidden,
.demo-content.full-width .demo-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    width: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
}

.demo-main {
    padding: 30px;
    background: #1e1e1e;
    position: relative;
}

.demo-calendar-day {
    transition: all 0.3s ease;
}

.demo-calendar-day:hover {
    background: rgba(var(--vt-theme-rgb), 0.15) !important;
}

.demo-calendar-day.creating {
    animation: demoDayPulse 0.6s ease;
}

@keyframes demoDayPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(var(--vt-theme-rgb), 0.4); }
}

.demo-event-appearing {
    animation: vt-fadeInUp 0.5s ease;
}

.demo-modal {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.demo-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.demo-modal-box {
    width: 100%;
    max-width: 400px;
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.demo-modal.active .demo-modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.demo-modal-header {
    background: #2d2d2d;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.demo-modal-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.demo-modal-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: white;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
}

.demo-modal-input:focus {
    outline: none;
    border-color: var(--vt-theme);
    box-shadow: 0 0 0 2px rgba(var(--vt-theme-rgb), 0.2);
}

.demo-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.demo-modal-create {
    background: var(--vt-theme);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.demo-ghost-calendar {
    position: fixed;
    z-index: 200;
    padding: 8px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    background: #2d2d2f;
    border: 1px solid rgba(var(--vt-theme-rgb), 0.4);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
}

.demo-ghost-calendar.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.demo-telegram-notif {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: #252527;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-telegram-notif.visible {
    opacity: 1;
    transform: translateX(0);
}

.demo-telegram-notif.hiding {
    opacity: 0;
    transform: translateX(400px);
}

#demoActionEvent.selected {
    border-color: var(--vt-theme) !important;
    box-shadow: 0 6px 20px rgba(var(--vt-theme-rgb), 0.3);
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-content-calendar { text-align: center; }
    .hero-features { align-items: center; }
    .hero-features .feature-item { justify-content: center; }
    .hero-buttons-calendar { justify-content: center; }
}

@media (max-width: 768px) {
    .hero-title-calendar.gradient-text { font-size: 48px; }
    .hero-buttons-calendar { flex-direction: column; align-items: center; }
    .cta-section-calendar { padding: 40px 20px; }
    .cta-title-calendar { font-size: 36px; }
    .calendar-preview { padding: 20px; }
}

@media (max-width: 480px) {
    .hero-title-calendar.gradient-text { font-size: 36px; }
    .hero-subtitle-calendar { font-size: 18px; }
    .features-grid-calendar { grid-template-columns: 1fr; }
    .calendar-grid { gap: 4px; }
    .weekday { font-size: 10px; padding: 4px 0; }
}
