/**
 * Pages Styles - Blog, Archive, Search, 404
 *
 * @package ATH_ATRAHI_DESIGN
 */

/* ==========================================================================
   Common Page Styles
   ========================================================================== */

.blog-page,
.archive-page,
.search-results-page {
    background: linear-gradient(180deg, #1a1a1a 0%, #232323 100%);
    min-height: 100vh;
}

/* ==========================================================================
   Blog Page
   ========================================================================== */

.blog-header {
    padding: 100px 0 50px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), transparent);
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: #b99d63;
    margin-bottom: 15px;
}

.blog-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Tabs */
.blog-categories {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab:hover,
.category-tab.active {
    background: rgba(185, 157, 99, 0.2);
    border-color: #b99d63;
    color: #b99d63;
}

.category-tab .count {
    background: rgba(185, 157, 99, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* Blog Content Grid */
.blog-content {
    padding: 60px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.posts-grid .post-card.featured {
    grid-column: 1 / -1;
}

/* Post Card */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(185, 157, 99, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.post-card-link {
    text-decoration: none;
    display: block;
}

.post-card.featured .post-card-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.post-card .post-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card.featured .post-image {
    aspect-ratio: 4/3;
}

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

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

.post-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.1), rgba(185, 157, 99, 0.05));
}

.post-image-placeholder svg {
    color: rgba(185, 157, 99, 0.5);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

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

.post-card.featured .post-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
}

.post-category {
    background: rgba(185, 157, 99, 0.2);
    color: #b99d63;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.post-date {
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-date svg {
    opacity: 0.7;
}

.post-card .post-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-card.featured .post-title {
    font-size: 28px;
}

.post-card:hover .post-title {
    color: #b99d63;
}

.post-excerpt {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #b99d63;
    font-size: 14px;
    font-weight: 500;
    transition: gap 0.3s ease;
}

.post-card:hover .read-more {
    gap: 10px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.blog-sidebar,
.archive-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #b99d63;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(185, 157, 99, 0.3);
}

/* Search Widget */
.search-widget {
    background: transparent;
    border: none;
    padding: 0;
}

.search-form,
.sidebar-search {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 15px;
    background: rgba(185, 157, 99, 0.2);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: rgba(185, 157, 99, 0.3);
}

.search-btn svg {
    color: #b99d63;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.popular-post:hover {
    background: rgba(255, 255, 255, 0.05);
}

.popular-post .rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(185, 157, 99, 0.2);
    color: #b99d63;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.popular-post-info h4 {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.popular-post:hover h4 {
    color: #b99d63;
}

.popular-post-info .date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-list li a:hover,
.category-list li.current a {
    color: #b99d63;
    padding-left: 10px;
}

.category-list li a .count {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover,
.tag-item.current {
    background: rgba(185, 157, 99, 0.2);
    border-color: #b99d63;
    color: #b99d63;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.1), rgba(185, 157, 99, 0.05));
    border-color: rgba(185, 157, 99, 0.2);
}

.newsletter-widget p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    padding: 12px 15px;
    background: linear-gradient(135deg, #b99d63, #9a7d44);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(185, 157, 99, 0.3);
}

.newsletter-form button svg {
    color: #ffffff;
}

.newsletter-message {
    margin-top: 10px;
    font-size: 13px;
}

.newsletter-message.success {
    color: #10b981;
}

.newsletter-message.error {
    color: #ef4444;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination,
.search-pagination,
.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination a,
.pagination span,
.search-pagination a,
.search-pagination span,
.archive-pagination a,
.archive-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover,
.search-pagination a:hover,
.archive-pagination a:hover {
    background: rgba(185, 157, 99, 0.2);
    border-color: #b99d63;
    color: #b99d63;
}

.pagination .current,
.search-pagination .current,
.archive-pagination .current {
    background: linear-gradient(135deg, #b99d63, #9a7d44);
    border-color: #b99d63;
    color: #ffffff;
}

/* ==========================================================================
   Archive Page
   ========================================================================== */

.archive-header {
    padding: 100px 0 40px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), transparent);
}

.archive-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: #ffffff;
    margin-bottom: 15px;
}

.archive-title .archive-type {
    display: block;
    font-size: 14px;
    color: #b99d63;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.archive-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 15px;
}

.archive-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.archive-content {
    padding: 50px 0 80px;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* Archive Post List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.archive-post {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.archive-post:hover {
    border-color: rgba(185, 157, 99, 0.3);
    transform: translateX(10px);
}

.archive-post .post-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.archive-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.archive-post:hover .post-image img {
    transform: scale(1.1);
}

.archive-post .post-content {
    padding: 25px 25px 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.archive-post .post-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 12px;
}

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

.archive-post:hover .post-title a {
    color: #b99d63;
}

/* ==========================================================================
   Search Results Page
   ========================================================================== */

.search-header {
    padding: 100px 0 50px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.95), transparent);
}

.search-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: #ffffff;
    margin-bottom: 15px;
}

.search-title span {
    color: #b99d63;
}

.search-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 30px;
}

