/**
 * Search Page Styles - Coran 3D
 * Magnificent Islamic-inspired design with calligraphy and illuminations
 * =======================================================================
 */

/* =============================================
   SEARCH PAGE CONTAINER
   ============================================= */

.search-page {
    min-height: 100vh;
    padding: var(--space-8) var(--space-6);
    position: relative;
    overflow: hidden;
}

/* Islamic Filigree Background - Subtle Tone-on-Tone */
.search-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Islamic 8-pointed star (Rub el Hizb) pattern with arabesque */
    background-image:
        /* Central medallion glow */
        radial-gradient(ellipse at 50% 30%, rgba(212, 175, 125, 0.04) 0%, transparent 50%),
        /* 8-pointed Islamic star pattern (Rub el Hizb) */
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.035'%3E%3C!-- 8-pointed Islamic star --%3E%3Cpath d='M60 10L70 40L100 40L75 60L85 90L60 70L35 90L45 60L20 40L50 40Z' stroke-width='0.5'/%3E%3Cpath d='M60 10L70 40L100 40L75 60L85 90L60 70L35 90L45 60L20 40L50 40Z' transform='rotate(45 60 60)' stroke-width='0.5'/%3E%3Ccircle cx='60' cy='60' r='15' stroke-width='0.5'/%3E%3Ccircle cx='60' cy='60' r='8' stroke-width='0.3'/%3E%3C/g%3E%3C/svg%3E"),
        /* Arabesque flourish pattern */
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.025' stroke-width='0.5'%3E%3C!-- Arabesque curves --%3E%3Cpath d='M0 100 Q50 50 100 100 Q150 150 200 100'/%3E%3Cpath d='M0 100 Q50 150 100 100 Q150 50 200 100'/%3E%3Cpath d='M100 0 Q50 50 100 100 Q150 150 100 200'/%3E%3Cpath d='M100 0 Q150 50 100 100 Q50 150 100 200'/%3E%3Ccircle cx='100' cy='100' r='30'/%3E%3Ccircle cx='100' cy='100' r='50'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Illuminated Manuscript Border Effect */
.search-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Geometric Islamic tiling with 8-pointed stars */
    background:
        /* Top fade */
        linear-gradient(180deg, var(--bg-primary) 0%, transparent 15%),
        /* Bottom fade */
        linear-gradient(0deg, var(--bg-primary) 0%, transparent 15%),
        /* Complex Islamic geometric pattern */
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.03'%3E%3C!-- 8-pointed star small --%3E%3Cpolygon points='40,5 45,25 65,25 50,35 55,55 40,45 25,55 30,35 15,25 35,25' stroke-width='0.3'/%3E%3C!-- Interlocking squares forming 8-point star --%3E%3Crect x='20' y='20' width='40' height='40' transform='rotate(0 40 40)' stroke-width='0.3'/%3E%3Crect x='20' y='20' width='40' height='40' transform='rotate(45 40 40)' stroke-width='0.3'/%3E%3C!-- Corner ornaments --%3E%3Ccircle cx='40' cy='40' r='12' stroke-width='0.3'/%3E%3Ccircle cx='40' cy='40' r='5' stroke-width='0.2'/%3E%3C/g%3E%3C/svg%3E"),
        /* Calligraphic flourishes */
        url("data:image/svg+xml,%3Csvg width='300' height='300' viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.02' stroke-width='0.5'%3E%3C!-- Large medallion --%3E%3Ccircle cx='150' cy='150' r='100'/%3E%3Ccircle cx='150' cy='150' r='80'/%3E%3Ccircle cx='150' cy='150' r='60'/%3E%3C!-- 8-pointed star large --%3E%3Cpath d='M150 50L165 110L225 110L180 145L195 205L150 170L105 205L120 145L75 110L135 110Z'/%3E%3Cpath d='M150 50L165 110L225 110L180 145L195 205L150 170L105 205L120 145L75 110L135 110Z' transform='rotate(45 150 150)'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* =============================================
   SEARCH HEADER WITH CALLIGRAPHY
   ============================================= */

.search-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: var(--space-10);
    padding-top: var(--space-8);
}

/* Arabic Calligraphy Title */
.search-header__calligraphy {
    font-family: var(--font-arabic);
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--accent-primary);
    margin-bottom: var(--space-2);
    text-shadow:
        0 0 40px var(--accent-glow),
        0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
    line-height: 1.2;
    animation: calligraphyGlow 4s ease-in-out infinite;
}

@keyframes calligraphyGlow {
    0%, 100% {
        text-shadow:
            0 0 40px var(--accent-glow),
            0 2px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 60px var(--accent-glow),
            0 0 80px var(--accent-softer),
            0 2px 20px rgba(0, 0, 0, 0.3);
    }
}

/* Decorative Divider - Islamic Geometric */
.search-header__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin: var(--space-6) auto;
    max-width: 500px;
}

.search-header__divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-primary) 50%,
        transparent 100%);
}

.search-header__divider-ornament {
    width: 40px;
    height: 40px;
    position: relative;
}

