/**
 * Layout Styles
 * Page headers, content sections, about sections, and page-specific layouts
 */

/* Page Header Styles */
.page-header {
    margin-bottom: 0;
}

.page-header-with-image {
    min-height: 400px;
    background-attachment: fixed;
    background-size: cover !important;
    background-position: center center !important;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Page and Post headers with background image - align title to bottom */
.page-header[style*="background-image"],
.post-header[style*="background-image"] {
    position: relative;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.page-header[style*="background-image"]:before,
.post-header[style*="background-image"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

.page-header[style*="background-image"] .uk-container,
.post-header[style*="background-image"] .uk-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

.page-header[style*="background-image"] .page-title,
.post-header[style*="background-image"] .post-title {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0;
    text-align: left;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Dynamic Contrast Optimization */
.page-header.contrast-optimized:before {
    background: var(--overlay-gradient, linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.6) 100%));
}

.page-header.bright-background .page-title,
.post-header.bright-background .post-title {
    color: #1a1a1a !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8) !important;
}

.page-header.dark-background .page-title,
.post-header.dark-background .post-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.page-header.contrast-fallback .page-title,
.post-header.contrast-fallback .post-title {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8) !important;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

.page-header-with-image .uk-container {
    z-index: 2;
}

.page-header-with-image .page-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.page-header:not(.page-header-with-image) .page-title {
    color: #111;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
}

/* Post Header Styles */
.post-header-with-image {
    min-height: 400px;
    background-attachment: fixed;
    background-size: cover !important;
    background-position: center center !important;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.post-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

.post-header-with-image .uk-container {
    z-index: 2;
}

.post-header-with-image .post-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.post-meta-section {
    border-bottom: 1px solid #eeeeee;
}

.post-meta-section .entry-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.post-meta-section .entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Content Sections */
.content-section {
    padding: 5rem 0;
}

.content-section.bg-light {
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}