/* public/assets/css/home-module.css */

/* --- SCOPING WRAPPER --- */
.m-home {
    width: 100%;
    overflow-x: hidden;
}

/* --- 1. HERO SECTION (Поиск) --- */
.m-home .hero-section {
    padding: 100px 0 80px;
    text-align: center;
    background: radial-gradient(circle at center, #EEF2FF 0%, rgba(255,255,255,0) 70%);
}

.m-home .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-text-heading);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.m-home .hero-title span { color: var(--color-primary); }

.m-home .hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* =========================================================
   HERO SEARCH (Google-like)
   Требование:
   - УБРАТЬ левую лупу (лишняя на главной)
   - Поле с круглыми сторонами "как Google"
   - Кнопки X и лупа справа немного увеличить
   ========================================================= */

.m-home .search-form {
    max-width: 920px;
    margin: 0 auto 18px;
}

/* Input wrapper becomes the "pill" */
.m-home .search-input-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;

    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px; /* максимально круглые края как в Google */
    padding: 12px 14px;

    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.08);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.m-home .search-input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.12);
    border-color: var(--color-primary);
}

/* Левую лупу на главной скрываем */
.m-home .search-icon {
    display: none !important;
}

/* Input */
.m-home .search-input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;

    /* без левой иконки делаем нормальный отступ */
    padding: 12px 10px 12px 16px;

    font-size: 1.08rem;
    color: var(--color-text-heading);
    background: transparent;
    font-family: inherit;
    min-width: 0;
}

/* УБРАТЬ встроенный "крестик" браузера (Chrome/Safari) */
.m-home .search-input[type="search"]::-webkit-search-cancel-button,
.m-home .search-input[type="search"]::-webkit-search-decoration,
.m-home .search-input[type="search"]::-webkit-search-results-button,
.m-home .search-input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.m-home .search-input::placeholder {
    color: var(--color-text-muted);
}

/* Right-side buttons (X + submit) — чуть крупнее */
.m-home .search-input-wrapper .btn {
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 800;
    white-space: nowrap;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;

    min-width: 48px;   /* визуально крупнее */
    min-height: 44px;  /* удобнее на мобиле */
}

.m-home .search-input-wrapper .btn i {
    font-size: 1.1rem; /* иконки чуть крупнее */
}

/* Reset (outline) */
.m-home .search-input-wrapper .btn.btn-outline {
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text-muted);
}

.m-home .search-input-wrapper .btn.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Submit (primary) */
.m-home .search-input-wrapper .btn.btn-primary {
    border: 1px solid transparent;
}

/* Reset button */
.m-home .search-reset {
    cursor: pointer;
}

/* Убираем старую кнопку, если где-то еще осталась в DOM */
.m-home .btn-search {
    display: none !important;
}

/* =========================================================
   Popular tags (optional; показываем только если есть реальные данные)
   ========================================================= */

