/**
 * Light Pastel Theme Design System (Pure CSS Keyframes Animation with Maximum Priority !important)
 * 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;
}

/* Global Reset & Seamless Pattern across ALL pages */
html, body {
  background-color: #FAF8F5 !important;
  background-image: radial-gradient(#E5DEC9 1.2px, transparent 1.2px) !important;
  background-size: 22px 22px !important;
  background-repeat: repeat !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.site,
.site-main,
.content-area,
.site-content,
.archive-container,
.single-container,
.page-content,
.post-content {
  background: transparent !important;
  color: var(--text-primary) !important;
}

/* Header */
.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #FAF8F5 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  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;
}

/* Footer & Widgets */
.site-footer {
  background: var(--bg-surface-alt) !important;
  border-top: 1px solid var(--border-soft) !important;
  color: var(--text-primary) !important;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-main,
.footer-bottom {
  background: transparent !important;
}

.footer-widget-title,
.footer-widget,
.footer-widget p,
.footer-widget a,
.footer-copyright p,
.footer-credits p {
  color: var(--text-primary) !important;
}

.footer-widget a:hover {
  color: var(--pastel-5-teal) !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,
.archive-section,
.single-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, Archives, Articles, Sidebars, Modals */
.info-banner,
.quick-action-card,
.navigator-card,
.help-card,
.article-card,
.archive .post,
.blog .post,
.search .post,
.archive .hentry,
.blog .hentry,
.search .hentry,
.widget,
.ovz-sidebar-filters,
.archive-card,
.card {
  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;
}

.single .post,
.single .hentry,
.single-container,
.post-content,
.entry-content {
  background: transparent !important;
}

.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,
.entry-title,
.page-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,
.entry-summary,
.entry-content p,
p {
  color: var(--text-secondary) !important;
}

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

/* Inputs, Selects, Textareas */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea,
.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;
  padding: 0.85rem 1.2rem;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--pastel-5-teal) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.2);
}

.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-grid-layout,
.ovz-sidebar-filters,
.map-content-col {
  border-radius: 24px !important;
}

/* ==========================================================
   HERO SECTION & MAXIMUM PRIORITY !important ANIMATIONS
   ========================================================== */
.hero-pastel {
    position: relative;
    width: 100%;
    min-height: clamp(520px, 55vw, 820px);
    background-color: var(--bg-page);
    background-image: url('/images/fon.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 80px 15px 60px;
    z-index: 10;
}

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

.hero-tactile-letters {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: clamp(4px, 1.2vw, 18px) !important;
    margin-bottom: clamp(32px, 4.5vw, 50px) !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 480px) {
    .hero-tactile-letters {
        gap: 4px !important;
    }
}

/* ==========================================================
   ULTIMATE FORCED FALLING ANIMATION: CHILDSIDE LETTERS
   ========================================================== */

/* Изначально скрываем буквы, чтобы не было вспышки перед анимацией */
.hero-tactile-letters .tactile-wrapper {
    opacity: 0 !important;
    visibility: hidden !important;
}

@keyframes forceCubeFall {
  0% {
    opacity: 0 !important;
    transform: translateY(-400px) rotate(30deg) scale(0.5) !important;
  }
  70% {
    opacity: 1 !important;
    transform: translateY(15px) rotate(-3deg) scale(1.05) !important;
  }
  90% {
    transform: translateY(-5px) rotate(1deg) scale(0.98) !important;
  }
  100% {
    opacity: 1 !important;
    transform: translateY(0) rotate(0deg) scale(1) !important;
  }
}

@keyframes forceSloganRise {
  0% {
    opacity: 0 !important;
    transform: translateY(30px) !important;
  }
  100% {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Принудительное применение анимации ко всем элементам букв без исключений */
.hero-tactile-letters .tactile-wrapper,
[aria-label="CHILDSIDE"] > div,
.hero-tactile-letters > div {
    animation-name: forceCubeFall !important;
    animation-duration: 0.9s !important;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    animation-fill-mode: both !important;
    display: inline-block !important;
}

/* Каскадные задержки для каждой буквы */
.hero-tactile-letters .tactile-wrapper:nth-child(1), [aria-label="CHILDSIDE"] > div:nth-child(1) { animation-delay: 0.05s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(2), [aria-label="CHILDSIDE"] > div:nth-child(2) { animation-delay: 0.12s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(3), [aria-label="CHILDSIDE"] > div:nth-child(3) { animation-delay: 0.19s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(4), [aria-label="CHILDSIDE"] > div:nth-child(4) { animation-delay: 0.26s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(5), [aria-label="CHILDSIDE"] > div:nth-child(5) { animation-delay: 0.33s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(6), [aria-label="CHILDSIDE"] > div:nth-child(6) { animation-delay: 0.40s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(7), [aria-label="CHILDSIDE"] > div:nth-child(7) { animation-delay: 0.47s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(8), [aria-label="CHILDSIDE"] > div:nth-child(8) { animation-delay: 0.54s !important; }
.hero-tactile-letters .tactile-wrapper:nth-child(9), [aria-label="CHILDSIDE"] > div:nth-child(9) { animation-delay: 0.61s !important; }

/* Анимация слогана */
.hero-pastel__content,
.hero-pastel__slogan {
    animation: forceSloganRise 0.7s ease-out 0.7s both !important;
}

/* Переопределяем prefers-reduced-motion на уровне CSS для гарантии */
@media (prefers-reduced-motion: reduce) {
    .hero-tactile-letters .tactile-wrapper,
    [aria-label="CHILDSIDE"] > div,
    .hero-tactile-letters > div,
    .hero-pastel__content,
    .hero-pastel__slogan {
        animation-name: forceCubeFall !important;
    }
}

/* Larger Tactile Cubes CHILDSIDE */
.tactile-tile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: clamp(36px, 8.2vw, 104px) !important;
    height: clamp(36px, 8.2vw, 104px) !important;
    border-radius: clamp(12px, 2vw, 24px) !important;
    font-family: var(--font-family-display, 'Inter', sans-serif) !important;
    font-weight: 800 !important;
    font-size: clamp(22px, 4.6vw, 56px) !important;
    color: #FFFFFF !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) !important;
    transform: rotate(var(--tilt, 0deg)) !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

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

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

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

.hero-pastel__slogan {
    font-size: clamp(18px, 2.6vw, 32px) !important;
    font-weight: 700 !important;
    color: var(--text-primary, #2B2D42) !important;
    margin-bottom: 2.2rem !important;
    background: rgba(250, 248, 245, 0.96) !important;
    backdrop-filter: blur(8px) !important;
    padding: 12px 30px !important;
    border-radius: 999px !important;
    display: inline-block !important;
    box-shadow: 0 4px 20px rgba(43, 45, 66, 0.06) !important;
    border: 1px solid var(--border-soft) !important;
}

/* Tactile Buttons in Hero Section */
.hero-pastel .tactile-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--pastel-5-teal, #4DB6AC) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: clamp(15px, 1.2vw, 19px) !important;
    padding: 15px 40px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    box-shadow: 0 6px 0 #00796B, 0 14px 28px rgba(77, 182, 172, 0.35) !important;
    transition: all 0.15s ease !important;
}

.hero-pastel .tactile-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 0 #00796B, 0 18px 32px rgba(77, 182, 172, 0.45) !important;
    color: #FFFFFF !important;
}

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

@media (prefers-reduced-motion: reduce) {
    [aria-label="CHILDSIDE"] > div, .hero-pastel__content, .hero-pastel h1 {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
