/* ========================================
ITSMI LABORATORY - OPTIMIZED STYLES (FULL)
======================================== */

:root {
    --color-gold: #ffd700;
    --color-gold-hover: #ffed4a;
    --color-danger: #ff4444;
    --color-danger-hover: #ff6666;
    --color-success: #4CAF50;
    --color-bg-dark: #1a1a1a;
    --color-bg-black: #000000;
    --color-text-light: #ffffff;
    --color-text-dark: #1a1a1a;
    --color-text-gray: #d3d3d3;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-round: 50px;
    background-image: url('images/bg1.jpg');
    background-size: 100% 100%, 120% 120%;
    background-position: center, 0% 50%;
    
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
ГЛАВНАЯ СТРАНИЦА (3D СЛОИ)
======================================== */
body.main-site {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    background-image: url('images/bg1.jpg');
    background-attachment: fixed;
    background-repeat: repeat;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

.layers-container {
    position: relative;
    height: 500vh;
    transform-style: preserve-3d;
    perspective: 1200px;
    perspective-origin: center center;
}

.layer {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    isolation: isolate;
    will-change: transform, opacity;
}

@keyframes imagePan {
    0%, 100% {
        background-position: center, 0% 50%;
    }
    50% {
        background-position: center, 100% 50%;
    }
}

.layer-1 {
    background-color: #f0efeb;
    color: #1a1a1a;
    z-index: 5;
    background-image:
        linear-gradient(135deg, rgba(26,26,26,0), rgba(26,26,26,0)),
        url(images/work.jpg);
    background-size: 100% 100%, 120% 120%;
    background-position: center, 0% 50%;
    background-repeat: no-repeat, no-repeat;
    animation: imagePan 55s ease infinite;
    will-change: background-position;
    transform: translateZ(0);
}

.layer-2 {
    background-color: #c4c0b1;
    color: #1a1a1a;
    z-index: 4;
    background-image:
        linear-gradient(135deg, rgba(26,26,26,0), rgba(26,26,26,0)),
        url(images/work1.jpg);
    background-size: 100% 100%, 120% 120%;
    background-position: center, 0% 50%;
    background-repeat: no-repeat, no-repeat;
    animation: imagePan 55s ease infinite;
    will-change: background-position;
    transform: translateZ(0);
}

.layer-3 {
    background-color: #d8d8cb;
    color: #1a1a1a;
    z-index: 3;
    background-image:
        linear-gradient(135deg, rgba(26,26,26,0), rgba(26,26,26,0)),
        url(images/work3.jpg);
    background-size: 100% 100%, 120% 120%;
    background-position: center, 0% 50%;
    background-repeat: no-repeat, no-repeat;
    animation: imagePan 55s ease infinite;
    will-change: background-position;
    transform: translateZ(0);
}

.layer-4 {
    background-color: #abbbc0;
    color: #1a1a1a;
    z-index: 2;
    background-image:
        linear-gradient(135deg, rgba(26,26,26,0.7), rgba(26,26,26,0.3)),
        url(images/work1.jpg);
    background-size: 100% 100%, 400% 400%;
    background-position: center, 0% 50%;
    background-repeat: no-repeat, no-repeat;
    animation: imagePan 55s ease infinite;
    will-change: background-position;
    transform: translateZ(0);
}

.layer-5 {
    background-color: #b5bca5;
    color: #1a1a1a;
    z-index: 1;
    background-image:
        linear-gradient(135deg, rgba(26,26,26,0.7), rgba(26,26,26,0.3)),
        url(images/work.jpg);
    background-size: 100% 100%, 150% 150%;
    background-position: center, 0% 50%;
    background-repeat: no-repeat, no-repeat;
    animation: imagePan 55s ease infinite;
    will-change: background-position;
    transform: translateZ(0);
}

.layer-content {
    position: relative;
    max-width: 100%;
    padding: 2rem;
    text-align: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.layer h1 {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    text-shadow: 0 10px 50px rgba(255, 253, 253, 0.3);
    position: relative;
}

.layer p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    line-height: 1.8;
    color: #d3f801;
}

.layer-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: rgba(0, 0, 0, 0.6);
    background-image: url(images/bg1.jpg);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    border: 2px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.layer-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    background-image: url(images/bg1.jpg);
    transform: scale(1.05);
}

.layer-btn[href="booking.html"] {
    background: #ffd700;
    color: #000;
    border: none;
}

.layer-btn[href="booking.html"]:hover {
    background: #ffed4a;
    transform: scale(1.05);
}




/* ========================================
УСЛУГИ (ГЛАВНАЯ)
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #1a1a1a;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    color: #1a1a1a;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.service-card p {
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
}

/* ========================================
ПОРТФОЛИО (ГЛАВНАЯ)
======================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.portfolio-overlay p {
    opacity: 0.9;
    color: white;
}

/* ========================================
ФОРМА КОНТАКТОВ
======================================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    color: #1a1a1a;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
НАВИГАЦИЯ И КУРСОР
======================================== */
.layer-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.nav-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.5);
}

