/* =========================================
   1. Global Styles
   ========================================= */
body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
    background-color: #FAFAF9 !important;
    color: #1e293b !important;
    overflow-x: hidden !important;
}

.wp-resources-wrapper {
    max-width: 1280px !important;
    margin: -100px auto 0 !important;
    padding: 0 20px 60px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* =========================================
   2. Hero Section
   ========================================= */
.wp-hero {
    position: relative !important;
    padding: 0 0 96px !important;
    margin-top: 0 !important;
    text-align: center !important;
    background: transparent !important;
}

.wp-hero-bg {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 120% !important;
    height: 120% !important;
    background: radial-gradient(ellipse at center, rgba(236, 253, 245, 0.5), transparent, transparent) !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.wp-hero-content {
    position: relative !important;
    z-index: 10 !important;
    max-width: 896px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Hero Badge */
.wp-hero-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    background: #fff !important;
    border: 1px solid #d1fae5 !important;
    border-radius: 9999px !important;
    color: #047857 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    margin-top: 0 !important;
    margin-bottom: 32px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.ping-dot {
    position: relative !important;
    display: flex !important;
    height: 8px !important;
    width: 8px !important;
}

.ping {
    position: absolute !important;
    display: inline-flex !important;
    height: 100% !important;
    width: 100% !important;
    border-radius: 50% !important;
    background: #34d399 !important;
    opacity: 0.75 !important;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
}

.dot {
    position: relative !important;
    display: inline-flex !important;
    border-radius: 50% !important;
    height: 8px !important;
    width: 8px !important;
    background: #10b981 !important;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Hero Text */
.wp-hero-title {
    font-size: 48px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    line-height: 1.1 !important;
    margin-bottom: 32px !important;
    margin-top: 0 !important;
}

.highlight-text {
    background: linear-gradient(to right, #059669, #14b8a6) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    position: relative !important;
    display: inline-block !important;
}

.wp-hero-subtitle {
    font-size: 20px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    max-width: 672px !important;
    margin: 0 auto !important;
    font-weight: 500 !important;
}

/* =========================================
   3. Controls Bar
   ========================================= */
.wp-controls-sticky {
    position: sticky !important;
    top: 16px !important;
    z-index: 20 !important;
    margin-bottom: 32px !important;
    padding: 0 !important;
}

.wp-controls-bar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    box-sizing: border-box !important;
}

/* Search */
.wp-search-wrapper {
    position: relative !important;
    width: 100% !important;
}

.search-icon-wrapper {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    padding-left: 16px !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important;
    color: #9ca3af !important;
}

.wp-search-wrapper input {
    width: 100% !important;
    padding: 12px 16px 12px 44px !important;
    background: rgba(249, 250, 251, 0.5) !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #111827 !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    height: 48px !important;
}

.wp-search-wrapper input:focus {
    background: #fff !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* Filters */
.wp-filters-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.wp-filters-wrapper::-webkit-scrollbar {
    display: none !important;
}

.wp-filters-container {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.filter-pill {
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background: #f9fafb !important;
    color: #4b5563 !important;
    margin: 0 !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.filter-pill:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.filter-pill.active {
    background: #059669 !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2) !important;
}

.wp-controls-divider {
    display: none !important;
    width: 1px !important;
    height: 32px !important;
    background: #f3f4f6 !important;
    margin: 0 8px !important;
}

/* Meta & Select */
.wp-controls-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 16px !important;
}

.results-info {
    font-size: 14px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
}

.wp-per-page-select select {
    padding: 8px 32px 8px 12px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    font-size: 13px !important;
    color: #374151 !important;
    background-color: #fff !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 16px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* =========================================
   4. Grid Layout
   ========================================= */
.wp-resources-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
}

/* =========================================
   5. Card Styles
   ========================================= */
.wp-resource-card {
    background: #fff !important;
    border-radius: 16px !important;
    padding: 12px !important;
    border: 1px solid #f3f4f6 !important;
    transition: all 0.3s !important;
    display: flex;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}

.wp-resource-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-color: #e5e7eb !important;
}

/* Card Header */
.wp-card-header {
    position: relative !important;
    height: 140px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
    background: #ecfdf5 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 16px !important;
}

/* Themes */
.theme-rapport {
    background: #d1fae5 !important;
}

.theme-cv {
    background: #dbeafe !important;
}

.theme-expose {
    background: #fed7aa !important;
}

/* Category Badge */
.category-badge {
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    z-index: 2 !important;
}

.theme-rapport .category-badge {
    background: #059669 !important;
    color: white !important;
}

.theme-cv .category-badge {
    background: #2563eb !important;
    color: white !important;
}

.theme-expose .category-badge {
    background: #ea580c !important;
    color: white !important;
}

/* Card Content */
.wp-card-content {
    padding: 0 4px !important;
    flex-grow: 1 !important;
}

.wp-card-meta-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

.meta-date {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #9ca3af !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.format-badge {
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

.format-pdf {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.format-docx {
    background: #dbeafe !important;
    color: #2563eb !important;
}

.format-pptx {
    background: #fed7aa !important;
    color: #ea580c !important;
}

.format-xlsx {
    background: #dcfce7 !important;
    color: #16a34a !important;
}

.wp-card-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
    margin-top: 0 !important;
}

.wp-card-author {
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
    color: #6b7280 !important;
    margin-bottom: 12px !important;
    gap: 6px !important;
}

.wp-card-author svg {
    flex-shrink: 0 !important;
    color: #9ca3af !important;
}

/* Company Display */
.wp-card-company {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #374151 !important;
    margin-bottom: 12px !important;
}

.wp-card-company svg {
    flex-shrink: 0 !important;
    color: #6b7280 !important;
}

.wp-card-company strong {
    font-weight: 700 !important;
    color: #111827 !important;
}

/* Culture Display */
.wp-card-culture {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #059669 !important;
    margin-bottom: 12px !important;
}

.wp-card-culture svg {
    flex-shrink: 0 !important;
    color: #10b981 !important;
}

.wp-card-desc {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Card Footer */
.wp-card-footer {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding-top: 12px !important;
    border-top: 1px solid #f3f4f6 !important;
}

.btn-preview {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    color: #6b7280 !important;
    flex-shrink: 0 !important;
}

.btn-preview:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
}

.btn-download {
    flex: 1 !important;
    background: #10b981 !important;
    color: white !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.3s !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
    border: none !important;
}

.btn-download:hover {
    background: #059669 !important;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.btn-download svg {
    flex-shrink: 0 !important;
}

/* =========================================
   6. Pagination & No Results
   ========================================= */
.wp-resources-pagination {
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    margin-top: 40px !important;
}

.page-btn {
    padding: 10px 20px !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-size: 14px !important;
}

.page-btn:hover:not(:disabled) {
    border-color: #10b981 !important;
    color: #10b981 !important;
    background: #ecfdf5 !important;
}

.page-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.page-info {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

#wp-resources-no-results {
    text-align: center !important;
    padding: 60px !important;
    color: #6b7280 !important;
    font-size: 16px !important;
    background: #fff !important;
    border-radius: 16px !important;
    border: 1px dashed #e5e7eb !important;
    margin-bottom: 40px !important;
}

/* =========================================
   7. Responsive Media Queries
   ========================================= */

/* Mobile Devices (< 640px) */
@media (max-width: 639px) {
    .wp-resources-wrapper {
        padding: 0 8px 40px !important;
        margin: -100px auto 0 !important;
    }

    .wp-hero {
        padding: 0 0 48px !important;
    }

    .wp-hero-badge {
        font-size: 11px !important;
        padding: 6px 12px !important;
        margin-bottom: 20px !important;
    }

    .wp-hero-title {
        font-size: 32px !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
    }

    .wp-hero-subtitle {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .wp-controls-sticky {
        top: 8px !important;
        margin-bottom: 24px !important;
    }

    .wp-controls-bar {
        padding: 12px !important;
        gap: 12px !important;
    }

    .wp-search-wrapper input {
        font-size: 14px !important;
        padding: 10px 12px 10px 40px !important;
        height: 44px !important;
    }

    .filter-pill {
        font-size: 13px !important;
        padding: 6px 12px !important;
        height: 36px !important;
    }

    .wp-controls-meta {
        font-size: 13px !important;
    }

    .wp-per-page-select select {
        font-size: 12px !important;
        padding: 6px 28px 6px 10px !important;
    }

    .wp-resources-grid {
        gap: 16px !important;
        margin-bottom: 32px !important;
    }

    .wp-resource-card {
        padding: 10px !important;
    }

    .wp-card-header {
        height: 100px !important;
        margin-bottom: 12px !important;
    }

    .floating-icon {
        width: 28px !important;
        height: 28px !important;
        bottom: -14px !important;
    }

    .floating-icon svg {
        width: 14px !important;
        height: 14px !important;
    }

    .wp-card-title {
        font-size: 15px !important;
    }

    .wp-card-desc {
        font-size: 12px !important;
    }

    .btn-download {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    .wp-resources-pagination {
        gap: 12px !important;
        margin-top: 32px !important;
    }

    .page-btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    .page-info {
        font-size: 13px !important;
    }
}

/* Small Devices (Tablets, >= 640px) */
@media (min-width: 640px) {
    .wp-hero-title {
        font-size: 60px !important;
    }

    .wp-resources-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Medium Devices (Laptops, >= 768px) */
@media (min-width: 768px) {
    .wp-hero-title {
        font-size: 72px !important;
    }
}

/* Large Devices (Desktops, >= 1024px) */
@media (min-width: 1024px) {
    .wp-controls-bar {
        flex-direction: row !important;
        align-items: center !important;
        padding: 8px !important;
    }

    .wp-search-wrapper {
        width: 320px !important;
        flex-shrink: 0 !important;
    }

    .wp-filters-wrapper {
        width: auto !important;
        flex-grow: 1 !important;
        padding-bottom: 0 !important;
        margin: 0 16px !important;
    }

    .wp-controls-divider {
        display: block !important;
    }

    .wp-controls-meta {
        width: auto !important;
        gap: 16px !important;
    }

    .wp-resources-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Extra Large Devices (Large Desktops, >= 1280px) */
@media (min-width: 1280px) {
    .wp-resources-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}