/* css/about.css – Two-column layout for About pages */
.visit-main {
    flex: 1 0 auto;             /* Grow to fill space, don't shrink below content size */
    display: flex;              /* Now make its children (hero-section) also flex */
    flex-direction: column;
}

/* Main page wrapper */


.about-page {
    padding-bottom: auto;   /* ← main fix: gives enough room for footer */
    min-height: calc(100vh - 160px);    /* ensures page is at least full height minus header */
    background-color: #f8f8f8;
}

.hero-section {
    flex: 1;                    /* ← This makes it grow to fill the main */
    display: flex;              /* Blue left + content + blue right in row */
    width: 100%;
    min-height: 0;              /* Prevents overflow issues in some browsers */
}

.blue-left,
.blue-right {
    flex: 1;                    /* Each blue side takes equal leftover space */
    height: 300px;
    margin-top: 150px;
    background-color: #003366;
}

.hero-content {
    flex: 0 1 850px;           /* Or your preferred max-width, e.g. 1100px or 1000px */
    max-width: 850px;
    display: flex;
    flex-direction: column;     /* So inner container + visit-content can stretch */
    background: #f8f8f8;        /* or white — your central background */
    margin: 0 auto;             /* Centers it horizontally if needed */
    margin-top: 150px;
}

/* Optional: ensure the two-column area inside also stretches */
.container {
    flex: 1;                    /* Grow to fill hero-content height */
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.visit-content {
    flex: 1;                    /* The left + right columns stretch vertically */
    display: flex;
    gap: 30px;
    min-height: 400px;          /* Optional minimum so it doesn't collapse too much */
}

.visit-left {
    flex: 0 0 150px;            /* Fixed-ish sidebar width */
    background: #f8f5f0;
    padding: 25px;
    border-radius: 6px;
    max-width:25%;
    /* Add or change this: */
    min-height: 400px;       /* minimum height – prevents it from being too short */
    height: fit-content;     /* default – only as tall as needed */
    /* or */
    align-self: stretch;     /* makes it stretch full height of .visit-content */
}

.visit-left {
    font-size: 0.8rem;           /* bigger text – try 1rem (default) / 0.95rem (smaller) */
    padding: 15px 15px;          /* more/less inner space */
    font-style: Georgia, serif;
    text-align: left;
}

.main-nav .submenu ul,
.visit-left ul {
    list-style: none;          /* removes bullets / numbers */
    padding-left: 0;           /* removes default left indentation */
    margin-left: 0;
}

.visit-left ul {
    margin: 1.0rem 0;            /* more space between sections */
}

.visit-left li {
    margin: 0.3rem 0;              /* space between links */
}

.visit-left a {
    font-size: 0.9rem;           /* link text size */
    padding: 0.6rem 0;           /* more clickable area */
}
.visit-right {
    flex: 1;                    /* Right side (dynamic content) takes remaining space */
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    overflow: auto;             /* Scroll if loaded content is very long */
    min-height: 500px;          /* Helps when content is short */
    font-size: 0.7em;
}

/* Highlight active link */
.visit-left a.active {
    color: #003366;             /* dark blue – matches your theme */
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

iframe {
  border:none;
  width: 100%; /* takes precedence over the width set with the HTML width attribute */
}

/* Right main content – for iframe */
.main-content {
    flex: 1;
}

#content-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Breadcrumb bar (optional) */
/* Breadcrumb bar (optional – matches your other pages) */
.breadcrumb-bar {
    background-color: #f8f8f8;
    max-width: 750px;
    height: 30px;
    margin-top: 10px
}

.breadcrumb-text {
    font-size: 0.6rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    vertical-align: middle;
    text-align: left;
    letter-spacing: 0.5px;
    margin-left: 15px;
    margin-top: 30px;
}


/* Responsive – stack on smaller screens */
@media (max-width: 850px) {
    .about-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
    }
    
    #content-frame {
        min-height: 400px;
    }
}

/* Make sure the right column takes available space */
.visit-right {
    flex: 1;
    min-height: 600px;          /* prevent collapse when empty */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;           /* contain any overflowing child elements */
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Style for the dynamic content container */
.dynamic-content {
    padding: 5px;
    line-height: 1.6;
}

/* Optional: make sure loaded pages don't have double headers/footers if they include them */
.dynamic-content header,
.dynamic-content footer,
.dynamic-content .main-nav {
    display: none;              /* hide unwanted parts from included pages if present */
}

/* Improve readability of loaded content */


.dynamic-content h1{
    color: #003366;
    /*margin-top: 1.5em;*/
    font-size: 1.5rem;
}
.dynamic-content h2 {
    color: #003366;
    margin-top: 1.0em;
}
.dynamic-content h3 {
    color: #003366;
    margin-top: 1.0em;
}

.dynamic-content p {
    margin: 0.8em 0;
    font-size: 0.8em;
    font-style: Georgia, serif;
    text-align: justify;
}

/* Floating image with text wrapping all around */
.history-feature {
    overflow: hidden;           /* contains the float */
    margin: 1.5em 0 2.5em;
}

.history-main-image {
    float: left;                /* image on the left, text flows right & below */
    width: 45%;                 /* or max-width: 420px; – adjust to your preference */
    max-width: 420px;
    height: auto;
    margin: 0 1.8em 1.2em 0;    /* space on the right and below the image */
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    border: 1px solid #e0e0e0;
}

/* Ensure paragraphs flow nicely around and below the image */
.history-feature p {
    margin: 0 0 1.8em 0;
    line-height: 1.68;
}

/* Floating image with text wrapping all around - Pastors*/
.pastors-feature {
    overflow: hidden;           /* contains the float */
    margin: 1.5em 0 2.5em;
}

.pastors-main-image {
    float: left;                /* image on the left, text flows right & below */
    width: 15%;                 /* or max-width: 420px; – adjust to your preference */
    max-width: 420px;
    height: auto;
    margin: 0 1.0em 0.8em 0;    /* space on the right and below the image */
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    border: 1px solid #e0e0e0;
}

/* Ensure paragraphs flow nicely around and below the image */
.pastors-feature p {
    margin: 0 0 1.3em 0;
    line-height: 1.68;
}

.pastors-feature h2 {
    margin: 0 0 0.2em 0;
    font-size: 0.8em;
    line-height: 1.68;
}

/* Clear float after the image so following content starts cleanly */
.pastors-feature::after {
    content: "";
    display: block;
    clear: both;
}

/* On smaller screens → stack image above text */
@media (max-width: 780px) {
    .history-main-image {
        float: none;
        display: block;
        margin: 0 auto 1.5em;
        width: 90%;
        max-width: 90%;
    }
        .pastors-main-image {
        float: none;
        display: block;
        margin: 0 auto 1.5em;
        width: 90%;
        max-width: 90%;
    }
}