/**
 * Light Pastel Theme Design System (TZ Implementation)
 * CHILDSIDE 2026
 */

:root {
  --bg-page: #FAF8F5;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F2EFE9;

  --text-primary: #2B2D42;
  --text-secondary: #6C757D;
  --text-inverse: #FFFFFF;

  --pastel-1-coral: #FF8A80;
  --pastel-2-peach: #FFB74D;
  --pastel-3-honey: #FBC02D;
  --pastel-4-mint: #81C784;
  --pastel-5-teal: #4DB6AC;
  --pastel-6-sky: #64B5F6;
  --pastel-7-lavender: #9575CD;
  --pastel-8-rose: #F06292;
  --pastel-9-cyan: #4DD0E1;

  --border-soft: rgba(43, 45, 66, 0.08);
  --shadow-card: 0 10px 25px -5px rgba(43, 45, 66, 0.06), 0 4px 10px -2px rgba(43, 45, 66, 0.03);
  --radius-card: 20px;
}

/* 2. Seamless background pattern across the entire site */
body {
  background-color: var(--bg-page) !important;
  background-image: url('../images/pattern_1.webp') !important;
  background-repeat: repeat !important;
  background-size: 500px !important;
  background-blend-mode: overlay;
  color: var(--text-primary) !important;
}

/* 3. Layering: Header z-index 50, opaque translucent background */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.94) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft) !important;
}

.site-title {
  color: var(--text-primary) !important;
}

.primary-menu > li > a {
  color: var(--text-primary) !important;
  background: rgba(77, 182, 172, 0.12) !important;
  border: 1px solid rgba(77, 182, 172, 0.3) !important;
}

.primary-menu > li > a:hover {
  background: var(--pastel-5-teal) !important;
  color: #FFFFFF !important;
}

/* Transparent section backgrounds so pattern shines through everywhere */
.info-banner-section,
.about-text-section,
.quick-actions-section,
.navigator-sections,
.map-section,
.articles-section,
.help-project-section {
  background: transparent !important;
}

.about-text-section {
  background: rgba(242, 239, 233, 0.6) !important;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* Cards & Surfaces */
.info-banner,
.quick-action-card,
.navigator-card,
.help-card,
.article-card,
.ovz-sidebar-filters {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-card) !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease;
}

/* 4. Pastel accents for cards ("Что вам нужно сейчас?" & "Четыре раздела Навигатора") */
.quick-action-card--1:hover { border-color: var(--pastel-1-coral) !important; }
.quick-action-card--2:hover { border-color: var(--pastel-2-peach) !important; }
.quick-action-card--3:hover { border-color: var(--pastel-3-honey) !important; }
.quick-action-card--4:hover { border-color: var(--pastel-4-mint) !important; }
.quick-action-card--5:hover { border-color: var(--pastel-5-teal) !important; }
.quick-action-card--6:hover { border-color: var(--pastel-8-rose) !important; }

.navigator-card--1:hover { border-color: var(--pastel-6-sky) !important; }
.navigator-card--2:hover { border-color: var(--pastel-3-honey) !important; }
.navigator-card--3:hover { border-color: var(--pastel-7-lavender) !important; }
.navigator-card--4:hover { border-color: var(--pastel-8-rose) !important; }

.info-banner__title,
.quick-action-card__title,
.navigator-card__title,
.help-card__title,
.section-title,
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
}

.info-banner__text,
.quick-action-card__desc,
.navigator-card__desc,
.help-card__desc,
.section-subtitle,
p {
  color: var(--text-secondary) !important;
}

.about-text p {
  color: var(--text-primary) !important;
}

.quick-search-input,
.search-field {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text-primary) !important;
  border-radius: 14px !important;
}

.quick-search-btn {
  background: var(--pastel-5-teal) !important;
  color: #FFFFFF !important;
  border-radius: 14px !important;
  font-weight: 700;
}

.quick-search-btn:hover {
  background: #00796B !important;
}

