/**
 * Archive & Category Pages Styles
 * ResourceBoy style with search bar
 */

/* ===================================
   ARCHIVE HERO (WITH SEARCH)
   =================================== */
.archive-hero {
    background-color: #f8f9fa;
    padding: 48px 0 64px;
    border-bottom: 1px solid #e5e7eb;
}

.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #111827;
}

.breadcrumb-sep {
    color: #d1d5db;
}

.breadcrumb-current {
    color: #111827;
    font-weight: 500;
}

/* Archive Title */
.archive-title {
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    line-height: 1.2;
}

.archive-description {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ===================================
   ARCHIVE SEARCH (ResourceBoy Style)
   =================================== */
.archive-search-section {
    max-width: 600px;
    margin: 0 auto;
}

.archive-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px 4px 4px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.archive-search-form:focus-within {
    border-color: #ED1C24;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.archive-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
    margin-right: 12px;
}

.archive-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #111827;
    background: transparent;
    padding: 12px 0;
}

.archive-search-input::placeholder {
    color: #9ca3af;
}

.archive-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: linear-gradient(135deg, #c9181f 0%, #ED1C24 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.archive-search-btn:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ===================================
   ARCHIVE RESOURCES SECTION
   =================================== */
.archive-resources-section {
    padding: 64px 0 80px;
    background-color: #ffffff;
}

.archive-meta {
    margin-bottom: 32px;
    text-align: center;
}

.archive-count {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.archive-count strong {
    color: #111827;
    font-weight: 600;
}

/* ===================================
   PAGINATION
   =================================== */
.pagination-wrapper {
    margin-top: 64px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-wrapper .page-numbers li {
    display: inline-block;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-wrapper .page-numbers a:hover {
    border-color: #ED1C24;
    color: #ED1C24;
    background-color: #f9fafb;
}

.pagination-wrapper .page-numbers .current {
    background-color: #ED1C24;
    border-color: #ED1C24;
    color: #ffffff;
}

.pagination-wrapper .page-numbers .prev,
.pagination-wrapper .page-numbers .next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-wrapper .page-numbers .dots {
    border: none;
    color: #9ca3af;
}

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px;
}

.empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #ED1C24;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.empty-state .btn-primary:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .archive-title {
        font-size: 36px;
    }

    .archive-description {
        font-size: 16px;
    }

    .archive-search-input {
        font-size: 15px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .archive-hero {
        padding: 32px 0 48px;
    }

    .archive-header {
        margin-bottom: 32px;
    }

    .archive-title {
        font-size: 28px;
    }

    .archive-description {
        font-size: 15px;
    }

    .breadcrumbs {
        font-size: 13px;
    }

    .archive-search-form {
        padding: 4px 4px 4px 12px;
    }

    .archive-search-input {
        font-size: 16px;
        padding: 10px 8px 10px 0;
        min-width: 0;
    }

    .archive-search-btn {
        min-width: 44px;
        width: 44px;
        height: 44px;
        padding: 0;
    }

    .archive-search-btn .archive-search-btn-text {
        display: none;
    }

    .archive-resources-section {
        padding: 48px 0 64px;
    }

    .pagination-wrapper {
        margin-top: 48px;
    }

    .pagination-wrapper .page-numbers a,
    .pagination-wrapper .page-numbers span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    .empty-state {
        padding: 60px 20px;
    }

    .empty-state h3 {
        font-size: 20px;
    }

    .empty-state p {
        font-size: 15px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
    .archive-title {
        font-size: 24px;
    }

    .archive-description {
        font-size: 14px;
    }

    .breadcrumbs {
        font-size: 12px;
    }

    .archive-search-section {
        max-width: 100%;
        padding: 0 8px;
    }

    .archive-search-form {
        padding: 4px 4px 4px 10px;
    }

    .archive-search-input {
        font-size: 16px;
    }

    .advanced-search-filters {
        flex-direction: column;
    }

    .advanced-search-filters .filter-select {
        min-width: 100%;
    }
}

/* ===================================
   FONTS ARCHIVE (Resource Boy style)
   Large display + small label per card
   =================================== */
.archive-resources-section--fonts .resource-grid--fonts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px 24px;
    align-items: start;
}

.resource-card--font-archive {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(19, 19, 20, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.resource-card--font-archive:hover {
    box-shadow: 0 4px 12px rgba(19, 19, 20, 0.12);
    transform: translateY(-2px);
}

.resource-card-link--font {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Fixed outer box: same size for every font card (Resource Boy style) */
.resource-card-font-display {
    width: 100%;
    aspect-ratio: 4/3;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
}

/* Image fits inside the box perfectly: full image visible, no crop, no distortion (like resourceboy.com/fonts) */
.resource-card-font-image {
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.resource-card-font-fallback {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 700;
    color: #111827;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

.resource-card-font-label {
    margin: 0;
    padding: 14px 16px 18px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
    text-align: center;
    background: #fff;
}

.resource-card--font-archive:hover .resource-card-font-label {
    color: #111827;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .archive-search-section,
    .pagination-wrapper {
        display: none !important;
    }

    .archive-hero {
        background-color: #ffffff;
        border-bottom: 1px solid #000;
    }
}
