/* ============================================
   style.css — Пуховичи.by
   Цвета: флаг Пуховичского района
   Эффект: стеклянный (glassmorphism)
   ============================================ */

/* ---------- СБРОС И БАЗА ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1a3a6b;
    --primary-hover: #152e55;
    --primary-light: #3a7bd5;
    --accent: #f0a030;
    --bg: #f0f3f8;
    --white: #ffffff;
    --text: #1a1a2e;
    --text-light: #5a6070;
    --border: #dde3ed;
    --shadow: 0 2px 8px rgba(26,58,107,0.06);
    --shadow-lg: 0 8px 32px rgba(26,58,107,0.10);
    --radius: 10px;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(10px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- ШАПКА (СТЕКЛО) ---------- */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(26,58,107,0.06);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.logo:hover span:first-child {
    transform: rotate(-5deg) scale(1.08);
    box-shadow: 0 6px 18px rgba(26,58,107,0.25);
}

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

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(26,58,107,0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(26,58,107,0.35);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--primary);
    border: 1px solid rgba(26,58,107,0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary);
}

.btn-danger {
    background: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ---------- ГЕРОЙ (ПОИСК) ---------- */
.hero {
    background: linear-gradient(160deg, #dce6f5 0%, #eef2f8 40%, #fdfaf3 100%);
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(58,123,213,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(240,160,48,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

/* Стеклянная поисковая панель */
.search-box {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 650px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.search-box select,
.search-box input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    min-width: 180px;
    transition: border 0.2s, box-shadow 0.2s;
}

.search-box select:focus,
.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(58,123,213,0.1);
}

.search-box button {
    padding: 12px 28px;
}

/* ---------- СЕКЦИИ ---------- */
.section {
    padding: 50px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: var(--primary);
}

.section-white {
    background: var(--white);
}

.section-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ---------- ПЛИТКИ КАТЕГОРИЙ (СТЕКЛО) ---------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.cat-card {
    display: block;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.cat-card:hover {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(58, 123, 213, 0.3);
}

.cat-card .cat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.cat-card .cat-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

/* ---------- ОТЗЫВЫ НА ГЛАВНОЙ (СТЕКЛО) ---------- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.review-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s ease;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-lg);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 600;
    font-size: 14px;
}

.review-stars {
    color: var(--accent);
    font-size: 14px;
}

.review-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 6px;
}

.review-master {
    font-size: 12px;
    color: #999;
}

/* ---------- КАРТОЧКА МАСТЕРА (СТЕКЛО) ---------- */
.master-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.master-card:hover {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.master-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(58, 123, 213, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    color: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.master-info {
    flex: 1;
}

.master-name {
    font-weight: 600;
    font-size: 16px;
}

.master-cats {
    font-size: 12px;
    color: var(--text-light);
    margin: 4px 0;
}

.master-city {
    font-size: 12px;
    color: #999;
}

.master-rating {
    font-size: 14px;
    color: var(--accent);
}

/* ---------- ФОРМЫ (СТЕКЛО) ---------- */
.form-container {
    max-width: 460px;
    margin: 40px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.form-container h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 22px;
    color: var(--primary);
}

.form-container .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.form-group .required {
    color: #d32f2f;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    transition: border 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(58,123,213,0.1);
}

.form-group button {
    width: 100%;
    margin-top: 8px;
}

.form-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

/* ---------- СООБЩЕНИЯ ---------- */
.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.message-success {
    background: rgba(232, 245, 233, 0.8);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.message-error {
    background: rgba(255, 235, 238, 0.8);
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.2);
}

.message-info {
    background: rgba(227, 242, 253, 0.8);
    color: #1565c0;
    border: 1px solid rgba(21, 101, 192, 0.2);
}

/* ---------- АДМИН-ПАНЕЛЬ ---------- */
.admin-header {
    background: var(--primary);
    color: white;
    padding: 16px 25px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(26,58,107,0.3);
}

.admin-header h1 {
    font-size: 20px;
}

.stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    min-width: 110px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .number {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    color: var(--text-light);
    font-size: 12px;
}

.stat-all { border-left: 4px solid var(--primary-light); }
.stat-pending { border-left: 4px solid #f0a030; }
.stat-active { border-left: 4px solid #2e7d32; }
.stat-rejected { border-left: 4px solid #d32f2f; }

.admin-table {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: collapse;
    border: 1px solid var(--glass-border);
}

.admin-table th {
    background: var(--primary);
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.6);
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.status-pending { background: #fff8e8; color: #b8650a; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #ffebee; color: #c62828; }
.status-blocked { background: #fce4ec; color: #880e4f; }

.filters {
    margin-bottom: 16px;
}

.filters a {
    display: inline-block;
    padding: 6px 14px;
    margin-right: 4px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text);
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}

.filters a.active,
.filters a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---------- ПОДВАЛ ---------- */
.footer {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 40px;
}

/* Анимации для героя */
@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes float3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    33% { transform: translateX(10px) translateY(-10px); }
    66% { transform: translateX(-5px) translateY(5px); }
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 768px) {
    /* Шапка — липкая */
    .header {
        top: 0;
        z-index: 100;
        padding: 12px 0;
    }
    .header .container {
        flex-direction: column;
        gap: 6px;
    }
    .logo {
        font-size: 20px;
    }
    .nav {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav a {
        font-size: 13px;
    }

    /* Герой */
    .hero {
        padding: 30px 0 25px;
    }
    .hero h1 {
        font-size: 20px;
        line-height: 1.3;
    }
    .hero p {
        font-size: 13px;
        line-height: 1.5;
    }
    .search-box {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .search-box select,
    .search-box input,
    .search-box button {
        width: 100%;
        min-width: unset;
    }

    /* Секции */
    .section {
        padding: 25px 0;
    }
    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    /* Плитки категорий */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .cat-card {
        padding: 12px 8px;
    }
    .cat-card .cat-name {
        font-size: 12px;
    }

    /* Отзывы */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Карточка мастера */
    .master-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Формы */
    .form-container {
        margin: 20px 0;
        padding: 20px 15px;
    }
    .form-container h1 {
        font-size: 20px;
    }

    /* Админка */
    .stats {
        gap: 8px;
    }
    .stat-card {
        min-width: 70px;
        padding: 10px 12px;
    }
    .stat-card .number {
        font-size: 20px;
    }
    .stat-card .label {
        font-size: 10px;
    }
    .admin-table {
        font-size: 11px;
    }
    .admin-table th,
    .admin-table td {
        padding: 6px 4px;
    }
    .filters a {
        padding: 5px 8px;
        font-size: 11px;
        margin-bottom: 4px;
    }

    /* Подвал */
    .footer {
        padding: 14px 0;
        font-size: 12px;
    }
    
       /* Страница категории — сайдбар */
    .category-layout {
        flex-direction: column;
        gap: 12px !important;
    }
    .category-sidebar {
        width: 100%;
        order: 2;
    }
    .category-sidebar .cat-card {
        padding: 10px;
    }
    .category-sidebar h3 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .category-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
    }
    .category-sidebar li {
        margin-bottom: 0;
    }
    .category-sidebar li a {
        display: inline-block;
        padding: 3px 8px;
        background: #f0f3f8;
        border-radius: 10px;
        font-size: 11px;
    }
    .category-main {
        width: 100%;
        min-width: auto;
        order: 1;
    }
    .master-card {
        margin: 0 0 10px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 14px;
    }
    .master-card .btn {
        width: 100%;
        text-align: center;
    }
    .master-name {
        font-size: 14px;
    }
    .master-cats,
    .master-city {
        font-size: 11px;
    }
}

/* Запрет горизонтального скролла на всех устройствах */
html {
    overflow-x: hidden;
    width: 100%;
}
* {
    max-width: 100%;
}

/* Баннеры */
.banner-place {
    background: #f8fafb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 2px dashed #3a7bd5;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.banner-place:hover {
    border-color: #1a3a6b;
    background: #e8eef7;
}
.banner-label {
    font-size: 11px;
    color: #999;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.banner-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a6b;
    text-decoration: none;
}
.banner-subtitle {
    font-size: 12px;
    color: #5a6070;
    margin-top: 4px;
}
.banner-hidden {
    display: none !important;
}