.nav-dot.active {
    background: #1a1a1a;
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.nav-dot:hover {
    transform: scale(1.2);
    background: rgba(0, 0, 0, 0.6);
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a1a1a;
    pointer-events: none;
    z-index: 2147483647;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 215, 0, 0.5);
    pointer-events: none;
    z-index: 2147483646;
    transform: translate(-50%, -50%);
    transition: transform 0.4s ease, border-color 0.3s ease;
}

.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483640;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(82, 81, 78, 0.4) 50%,
        rgba(255, 215, 0, 0.1) 100%);
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.5),
        0 0 10px rgba(128, 127, 127, 0.3);
    pointer-events: auto;
    cursor: pointer;
}

.bubble-shine {
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 15%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    transform: rotate(-45deg);
}

.cursor-bubble {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 215, 0, 0.5) 50%,
        rgba(255, 215, 0, 0.2) 100%);
    box-shadow:
        inset 0 0 6px rgba(255, 255, 255, 0.6),
        0 0 8px rgba(255, 215, 0, 0.4);
    pointer-events: none;
    z-index: 2147483645;
    animation: cursorBubblePop 0.6s ease-out forwards;
}

@keyframes cursorBubblePop {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes bubbleFloat {
    0% { transform: translateY(0) scale(0.9); opacity: 0; }
    10% { opacity: 0.95; }
    90% { opacity: 0.95; }
    95% { opacity: 0.5; }
    100% { transform: translateY(calc(-100vh - 100px)) scale(1.2); opacity: 0; }
}

@keyframes bubblePop {
    0% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.3); opacity: 0.7; }
    80% { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1.5); opacity: 0; }
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    z-index: 10000;
    transition: width 0.1s ease;
}


/* ========================================
СТРАНИЦА ЗАПИСИ (BOOKING)
======================================== */
body.booking-site,
body.admin-site,
body.login-page {
    background: #1a1a1a;
    color: #fff;
    overflow-y: scroll;
    font-family: 'Segoe UI', sans-serif;
}

.booking-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 2rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.booking-step { display: none; }
.booking-step.active { display: block; animation: fadeIn 0.5s ease; }

.master-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.master-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}

.master-card:hover, .master-card.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-5px);
}

.master-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid #ffd700;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card.booking {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    overflow: hidden;
}

.service-card.booking:hover, .service-card.booking.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-5px);
}

.service-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.1);
}

