/* 
 * ClemxyTech Apps Hub - Global UI Design System
 * -----------------------------------------------
 * Version: 2.0
 * Style: Modern, Tech-Focused, Premium, App Store Inspired
 */

:root {
    /* --- COLOR TOKENS --- */
    --primary-color: #0A1F44;
    /* Deep Tech Blue */
    --accent-color: #00E5FF;
    /* Electric Cyan */

    --bg-light: #F8FAFC;
    --bg-dark: #0B1220;
    --bg-card: #FFFFFF;

    --text-dark: #0F172A;
    --text-light: #E5E7EB;
    --text-muted: #64748B;

    /* --- TYPOGRAPHY TOKENS --- */
    --font-heading: 'Sora', 'Inter', sans-serif;
    --font-body: 'Inter', 'DM Sans', sans-serif;

    /* Font Sizes */
    --fs-h1: clamp(2.5rem, 5vw, 4rem);
    --fs-h2: clamp(2rem, 4vw, 3rem);
    --fs-h3: clamp(1.5rem, 3vw, 2.25rem);
    --fs-h4: 1.5rem;
    --fs-body: 1rem;
    --fs-small: 0.875rem;

    /* --- SPACING TOKENS --- */
    --section-padding: 96px;
    --card-padding: 24px;
    --btn-radius: 12px;
    --radius-lg: 20px;

    /* --- SHADOWS --- */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.15);

    /* --- ANIMATION --- */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* --- DARK MODE SYSTEM --- */
[data-theme="dark"] {
    --bg-light: #0B1220;
    --bg-dark: #050A14;
    --bg-card: #111B2D;
    --text-dark: #F8FAFC;
    --text-light: #E2E8F0;
    --text-muted: #94A3B8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4);

    /* Variable Re-assignments */
    --primary-color: #00E5FF;
    /* Swap primary to accent for visibility in dark mode? Or keep blue? Let's keep blue but brighter */
    --primary-bright: #38BDF8;
}

/* Also support OS preference as default */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-light: #0B1220;
        --bg-dark: #050A14;
        --bg-card: #111B2D;
        --text-dark: #F8FAFC;
        --text-light: #E2E8F0;
        --text-muted: #94A3B8;
        --border-color: rgba(255, 255, 255, 0.08);
        --glass-bg: rgba(255, 255, 255, 0.03);
        --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4);
    }
}

/* --- 1. RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

h1 {
    font-size: var(--fs-h1);
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-color);
}

h2 {
    font-size: var(--fs-h2);
    font-family: var(--font-heading);
    font-weight: 800;
}

h3 {
    font-size: var(--fs-h3);
    font-family: var(--font-heading);
    font-weight: 700;
}

h4 {
    font-size: var(--fs-h4);
    font-family: var(--font-heading);
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {

    h1,
    h2,
    h3,
    h4 {
        color: #FFFFFF;
    }
}

h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    transition: var(--transition-base);
    color: inherit;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* --- 2. GLOBAL COMPONENTS --- */

/* CONTAINER */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--btn-radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color) !important;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.35);
    background: #00f0ff;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: #FFF !important;
}

.btn-outline:hover {
    background: #FFF;
    color: var(--primary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 1.2rem 3.5rem;
    font-size: 1.1rem;
}

/* CARDS */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.card-premium:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-premium);
    border-color: var(--accent-color);
}

/* --- 3. THEME SECTIONS --- */

/* STICKY HEADER */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-base);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .site-header.is-scrolled {
    background: rgba(11, 18, 32, 0.85);
    /* Specific dark glass */
}

.header-inner-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
}

.site-branding .custom-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #FFF;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-branding .site-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFF;
}

.main-navigation {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: #FFF;
}

/* HERO SYSTEM */
.hero-section {
    position: relative;
    padding: 16rem 0 12rem;
    background: linear-gradient(135deg, #0A1F44 0%, #050B1A 100%);
    color: #FFF;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 75% 30%, rgba(0, 229, 255, 0.12), transparent 50%);
    z-index: 1;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 5;
}

.hero-title {
    font-size: var(--fs-h1);
    color: #FFF;
    margin-bottom: 2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(229, 231, 235, 0.8);
    margin-bottom: 3.5rem;
    max-width: 600px;
    font-weight: 400;
}

.hero-visual {
    perspective: 2000px;
}

.hero-dashboard-mockup {
    transform: rotateY(-18deg) rotateX(8deg) translateY(-20px);
    transition: var(--transition-slow);
    filter: drop-shadow(0 40px 100px rgba(0, 0, 0, 0.6));
}

.hero-dashboard-mockup:hover {
    transform: rotateY(-8deg) rotateX(4deg) translateY(-30px);
}

.mockup-inner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0D1B3E;
    position: relative;
}

