/* Публичные страницы: точка и мастер (оформление по макету) */

:root {
    --am-primary: #7B2CBF;
    --am-primary-light: #9D4EDD;
    --am-hero-overlay: rgba(0, 0, 0, 0.55);
    --am-action-bar-bg: #f0f0f0;
    --am-contact-call: #0d6efd;
    --am-contact-whatsapp: #25D366;
    --am-contact-viber: #7360f2;
    --am-contact-telegram: #0088cc;
}

.public-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #fff;
}

/* Верхняя полоса */
.top-banner {
    background: #2d2d2d;
    color: #fff;
}

.top-banner-slogan {
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Hero: фон + карточка мастера/точки */
.hero-wrap {
    position: relative;
    width: 100%;
    min-height: 190px;
    background: linear-gradient(135deg, #6a4c93 0%, #4a2c6d 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.hero-wrap .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-wrap .hero-bg + .hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--am-hero-overlay);
}

.hero-card {
    position: relative;
    width: 100%;
    padding: 1.5rem 1rem 1.5rem 1rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}

.hero-card .hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.hero-card .hero-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.hero-card .hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.hero-card .hero-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
}

.hero-card .hero-address {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Панель действий (календарь, галерея, лайки, инфо) */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--am-action-bar-bg);
    border-bottom: 1px solid #dee2e6;
}

.action-bar .action-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: none;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.action-bar .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    color: #333;
}

.action-bar .action-btn.active {
    background: var(--am-primary);
    color: #fff;
}

.action-bar .action-btn i {
    font-size: 1.4rem;
}

.action-bar .action-btn .action-count {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Основной контент */
.public-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

/* Кнопка «Записаться онлайн» */
.cta-booking {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 2rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #fff !important;
    background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-light) 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(123, 44, 191, 0.4);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.cta-booking:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.5);
}

/* Липкая панель с кнопками «Записаться онлайн» и «Позвонить» */
.cta-sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    padding: 0.5rem 0 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.cta-booking-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    max-width: 360px;
    margin: 0 auto;
}

.cta-booking-row .cta-booking {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-phone-btn {
    flex-shrink: 0;
    height: 100%;
    width: auto;
    aspect-ratio: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-light) 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(123, 44, 191, 0.4);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.cta-phone-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.5);
}

.cta-phone-btn i {
    font-size: 1.25rem;
}

/* Секция «Связаться со мной» */
.contact-section-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
    margin: 0 auto 2rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}

.contact-btn:hover {
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-btn .contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-btn.contact-call .contact-icon { background: #e7f1ff; color: var(--am-contact-call); }
.contact-btn.contact-whatsapp .contact-icon { background: #dcf8e8; color: var(--am-contact-whatsapp); }
.contact-btn.contact-viber .contact-icon { background: #ede8ff; color: var(--am-contact-viber); }
.contact-btn.contact-telegram .contact-icon { background: #e3f4fc; color: var(--am-contact-telegram); }

.contact-btn i {
    font-size: 1.25rem;
}

/* Секции с заголовками */
.public-section {
    margin-bottom: 2rem;
}

.public-section h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Якоря: заголовок не уезжает под шапку при переходе из action-bar */
.public-section.public-section-anchor {
    scroll-margin-top: 5rem;
}

/* Карточка информации (адрес + расписание) */
.info-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.info-card .info-address {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.info-card .info-address i {
    color: var(--am-primary);
    margin-top: 0.2rem;
}

/* Блок адреса с картой */
.address-block {
    margin-bottom: 1.5rem;
}

.address-block:last-child {
    margin-bottom: 0;
}

/* Виджет Яндекс.Карт */
.yandex-map-widget {
    width: 100%;
    height: 280px;
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

/* Список телефонов в блоке «О мастере» */
.about-phones-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.about-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.about-phone-row:last-child {
    border-bottom: none;
}

.about-phone-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.about-phone-desc {
    font-weight: 500;
    color: #333;
}

.about-phone-number {
    font-size: 0.95rem;
    color: #666;
}

.about-phone-call-btn {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: linear-gradient(135deg, var(--am-primary) 0%, var(--am-primary-light) 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(123, 44, 191, 0.35);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.about-phone-call-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(123, 44, 191, 0.45);
}

.about-phone-call-btn i {
    font-size: 1.1rem;
}

.about-email {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.about-email i {
    color: var(--am-primary);
}

.about-email a {
    color: var(--am-primary);
    font-weight: 500;
    text-decoration: none;
}

.about-email a:hover {
    text-decoration: underline;
}

.about-contacts-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.about-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #e4e4e7;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1;
}

.about-contact-pill:hover {
    color: #333;
    background: #f8f9fb;
    border-color: #d6d9df;
}

.about-contact-phone i { color: var(--am-contact-call); }
.about-contact-whatsapp i { color: var(--am-contact-whatsapp); }
.about-contact-viber i { color: var(--am-contact-viber); }
.about-contact-telegram i { color: var(--am-contact-telegram); }

/* Услуги: без линии под последней записью */
.services-list .list-group-item:last-child {
    border-bottom: none !important;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Рекламные фотографии внизу страницы */
.ad-photos-section {
    margin-top: 2rem;
}

.ad-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.ad-photo-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ad-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* На мобильных: рекламные фото по одному в ряд, исходные пропорции, скругление сохраняется */
@media (max-width: 576px) {
    .ad-photos-grid {
        grid-template-columns: 1fr;
    }

    .ad-photo-item {
        aspect-ratio: auto;
        height: auto;
    }

    .ad-photo-item img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

.schedule-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.schedule-list li:last-child { border-bottom: none; }

/* Карточки мастеров на странице точки */
.master-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.master-card:hover {
    color: inherit;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.master-card .master-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.master-card .master-avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--am-primary-light), var(--am-primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.master-card .master-name { font-weight: 600; margin-bottom: 0.15rem; }
.master-card .master-spec { font-size: 0.9rem; color: #666; }
.master-card .master-rating { color: #d4a017; font-size: 0.9rem; }

/* Онлайн‑запись: шаги и календарь */
.booking-page .booking-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.booking-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.booking-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #777;
    background: #fff;
    transition: all 0.15s;
}

.booking-step-dot.active {
    border-color: var(--am-primary);
    background: var(--am-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(123,44,191,0.35);
}

.booking-step-dot.completed {
    border-color: var(--am-primary-light);
    background: rgba(123,44,191,0.08);
    color: var(--am-primary);
}

.booking-calendar {
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    padding: 0.75rem 0.75rem 0.5rem;
    background: #fafafa;
}

.booking-calendar-header {
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.booking-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    color: #999;
}

.booking-calendar-weekday {
    text-align: center;
}

.booking-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.booking-calendar-day {
    padding: 0.35rem 0;
    border-radius: 999px;
    border: none;
    background: #fff;
    color: #333;
    font-size: 0.85rem;
}

.booking-calendar-day:hover:not(:disabled) {
    background: #f0e8ff;
}

.booking-calendar-day.active {
    background: var(--am-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(123,44,191,0.35);
}

.booking-calendar-day-disabled {
    opacity: 0.35;
}

.booking-calendar-day-empty {
    background: transparent;
    border: none;
    box-shadow: none;
}

.booking-timeslots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.booking-timeslot-btn {
    min-width: 64px;
    border-radius: 999px;
}

.booking-timeslot-btn.active {
    background: var(--am-primary);
    border-color: var(--am-primary);
    color: #fff;
}
