/*
 * APlusWebTraffic Directory + Deal Feed visual upgrade
 * Loaded after the existing discovery and page-specific stylesheets.
 * All rules are scoped to the two public discovery pages.
 */

.directory-discovery-page,
.social-discovery-page {
    --discovery-navy: #03101f;
    --discovery-navy-soft: #071b34;
    --discovery-blue: #087cff;
    --discovery-blue-light: #55b7ff;
    --discovery-green: #58dc37;
    --discovery-gold: #ffbf16;
    --discovery-orange: #ff8a00;
    --discovery-ink: #12243c;
    --discovery-muted: #637187;
    --discovery-line: #dce6f2;
    --discovery-surface: #f5f9fd;

    position: relative;
    padding: clamp(1.25rem, 3vw, 2.25rem) 0 clamp(4rem, 8vw, 7rem);
    overflow: hidden;
    color: var(--discovery-ink);
    background:
        radial-gradient(circle at 4% 20%, rgba(8, 124, 255, .08), transparent 27rem),
        radial-gradient(circle at 96% 65%, rgba(88, 220, 55, .06), transparent 25rem),
        #f7faff;
}

.directory-discovery-page *,
.directory-discovery-page *::before,
.directory-discovery-page *::after,
.social-discovery-page *,
.social-discovery-page *::before,
.social-discovery-page *::after {
    box-sizing: border-box;
}

.directory-discovery-page .discovery-page-hero,
.social-discovery-page .discovery-page-hero {
    position: relative;
    isolation: isolate;
    max-width: none;
    margin: 0 0 clamp(2rem, 5vw, 3.75rem);
    padding: clamp(3.25rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4rem);
    overflow: hidden;
    color: #fff;
    text-align: center;
    border: 1px solid rgba(85, 183, 255, .28);
    border-radius: clamp(24px, 4vw, 38px);
    background:
        radial-gradient(circle at 12% 12%, rgba(8, 124, 255, .44), transparent 35%),
        radial-gradient(circle at 88% 18%, rgba(88, 220, 55, .16), transparent 30%),
        linear-gradient(135deg, #020a15 0%, #061b35 58%, #03204a 100%);
    box-shadow: 0 30px 80px rgba(3, 16, 31, .22);
}

.directory-discovery-page .discovery-page-hero::before,
.social-discovery-page .discovery-page-hero::before {
    position: absolute;
    z-index: -1;
    width: 26rem;
    height: 26rem;
    right: -16rem;
    bottom: -18rem;
    content: "";
    border: 1px solid rgba(255, 191, 22, .32);
    border-radius: 50%;
    box-shadow: 0 0 5rem rgba(255, 191, 22, .12);
}

.directory-discovery-page .section-kicker,
.social-discovery-page .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .75rem;
    color: var(--discovery-blue);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .13em;
    line-height: 1.35;
    text-transform: uppercase;
}

.directory-discovery-page .section-kicker::before,
.social-discovery-page .section-kicker::before {
    width: 1.55rem;
    height: 2px;
    content: "";
    border-radius: 999px;
    background: currentColor;
}

.directory-discovery-page .discovery-page-hero .section-kicker,
.social-discovery-page .discovery-page-hero .section-kicker {
    color: var(--discovery-gold);
}

.directory-discovery-page .discovery-page-hero h1,
.social-discovery-page .discovery-page-hero h1 {
    max-width: 900px;
    margin: .35rem auto 1rem;
    color: #fff;
    font-size: clamp(2.35rem, 6vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1;
    text-wrap: balance;
}

.directory-discovery-page .discovery-page-hero > p,
.social-discovery-page .discovery-page-hero > p {
    max-width: 730px;
    margin: 0 auto;
    color: #cbd9ea;
    font-size: clamp(1rem, 2vw, 1.16rem);
    line-height: 1.7;
}

.discovery-hero-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .7rem;
    margin: 1.6rem auto 0;
}