.search-header__divider-ornament svg {
    width: 100%;
    height: 100%;
    color: var(--accent-primary);
    animation: ornamentRotate 20s linear infinite;
}

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

/* French Title */
.search-header__title {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.search-header__subtitle {
    font-size: var(--text-base);
    color: var(--text-tertiary);
    max-width: 500px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* =============================================
   SEARCH INPUT - MAGNIFICENT DESIGN
   ============================================= */

.search-input-container {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto var(--space-10);
}

/* Outer Decorative Frame */
.search-input-frame {
    position: relative;
    padding: 3px;
    background: linear-gradient(135deg,
        var(--accent-primary) 0%,
        var(--ochre) 25%,
        var(--accent-tertiary) 50%,
        var(--ochre) 75%,
        var(--accent-primary) 100%);
    border-radius: var(--radius-2xl);
    box-shadow:
        0 0 30px var(--accent-glow),
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: framePulse 3s ease-in-out infinite;
}

@keyframes framePulse {
    0%, 100% {
        box-shadow:
            0 0 30px var(--accent-glow),
            0 10px 40px rgba(0, 0, 0, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 50px var(--accent-glow),
            0 10px 40px rgba(0, 0, 0, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.15);
    }
}

/* Inner Container */
.search-input-inner {
    position: relative;
    background: var(--bg-secondary);
    border-radius: calc(var(--radius-2xl) - 2px);
    overflow: hidden;
}

/* Corner Ornaments - Islamic 8-pointed star */
.search-input-inner::before,
.search-input-inner::after {
    content: '✴';
    position: absolute;
    font-size: 14px;
    color: var(--accent-primary);
    opacity: 0.6;
    z-index: 2;
}

.search-input-inner::before {
    top: 12px;
    left: 16px;
}

.search-input-inner::after {
    top: 12px;
    right: 16px;
}

/* Search Input Field */
.search-input {
    width: 100%;
    padding: var(--space-5) var(--space-8);
    padding-left: 60px;
    padding-right: 60px;
    font-size: var(--text-lg);
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    text-align: left;
    direction: ltr;
}

.search-input::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
    text-align: center;
}

.search-input:focus::placeholder {
    color: var(--text-muted);
}

/* Search Icon */
.search-input-icon {
    position: absolute;
    left: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    pointer-events: none;
    z-index: 2;
}

/* Clear Button */
.search-clear-btn {
    position: absolute;
    right: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: none;
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-default);
    z-index: 2;
}

.search-clear-btn.visible {
    opacity: 1;
    visibility: visible;
}

.search-clear-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-50%) scale(1.1);
}

/* =============================================
   SEARCH FILTERS - ELEGANT CHIPS
   ============================================= */

.search-filters {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-default);
    position: relative;
    overflow: hidden;
}

.search-filter-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-default);
}

.search-filter-chip:hover {
    border-color: var(--accent-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.search-filter-chip:hover::before {
    opacity: 1;
}

.search-filter-chip.active {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.search-filter-chip.active::before {
    opacity: 1;
}

.search-filter-chip__icon {
    width: 16px;
    height: 16px;
    position: relative;
    z-index: 1;
}

.search-filter-chip__label {
    position: relative;
    z-index: 1;
}

/* =============================================
   SEARCH RESULTS CONTAINER
   ============================================= */

.search-results {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Results Header */
.search-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.search-results__count {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.search-results__count strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.search-results__sort {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.search-results__sort select {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    outline: none;
}

.search-results__sort select:focus {
    border-color: var(--accent-primary);
}

/* Results Grid */
.search-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* =============================================
   SEARCH RESULT CARD - ILLUMINATED STYLE
   ============================================= */

.search-result-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration-slow) var(--ease-default);
}

/* Illuminated Border Effect */
.search-result-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
        var(--accent-primary) 0%,
        transparent 40%,
        transparent 60%,
        var(--ochre) 100%);
    border-radius: calc(var(--radius-xl) + 2px);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--duration-slow) var(--ease-default);
}

.search-result-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px var(--accent-glow);
}

.search-result-card:hover::before {
    opacity: 1;
}

/* Card Image */
.search-result-card__image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.search-result-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-default);
}

.search-result-card:hover .search-result-card__image img {
    transform: scale(1.08);
}

/* Image Overlay with Islamic Pattern */
.search-result-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8) 100%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='%23D4AF7D' stroke-opacity='0.1' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease-default);
}

.search-result-card:hover .search-result-card__image::after {
    opacity: 1;
}

/* Card Badge */
.search-result-card__badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-1) var(--space-3);
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    z-index: 1;
}

/* Card Duration */
.search-result-card__duration {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    padding: var(--space-1) var(--space-2);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
    z-index: 1;
}

/* Card Content */
.search-result-card__content {
    padding: var(--space-4);
}

.search-result-card__category {
    font-size: var(--text-xs);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--space-2);
}

.search-result-card__title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-card__description {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: var(--leading-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-3);
}

/* Card Footer */
.search-result-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}

.search-result-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.search-result-card__meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.search-result-card__meta-item svg {
    width: 14px;
    height: 14px;
    color: var(--accent-tertiary);
}

