/* ============================================
   Политика на диване - Light Theme 2025
   ============================================ */

:root {
    /* Colors - Primary */
    --primary: #2563eb;
    --primary-border: #bfdbfe; /* blue-200 */

    /* Colors - Slate (Grayscale) */
    --slate-900: #0f172a;
    --slate-600: #475569;
    --slate-200: #e2e8f0;

    /* Colors - Accents */
    --yellow-50: #fefce8;
    --yellow-600: #ca8a04;

    --amber-100: #fffbeb;
    --amber-600: #d97706;

    --green-100: #dcfce7;
    --green-600: #16a34a;

    --purple-100: #f3e8ff;
    --purple-600: #9333ea;

    /* System */
    --font-main: 'Inter', sans-serif;
    --radius: 12px;
    --radius-xl: 1rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: #f5f0e6;
    color: var(--slate-600);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--slate-900);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

b, strong { font-weight: 700; }

/* Flexbox utilities */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Dimensions */
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* Spacing */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-8 { padding: 2rem; }

/* Visuals */
.rounded-xl { border-radius: var(--radius-xl); }

/* Typography utilities */
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }

/* Color utilities */
.text-slate-900 { color: var(--slate-900); }
.text-slate-600 { color: var(--slate-600); }

.text-blue-600 { color: var(--primary); }
.text-purple-600 { color: var(--purple-600); }
.text-amber-600 { color: var(--amber-600); }

.bg-blue-100 { background-color: var(--primary-border); }
.bg-amber-100 { background-color: var(--amber-100); }
.bg-purple-100 { background-color: var(--purple-100); }

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Пустые карточки-заполнители сетки некликабельны — без hover-отклика */
.feature-card:empty:hover {
    border-color: var(--slate-200);
    transform: none;
    box-shadow: none;
}

/* Service Cards (inside feature-card) */
.service-card {
    display: flex;
    flex-direction: column;
}
.service-card-body {
    flex: 1;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.status-active {
    background-color: var(--green-100);
    color: var(--green-600);
}
.status-dev {
    background-color: var(--yellow-50);
    color: var(--yellow-600);
}

/* ============================================
   Layout — mobile first
   <768px        : 1 column
   768–1023.98px : 2 columns
   >=1024px      : 12 columns (final desktop layout)
   ============================================ */

/* Базовая сетка .page-grid, слоты и шапка header.site-header — единый
   источник в /elements/layout.css. Ниже только правила, уникальные для
   главной (поведение feature-card). */

/* Card padding (mobile default) */
.feature-card.p-8 {
    padding: 1.125rem;
}

/* Empty structural cards & spacers hidden by default — desktop-only */
.feature-card:empty,
.spacer {
    display: none;
}

/* ---- Small phones (<=380px) ---- */
@media (max-width: 380px) {
    .feature-card.p-8 {
        padding: 0.875rem;
    }
}

/* ---- Phone-specific typography (<768px) ---- */
@media (max-width: 767.98px) {
    .text-xl {
        font-size: 1.0625rem;
        line-height: 1.4;
    }
    .w-12 { width: 2.5rem; }
    .h-12 { height: 2.5rem; }
}

/* ---- Tablet (>=768px): 2 columns ---- */
@media (min-width: 768px) {
    .feature-card.p-8 {
        padding: 1.5rem;
    }
}

/* ---- Desktop (>=1024px): 12-column grid ---- */
@media (min-width: 1024px) {
    /* Дополняет 12-колоночную .page-grid из layout.css строками под карточки
       (9 ячеек — 3 ряда по 3, включая пустые карточки-заполнители) */
    .page-grid {
        grid-template-rows: auto repeat(3, minmax(200px, 1fr)) auto;
    }
    /* Service / spacer cards: 3 per row */
    .page-grid > .feature-card,
    .page-grid > .spacer {
        grid-column: span 4;
    }
    /* Restore card padding and structural spacers */
    .feature-card.p-8 {
        padding: 2rem;
    }
    .feature-card:empty,
    .spacer {
        display: block;
    }
}
