/*
Theme Name: ВелоТюЛеша
Description: Кастомная тема для мастерской ВелоТюЛеша в стиле старого сайта.
Version: 1.0
Author: Леша / TiuLesha
*/

:root {
    --primary-orange: #ff7a21;
    --bg-dark: #1a1a1a;
    --card-bg: #1d1d1d;
    --text-main: #f0f0f0;
    --text-muted: #b0b0b0;
    --radius: 30px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

header {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-decoration: none;
}

.logo span { color: var(--primary-orange); }

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 25px; }
nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}
nav ul li a:hover { color: var(--primary-orange); }

.site-content {
    max-width: 1100px;
    margin: 140px auto 60px auto;
    padding: 0 20px;
}

.window-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #2a2a2a;
    margin-bottom: 30px;
}

h1, h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-orange);
    margin: 10px auto;
    border-radius: 2px;
}

footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid #2a2a2a;
    margin-top: 60px;
}

.legal-links { margin-top: 15px; }
.legal-links a {
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    margin: 0 10px;
}
.legal-links a:hover { color: var(--primary-orange); }

/* =========================================================
   ГАЛЕРЕЯ РАБОТ
   ========================================================= */

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.work-card {
    background: #222;
    border: 1px solid #303030;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-orange);
}

.work-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #151515;
}

.work-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.03);
}

.work-card-content {
    padding: 20px;
}

.work-card-content h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    text-align: left;
    text-transform: none;
}

.work-card-content h2::after {
    display: none;
}

.work-card-content h2 a {
    color: var(--text-main);
    text-decoration: none;
}

.work-card-content h2 a:hover {
    color: var(--primary-orange);
}

.work-card-content p {
    color: var(--text-muted);
}

.work-photo-count {
    margin-top: 12px;
    font-size: 0.85rem;
}


/* =========================================================
   ОТДЕЛЬНАЯ РАБОТА
   ========================================================= */

.work-description {
    max-width: 800px;
    margin: 0 auto 35px;
    color: var(--text-muted);
}

.single-work-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.single-work-photo {
    margin: 0;
    background: #151515;
    border: 1px solid #303030;
    border-radius: 18px;
    overflow: hidden;
}

.single-work-photo a {
    display: block;
}

.single-work-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.single-work-photo figcaption {
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.back-to-gallery {
    margin-top: 35px;
    text-align: center;
}

.back-to-gallery a {
    display: inline-block;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
}

.back-to-gallery a:hover {
    text-decoration: underline;
}


/* =========================================================
   АДАПТАЦИЯ ГАЛЕРЕИ
   ========================================================= */

@media (max-width: 900px) {

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .window-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .works-grid,
    .single-work-gallery {
        grid-template-columns: 1fr;
    }

    .work-card-content {
        padding: 16px;
    }

}

/* =========================================================
   КАРТОЧКИ ГАЛЕРЕИ — ЕДИНЫЙ ФОРМАТ
   ========================================================= */

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.work-card {
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border: 1px solid #343434;
    border-radius: 12px;
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-orange);
}

/* Все превью одного размера */
.work-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #111;
}

.work-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.025);
}

.work-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px 12px 12px;
}

.work-card-content h2 {
    margin: 0 0 6px;
    padding: 0;
    font-size: 1rem;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

.work-card-content h2::after {
    display: none;
}

.work-card-content h2 a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 700;
}

.work-card-content h2 a:hover {
    color: #ff984d;
}