/* =============================================
   EMPTY STATE - BEAUTIFUL DESIGN
   ============================================= */

.search-empty {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    position: relative;
    z-index: 1;
}

.search-empty__illustration {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--space-8);
    position: relative;
}

/* Animated Islamic Geometric Pattern */
.search-empty__pattern {
    width: 100%;
    height: 100%;
    position: relative;
}

.search-empty__pattern svg {
    width: 100%;
    height: 100%;
    color: var(--accent-primary);
    opacity: 0.3;
    animation: patternPulse 4s ease-in-out infinite;
}

@keyframes patternPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.search-empty__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    color: var(--accent-primary);
}

.search-empty__title {
    font-family: var(--font-arabic);
    font-size: var(--text-3xl);
    color: var(--accent-primary);
    margin-bottom: var(--space-3);
}

.search-empty__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.search-empty__hint {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    max-width: 400px;
    margin: 0 auto;
}

/* =============================================
   INITIAL STATE - SUGGESTIONS
   ============================================= */

.search-initial {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.search-suggestions {
    margin-bottom: var(--space-10);
}

.search-suggestions__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.search-suggestions__title svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.search-suggestions__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.search-suggestion-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-default);
    position: relative;
    overflow: hidden;
}

.search-suggestion-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--ochre-soft) 100%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-default);
}

.search-suggestion-tag:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow:
        var(--shadow-md),
        0 0 20px var(--accent-glow);
}

.search-suggestion-tag:hover::before {
    opacity: 1;
}

.search-suggestion-tag__icon {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
    color: var(--accent-tertiary);
}

.search-suggestion-tag:hover .search-suggestion-tag__icon {
    color: var(--accent-primary);
}

.search-suggestion-tag__text {
    position: relative;
    z-index: 1;
}

/* Popular Categories */
.search-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.search-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-default);
    position: relative;
    overflow: hidden;
}

/* Decorative Corner */
.search-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, var(--accent-soft) 50%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-default);
}

.search-category-card:hover {
    border-color: var(--accent-tertiary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.search-category-card:hover::before {
    opacity: 1;
}

.search-category-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    color: var(--accent-primary);
    transition: transform var(--duration-normal) var(--ease-bounce);
}

.search-category-card:hover .search-category-card__icon {
    transform: scale(1.1);
}

.search-category-card__title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-1);
}

.search-category-card__count {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* =============================================
   LOADING STATE
   ============================================= */

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    position: relative;
    z-index: 1;
}

.search-loading__spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: var(--space-6);
}

/* Islamic Star Spinner */
.search-loading__spinner::before,
.search-loading__spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spinnerRotate 1.2s linear infinite;
}

.search-loading__spinner::after {
    inset: 8px;
    border-top-color: var(--ochre);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

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

.search-loading__text {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

/* =============================================
   RECENT SEARCHES
   ============================================= */

.search-recent {
    margin-bottom: var(--space-8);
}

.search-recent__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.search-recent__title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.search-recent__title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-tertiary);
}

.search-recent__clear {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-default);
}

.search-recent__clear:hover {
    color: var(--accent-primary);
}

.search-recent__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.search-recent__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-default);
}

.search-recent__item:hover {
    border-color: var(--accent-tertiary);
    color: var(--text-primary);
}

.search-recent__item-remove {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-default);
}

.search-recent__item-remove:hover {
    color: var(--danger);
}

/* =============================================
   DOCUMENT CARD - SEARCH RESULTS
   ============================================= */

.search-result-card--document {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
}

.search-result-card--document .search-result-card__icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-lg);
    color: var(--accent-primary);
}

.search-result-card--document .search-result-card__icon svg {
    width: 28px;
    height: 28px;
}

.search-result-card--document .search-result-card__content {
    padding: 0;
    flex: 1;
}

.search-result-card--document .search-result-card__badge--document {
    position: static;
    display: inline-block;
    background: var(--ochre);
    margin-bottom: var(--space-2);
}

.search-result-card--document .search-result-card__title {
    margin-bottom: var(--space-1);
}

.search-result-card--document .search-result-card__description {
    margin-bottom: 0;
    font-size: var(--text-xs);
    -webkit-line-clamp: 1;
}

/* =============================================
   HIGHLIGHT MATCHED TEXT
   ============================================= */

.search-highlight {
    background: var(--accent-soft);
    color: var(--accent-primary);
    padding: 0 2px;
    border-radius: 2px;
}

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

@media (max-width: 768px) {
    .search-page {
        padding: var(--space-6) var(--space-4);
    }

    .search-header__calligraphy {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .search-input {
        font-size: var(--text-base);
        padding: var(--space-4) var(--space-6);
        padding-left: 50px;
        padding-right: 50px;
    }

    .search-results__grid {
        grid-template-columns: 1fr;
    }

    .search-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .search-header__divider {
        max-width: 280px;
    }

    .search-filters {
        gap: var(--space-2);
    }

    .search-filter-chip {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .search-categories {
        grid-template-columns: 1fr;
    }
}
