:root {
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --accent-500: #22d3ee;
    --surface: #ffffff;
    --surface-muted: #f5f7fb;
    --surface-dark: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border: rgba(148, 163, 184, 0.25);
    --shadow-soft: 0 18px 44px rgba(15, 23, 42, 0.12);
    --shadow-hover: 0 24px 60px rgba(67, 56, 202, 0.28);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body.explore-modern {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #f8f9ff 0%, #f3f4f8 60%, #f6f7fb 100%);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.explore-modern *,
body.explore-modern *::before,
body.explore-modern *::after {
    box-sizing: border-box;
}

body.explore-modern a {
    text-decoration: none;
    color: inherit;
}

body.explore-modern img {
    display: block;
    max-width: 100%;
}

body.explore-modern #header,
body.explore-modern #headerimg {
    display: none !important;
}

body.explore-modern > h1,
body.explore-modern > .wp-site-blocks > h1,
body.explore-modern > .wp-site-blocks > .description,
body.explore-modern > h1 + .description {
    display: none !important;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.explore-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.explore-loader {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translate(-50%, -140%);
    z-index: 11000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.explore-loader__spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: explore-spin 0.8s linear infinite;
}

body.explore-loading .explore-loader {
    opacity: 1;
    transform: translate(-50%, 0);
}

@keyframes explore-spin {
    to {
        transform: rotate(360deg);
    }
}

.explore-shell {
    position: sticky;
    top: 84px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 18px clamp(20px, 4vw, 64px) 12px;
    transition: padding 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.explore-shell.is-scrolled {
    padding-top: 12px;
    padding-bottom: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

.shell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 32px);
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.32);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--text-tertiary);
}

.shell-search {
    flex: 1 1 320px;
    max-width: 520px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-muted);
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 10px 18px;
    transition: var(--transition);
}

.search-field:focus-within {
    border-color: var(--brand-500);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.search-field svg {
    width: 18px;
    height: 18px;
    fill: var(--text-tertiary);
}

.search-field input {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    color: var(--text-primary);
}

.search-field input::placeholder {
    color: rgba(100, 116, 139, 0.7);
}

.search-status {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-status.is-visible {
    opacity: 1;
}

.shell-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shell-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: var(--brand-600);
    transition: var(--transition);
    border: 1px solid transparent;
}

.shell-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.22);
}

.shell-button--primary {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    box-shadow: 0 18px 38px rgba(79, 70, 229, 0.35);
}

.explore-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero {
    padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 64px) 52px;
}

.hero-surface {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: clamp(32px, 6vw, 70px);
    background: radial-gradient(120% 140% at -10% -10%, rgba(99, 102, 241, 0.92) 0%, rgba(79, 70, 229, 0.85) 40%, rgba(37, 99, 235, 0.8) 100%);
    color: #fff;
    display: grid;
    gap: clamp(24px, 4vw, 56px);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    box-shadow: var(--shadow-soft);
}

.hero-surface::after {
    content: '';
    position: absolute;
    inset: -45% 25% 15% -35%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.35) 0%, rgba(34, 211, 238, 0) 60%);
}

.hero-copy,
.hero-kpis,
.hero-preview {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: rgba(226, 232, 255, 0.78);
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1.05;
    margin: 0;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(244, 247, 255, 0.85);
    margin: 0;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.hero-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-500);
}

.hero-kpis {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.hero-kpi {
    background: rgba(15, 23, 42, 0.26);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-kpi__value {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
}

.hero-kpi__label {
    font-size: 0.78rem;
    color: rgba(226, 232, 255, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    align-content: flex-start;
}

.hero-preview__card {
    position: relative;
    padding-top: 125%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.4);
}

.hero-preview__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 10%, rgba(15, 23, 42, 0.55) 100%);
}

.hero-preview__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-preview--empty {
    color: rgba(226, 232, 255, 0.75);
    font-size: 0.9rem;
}

.filters {
    padding: 0 clamp(20px, 4vw, 64px) 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-count {
    font-size: 1.4rem;
    font-weight: 700;
}

.summary-context {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.sort-tabs,
.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tabs {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.sort-tab,
.filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: #fff;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
}

.sort-tab:hover,
.filter-tab:hover {
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--brand-600);
}

.sort-tab[aria-current="true"],
.filter-tab[aria-current="true"] {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.3);
}

.gallery-section {
    padding: 0 clamp(20px, 4vw, 64px) clamp(40px, 6vw, 96px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.gallery-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.gallery-link {
    display: block;
    position: relative;
}

.gallery-link:hover .gallery-media img {
    transform: scale(1.05);
}

.gallery-media {
    position: relative;
    padding-top: 120%;
    overflow: hidden;
}

.gallery-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-media--placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(34, 211, 238, 0.4));
}

.gallery-media--placeholder img {
    mix-blend-mode: screen;
}

.gallery-platform {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

.gallery-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
}

.gallery-play svg {
    width: 20px;
    height: 20px;
    fill: var(--brand-600);
    margin-left: 2px;
}

.gallery-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px 22px;
}

.gallery-caption {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-caption.selectable-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    cursor: text;
}

.gallery-caption.selectable-text::selection {
    background: rgba(99, 102, 241, 0.3);
    color: inherit;
}

.gallery-view-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 8px;
}

.gallery-view-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.gallery-caption--muted {
    color: var(--text-tertiary);
    font-style: italic;
}

.gallery-meta__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.gallery-meta__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    font-weight: 600;
}

.gallery-meta__meta svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.load-more {
    margin-top: clamp(32px, 5vw, 64px);
    text-align: center;
}

.load-more a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.32);
}

.load-more a:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 48px rgba(79, 70, 229, 0.38);
}

.empty-state {
    padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 64px);
    text-align: center;
    color: var(--text-tertiary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.modern-footer {
    background: #fff;
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 64px);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--brand-600);
}

.footer-bottom {
    margin-top: clamp(32px, 4vw, 48px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .hero-surface {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .explore-shell {
        top: 72px;
    }
}

@media (max-width: 768px) {
    .explore-shell {
        padding: 16px 20px 10px;
        top: 0;
    }

    .shell-top {
        align-items: stretch;
    }

    .shell-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        padding: 28px 20px 40px;
    }

    .filters,
    .gallery-section,
    .modern-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 540px) {
    .shell-actions {
        flex-direction: column;
        gap: 8px;
    }

    .shell-button {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .filters-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-count {
        font-size: 1.2rem;
    }
}

/* Load More Button Styles */
.load-more {
    text-align: center;
    padding: 40px 20px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .spinner {
    animation: spin 1s linear infinite;
}

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

/* Animation for new items */
.gallery-card {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Infinite Scroll Styles */
.infinite-scroll-trigger {
    height: 1px;
    width: 100%;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    color: #667eea;
    font-size: 15px;
    font-weight: 500;
}

.loading-indicator .spinner {
    color: #667eea;
}

.end-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    margin: 20px auto;
    max-width: 300px;
}


/* Video Preview on Hover */
.gallery-card[data-video-preview] .gallery-media {
    position: relative;
}

.gallery-card .video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
}

/* Only hide thumbnail/play when video is actually playing */
.gallery-card .video-preview.is-playing {
    opacity: 1;
}

.gallery-card.video-active .gallery-media > img {
    opacity: 0;
}

.gallery-card.video-active .gallery-play {
    opacity: 0 !important;
}

.gallery-media > img {
    transition: opacity 0.3s ease;
}