.m-home .quick-tags {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.m-home .quick-tags span {
    margin-right: 8px;
    opacity: 0.7;
}

.m-home .quick-tags a {
    color: var(--color-text-main);
    text-decoration: none;
    margin-right: 12px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.m-home .quick-tags a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

/* --- 2. STATS BAR (Grid) --- */
.m-home .stats-section {
    background: #fff;
    padding: 40px 0;
    border-bottom: 1px solid var(--color-border);
}

.m-home .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.m-home .stat-number {
    font-size: 2.5rem;
    color: var(--color-primary);
    display: block;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.m-home .stat-label {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* --- 3. CATEGORIES (Cards) --- */
.m-home .categories-section { padding: 80px 0; }

.m-home .section-title {
    text-align: center;
    margin-bottom: 48px;
    font-size: 2rem;
    color: var(--color-text-heading);
}

.m-home .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.m-home .category-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.m-home .category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.m-home .icon-box {
    width: 64px;
    height: 64px;
    background: #EEF2FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 24px;
    transition: all 0.2s;
}

.m-home .category-card:hover .icon-box {
    background: var(--color-primary);
    color: white;
    transform: rotate(-5deg);
}

.m-home .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-heading);
}

.m-home .card-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- 4. DIGITAL SOUL (Soft Block) --- */
.m-home .digital-soul-section {
    padding: 80px 0;
    background: #F9FAFB;
}

.m-home .ds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.m-home .ds-list {
    list-style: none;
    margin-top: 24px;
    margin-bottom: 32px;
    padding-left: 0;
}

.m-home .ds-list li {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.m-home .ds-list i {
    color: var(--color-primary);
    background: #fff;
    border-radius: 50%;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    margin-top: 2px;
}

.m-home .illustration-box {
    background: #fff;
    height: 400px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D1D5DB;
    box-shadow: var(--shadow-md);
}

/* --- 5. CTA SECTION (Light / Airy) --- */
.m-home .cta-section {
    background: #EEF2FF;
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid #E0E7FF;
}

.m-home .cta-container { max-width: 800px; margin: 0 auto; }

.m-home .cta-title {
    color: var(--color-text-heading);
    margin-bottom: 16px;
    font-size: 2.5rem;
}

.m-home .cta-desc {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.m-home .cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.m-home .btn-cta-primary {
    background: var(--color-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.m-home .btn-cta-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.m-home .btn-cta-outline {
    background: white;
    color: var(--color-text-main);
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid var(--color-border);
    font-size: 1.1rem;
}

.m-home .btn-cta-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* =========================================================
   DIGITAL SOUL VISUALIZATION (Pure CSS)
   ========================================================= */

.ds-visual-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #EEF2FF 0%, rgba(255,255,255,0) 70%);
}

.ds-card-glass {
    position: relative;
    width: 220px;
    height: 280px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(79, 70, 229, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: ds-float 6s ease-in-out infinite;
}

.ds-avatar-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ds-line-skeleton {
    height: 12px;
    background: #F3F4F6;
    border-radius: 6px;
    margin-bottom: 10px;
    width: 70%;
}
.ds-line-skeleton.short { width: 40%; }

.ds-rating-badge {
    margin-top: 20px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ds-rating-badge i { color: #F59E0B; }

.ds-satellite {
    position: absolute;
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #EEF2FF;
    z-index: 3;
    animation: ds-float 5s ease-in-out infinite reverse;
}

.ds-sat-1 { top: 10%; left: 10%; animation-delay: 0s; }
.ds-sat-2 { top: 20%; right: 5%; animation-delay: 1s; }
.ds-sat-3 { bottom: 15%; left: 15%; animation-delay: 2s; }

.ds-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ds-conn-line {
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-dasharray: 6 6;
    opacity: 0.2;
    animation: ds-dash 30s linear infinite;
}

/* Анимации */
@keyframes ds-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes ds-dash {
    to { stroke-dashoffset: -1000; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .m-home .stats-grid,
    .m-home .ds-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .m-home .hero-title { font-size: 2.5rem; }

    .m-home .cta-buttons { flex-direction: column; }
}

@media (max-width: 600px) {
    .m-home .hero-section { padding: 70px 0 60px; }

    .m-home .search-form {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .m-home .search-input-wrapper {
        border-radius: 999px;
        padding: 12px 12px;
        gap: 10px;
        box-shadow: 0 16px 36px rgba(79, 70, 229, 0.08);
    }

    .m-home .search-input {
        padding: 12px 10px 12px 14px;
        font-size: 1.02rem;
    }

    .m-home .search-input-wrapper .btn {
        padding: 12px 14px;
        border-radius: 16px;
        min-width: 46px;
        min-height: 44px;
    }

    .m-home .quick-tags a {
        margin-right: 8px;
        margin-bottom: 8px;
        display: inline-flex;
    }

    .ds-visual-wrapper { height: 320px; transform: scale(0.9); }
    .ds-sat-1 { left: 0; }
    .ds-sat-2 { right: 0; }
    .ds-sat-3 { bottom: 5%; left: 5%; }
}
  