.work-photo-count {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.work-card-button {
    display: block;
    margin-top: auto;
    padding: 10px 12px;

    border: 1px solid #414141;
    border-radius: 7px;

    color: var(--text-main);
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.work-card-button:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    background: #202020;
}


/* Планшет */

@media (max-width: 900px) {

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* Телефон */

@media (max-width: 600px) {

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-card-image {
        aspect-ratio: 4 / 3;
    }

}

/* =========================================================
   ОТДЕЛЬНАЯ РАБОТА — ЕДИНЫЙ ФОРМАТ ФОТО
   ========================================================= */

.single-work-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.single-work-photo {
    margin: 0;
    background: #171717;
    border: 1px solid #303030;
    border-radius: 14px;
    overflow: hidden;
}

.single-work-photo a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}

.single-work-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.single-work-photo figcaption {
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 700px) {

    .single-work-gallery {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   ГЛАВНАЯ — ПРИМЕРЫ РАБОТ
   ========================================================= */

.home-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.home-work-title {
    margin: 0 0 24px;
    text-align: center;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.home-work-title a {
    color: var(--primary-orange);
    text-decoration: none;
}

.home-work-title a:hover {
    color: #ff984d;
}


/* Основная сетка */

.home-work-gallery {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}


/* 1 фотография */

.home-work-gallery-1 {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}


/* 2 фотографии */

.home-work-gallery-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* 3 фотографии */

.home-work-gallery-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* 4 фотографии */

.home-work-gallery-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* Карточка фотографии */

.home-work-photo {
    margin: 0;
    background: #171717;
    border: 1px solid #303030;
    border-radius: 18px;
    overflow: hidden;
}


/* Одинаковый визуальный формат */

.home-work-photo a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}

.home-work-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.home-work-photo:hover img {
    transform: scale(1.025);
}


/* Подпись */

.home-work-photo figcaption {
    padding: 11px 14px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}


/* Кнопки */

.home-work-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.home-work-button,
.home-work-gallery-link {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 600;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.home-work-button {
    background: var(--primary-orange);
    border: 1px solid var(--primary-orange);
    color: #111;
}

.home-work-button:hover {
    background: #ff984d;
    border-color: #ff984d;
}

.home-work-gallery-link {
    border: 1px solid #444;
    color: var(--text-main);
}

.home-work-gallery-link:hover {
    color: var(--primary-orange);
    border-color: var(--primary-orange);
}


/* Планшет */

@media (max-width: 900px) {

    .home-work-gallery-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* Телефон */

@media (max-width: 650px) {

    .home-work-gallery-2,
    .home-work-gallery-3,
    .home-work-gallery-4 {
        grid-template-columns: 1fr;
    }

    .home-work-photo a {
        aspect-ratio: 4 / 3;
    }

    .home-work-actions {
        flex-direction: column;
    }

    .home-work-button,
    .home-work-gallery-link {
        width: 100%;
        text-align: center;
    }

}

/* Статус мастерской на главной */

.home-schedule-status {
    width: fit-content;
    max-width: 100%;
    margin: 22px auto 0;
    padding: 10px 18px;

    background: #171717;
    border: 1px solid var(--primary-orange);
    border-radius: 999px;

    color: var(--text-main);
    font-weight: 600;
    text-align: center;
}

/* =========================================================
   ГЛАВНАЯ — РАСПИСАНИЕ НА ТЕКУЩУЮ НЕДЕЛЮ
   ========================================================= */

.home-week-schedule {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.home-week-day {
    min-width: 0;
    padding: 14px 8px;

    background: #171717;
    border: 1px solid #303030;
    border-radius: 14px;

    text-align: center;
}

/* Сегодня */

.home-week-day.is-today {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 1px var(--primary-orange);
}

/* День недели */

.home-week-day-name {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Дата */

.home-week-date {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Рабочее время */

.home-week-time {
    margin-top: 10px;
    color: var(--primary-orange);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Выходной */

.home-week-closed {
    margin-top: 10px;
    color: #777;
    font-size: 0.85rem;
}

/* Примечание */

.home-week-note {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Планшет */

@media (max-width: 900px) {

    .home-week-schedule {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}

/* Телефон */

@media (max-width: 600px) {

    .home-week-schedule {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-week-day {
        padding: 12px 8px;
    }

}

/* =========================================================
   ВЕРХНЯЯ ПЛАШКА ДЛИТЕЛЬНОГО ЗАКРЫТИЯ
   ========================================================= */

.site-schedule-banner {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    z-index: 999;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 10px 20px;

    background: var(--primary-orange);
    color: #111;

    font-weight: 700;
    text-align: center;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/*
 * Когда плашка есть, добавляем дополнительный
 * отступ основному контенту.
 */
body:has(.site-schedule-banner) .site-content {
    margin-top: 190px;
}

@media (max-width: 700px) {

    .site-schedule-banner {
        top: 72px;
        padding: 9px 14px;
        font-size: 0.9rem;
        line-height: 1.35;
    }

    body:has(.site-schedule-banner) .site-content {
        margin-top: 205px;
    }
}

/* =========================================================
   КОНТАКТЫ
   ========================================================= */

.contacts-page a {
    color: var(--primary-orange);
    text-decoration: none;
}

.contacts-page a:hover {
    color: #ff984d;
    text-decoration: underline;
}

/* =========================================================
   КОНТАКТЫ — КНОПКИ СВЯЗИ
   ========================================================= */

.contacts-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.contacts-main,
.contacts-social {
    min-width: 0;
}

.contacts-main p,
.contacts-social p {
    color: var(--text-muted);
}

.contact-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 48px;
    padding: 11px 16px;

    background: #171717;
    border: 1px solid #3a3a3a;
    border-radius: 12px;

    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 700;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.contact-button:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange) !important;
    background: #1d1d1d;
    transform: translateY(-1px);
}

.contact-button i {
    font-size: 1.05rem;
}

.contact-email {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 800px) {
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .contact-buttons {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   КОНТАКТЫ — КАК НАС НАЙТИ
   ========================================================= */

.contacts-find {
    margin-top: 36px;
}

.contacts-find-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.contacts-map,
.contacts-entrance-photo {
    margin: 0;
    min-width: 0;
    background: #171717;
    border: 1px solid #303030;
    border-radius: 18px;
    overflow: hidden;
}

.contacts-map {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    color: var(--text-muted);
    font-weight: 600;
}
.contacts-map {
    display: flex;
    flex-direction: column;
}

.contacts-map-image-link {
    display: block;
    height: 360px;
    overflow: hidden;
}

.contacts-map-image-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.25s ease;
}

.contacts-map-image-link:hover img {
    transform: scale(1.03);
}

.contacts-map-actions {
    padding: 12px 14px;
}

.contacts-map-actions .contact-button {
    width: 100%;
}

.contacts-entrance-photo img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center;
}

.contacts-entrance-photo figcaption {
    padding: 12px 14px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 800px) {
    .contacts-find-grid {
        grid-template-columns: 1fr;
    }

    .contacts-map-image-link {
        height: 300px;
    }

    .contacts-entrance-photo img {
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

/* =========================================================
   О МАСТЕРЕ
   ========================================================= */

.about-master-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.about-master-photo {
    min-width: 0;
}

.about-master-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
}

.about-master-text {
    min-width: 0;
}

.about-master-text p {
    margin: 0 0 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

.about-master-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 800px) {
    .about-master-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-master-photo {
        max-width: 520px;
        margin: 0 auto;
    }
}

/* =========================================================
   ГЛАВНАЯ — КОНТАКТЫ
   ========================================================= */

.home-contacts p {
    margin: 0 0 10px;
    color: var(--text-muted);
    line-height: 1.6;
}

.home-contacts p:last-child {
    margin-bottom: 0;
}

.home-contacts a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 700;
}

.home-contacts a:hover {
    color: #ff984d;
    text-decoration: underline;
}

.home-contacts-note {
    margin-top: 14px !important;
    padding-top: 14px;
    border-top: 1px solid #303030;
}

/* =========================================================
   МОБИЛЬНОЕ МЕНЮ
   ========================================================= */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    background: #171717;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--text-main);
    border-radius: 2px;
}

@media (max-width: 800px) {

    header {
        padding: 14px 0;
    }

    nav {
        position: relative;
        gap: 16px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav ul {
        display: none;
        position: absolute;
        top: calc(100% + 14px);
        left: 20px;
        right: 20px;
        flex-direction: column;
        gap: 0;
        padding: 10px;

        background: rgba(26, 26, 26, 0.98);
        border: 1px solid #303030;
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    }

    nav ul.is-open {
        display: flex;
    }

    nav ul li {
        margin-left: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 12px 14px;
        border-radius: 8px;
    }

    nav ul li a:hover {
        background: #202020;
    }
}
