/*
Theme Name: MCA Astra Child Theme
Theme URI: [Your Site URL]
Description: Child theme for the Messiah Christian Academy site using Astra.
Author: Michael Williams
Template: Astra
Version: 1.0.0
*/

/* Paste your clean custom CSS below this line */

/* Custom CSS to place the menu over the Hero Image - REVISED AND FINALIZED */

/* Hide the entire Astra header area */
.site-header {
    display: none !important;
}

/* --- 1a. MENU OVER HERO (HOME PAGE ONLY) --- */

/* Ensures the menu is ABSOLUTE only when on the home page */
.home #site-navigation-custom {
    position: absolute !important; 
    background-color: transparent !important; /* Transparent over the hero image */
    padding-top: 85px !important; /* Pushes nav bar down on homepage */
    top: 0 !important;
    height: auto !important;
    min-height: auto !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* Center the menu items horizontally on interior pages, flex-end on home */
#site-navigation-custom .main-header-menu {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    padding: 0 50px;
}

/* FINAL CSS CLEANUP: Remove unwanted default padding/margins */

/* 1. Remove padding from the main page wrapper/container to remove the left white strip */
.ast-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 2. Target the primary content area to remove bottom margin/padding */
.site-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Target the section that contains the hero image itself */
#primary {
    padding: 0 !important;
    margin: 0 !important;
}

/* 4. Remove padding from the main header area (which still contains the logo) */
.ast-site-identity {
    padding-left: 0 !important;
}

/* Text Color Fixes for Readability - FINAL MCA YELLOW */

/* 1. Hero Image Title (Messiah Christian Academy) */
.mca-hero h1 {
    color: #ffc72c !important;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 1.0) !important;
    position: relative;
    z-index: 10;
}

/* 2. Hero Image Subtitle (Christ-centered learning...) */
.mca-hero h2,
.mca-hero p {
    color: #ffc72c !important;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 1.0) !important;
    position: relative;
    z-index: 10;
}

/* 3. "Programs by Age and Grade" Section Header */
.mca-programs h2 {
    color: #ffc72c !important;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold !important;
    text-decoration: none !important; /* Changed from underline to none */
}

/* 4. Program Card Headers (Infants, Toddler 1, etc.) */
.mca-programs .program-card h3 {
    color: #ffc72c !important;
}

/* 5. Program Card Sub-Headers and Body Text */
.mca-programs .program-card p {
    color: #ffffff !important;
}

/* Hero Image Overlay for Improved Text Readability */
.mca-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Black filter, 40% opacity for better contrast */
    z-index: 2;
}

/* --- FIX: Push the entire Hero Image section down to prevent content creep --- */
.mca-hero {
    margin-top: 190px !important; /* Adjusted to match CSS Hero's value */
    position: relative;
}

/* Program Card Hover Effect: HARDWARE ACCELERATION FIX */

/* --- 1. Fix the Parent Container (The Card Row) for Clipping --- */
.mca-program-cards {
    overflow: visible !important;
}

/* --- 2. Base element: The card itself (.mca-card) --- */
.mca-programs .mca-card {
    transform: translateZ(0) !important;
    transition: all 0.3s ease-in-out !important;
    position: relative !important;
    z-index: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    will-change: transform, box-shadow;
}

/* --- 3. Hover state: LIFT and STRONGER SHADOW --- */
.mca-programs .mca-card:hover {
    transform: translateY(-8px) translateZ(0) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
    z-index: 10 !important;
    background-color: #f0f0f0 !important;
}

/* --- REVISED Calendar/CTA Section Styles (Base Styles) --- */

/* 1. Full Section Background (MCA Brand Yellow: #ffc72c) */
.mca-calendar-section {
    background-color: #ffc72c;
    padding: 10px 0 60px 0 !important;
    color: #0d1e2e;
    text-align: center;
    margin-top: -5px !important; /* From testimonial gap fix */
    padding-top: 0 !important;
    z-index: 1;
}

/* 2. Main Title Style */
.mca-calendar-title {
    color: #0d1e2e !important;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-weight: bold;
    padding-top: 25px !important; /* Matches CSS Hero */
}

/* 3. Centered Button Wrapper */
.mca-cta-wrapper {
    margin-bottom: 40px;
}

/* 4. Calendar Button Style (Navy Blue - #0d1e2e) */
.mca-calendar-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #0d1e2e;
    color: #ffffff;
    font-size: 1.25em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.5px;
}

