/**
 * AlterEgo Band - Pages Styling
 * Consistent styling for all WordPress pages
 *
 * @package AlterEgo
 */

/* =============================================================
   GLOBAL PAGE STYLES
   ============================================================= */

/* Main content wrapper */
.site-main {
    background: #fff;
    min-height: 60vh;
}

/* Container consistency */
.site-main .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =============================================================
   PAGE HEADER
   ============================================================= */
.page-header {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 50%, #C9A961 100%);
    color: #fff;
    padding: 6rem 0 4rem 0;
    margin: 0 0 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(201, 169, 97, 0.05) 10px,
        rgba(201, 169, 97, 0.05) 20px
    );
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header .page-title,
.page-header .entry-title {
    font-size: 3.5rem;
    margin: 0;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Playfair Display', Georgia, serif;
}

/* =============================================================
   ARTICLE CONTENT
   ============================================================= */
article {
    background: #fff;
}

/* Entry header for pages without separate header */
article .entry-header:not(.page-header) {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #C9A961, transparent) 1;
}

article .entry-header:not(.page-header) .entry-title {
    font-size: 2.5rem;
    color: #4A3728;
    margin: 0;
}

/* Entry content */
.entry-content {
    background: #FAF8F3;
    padding: 3rem;
    margin: 3rem 0;
    border-radius: 12px;
    border: 2px solid rgba(201, 169, 97, 0.2);
    line-height: 1.8;
    color: #555;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #4A3728;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #C9A961;
    padding-bottom: 0.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

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

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

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

.entry-content a {
    color: #C9A961;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: #4A3728;
    border-bottom-color: #C9A961;
}

/* Post thumbnail */
.post-thumbnail {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(74, 55, 40, 0.15);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry footer */
.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(201, 169, 97, 0.2);
}

.edit-link a {
    color: #C9A961;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.edit-link a:hover {
    color: #4A3728;
}

/* =============================================================
   SEARCH RESULTS PAGE
   ============================================================= */
.search .site-main {
    background: #F5F5F0;
}

.search-results {
    padding: 3rem 0;
}

.search-results .page-header {
    margin-bottom: 3rem;
}

.search-results .page-title span {
    color: #C9A961;
    font-weight: 700;
}

/* No results found */
.page-content {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    border: 2px solid rgba(201, 169, 97, 0.2);
    text-align: center;
    margin: 3rem 0;
}

.page-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* =============================================================
   ARCHIVE PAGES
   ============================================================= */
.archive .site-main {
    background: #F5F5F0;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.archive-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1rem;
    font-style: italic;
}

/* =============================================================
   404 ERROR PAGE
   ============================================================= */
.error-404 .site-main {
    background: #F5F5F0;
}

/* =============================================================
   SIDEBAR
   ============================================================= */
.sidebar {
    background: #FAF8F3;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid rgba(201, 169, 97, 0.2);
    margin-top: 3rem;
}

.sidebar .widget {
    margin-bottom: 2rem;
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar .widget-title {
    font-size: 1.5rem;
    color: #4A3728;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #C9A961;
}

/* =============================================================
   PAGINATION
   ============================================================= */
.pagination,
.posts-pagination {
    margin: 4rem 0;
    text-align: center;
}

.pagination .nav-links,
.posts-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span,
.posts-pagination a,
.posts-pagination span {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: #4A3728;
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover,
.posts-pagination a:hover {
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
    border-color: #C9A961;
    transform: translateY(-2px);
}

.pagination .current,
.posts-pagination .current {
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
    border-color: #C9A961;
}

/* =============================================================
   SINGLE POST
   ============================================================= */
.single-post .site-main {
    background: #F5F5F0;
}

.single-post article {
    background: #fff;
    padding: 3rem 0;
}

/* Post meta */
.entry-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
    margin: 1rem 0;
}

.entry-meta a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-meta a:hover {
    color: #C9A961;
}

/* =============================================================
   BUTTONS & LINKS
   ============================================================= */
.btn,
a.btn,
button.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover,
a.btn:hover,
button.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #C9A961;
    color: #C9A961;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
}

/* =============================================================
   RESPONSIVE DESIGN
   ============================================================= */
@media (max-width: 1024px) {
    .site-main .container {
        padding: 0 1.5rem;
    }

    .entry-content {
        padding: 2rem;
    }

    .page-header .page-title,
    .page-header .entry-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .site-main .container {
        padding: 0 1rem;
    }

    .page-header {
        padding: 4rem 0 2rem 0;
        margin-bottom: 2rem;
    }

    .page-header .page-title,
    .page-header .entry-title {
        font-size: 2rem;
    }

    .entry-content {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .entry-content h2 {
        font-size: 1.75rem;
    }

    .entry-content h3 {
        font-size: 1.35rem;
    }

    article .entry-header:not(.page-header) .entry-title {
        font-size: 2rem;
    }

    .archive-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header .page-title,
    .page-header .entry-title {
        font-size: 1.75rem;
    }

    .entry-content {
        padding: 1rem;
    }

    .btn,
    a.btn,
    button.btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}