.mockup-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.hero-abstract-shape {
    width: 500px;
    height: 500px;
    background: var(--accent-color);
    filter: blur(150px);
    opacity: 0.1;
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    z-index: -1;
}

/* SECTION DIVIDERS */
.hero-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 10;
}

.hero-curve svg {
    display: block;
    width: 100%;
    height: 60px;
    fill: var(--bg-main);
}

/* --- 4. APP SPECIFIC UI --- */

/* APP CARD PREMIUM SYSTEM */
.app-card-premium {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    height: 100%;
    position: relative;
}

.app-card-premium:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-premium);
}

.app-card-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.app-card-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.app-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.app-card-identity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-card-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
}

.app-card-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.app-card-title a:hover {
    color: var(--accent-color);
}

.app-card-body {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.app-card-description p {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.app-card-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-app-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: var(--btn-radius);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.app-card-premium:hover .btn-app-card {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* --- 5. ANIMATIONS & REFINEMENTS --- */

/* Reveal Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s var(--transition-base) both;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* --- 6. UTILITIES --- */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .container {
        padding: 0 1rem;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .nav-menu {
        display: none;
    }

    .site-header {
        padding: 1rem 0;
        background: rgba(10, 31, 68, 0.95);
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .btn {
        width: 100%;
    }
}

/* WP ADMIN BAR FIX */
.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* --- 7. ADDITIONAL DESIGN SYSTEM COMPONENTS --- */

/* SEARCH & INPUTS */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    color: inherit;
    transition: var(--transition-base);
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1);
}

/* PAGINATION */
.pagination-wrap .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination-wrap .page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-weight: 700;
}

.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
    background: var(--primary-color);
    color: #FFF;
    border-color: var(--primary-color);
}

/* ERROR PAGE SPECIFIC */
.error-404-wrapper {
    padding: 10rem 0;
}

.error-404-visual .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: var(--accent-color);
    opacity: 0.5;
    margin-bottom: 2rem;
}

/* MARKETPLACE FILTERS */
.marketplace-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2.5rem;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.filter-item {
    padding: 0.6rem 1.5rem;
    border-radius: var(--btn-radius);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.filter-item:hover,
.filter-item.active {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.app-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: var(--btn-radius);
    padding: 0 0.5rem 0 1.5rem;
    border: 1px solid var(--border-color);
}

.app-search-form input[type="search"] {
    border: none;
    background: transparent;
    padding: 0.8rem 0;
}

.search-submit {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
}

/* --- 8. MOBILE HEADER & NAVIGATION --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #FFF;
    position: relative;
    transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #FFF;
    left: 0;
    transition: var(--transition-base);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.menu-toggle.opened .hamburger {
    background: transparent;
}

.menu-toggle.opened .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.opened .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .header-inner-wrap {
        display: flex;
        justify-content: space-between;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #0A1F44;
        flex-direction: column;
        padding: 6rem 2rem;
        transition: var(--transition-base);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.is-active {
        right: 0;
    }

    .header-actions {
        display: none;
    }
}

/* --- 9. FEATURED APDS GRID --- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.section-description {
    max-width: 700px;
    margin: -3rem auto 5rem;
    font-size: 1.15rem;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 10. ARCHIVE PAGE (Marketplace) --- */
.archive-hero {
    padding: 12rem 0 6rem;
    background: var(--bg-light);
}

.archive-title {
    font-size: var(--fs-h1);
    margin-bottom: 1.5rem;
}

.archive-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.archive-filters-section {
    padding: 2rem 0;
    margin-top: -4rem;
    position: relative;
    z-index: 50;
}

.filter-bar-inner {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    align-items: center;
}

.filter-group {
    flex: 1;
}

.filter-group.filter-submit {
    flex: 0 0 auto;
}

.filter-search .input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search .dashicons {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-search input {
    padding-left: 3.5rem !important;
}

.filter-taxonomy select {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-dark);
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

@media (max-width: 991px) {
    .filter-bar-inner {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 2rem;
        margin-top: 0;
    }

    .archive-filters-section {
        margin-top: 0;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group.filter-submit .btn {
        width: 100%;
    }
}

.archive-catalog {
    padding: 5rem 0 10rem;
}

/* --- 11. SINGLE APP LANDING PAGE --- */
.single-app-landing {
    overflow: hidden;
}

.app-single-hero {
    position: relative;
    padding: 12rem 0 8rem;
    background: var(--primary-color);
    color: #FFF;
}

.hero-bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.08), transparent 70%);
}

