/**
 * Blog Archive Template Styles
 * Greater Zion Theme
 */

/* ========================================
   1. Archive Container
   ======================================== */
.gz-blog-archive {
    background: #f8f8f8;
    min-height: 100vh;
}

.gz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   2. Hero Section
   ======================================== */
.gz-archive-hero {
    background: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px; /* Account for fixed header */
}

.gz-archive-title {
    font-size: 48px;
    font-weight: bold;
    color: #364b54;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.gz-archive-subtitle {
    font-size: 20px;
    color: #7B7C7F;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   3. Category Cards
   ======================================== */
.gz-category-cards {
    padding: 40px 0;
}

.gz-cards-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.gz-cards-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gz-cards-grid::-webkit-scrollbar {
    display: none;
}

.gz-category-card {
    flex: 0 0 280px;
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.gz-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #4a9eff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.gz-category-card:hover::before,
.gz-category-card.active::before {
    transform: scaleX(1);
}

.gz-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gz-category-card.active {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gz-category-card.clicked {
    animation: cardClick 0.3s ease;
}

@keyframes cardClick {
    0% { transform: translateY(-5px) scale(1); }
    50% { transform: translateY(-5px) scale(0.95); }
    100% { transform: translateY(-5px) scale(1); }
}

.gz-card-number {
    font-size: 36px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 10px;
}

.gz-category-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #364b54;
    margin: 0 0 15px 0;
}

.gz-card-link {
    color: #007cba;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.gz-arrow {
    transition: transform 0.3s ease;
}

.gz-category-card:hover .gz-arrow {
    transform: translateX(3px);
}

/* Category Card Variants */
.gz-card-planning { border-left: 4px solid #007cba; }
.gz-card-adventures { border-left: 4px solid #28a745; }
.gz-card-stories { border-left: 4px solid #ffc107; }
.gz-card-culture { border-left: 4px solid #6f42c1; }
.gz-card-dining { border-left: 4px solid #fd7e14; }
.gz-card-foodie { border-left: 4px solid #e83e8c; }
.gz-card-events { border-left: 4px solid #20c997; }
.gz-card-golf { border-left: 4px solid #17a2b8; }
.gz-card-gems { border-left: 4px solid #6c757d; }
.gz-card-all { border-left: 4px solid #6c757d; }

/* Fallback for any dynamic categories */
.gz-category-card:not(.gz-card-planning):not(.gz-card-adventures):not(.gz-card-stories):not(.gz-card-culture):not(.gz-card-dining):not(.gz-card-foodie):not(.gz-card-events):not(.gz-card-golf):not(.gz-card-gems):not(.gz-card-all) {
    border-left: 4px solid #007cba;
}

.gz-card-all .gz-card-icon {
    font-size: 36px;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Navigation Buttons */
.gz-cards-nav {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #6c757d;
    flex-shrink: 0;
}

.gz-cards-nav:hover:not(:disabled) {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.gz-cards-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   4. Recent Stories Section
   ======================================== */
.gz-recent-stories {
    padding: 60px 0;
}

.gz-section-title {
    font-size: 36px;
    font-weight: bold;
    color: #364b54;
    text-align: center;
    margin: 0 0 50px 0;
}

.gz-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.gz-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.gz-post-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.gz-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gz-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.gz-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gz-post-card:hover .gz-card-image img {
    transform: scale(1.05);
}

.gz-content-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.gz-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.gz-badge-itinerary { background: #007cba; }
.gz-badge-hiking { background: #28a745; }
.gz-badge-guide { background: #ffc107; color: #333; }
.gz-badge-default { background: #6c757d; }

.gz-card-content {
    padding: 25px;
}

.gz-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #364b54;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.gz-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gz-card-title a:hover {
    color: #007cba;
}

.gz-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.gz-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.gz-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.gz-meta-icon {
    font-size: 14px;
}

/* ========================================
   5. Load More Button
   ======================================== */
.gz-load-more {
    text-align: center;
    margin-top: 40px;
}

.gz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gz-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,124,186,0.3);
}

.gz-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   6. Loading States
   ======================================== */
.gz-posts-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gz-posts-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   7. Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .gz-archive-title {
        font-size: 36px;
    }
    
    .gz-archive-subtitle {
        font-size: 18px;
    }
    
    .gz-category-card {
        flex: 0 0 250px;
        padding: 20px 15px;
    }
    
    .gz-cards-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .gz-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gz-section-title {
        font-size: 28px;
    }
    
    .gz-card-content {
        padding: 20px;
    }
    
    .gz-card-meta {
        gap: 10px;
    }
    
    .gz-meta-item {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .gz-container {
        padding: 0 15px;
    }
    
    .gz-archive-hero {
        padding: 100px 0 40px;
    }
    
    .gz-archive-title {
        font-size: 28px;
    }
    
    .gz-archive-subtitle {
        font-size: 16px;
    }
    
    .gz-category-card {
        flex: 0 0 200px;
        padding: 15px 10px;
    }
    
    .gz-card-number {
        font-size: 28px;
    }
    
    .gz-category-card h3 {
        font-size: 16px;
    }
    
    .gz-cards-wrapper {
        gap: 10px;
    }
    
    .gz-cards-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* ========================================
   8. Accessibility
   ======================================== */
.gz-category-card:focus,
.gz-cards-nav:focus,
.gz-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* ========================================
   9. Print Styles
   ======================================== */
@media print {
    .gz-category-cards,
    .gz-cards-nav,
    .gz-load-more {
        display: none;
    }
    
    .gz-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gz-post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