.discovery-hero-points span {
    padding: .62rem .88rem;
    color: #edf6ff;
    font-size: .8rem;
    font-weight: 750;
    line-height: 1.3;
    border: 1px solid rgba(85, 183, 255, .3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
}

.directory-discovery-page .discovery-page-search {
    position: relative;
    display: flex;
    gap: .65rem;
    max-width: 780px;
    margin: 1.75rem auto 0;
    padding: .55rem;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 17px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 16px 35px rgba(0, 0, 0, .18);
    backdrop-filter: blur(12px);
}

.directory-discovery-page .discovery-page-search input {
    min-height: 3.25rem;
    padding: .85rem 1rem;
    color: var(--discovery-ink);
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    outline: 0;
}

.directory-discovery-page .discovery-page-search input:focus {
    box-shadow: 0 0 0 4px rgba(85, 183, 255, .22);
}

.directory-discovery-page .discovery-page-search .button {
    min-width: 8.75rem;
    border: 1px solid var(--discovery-gold);
    border-radius: 12px;
    color: #071426;
    background: linear-gradient(180deg, #ffd35a, var(--discovery-gold));
    box-shadow: 0 10px 24px rgba(255, 191, 22, .25);
    font-weight: 850;
}

.social-discovery-page .social-targeting-guide {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-top: 1.7rem;
    padding: .5rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
}

.social-discovery-page .social-targeting-guide span {
    padding: .5rem .7rem;
    color: #a9bed8;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.social-discovery-page .social-targeting-guide a {
    padding: .55rem .85rem;
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 999px;
    background: rgba(8, 124, 255, .22);
    transition: background .2s ease, transform .2s ease;
}

.social-discovery-page .social-targeting-guide a:hover {
    transform: translateY(-1px);
    background: rgba(8, 124, 255, .42);
}

.directory-discovery-page .discovery-three-column-layout,
.social-discovery-page .discovery-three-column-layout {
    grid-template-columns: minmax(185px, 220px) minmax(0, 1fr) minmax(235px, 290px);
    gap: clamp(1rem, 2vw, 1.5rem);
}

.directory-discovery-page .directory-left-sidebar,
.directory-discovery-page .discovery-sidebar,
.social-discovery-page .directory-left-sidebar,
.social-discovery-page .discovery-sidebar,
.social-discovery-page .deal-feed-sidebar {
    top: 1.25rem;
    gap: .9rem;
}

.directory-discovery-page .directory-sidebar-card,
.directory-discovery-page .discovery-sidebar-card,
.social-discovery-page .directory-sidebar-card,
.social-discovery-page .discovery-sidebar-card,
.social-discovery-page .deal-feed-sidebar-card {
    padding: 1.1rem;
    overflow: hidden;
    border: 1px solid var(--discovery-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 35px rgba(18, 36, 60, .07);
}

.directory-discovery-page .discovery-sidebar-card--intro,
.social-discovery-page .deal-feed-sidebar-card:first-child {
    color: #fff;
    border-color: rgba(85, 183, 255, .28);
    background:
        radial-gradient(circle at 100% 0, rgba(8, 124, 255, .34), transparent 42%),
        linear-gradient(145deg, #071b34, #03101f);
}

.directory-discovery-page .discovery-sidebar-card--intro h2,
.directory-discovery-page .discovery-sidebar-card--intro p,
.social-discovery-page .deal-feed-sidebar-card:first-child h2,
.social-discovery-page .deal-feed-sidebar-card:first-child p {
    color: #fff;
}

.directory-discovery-page .discovery-sidebar-card--intro p,
.social-discovery-page .deal-feed-sidebar-card:first-child p {
    color: #c7d7e9;
}

.directory-discovery-page .directory-filter-disclosure {
    padding: 0;
}

.directory-discovery-page .directory-filter-disclosure summary {
    padding: 1.05rem 2.8rem 1.05rem 1.05rem;
}

.directory-discovery-page .directory-sidebar-card a,
.directory-discovery-page .discovery-sidebar-links a,
.social-discovery-page .directory-sidebar-card a,
.social-discovery-page .discovery-sidebar-links a,
.social-discovery-page .deal-feed-sidebar-links a,
.social-discovery-page .deal-feed-sidebar-card > a {
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.directory-discovery-page .directory-sidebar-card a:hover,
.directory-discovery-page .directory-sidebar-card a.is-active,
.directory-discovery-page .discovery-sidebar-links a:hover,
.social-discovery-page .directory-sidebar-card a:hover,
.social-discovery-page .directory-sidebar-card a.is-active,
.social-discovery-page .discovery-sidebar-links a:hover,
.social-discovery-page .deal-feed-sidebar-links a:hover,
.social-discovery-page .deal-feed-sidebar-card > a:hover {
    color: #075fc7;
    background: #eaf4ff;
    transform: translateX(2px);
}

.directory-discovery-page .discovery-main-column,
.social-discovery-page .discovery-main-column {
    min-width: 0;
}

.directory-discovery-page .discovery-section-heading,
.directory-discovery-page .directory-result-header,
.social-discovery-page .social-feed-heading {
    margin: 0 0 1rem;
    padding: 1.3rem 1.45rem;
    border: 1px solid var(--discovery-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 32px rgba(18, 36, 60, .06);
}

.directory-discovery-page .discovery-section-heading h2,
.directory-discovery-page .directory-result-header h2,
.social-discovery-page .social-feed-heading h2 {
    margin: .2rem 0 .35rem;
    color: var(--discovery-ink);
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.directory-discovery-page .directory-category-grid {
    gap: 1rem;
}

.directory-discovery-page .directory-category-card {
    position: relative;
    min-height: 6.25rem;
    padding: 1.15rem;
    overflow: hidden;
    border-color: var(--discovery-line);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(18, 36, 60, .06);
}

.directory-discovery-page .directory-category-card::after {
    position: absolute;
    width: 4.5rem;
    height: 4.5rem;
    right: -2.5rem;
    bottom: -2.5rem;
    content: "";
    border-radius: 50%;
    background: rgba(8, 124, 255, .06);
}

.directory-discovery-page .directory-category-card:hover,
.directory-discovery-page .directory-category-card.is-active {
    transform: translateY(-4px);
    border-color: rgba(8, 124, 255, .38);
    box-shadow: 0 20px 42px rgba(18, 61, 112, .12);
}

.directory-discovery-page .directory-category-card__symbol {
    color: var(--discovery-blue);
    background: linear-gradient(145deg, #e3f2ff, #f4f9ff);
    box-shadow: inset 0 0 0 1px rgba(8, 124, 255, .08);
}

.directory-discovery-page .directory-category-card:nth-child(3n + 2) .directory-category-card__symbol {
    color: #248714;
    background: linear-gradient(145deg, #e5f9df, #f6fff3);
}

.directory-discovery-page .directory-category-card:nth-child(3n) .directory-category-card__symbol {
    color: #b87900;
    background: linear-gradient(145deg, #fff2c8, #fffaf0);
}

.directory-discovery-page .directory-category-card__content strong {
    color: var(--discovery-ink);
    font-size: 1rem;
}

.directory-discovery-page .directory-category-card__count {
    color: #075fc7;
    background: #eaf4ff;
}

.directory-discovery-page .directory-result-list,
.social-discovery-page .social-discovery-feed {
    gap: 1.15rem;
}

.directory-discovery-page .uae-advertisement,
.social-discovery-page .uae-advertisement {
    border-color: var(--discovery-line);
    border-radius: 22px;
    box-shadow: 0 15px 42px rgba(18, 36, 60, .08);
}

.directory-discovery-page .uae-advertisement:hover,
.social-discovery-page .uae-advertisement:hover {
    transform: translateY(-4px);
    border-color: rgba(8, 124, 255, .34);
    box-shadow: 0 22px 52px rgba(18, 61, 112, .14);
}

.directory-discovery-page .uae-advertisement__button--primary,
.social-discovery-page .uae-advertisement__button--primary {
    background: linear-gradient(135deg, var(--discovery-blue), #075bbd);
    box-shadow: 0 10px 25px rgba(8, 124, 255, .23);
}

.directory-discovery-page .uae-advertisement__badge--placement,
.social-discovery-page .uae-advertisement__badge--placement {
    color: #1d7512;
    background: #e6f9df;
}

.social-discovery-page .social-discovery-item {
    padding: .75rem;
    border: 1px solid var(--discovery-line);
    border-radius: 26px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 16px 42px rgba(18, 36, 60, .07);
}

.social-discovery-page .social-discovery-item-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .45rem .55rem .8rem;
    color: var(--discovery-muted);
    font-size: .75rem;
}

.social-discovery-page .social-discovery-event-label {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: #075fc7;
    font-weight: 850;
}

.social-discovery-page .social-discovery-event-label::before {
    width: .48rem;
    height: .48rem;
    content: "";
    border-radius: 50%;
    background: var(--discovery-green);
    box-shadow: 0 0 0 4px rgba(88, 220, 55, .13);
}

.social-discovery-page .social-empty-state,
.directory-discovery-page .directory-empty-state {
    padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
    border: 1px solid var(--discovery-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(18, 36, 60, .07);
    text-align: center;
}

.social-discovery-page .social-feed-continuous {
    margin-top: 1.25rem;
    color: var(--discovery-muted);
    text-align: center;
}

.social-discovery-page .social-feed-continuous p:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    margin: 0;
    padding: .55rem .9rem;
    border: 1px solid var(--discovery-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 36, 60, .05);
}

.social-discovery-page .deal-feed-sidebar-card h2 {
    margin: .25rem 0 .65rem;
    color: var(--discovery-ink);
    font-size: 1.05rem;
}

.social-discovery-page .deal-feed-sidebar-card p {
    color: var(--discovery-muted);
    font-size: .85rem;
    line-height: 1.6;
}

.social-discovery-page .deal-feed-sidebar-links {
    display: grid;
    gap: .35rem;
    margin-top: .85rem;
}

.social-discovery-page .deal-feed-sidebar-links a,
.social-discovery-page .deal-feed-sidebar-card > a {
    display: block;
    padding: .62rem .7rem;
    color: #075fc7;
    font-size: .83rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: .7rem;
}

@media (max-width: 1080px) {
    .directory-discovery-page .discovery-three-column-layout,
    .social-discovery-page .discovery-three-column-layout {
        grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    }

    .directory-discovery-page .discovery-sidebar,
    .social-discovery-page .deal-feed-sidebar {
        position: static;
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .directory-discovery-page .discovery-sidebar-card--intro {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .directory-discovery-page,
    .social-discovery-page {
        padding-top: .8rem;
    }

    .directory-discovery-page .discovery-page-hero,
    .social-discovery-page .discovery-page-hero {
        padding: 3.25rem 1.2rem;
        border-radius: 24px;
    }

    .directory-discovery-page .discovery-three-column-layout,
    .social-discovery-page .discovery-three-column-layout {
        grid-template-columns: 1fr;
    }

    .directory-discovery-page .directory-left-sidebar,
    .directory-discovery-page .discovery-sidebar,
    .social-discovery-page .directory-left-sidebar,
    .social-discovery-page .deal-feed-sidebar {
        position: static;
        grid-column: auto;
    }

    .directory-discovery-page .discovery-sidebar,
    .social-discovery-page .deal-feed-sidebar {
        grid-template-columns: 1fr;
    }

    .directory-discovery-page .discovery-sidebar-card--intro {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .discovery-hero-points {
        align-items: stretch;
        flex-direction: column;
    }

    .directory-discovery-page .discovery-page-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 16px;
    }

    .directory-discovery-page .discovery-page-search .button {
        min-height: 3.15rem;
    }

    .social-discovery-page .social-targeting-guide {
        width: 100%;
        border-radius: 18px;
    }

    .social-discovery-page .social-targeting-guide span {
        width: 100%;
    }

    .social-discovery-page .social-targeting-guide a {
        flex: 1 1 auto;
    }

    .directory-discovery-page .directory-category-grid {
        grid-template-columns: 1fr;
    }

    .social-discovery-page .social-discovery-item {
        padding: .45rem;
        border-radius: 20px;
    }

    .social-discovery-page .social-discovery-item-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .directory-discovery-page *,
    .social-discovery-page * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}