/* Map container rounded 24px */
.map-grid-layout,
.ovz-sidebar-filters,
.map-content-col {
  border-radius: 24px !important;
}

/* Hero Pastel & Tactile Letters Physics Animation */
.hero-pastel {
    position: relative;
    width: 100%;
    min-height: clamp(480px, 48vw, 700px);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 70px 15px 50px;
    z-index: 10;
}

.hero-pastel__container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* 5. Mobile responsiveness (360px-414px): tiles fit in one row without wrapping */
.hero-tactile-letters {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(3px, 1.2vw, 16px);
    margin-bottom: clamp(24px, 3.5vw, 40px);
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

.tactile-wrapper {
    display: inline-block;
    opacity: 0;
    transform: translateY(-220px) scale(0.9);
    animation: letterDrop 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(var(--i) * 70ms);
}

@keyframes letterDrop {
    0% {
        opacity: 0;
        transform: translateY(-220px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(14px) scale(1.03);
    }
    80% {
        opacity: 1;
        transform: translateY(-8px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tactile-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(28px, 8.8vw, 80px);
    height: clamp(28px, 8.8vw, 80px);
    border-radius: clamp(8px, 1.8vw, 20px);
    font-family: var(--font-family-display, 'Inter', sans-serif);
    font-weight: 800;
    font-size: clamp(16px, 4.5vw, 48px);
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: rotate(var(--tilt, 0deg));
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile-1 { background-color: #FF8A80; box-shadow: 0 4px 0 #D32F2F, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-2 { background-color: #FFB74D; box-shadow: 0 4px 0 #F57C00, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-3 { background-color: #FBC02D; box-shadow: 0 4px 0 #F57F17, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-4 { background-color: #81C784; box-shadow: 0 4px 0 #388E3C, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-5 { background-color: #4DB6AC; box-shadow: 0 4px 0 #00796B, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-6 { background-color: #64B5F6; box-shadow: 0 4px 0 #1976D2, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-7 { background-color: #9575CD; box-shadow: 0 4px 0 #512DA8, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-8 { background-color: #F06292; box-shadow: 0 4px 0 #C2185B, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }
.tile-9 { background-color: #4DD0E1; box-shadow: 0 4px 0 #0097A7, 0 8px 16px rgba(43, 45, 66, 0.12), inset 0 2px 2px rgba(255,255,255,0.45); }

.tactile-tile:hover {
    transform: rotate(var(--tilt, 0deg)) translateY(-4px) scale(1.06);
}

.tactile-tile:active {
    transform: rotate(var(--tilt, 0deg)) translateY(3px) scale(0.95);
    box-shadow: 0 1px 0 rgba(43, 45, 66, 0.3), 0 2px 6px rgba(43, 45, 66, 0.08), inset 0 2px 2px rgba(255,255,255,0.2) !important;
}

.hero-pastel__content {
    opacity: 0;
    transform: translateY(20px);
    animation: sloganFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.75s;
}

@keyframes sloganFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-pastel__slogan {
    font-size: clamp(16px, 2.2vw, 28px);
    font-weight: 700;
    color: var(--text-primary, #2B2D42);
    margin-bottom: 2rem;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(6px);
    padding: 10px 24px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(43, 45, 66, 0.06);
    border: 1px solid var(--border-soft);
}

.tactile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pastel-5-teal, #4DB6AC);
    color: #FFFFFF;
    font-weight: 700;
    font-size: clamp(14px, 1.1vw, 18px);
    padding: 14px 36px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 0 #00796B, 0 12px 24px rgba(77, 182, 172, 0.35);
    transition: all 0.15s ease;
}

.tactile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #00796B, 0 16px 28px rgba(77, 182, 172, 0.45);
    color: #FFFFFF;
}

.tactile-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #00796B, 0 4px 10px rgba(77, 182, 172, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .tactile-wrapper, .hero-pastel__content {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