.hero-flex-wrap {
    display: flex;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 5;
}

.app-hero-logo {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.app-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.app-hero-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-category-pill,
.app-status-pill {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-category-pill {
    color: var(--accent-color);
}

.app-title-main {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #FFF;
    margin-bottom: 1rem;
}

.app-value-proposition {
    font-size: 1.4rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    max-width: 700px;
}

.app-download-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Platform Discovery Buttons */
.btn-platform {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.8rem;
    background: #000;
    color: #FFF;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.btn-platform:hover {
    background: #111;
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.btn-platform .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.btn-labels {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-labels span {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.6;
    line-height: 1;
}

.btn-labels strong {
    font-size: 1.1rem;
    line-height: 1.2;
}

.app-single-description {
    padding: 6rem 0;
    background: var(--bg-light);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.container-narrow {
    max-width: 900px !important;
}

.description-card {
    padding: 4rem !important;
}

.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.app-single-features {
    padding: 8rem 0;
    background: #FFF;
}

.features-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 4rem;
}

.feature-item-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.feature-item-card:hover {
    background: #FFF;
    box-shadow: var(--shadow-premium);
    transform: translateY(-10px);
}

.feature-item-card .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.app-single-agency-cta {
    padding: 8rem 0;
    background: var(--bg-light);
}

.agency-cta-card {
    background: var(--primary-color);
    border-radius: 40px;
    padding: 6rem 4rem;
    text-align: center;
    color: #FFF;
    overflow: hidden;
    position: relative;
}

.agency-cta-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: var(--accent-color);
    filter: blur(200px);
    opacity: 0.05;
    transform: translate(-50%, -50%);
}

.agency-brand-mark {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.agency-brand-mark .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.agency-cta-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.agency-cta-content p {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991px) {
    .hero-flex-wrap {
        flex-direction: column;
        text-align: center;
    }

    .app-hero-meta {
        justify-content: center;
    }

    .app-value-proposition {
        margin-left: auto;
        margin-right: auto;
    }

    .app-download-actions {
        justify-content: center;
    }

    .features-grid-premium {
        grid-template-columns: 1fr;
    }
}

/* --- 12. UTILITY ADDITIONS --- */
.section-header-compact {
    margin-bottom: 4rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: var(--fs-h2);
    font-weight: 800;
    color: inherit;
}

.container-narrow {
    max-width: 900px !important;
}

.card-premium {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

/* --- GALLERY STYLING --- */
.app-single-gallery {
    padding: 8rem 0;
}

.gallery-wrapper-glass {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.wp-block-gallery,
.gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
}

.wp-block-gallery img,
.gallery img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.wp-block-gallery img:hover,
.gallery img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* --- 13. PLATFORM BADGE SYSTEM --- */
.app-download-actions {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-platform {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.75rem;
    background: #000000;
    color: #FFFFFF !important;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    min-width: 190px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-platform:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);
    background: #050505;
}

.btn-platform .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #FFF;
    transition: var(--transition-base);
}

.btn-platform:hover .dashicons {
    color: var(--accent-color);
    transform: rotate(-10deg);
}

.btn-platform .btn-labels {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.btn-platform .btn-labels span {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.btn-platform .btn-labels strong {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

/* Specific Badge Visual Overrides */
.btn-platform.google:hover {
    box-shadow: 0 15px 40px rgba(52, 168, 83, 0.2);
}

.btn-platform.apple:hover {
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.1);
}

.btn-platform.web:hover {
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);
}

/* --- 14. POLICY & LEGAL PAGES --- */
.policy-page-wrapper {
    padding: 12rem 0 10rem;
    background: var(--bg-light);
}

.policy-header {
    margin-bottom: 6rem;
}

.policy-title {
    font-size: var(--fs-h1);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.policy-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.policy-content {
    background: #FFF;
    padding: 5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.policy-content h2 {
    margin: 3rem 0 1.5rem;
    font-size: 1.75rem;
}

.policy-content h3 {
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
}

.policy-content p {
    margin-bottom: 1.5rem;
}

.policy-content ul,
.policy-content ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.policy-content li {
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .policy-content {
        padding: 3rem 2rem;
    }

    .policy-page-wrapper {
        padding: 8rem 0 6rem;
    }
}

/* --- 15. ABOUT PAGE --- */
.about-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.about-hero-image-wrap {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(15deg);
}

.about-hero-image-wrap .dashicons {
    font-size: 100px;
    width: 100px;
    height: 100px;
    color: var(--accent-color);
    opacity: 0.5;
}

.mission-vision-section {
    padding: var(--section-padding) 0;
    margin-top: -5rem;
    position: relative;
    z-index: 20;
}

.grid-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: var(--transition-base);
}

.card-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.card-premium:hover .card-icon {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.philosophy-section {
    padding: var(--section-padding) 0;
}

.lead-text {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 5rem;
    line-height: 1.6;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    text-align: left;
}

.phil-icon-wrap {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    opacity: 0.3;
}

.phil-item h4 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.trust-section {
    padding: var(--section-padding) 0 12rem;
}

.trust-card-premium {
    background: #FFF;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
}

.trust-content {
    display: flex;
    align-items: stretch;
}

.trust-stats {
    background: var(--primary-color);
    padding: 6rem 4rem;
    color: #FFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4rem;
    flex: 0 0 350px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.7;
}

.trust-text {
    padding: 6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.trust-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.trust-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
}

@media (max-width: 991px) {

    .grid-two-col,
    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .trust-content {
        flex-direction: column-reverse;
    }

    .trust-stats {
        flex: none;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 4rem 2rem;
        gap: 2.5rem;
        justify-content: center;
        text-align: center;
    }

    .stat-item {
        flex: 1 1 200px;
    }

    .trust-text {
        padding: 4rem 2rem;
        text-align: center;
        align-items: center;
    }
}

/* --- 16. CONTACT PAGE --- */
.contact-hero {
    background: linear-gradient(135deg, #0A1F44 0%, #0D1B3E 100%);
}

.contact-hero-icon-wrap {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero-icon-wrap .dashicons {
    font-size: 100px;
    width: 100px;
    height: 100px;
    color: var(--accent-color);
    opacity: 0.5;
}

.contact-main-section {
    padding: var(--section-padding) 0 12rem;
    margin-top: -6rem;
    position: relative;
    z-index: 50;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: start;
}

.contact-info-col h2 {
    margin-bottom: 1.5rem;
}

.section-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 3.5rem;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
}

.detail-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.detail-icon {
    width: 48px;
    height: 48px;
    background: #FFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.detail-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.detail-text p,
.detail-text a {
    color: var(--text-muted);
    font-weight: 500;
}

.consultation-cta-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    padding: 3rem;
    border-radius: var(--radius-lg);
}

.cta-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    display: block;
}

.consultation-cta-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.consultation-cta-card p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.form-card-premium {
    background: #FFF;
    padding: 5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
}

.form-header {
    margin-bottom: 3.5rem;
}

.form-header h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.clemxy-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.btn-full {
    width: 100%;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.form-privacy-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

@media (max-width: 1200px) {
    .contact-grid {
        gap: 3rem;
    }

    .form-card-premium {
        padding: 4rem 3rem;
    }
}

@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero {
        text-align: center;
    }

    .contact-main-section {
        margin-top: 0;
        padding-top: 6rem;
    }
}

@media (max-width: 640px) {
    .form-row.split {
        grid-template-columns: 1fr;
    }
}

/* --- 17. GLOBAL FOOTER --- */
.site-footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 8rem 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: #FFF;
}

.footer-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo .site-title {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.footer-description {
    line-height: 1.7;
    max-width: 300px;
}

.footer-title {
    color: #FFF;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    font-family: var(--font-heading);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1.25rem;
}

.footer-links a {
    color: inherit;
    transition: var(--transition-base);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-social-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    transition: var(--transition-base);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.footer-bottom-bar {
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-credit {
    font-weight: 700;
    color: #FFF;
}

@media (max-width: 1200px) {
    .footer-grid {
        gap: 3rem;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* --- 18. THEME TOGGLE BUTTON --- */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .btn-theme-toggle {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-color);
}

.btn-theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.btn-theme-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    position: absolute;
    transition: transform 0.5s var(--bounce), opacity 0.3s ease;
}

/* Toggle visibility based on theme */
.sun-icon {
    opacity: 1;
    transform: translateY(0);
}

.moon-icon {
    opacity: 0;
    transform: translateY(30px);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translateY(-30px);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Ensuring smooth transitions across the app */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Disable transitions for critical elements that shouldn't lag */
.site-header,
.btn,
.nav-menu {
    transition: var(--transition-base) !important;
}
/* --- FINAL UI REFINEMENTS --- */
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent-color) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-black { font-weight: 800 !important; }

/* Spacing Utilities */
.py-section { padding-top: var(--section-padding); padding-bottom: var(--section-padding); }
.pt-section { padding-top: var(--section-padding); }
.pb-section { padding-bottom: var(--section-padding); }

.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 4rem; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 2rem; }
.mb-lg { margin-bottom: 4rem; }

/* Selection */
::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Link Glow */
.link-glow:hover {
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    color: var(--accent-color);
}