.mca-calendar-button:hover {
    background-color: #000a12;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

/* 5. Brushstroke Styling (FINAL REVISION for Stretched Width) */
.mca-brushstroke-wrapper {
    margin: -255px auto 40px auto; /* Negative top margin to pull it up, preserving bottom spacing */
    max-width: 1200px;
    position: relative; /* Establish a positioning context */
}

.mca-brushstroke {
    display: block;
    width: 100%;
    max-height: 80px;
    height: auto;
    position: absolute; /* Position independently of flow */
    top: -40px; /* Adjust to align with the bottom of .mca-testimonial-gap */
    left: 0;
    z-index: 2; /* Ensure it overlays correctly */
}

/* --- MCA Event Dates Styling --- */

/* 1. Event Section Wrapper Spacing */
.mca-events-section {
    padding-top: 0;
    padding-bottom: 40px;
}

/* 2. MCA Event Dates Title (LARGER FONT) */
.mca-events-title {
    color: #0d1e2e;
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
}

/* 3. Event List Wrapper (For Centering) */
.mca-events-list-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

/* 4. Final Event List (REMOVES BULLETS) */
.mca-event-list-final {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 5. List Items */
.mca-event-list-final li {
    background-color: transparent;
    color: #0d1e2e;
    padding: 5px 0;
    margin-bottom: 0;
    border-radius: 0;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
}

/* --- FIX: Program and Calendar Section Spacing --- */

/* 1. Target the main page container (mca-page) to eliminate residual space */
.mca-page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. Target the section containing the program cards to ensure zero margin/padding below it */
.mca-programs {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    z-index: 2;
}

/* --- TEACHERS AND DIRECTORS PAGE STYLING --- */

/* 1. Main Headings */
.staff-heading {
    color: #0d1e2e;
    font-size: 3em;
    font-weight: 800;
    margin-top: 60px;
    margin-bottom: 40px;
    text-align: center;
}

/* 2. Teacher Grid Layout */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

/* 3. Individual Teacher Card */
.staff-card {
    background-color: #0d1e2e;
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease-in-out;
    height: 100%;
    box-sizing: border-box;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

/* Teacher Card Content Styles */
.staff-name {
    color: #ffc72c;
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 5px;
}

.staff-class {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    opacity: 0.9;
}

.staff-image-placeholder {
    width: 100%;
    height: 250px;
    background-color: #ffc72c;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #0d1e2e;
    border-radius: 8px;
    margin-bottom: 20px;
}

.staff-favorite-label,
.staff-favorite-value {
    margin: 5px 0;
    line-height: 1.4;
}

.staff-favorite-label {
    font-weight: bold;
    margin-top: 15px;
}

/* --- DIRECTORS SECTION STYLING --- */

/* Directors Row (Two-column layout for bio) */
.admin-row {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
    align-items: start;
}

/* Mobile Layout for Directors */
@media (max-width: 768px) {
    .admin-row {
        grid-template-columns: 1fr;
    }
}

/* Director Card (Same styling as teacher card, but adjusted for the two-column layout) */
.admin-card {
    padding: 30px 20px;
    text-align: center;
}

.admin-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Bio Text Box Styling */
.admin-bio-box {
    text-align: left;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f8f8;
}

.admin-bio-text {
    color: #0d1e2e;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ---------------------------------------------------- */
/* --- FINAL NAVIGATION BAR STYLING (ALL PAGES) --- */
/* ---------------------------------------------------- */

/* 1. Entire Custom Navigation Wrapper (This styles the SOLID NAVY bar for interior pages) */
#site-navigation-custom {
    background-color: #0d1e2e; /* MCA Navy Blue solid bar */
    position: relative;
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: space-between; /* Logo left, menu right */
    align-items: center;
    padding: 0 30px;
    height: 64px !important; /* HEIGHT for logo clearance */
    min-height: 64px !important;
}

/* 2. Style the Logo Image and its Wrapper */
.mca-nav-logo-link {
    display: block;
    line-height: 0;
    padding: 0 10px 0 0; /* Slight padding to the right */
}

/* 2b. Position the logo image on the left, smaller size */
#site-navigation-custom .mca-nav-logo {
    display: block; /* Make visible */
    max-width: 150px; /* Smaller size as requested */
    height: auto;
    position: relative; /* Remove absolute positioning for left alignment */
    top: 0;
    transform: none; /* Reset transforms */
    margin: 0;
    vertical-align: middle;
}

/* 3. Menu List Container - Ensure alignment to the right */
#site-navigation-custom .main-header-menu {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    padding: 0;
    margin: 0;
    padding-top: 0 !important;
}

/* 4. Individual Menu Links - FINAL STYLES AND HEIGHT for INTERIOR pages (NAVY BAR) */
#site-navigation-custom .main-header-menu .menu-item a {
    color: #ffc72c !important;
    font-weight: bold;
    text-shadow: none;
    text-decoration: none;
    height: 64px !important;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

/* Ensure "Our Teachers" link is visible (undo any previous hide) */
#site-navigation-custom .menu-item > a {
    display: flex !important; /* Ensure visibility */
}

/* ---------------------------------------------------------------------------------- */
/* --- HOME PAGE OVERRIDE FIX: TRANSPARENT BAR, LOGO & LINK ALIGNMENT --- */
/* ---------------------------------------------------------------------------------- */

/* 1. CRITICAL FIX: HIDE THE SECOND LOGO FROM THE HERO SECTION */
.mca-hero header {
    display: none !important;
}

/* 3. Ensure the content below the menu is pulled up to the top of the screen */
.home .site-content {
    padding-top: 0 !important;
    margin-top: -84px !important;
}

/* 5. Aggressively remove all possible background colors, borders, and shadows on parent theme elements for the home page header */
.home header,
.home .ast-primary-header-bar,
.home .ast-mobile-header-wrap,
.home #ast-desktop-header {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 6. Home Page Links: Final Color and Alignment */
.home #site-navigation-custom .main-header-menu .menu-item a {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #ffc72c !important;
    height: auto !important;
    padding: 5px 10px !important;
    position: relative;
    z-index: 10;
}

/* 6b. Final micro-adjustment to pull 'Our Teachers' up a few pixels */
.home #site-navigation-custom .main-header-menu .menu-item {
    position: relative;
    top: -28px;
}

/* ---------------------------------------------------------------------------------- */
/* --- FINAL TESTIMONIAL GAP FIX (The Working Solution) --- */
/* ---------------------------------------------------------------------------------- */

/* 1. Styles for the new white testimonial section (Must be placed in the content editor) */
.mca-testimonial-gap {
    background-color: #ffffff !important;
    padding: 40px 20px !important;
    margin-bottom: 0 !important;
}

/* 3. FINAL FIX: Calendar Title Positioning */
.mca-calendar-section .mca-calendar-title {
    padding-top: 40px !important;
    margin-top: 0 !important;
}

/* Ensure the calendar title (if it appears lower in the content) is also reset */
.mca-calendar-title {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Programs Title Padding (from CSS Hero) */
.entry-content #mcaProgramsTitle {
    padding-top: 25px;
}