/**
 * Homepage Hero Section
 */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 180, 216, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 180, 216, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-text {
    max-width: 900px;
    text-align: center;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 3rem);
    background: var(--color-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 32px;
    line-height: 1.3;
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin: 0 auto 48px;
    line-height: 1.7;
    max-width: 700px;
}

.rotating-text-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: bottom;
    overflow: visible;
    background: none;
    border: none;
    padding: 0;
    height: auto;
    margin: 0 0.2em;
}

.rotating-text {
    display: block;
    color: var(--color-primary);
    background: linear-gradient(90deg, var(--color-primary), #90e0ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 180, 216, 0.4);
}

/* ==========================================================================
   HERO SEARCH BOX (Canva-style)
   ========================================================================== */

.hero-search {
    max-width: 680px;
    margin: 0 auto;
}

.hero-search__form {
    margin: 0;
}

/* The outer box wraps input row + chips */
.hero-search__box {
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-default);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.hero-search__box:focus-within {
    border-color: var(--border-strong);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Input row (icon + input + filter btn) */
.hero-search__row {
    display: flex;
    align-items: center;
    padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4);
}

.hero-search__icon {
    flex-shrink: 0;
    color: var(--color-text-tertiary);
    transition: color 0.2s ease;
}

.hero-search__box:focus-within .hero-search__icon {
    color: var(--color-primary);
}

.hero-search__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-3) var(--space-3);
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
    outline: none;
    box-shadow: none;
    min-width: 0;
}

.hero-search__input:focus {
    outline: none;
    box-shadow: none;
}

.hero-search__input::placeholder {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-base);
}

/* Filter toggle button */
.hero-search__filter-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-default);
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.hero-search__filter-toggle:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(0, 180, 216, 0.06);
}

/* Active = chips are hidden (collapsed) */
.hero-search__filter-toggle.is-active {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(0, 180, 216, 0.1);
}

/* ==========================================================================
   SEARCH CHIPS — inside the box, visible by default
   ========================================================================== */

.hero-search__chips {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
    background: var(--surface-card);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: padding 0.25s ease, opacity 0.2s ease, max-height 0.3s ease;
    max-height: 120px;
}

/* Collapsed state (toggle hides chips) */
.hero-search__chips.is-hidden {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    pointer-events: none;
}

.hero-search__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.hero-search__chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0, 180, 216, 0.08);
}

.hero-search__chip--active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.hero-search__chip--active:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    opacity: 0.9;
}

/* ==========================================================================
   AUTOCOMPLETE SUGGESTIONS
   ========================================================================== */

.hero-search__suggestions {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--space-2) 0;
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
}

.hero-search__suggestions.is-visible {
    display: block;
}

.hero-search__suggestion {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.hero-search__suggestion:hover,
.hero-search__suggestion.is-focused {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-primary);
}

.hero-search__suggestion svg {
    flex-shrink: 0;
    color: var(--color-text-tertiary);
}

.hero-search__suggestion:hover svg,
.hero-search__suggestion.is-focused svg {
    color: var(--color-primary);
}

.hero-search__suggestion span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-search__suggestion strong {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

.hero-search__suggestion-type {
    flex: 0 0 auto !important;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-lg);
        margin-bottom: 32px;
    }

    .hero-search__input {
        font-size: var(--font-size-base);
        padding: var(--space-2) var(--space-2);
    }

    .hero-search__input::placeholder {
        font-size: var(--font-size-sm);
    }

    .hero-search__chips {
        gap: var(--space-1);
    }

    .hero-search__chip {
        padding: var(--space-1) var(--space-3);
        font-size: var(--font-size-xs);
    }

    .hero-search__suggestion {
        padding: var(--space-2) var(--space-4);
        font-size: var(--font-size-sm);
    }

    .hero-search__suggestions {
        max-height: 280px;
    }
}