/* ========================================
📅 КАЛЕНДАРЬ (ЗАПИСЬ + АДМИНКА + МАСТЕР)
======================================== */
.calendar-container {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* ✅ ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ ДЛЯ КАЛЕНДАРЯ */
.calendar-container,
.master-calendar-header,
.schedule-header {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.calendar-header, .schedule-header, .master-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,.05);
    border-radius: 15px;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-nav, .master-calendar-nav, .date-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.calendar-nav button, .master-calendar-nav button, .date-nav button {
    padding: .5rem 1rem;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.current-month, .current-date {
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 2rem;
    min-width: 650px !important; /* ✅ ФИКСИРОВАННАЯ МИНИМАЛЬНАЯ ШИРИНА */
}

.calendar-day-header {
    padding: .8rem;
    text-align: center;
    font-weight: 600;
    color: #161615;
    font-size: .9rem;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 100px;
    padding: .5rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    cursor: pointer;
    transition: .2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    position: relative;
    font-size: .85rem;
}

.calendar-day:hover {
    background: rgba(255,215,0,.1);
    border-color: #ffd700;
}

.calendar-day.selected {
    background: rgba(255,215,0,.2);
    border: 2px solid #ffd700;
}

.calendar-day.other-month { opacity: .3; }
.calendar-day.today { border: 2px solid #ffd700; }

.calendar-day.day-off {
    background: rgba(255,50,50,.15);
    border-color: #ff4444;
    cursor: not-allowed;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.day-number {
    font-weight: 600;
    font-size: 1.1rem;
}

.day-status {
    font-size: .75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,215,0,.2);
    color: #ffd700;
}

.day-status.off {
    background: rgba(255,50,50,.3);
    color: #ff6b6b;
}

.day-worktime {
    font-size: .75rem;
    opacity: .8;
    color: #ffd700;
}

.day-bookings {
    flex: 1;
    overflow: hidden;
    font-size: .75rem;
    opacity: .9;
}

.day-bookings .booking-mini {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px dashed rgba(255,255,255,.1);
}

.day-bookings .booking-mini:last-child {
    border-bottom: none;
}

.day-bookings .time {
    font-weight: 600;
    color: #ffd700;
    margin-right: 4px;
    white-space: nowrap;
}

.day-bookings .service {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.day-more {
    font-size: .7rem;
    opacity: .7;
    text-align: center;
    padding: 2px 0;
}

/* ========================================
ВРЕМЕННЫЕ СЛОТЫ
======================================== */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.time-slot {
    padding: 1rem;
    background: rgba(160, 161, 63, 0.767);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    position: relative;
    transition: 0.3s;
}

.time-slot:hover {
    background: rgba(42, 187, 73, 0.2);
}

.time-slot.selected {
    background: #ffd700;
    color: #000000;
    font-weight: bold;
}

.time-slot.booked {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.time-slot.partial {
    opacity: 0.5;
    border-color: #ff8c00;
}

.time-slot .duration-info {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.3rem;
}

/* ========================================
КНОПКИ (ОБЩИЕ)
======================================== */
.btn, .btn-next, .btn-back {
    
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin: .3rem;
}

.btn-next {
    padding: 1rem 2.5rem;
    background: #ffd700;
    color: #000;
    font-size: 1rem;
    margin-top: 1rem;
}

.btn-next:hover {
    background: #ffed4a;
    transform: translateY(-2px);
}

.btn-back {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    margin-right: 1rem;
}

.btn-gold {
    background: #ffd700;
    color: #000;
}

.btn-gold:hover {
    background: #ffed4a;
    transform: translateY(-2px);
}

.btn-danger, .logout {
    background: #ff4444;
    color: #fff;
}

.btn-danger:hover {
    background: #ff6666;
}

.btn-edit {
    background: #4CAF50;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ffd700;
    color: #ffd700;
}

.btn-small {
    padding: .5rem 1rem;
    font-size: .85rem;
}

.btn-group {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ========================================
ПОДТВЕРЖДЕНИЕ ЗАПИСИ
======================================== */
.confirm-box, .phone-input-section {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #f1f1f1;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(235, 233, 233, 0.2);
    flex-wrap: wrap;
}

.confirm-row:last-child { border-bottom: none; }
.confirm-label { color: #fcfaf2; }

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}

.step-dot.active { background: #ffd700; }

.back-link {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #0a0a09;
    text-decoration: none;
    font-size: 1.1rem;
}

/* ========================================
ФОРМЫ (ОБЩИЕ)
======================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 8px;
}

.form-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 1.5rem 0;
}

.form-inline input, .form-inline select, .form-inline textarea {
    flex: 1;
    min-width: 200px;
    padding: .8rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 8px;
}

select {
    padding: .8rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 8px;
}

/* ========================================
🪟 МОДАЛЬНЫЕ ОКНА - ИСПРАВЛЕНО ДЛЯ МОБИЛЬНЫХ
======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active { 
    display: flex; 
}

.modal-content {
    background: #343531;
    padding: 2rem;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-width: calc(100% - 2rem);
    border: 1px solid rgba(255,215,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    word-wrap: break-word;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    width: auto;
    height: auto;
}

.modal-content h3 {
    color: #ffd700;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-title {
    color: #ffd700;
    font-size: 1.3rem;
    word-wrap: break-word;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
}

.modal-close:hover { 
    color: #ffd700; 
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ========================================
АДМИН ПАНЕЛЬ
======================================== */
.admin-page, .admin-dashboard, .schedule-page {
    max-width: 1400px;
    margin: 50px auto;
    padding: 2rem;
}

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.admin-header h1 {
    color: #141411;
    font-size: 2.5rem;
    word-wrap: break-word;
}

.admin-nav {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-nav a {
    color: #0f0f0f;
    text-decoration: none;
    padding: .5rem 1rem;
    background: rgba(255,215,0,.1);
    border-radius: 8px;
    transition: 0.3s;
    white-space: nowrap;
}

.admin-nav a:hover {
    background: rgba(255,215,0,.3);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.admin-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.admin-card:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    transform: translateY(-5px);
}

.admin-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.admin-card h3 {
    color: #ffd700;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.admin-card p {
    opacity: 0.7;
    margin-bottom: 1rem;
}

.admin-card .count {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.admin-section {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    min-width: 600px;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.2);
    white-space: nowrap;
}

.data-table th {
    color: #ffd700;
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255,255,255,.05);
}

.section-title {
    color: #ffd700;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.booking-item, .master-item, .service-item, .client-item, .schedule-item {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.master-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 15px;
}

.master-services {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.service-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: .5rem 0;
    padding: .5rem;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    flex-wrap: wrap;
}

.service-row input {
    padding: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    border-radius: 5px;
    width: 100px;
}

.master-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.portfolio-thumb {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.portfolio-thumb:hover img {
    transform: scale(1.1);
}

.portfolio-thumb .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
}

.schedule-info {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.file-upload {
    border: 2px dashed rgba(255,255,255,.3);
    padding: .8rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    margin: 1rem 0;
    transition: 0.3s;
}

.file-upload:hover {
    border-color: #ffd700;
}

.file-upload input {
    display: none;
}

.preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 10px;
    margin-top: 1rem;
}

/* ========================================
ВХОД (LOGIN)
======================================== */
.login-container, .admin-login {
    max-width: 400px;
    margin: 100px auto;
    padding: 3rem;
    background: rgba(0,0,0,0.7);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.login-container h2, .admin-login h2 {
    color: #ffd700;
    margin-bottom: 2rem;
    word-wrap: break-word;
}

.login-container input, .admin-login input {
    width: 100%;
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 10px;
}

.backup-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    text-align: center;
}

/* ========================================
ТАЙМЛАЙН (РАСПИСАНИЕ)
======================================== */
.timeline {
    background: rgba(255,255,255,.05);
    border-radius: 15px;
    padding: 2rem;
    overflow-x: auto;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    overflow: hidden;
    min-width: 600px;
}

.timeline-grid .time-label {
    width: 80px;
    padding: 1rem 0.5rem;
    text-align: right;
    opacity: 0.5;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.timeline-grid .slot-content {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.time-slot.timeline {
    display: flex;
    min-height: 60px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.time-label {
    width: 80px;
    padding: 1rem 0;
    text-align: right;
    opacity: .5;
    font-size: .9rem;
}

.slot-content {
    flex: 1;
    padding: 1rem;
    position: relative;
}

.booking-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,215,0,0.1));
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 0.5rem);
    margin-bottom: 0.5rem;
}

.booking-card:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,215,0,0.15));
}

.booking-card.continued {
    background: rgba(255, 215, 0, 0.1);
    border: 1px dashed rgba(255, 215, 0, 0.3);
    min-height: 60px;
}

.booking-card .client-name {
    font-weight: 600;
    color: #ffd700;
    margin-bottom: .3rem;
}

.booking-card .service {
    opacity: 0.9;
    font-size: 0.9rem;
}

.booking-card .duration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0.7;
    font-size: .85rem;
}

.booking-card .phone {
    opacity: 0.7;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.booking-card .info {
    flex: 1;
}

.booking-card .info strong {
    color: #ffd700;
}

.booking-card .actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.empty-slot {
    opacity: 0.3;
    padding: 1rem;
    text-align: center;
}

/* ========================================
НАСТРОЙКИ ВРЕМЕНИ (АДМИНКА)
======================================== */
.time-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-setting {
    background: rgba(255,255,255,.05);
    padding: 1rem;
    border-radius: 10px;
}

.time-setting label {
    display: block;
    margin-bottom: .5rem;
    color: #ffd700;
    font-size: .9rem;
}

.time-setting input[type="time"],
.time-setting input[type="number"],
.time-setting select {
    width: 100%;
    padding: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 5px;
}

.breaks-section {
    margin-bottom: 1.5rem;
}

.breaks-list {
    margin-bottom: 1rem;
}

.break-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .5rem;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}

.break-item input {
    flex: 1;
    padding: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 5px;
    min-width: 100px;
}

.break-item button {
    padding: .3rem .8rem;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.preview-box {
    background: rgba(255,215,0,.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.preview-box h4 {
    margin-bottom: .5rem;
    color: #ffd700;
}

.preview-box p {
    opacity: .9;
    font-size: .95rem;
}

.bookings-list {
    margin-top: 2rem;
}

.multi-select-hint {
    background: rgba(255,215,0,.1);
    padding: .5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .9rem;
    display: none;
}

.multi-select-hint.active {
    display: block;
}

.selected-days {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.selected-day-tag {
    padding: .3rem .8rem;
    background: rgba(255,215,0,.2);
    border: 1px solid #ffd700;
    border-radius: 20px;
    font-size: .85rem;
    white-space: nowrap;
}

.day-schedule-list {
    margin-top: 1rem;
}

.schedule-item {
    background: rgba(255,255,255,.05);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.schedule-time {
    font-weight: 600;
    color: #ffd700;
    min-width: 60px;
    white-space: nowrap;
}

.schedule-info {
    flex: 1;
}

.schedule-info strong {
    display: block;
}

.schedule-info small {
    opacity: .7;
}

.schedule-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.master-select {
    padding: .8rem 1rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
}

#adminPanel {
    display: none;
    margin-top: 50px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
📱 АДАПТИВНОСТЬ - ТОЛЬКО МОБИЛЬНЫЕ
======================================== */

/* Планшеты и мобильные до 820px */
@media (max-width: 820px) {
    /* ✅ 3D СКРОЛЛ ОТКЛЮЧАЕМ - ОСТАВЛЯЕМ ОБЫЧНЫЙ */
    .layers-container {
        perspective: none !important;
        height: auto !important;
        min-height: 500vh;
    }
    
    .layer {
        height: auto !important;
        min-height: 100vh;
        padding: 2rem 1.5rem !important;
        transform: none !important;
        perspective: none !important;
        overflow: visible !important;
        position: relative !important;
        top: auto !important;
        animation: imagePan 55s ease infinite !important;
    }
    
    .layer h1 {
        font-size: 3.2rem !important;
        line-height: 1.2 !important;
    }
    
    .layer p {
        font-size: 1.25rem !important;
        line-height: 1.6 !important;
        max-width: 95% !important;
    }
    
    .layer-btn {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        width: auto !important;
        margin: 1.5rem auto !important;
        display: block !important;
    }
    
    .services-grid, .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    .service-icon {
        font-size: 2.8rem !important;
    }
    
    .service-card h3 {
        font-size: 1.6rem !important;
    }
    
    .portfolio-item {
        height: 280px !important;
        border-radius: 16px !important;
        aspect-ratio: auto !important;
    }
    
    .layer-nav {
        right: 15px !important;
        gap: 8px !important;
    }
    
    .nav-dot {
        width: 11px !important;
        height: 11px !important;
    }
    
    .contact-form {
        padding: 1.8rem !important;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 0.9rem !important;
        font-size: 1rem !important;
    }
    
    .layer-3 .layer-content > div {
        padding: 1.8rem !important;
        margin: 1.8rem auto !important;
        font-size: 1.05rem !important;
    }
    
    .layer-3 .layer-content > div p {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.2rem !important;
    }
    
    #vk_groups {
        height: 400px !important;
    }
    
    /* ✅ СКРЫВАЕМ КУРСОР И ПУЗЫРИ */
    .bubbles-container,
    .custom-cursor,
    .custom-cursor-follower,
    .cursor-bubble {
        display: none !important;
    }
    
    /* ✅ МОДАЛЬНЫЕ ОКНА НА ПЛАНШЕТАХ */
    .modal {
        padding: 0.5rem !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: calc(100% - 1rem) !important;
        padding: 1.5rem !important;
        max-height: 85vh !important;
    }
    
    .modal-title {
        font-size: 1.1rem !important;
    }
    
    .modal-close {
        font-size: 1.8rem !important;
    }
    
    /* ✅ КАЛЕНДАРЬ НА ПЛАНШЕТАХ - ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ */
    .calendar-container {
        padding: 1rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .calendar-grid {
        min-width: 600px !important;
    }
    
    .calendar-day {
        min-height: 70px !important;
        font-size: 0.75rem !important;
    }
    
    .day-number {
        font-size: 1rem !important;
    }
    
    /* ✅ КНОПКИ НА ПЛАНШЕТАХ */
    .btn-next {
        padding: 0.8rem 2rem !important;
        font-size: 0.95rem !important;
    }
    
    .btn-group {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .btn-group .btn {
        width: 100% !important;
    }
    
    /* ✅ ТАБЛИЦЫ НА ПЛАНШЕТАХ */
    .data-table {
        min-width: 500px !important;
        font-size: 0.9rem !important;
    }
    
    .data-table th, .data-table td {
        padding: 0.8rem !important;
    }
    
    /* ✅ АДМИНКА НА ПЛАНШЕТАХ */
    .admin-page, .admin-dashboard, .schedule-page {
        padding: 1rem !important;
        margin: 20px auto !important;
    }
    
    .admin-header h1 {
        font-size: 2rem !important;
    }
    
    .admin-grid {
        grid-template-columns: 1fr !important;
    }
    
    .admin-card {
        padding: 1.5rem !important;
    }
}

/* Маленькие телефоны до 480px */
@media (max-width: 480px) {
    .layer {
        padding: 1.5rem !important;
    }
    
    .layer h1 {
        font-size: 2.6rem !important;
    }
    
    .layer p {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
    }
    
    .layer-btn {
        padding: 0.85rem 1.6rem !important;
        font-size: 1rem !important;
        max-width: 280px !important;
    }
    
    .services-grid, .portfolio-grid {
        gap: 1.2rem !important;
        padding: 0.8rem !important;
    }
    
    .service-card {
        padding: 1.3rem !important;
    }
    
    .service-icon {
        font-size: 2.4rem !important;
    }
    
    .service-card h3 {
        font-size: 1.45rem !important;
    }
    
    .portfolio-item {
        height: 240px !important;
        border-radius: 14px !important;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.35rem !important;
    }
    
    .layer-nav {
        right: 12px !important;
        gap: 6px !important;
    }
    
    .nav-dot {
        width: 9px !important;
        height: 9px !important;
    }
    
    .contact-form {
        padding: 1.5rem !important;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem !important;
        font-size: 0.95rem !important;
    }
    
    .layer-3 .layer-content > div {
        padding: 1.5rem !important;
        margin: 1.5rem auto !important;
    }
    
    .layer-3 .layer-content > div p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    #vk_groups {
        height: 320px !important;
    }
    
    .layer-5 .layer-content > div:last-child p {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    /* ✅ МОДАЛЬНЫЕ ОКНА НА ТЕЛЕФОНАХ */
    .modal {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 80vh !important;
        padding: 1.5rem 1rem !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
    }
    
    .modal-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .modal-title {
        font-size: 1.2rem !important;
        width: 100% !important;
    }
    
    .modal-close {
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        font-size: 2rem !important;
        padding: 0.3rem !important;
    }
    
    .modal-buttons {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .modal-buttons .btn {
        width: 100% !important;
    }
    
    /* ✅ КАЛЕНДАРЬ НА ТЕЛЕФОНАХ - ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ */
    .calendar-container {
        padding: 0.5rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .calendar-grid {
        min-width: 550px !important;
        gap: 2px !important;
    }
    
    .calendar-day {
        min-height: 60px !important;
        padding: 0.3rem !important;
        font-size: 0.7rem !important;
    }
    
    .calendar-day-header {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    .day-number {
        font-size: 0.9rem !important;
    }
    
    .day-status {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }
    
    .day-bookings {
        font-size: 0.65rem !important;
    }
    
    .day-bookings .time {
        font-size: 0.65rem !important;
    }
    
    .day-more {
        font-size: 0.6rem !important;
    }
    
    /* ✅ ВРЕМЕННЫЕ СЛОТЫ НА ТЕЛЕФОНАХ */
    .time-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)) !important;
        gap: 0.5rem !important;
    }
    
    .time-slot {
        padding: 0.8rem 0.5rem !important;
        font-size: 0.85rem !important;
    }
    
    /* ✅ КНОПКИ НА ТЕЛЕФОНАХ */
    .btn-next {
        padding: 0.9rem 2rem !important;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    /* ✅ ФОРМЫ НА ТЕЛЕФОНАХ */
    .form-inline {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .form-inline input, 
    .form-inline select, 
    .form-inline textarea {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* ✅ ЗАПИСЬ НА ТЕЛЕФОНАХ */
    .booking-container {
        padding: 1.5rem 1rem !important;
        margin: 20px auto !important;
        border-radius: 15px !important;
    }
    
    .master-grid, .service-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .master-photo {
        width: 100px !important;
        height: 100px !important;
    }
    
    .service-image {
        height: 120px !important;
    }
    
    /* ✅ ВХОД НА ТЕЛЕФОНАХ */
    .login-container, .admin-login {
        padding: 2rem 1.5rem !important;
        margin: 50px auto !important;
        border-radius: 15px !important;
    }
    
    /* ✅ ТАЙМЛАЙН НА ТЕЛЕФОНАХ */
    .timeline {
        padding: 1rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .timeline-grid {
        min-width: 500px !important;
    }
    
    .booking-card {
        padding: 0.8rem !important;
    }
    
    .booking-card .client-name {
        font-size: 0.9rem !important;
    }
    
    .booking-card .service {
        font-size: 0.8rem !important;
    }
}

/* iOS Safari фикс */
@supports (-webkit-touch-callout: none) {
    .layer {
        min-height: -webkit-fill-available;
    }
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
    .calendar-container, .timeline, .admin-section {
        -webkit-overflow-scrolling: touch;
    }
}

/* Изображения не вылезает */
img {
    max-width: 100%;
    height: auto;
}