.search-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.search-form-large {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(185, 157, 99, 0.3);
    border-radius: 50px;
    overflow: hidden;
}

.search-form-large .search-input {
    flex: 1;
    padding: 18px 25px;
    font-size: 16px;
}

.search-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 30px;
    background: linear-gradient(135deg, #b99d63, #9a7d44);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: linear-gradient(135deg, #9a7d44, #7a5d24);
}

/* Search Results Grid */
.search-content {
    padding: 50px 0 80px;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.search-result-item:hover {
    border-color: rgba(185, 157, 99, 0.3);
    transform: translateX(10px);
}

.result-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-item:hover .result-image img {
    transform: scale(1.1);
}

.result-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(185, 157, 99, 0.1), rgba(185, 157, 99, 0.05));
}

.result-placeholder svg {
    color: rgba(185, 157, 99, 0.5);
}

.result-content {
    padding: 25px 25px 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
}

.result-type {
    background: rgba(185, 157, 99, 0.2);
    color: #b99d63;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.result-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
}

.result-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 10px;
}

.result-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-item:hover .result-title a {
    color: #b99d63;
}

.result-excerpt {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.result-excerpt mark {
    background: rgba(185, 157, 99, 0.3);
    color: #b99d63;
    padding: 2px 4px;
    border-radius: 3px;
}

.result-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b99d63;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: gap 0.3s ease;
}

.search-result-item:hover .result-link {
    gap: 10px;
}

/* No Results */
.no-results,
.no-posts {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.no-results-icon svg,
.no-posts svg {
    color: rgba(185, 157, 99, 0.3);
    margin-bottom: 25px;
}

.no-results h2,
.no-posts h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 15px;
}

.no-results p,
.no-posts p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-bottom: 30px;
}

.no-results strong {
    color: #b99d63;
}

.no-results-suggestions {
    max-width: 400px;
    margin: 0 auto 30px;
    text-align: left;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.no-results-suggestions h3 {
    font-size: 16px;
    color: #b99d63;
    margin-bottom: 15px;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-results-suggestions li {
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.no-results-suggestions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #b99d63;
}

.no-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.popular-pages {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-pages h3 {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 15px;
}

.popular-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.popular-links a {
    color: #b99d63;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(185, 157, 99, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.popular-links a:hover {
    background: rgba(185, 157, 99, 0.2);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .blog-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar,
    .archive-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .blog-title,
    .archive-title {
        font-size: 32px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid .post-card.featured .post-card-link {
        grid-template-columns: 1fr;
    }
    
    .archive-post,
    .search-result-item {
        grid-template-columns: 1fr;
    }
    
    .archive-post .post-content,
    .result-content {
        padding: 20px;
    }
    
    .blog-sidebar,
    .archive-sidebar {
        grid-template-columns: 1fr;
    }
    
    .no-results-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .blog-header,
    .archive-header,
    .search-header {
        padding: 80px 0 30px;
    }
    
    .blog-title,
    .archive-title,
    .search-title {
        font-size: 26px;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .search-form-large {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-submit {
        justify-content: center;
    }
}
