/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme for Astra
Author: Martin
Author URI: https://yourdomain.com/
Template: astra
Version: 1.0
*/

/* === GLOBAL FIXES === */

html, body {
    height: auto !important;
    overflow: visible !important;
}

#primary {
    background-color: #fff;
    margin: 0;
    padding: 0;
}

/* Force proportional scaling of the PDF canvas on tablet */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Allow the viewer to shrink */
    .single-event_post .pdfemb-viewer {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Force the inner layers to scale proportionally */
    .single-event_post .pdfemb-pagescontainer,
    .single-event_post .pdfemb-inner-div {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* The canvas must scale proportionally */
    .single-event_post .pdfemb-the-canvas {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* === EVENT TEASER GRID === */

.event-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.event-teaser {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background: #E9E6E3;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-teaser-thumb {
    flex: 0 0 150px;
    margin-right: 20px;
}

.event-teaser-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.event-teaser-content {
    flex: 1;
}

.event-date,
.event-church {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3em;
}

.event-teaser-content .entry-title {
    margin: 0.2em 0;
}

.event-summary {
    font-weight: 500;
    margin: 0.5em 0;
    color: #555;
}

/* === WEEKLY SERVICE SCHEDULE === */

.weekly-schedule,
.weekly-schedule p {
    width: 100%;
    max-width: 1000px; /* wider desktop layout */
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.6;
}

/* Tablet */
@media (max-width: 1024px) {
    .weekly-schedule,
    .weekly-schedule p {
        font-size: 16px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .weekly-schedule,
    .weekly-schedule p {
        font-size: 14px !important; /* smaller for mobile */
        padding: 0 10px; /* reduced padding */
    }
}

/* === VERSE FOR THE MONTH === */

.verse-month {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.verse-month .verse-text,
.verse-month .verse-text p,
.verse-month .verse-text * {
    font-family: 'EB Garamond', Georgia, serif !important;
    font-size: 22px !important;
    text-align: center !important;
    color: #ffffff !important;
    line-height: 1.6 !important;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.verse-month .verse-ref {
    font-style: italic;
    font-weight: normal;
    text-align: right;
    display: block;
    font-size: 16px;
    color: #ffffff !important;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .verse-month .verse-text,
    .verse-month .verse-text p {
        font-size: 16px !important;
    }
}

/* === EVENT ARCHIVE TITLES === */

body.post-type-archive-event-post h3.entry-title,
body.post-type-archive-event-post h3.entry-title a {
    color: #141414 !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

/* === PDF EMBEDDER OVERRIDES === */

body.single-blog_post .ast-container {
    display: flex;
    justify-content: center;
}

body.single-blog_post #primary {
    float: none !important;
    margin: 0 auto !important;
    max-width: 100% !important;
}

body.single-blog_post .pdfemb-viewer,
.blog .pdfemb-viewer {
    width: 900px !important;
    max-width: 900px !important;
    min-width: 900px !important;
    height: auto !important;
    min-height: 1200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 auto !important;
    display: block !important;
}

body.single-blog_post .pdfemb-inner-div,
.blog .pdfemb-inner-div {
    width: 900px !important;
    max-width: 900px !important;
    display: block !important;
    position: relative !important;
}

body.single-blog_post .pdfemb-pagescontainer,
.blog .pdfemb-pagescontainer {
    width: 900px !important;
    max-width: 900px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body.single-blog_post .pdfemb-inner-div canvas,
.blog .pdfemb-inner-div canvas {
    width: 900px !important;
    max-width: 900px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* --------------------------------------------------------------
   PDF Embedder Responsive Fixes
   - Blog posts (single-blog_post + blog archive)
   - Upcoming Events (single-event_post)
   -------------------------------------------------------------- */

/* ------------------------------
   1. Blog: max-width adjustments
   ------------------------------ */
@media (max-width: 950px) {
    body.single-blog_post .pdfemb-viewer,
    body.single-blog_post .pdfemb-inner-div,
    body.single-blog_post .pdfemb-pagescontainer,
    body.single-blog_post .pdfemb-inner-div canvas,
    .blog .pdfemb-viewer,
    .blog .pdfemb-inner-div,
    .blog .pdfemb-pagescontainer,
    .blog .pdfemb-inner-div canvas {
        width: 95% !important;
        max-width: 95% !important;
        min-width: auto !important;
    }
}

@media (max-width: 768px) {
    body.single-blog_post .pdfemb-viewer,
    body.single-blog_post .pdfemb-inner-div,
    body.single-blog_post .pdfemb-pagescontainer,
    body.single-blog_post .pdfemb-inner-div canvas,
    .blog .pdfemb-viewer,
    .blog .pdfemb-inner-div,
    .blog .pdfemb-pagescontainer,
    .blog .pdfemb-inner-div canvas {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        min-height: auto !important;
    }
}



/* === BLOG TIMELINE PAGE === */

.page-id-10668 .timeline-year {
    margin-top: 2.5rem;
    margin-bottom: 1.75rem;
    padding-top: 1rem;
    font-size: 1.5rem;        /* Increased from 1.25rem */
    font-weight: 700;         /* Stronger weight */
    color: #1f2937;
    border-top: 2px solid #e5e7eb;
}

.page-id-10668 .timeline-month {
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
}

.page-id-10668 .timeline-item {
    padding: 0.65rem 1rem;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
}

.page-id-10668 .timeline-item:last-child {
    border-bottom: 0;
}

.timeline-title {
    flex: 1;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
}

.timeline-title:hover {
    text-decoration: underline;
}

.page-id-10668 .timeline-item:nth-child(odd) {
    background: linear-gradient(to right, rgba(0,0,0,0.018), rgba(0,0,0,0));
}

/* === BLOG GRID CANVAS === */

body.blog-grid-canvas {
    background-color: #362CAE;
    margin: 0;
}

.blog-grid-title {
    padding: 2em 0 1em 0;
    text-align: center;
    color: white;
    margin: 0;
}

.blog-grid-footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 1.5em;
}

.blog-grid-footer-menu a span {
    color: white;
}

/* === BLOG SEARCH PANEL === */

.blog-search-form {
    margin-bottom: 2em;
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

.blog-search-form .archive-button,
.blog-search-form select {
    padding: 0.6em 1.2em;
    background: #0073e6;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    text-decoration: none;
    cursor: pointer;
}

.blog-search-form select {
    padding: 0.6em;
}

/* === BLOG GRID LAYOUT === */

.blog-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
}

/* === BLOG TEASERS === */

.blog-teaser {
    border: 1px solid #ccc;
    padding: 1em;
    background: #E9E6E3;
    border-radius: 4px;
}

.blog-thumb {
    float: left;
    width: 150px;
    margin: 0 1em 0.5em 0;
    display: block;
}

.blog-content {
    overflow: hidden;
}

.blog-content p {
    margin: 0 0 0.35em 0;
    font-size: 0.9em;
    color: #333;
}

.blog-content h3 {
    margin: 0 0 0.4em 0;
    font-size: 1.05em;
}

.blog-content h3 a {
    text-decoration: none;
    color: #000;
}

.blog-date {
    margin: 0;
    font-size: 0.85em;
    color: #333;
    font-weight: 600;
}

.blog-teaser::after {
    content: "";
    display: block;
    clear: both;
}

/* === RESPONSIVE: BLOG & EVENT TEASERS === */

@media (max-width: 600px) {

    .blog-archive-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    .blog-teaser {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-thumb {
        float: none;
        width: 100%;
        max-width: 250px;
        margin: 0 0 1em 0;
    }

    .blog-content {
        overflow: visible;
        width: 100%;
    }

    .event-teaser {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .event-teaser-thumb {
        width: 100%;
        max-width: 250px;
        margin: 0 0 1em 0;
    }

    .event-teaser-content {
        width: 100%;
    }
}

.page-template-page-blog-timeline {
    outline: 5px solid red !important;
}

