/*
 Theme Name:   Palestine Lodge No. 357
 Theme URI:    https://palestine357.org
 Description:  Custom child theme for Palestine Lodge No. 357, F&AM — Detroit, Michigan
 Author:       Palestine Lodge No. 357
 Template:     astra
 Version:      1.0.1
 Text Domain:  palestine357
*/

/* ===========================
   Google Fonts Import
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ===========================
   CSS Custom Properties
   =========================== */
:root {
    --p357-navy: #1a2744;
    --p357-gold: #c9a94e;
    --p357-cream: #f5f0e8;
    --p357-charcoal: #2a2a2a;
    --p357-white: #ffffff;
    --p357-gold-hover: #b8943f;
}

/* ===========================
   Global Typography
   =========================== */
body,
body.starter-starter {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--p357-charcoal);
    background-color: var(--p357-cream);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.site-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    color: var(--p357-navy);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.2em;
}

/* ===========================
   Site Header & Branding
   =========================== */
.site-header,
.ast-primary-header,
.ast-primary-header .ast-builder-layout-element,
.ast-primary-header-bar,
#ast-desktop-header .ast-primary-header-bar,
.ast-primary-header .site-primary-header-wrap {
    background-color: var(--p357-navy) !important;
}

.ast-builder-layout-element.ast-header-html-1,
.ast-header-html-1 .ast-builder-html-element {
    color: var(--p357-cream) !important;
}

.site-title a,
.site-title,
.ast-site-identity .site-title a {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--p357-gold) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    text-transform: none;
}

.site-description,
.ast-site-identity .site-description {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
}

/* ===========================
   Navigation
   =========================== */
.main-navigation a,
.ast-header-sections-navigation a,
.main-header-menu a,
.ast-builder-menu a,
.ast-nav-menu a,
.ast-header-sections-navigation .menu-item > a,
.ast-builder-menu .menu-item > .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link {
    font-family: 'Source Sans 3', sans-serif !important;
    color: var(--p357-cream) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: color 0.3s ease !important;
}

.main-header-menu a:hover,
.ast-builder-menu a:hover,
.ast-nav-menu a:hover,
.ast-builder-menu .menu-item > .menu-link:hover,
.ast-builder-menu-1 .menu-item > .menu-link:hover {
    color: var(--p357-gold) !important;
}

.main-header-menu .current-menu-item > a,
.ast-builder-menu .current-menu-item > .menu-link,
.ast-builder-menu-1 .current-menu-item > .menu-link {
    color: var(--p357-gold) !important;
}

/* Mobile menu */
.ast-mobile-header-content,
.ast-mobile-popup-drawer .ast-builder-layout-element,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-mobile-header-wrap .ast-above-header-bar,
.ast-mobile-header-wrap .ast-below-header-bar {
    background-color: var(--p357-navy) !important;
}

.ast-mobile-popup-drawer a,
.ast-mobile-header-content a {
    color: var(--p357-cream) !important;
}

/* Mobile hamburger icon */
.ast-mobile-menu-trigger-minimal,
.ast-button-wrap .ast-mobile-menu-trigger-minimal,
.ast-header-break-point .ast-mobile-menu-buttons-minimal.menu-toggle {
    color: var(--p357-gold) !important;
}

/* ===========================
   Hero Sections — full-width with background images
   =========================== */
.p357-hero {
    background-color: var(--p357-navy);
    color: var(--p357-white);
    /* Break out of Astra's content container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: -2em;
    margin-bottom: 2.5rem;
    border-bottom: 4px solid var(--p357-gold);
    /* Background image support */
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    padding: 0;
    overflow: hidden;
}

/* Dark overlay for readability */
.p357-hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(26, 39, 68, 0.70) 0%,
        rgba(26, 39, 68, 0.80) 50%,
        rgba(26, 39, 68, 0.85) 100%
    );
    padding: 6rem 2rem;
    text-align: center;
}

.p357-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--p357-gold);
    font-size: 3rem;
    margin-bottom: 0.3rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.p357-hero .p357-subhead {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.p357-hero .p357-tagline {
    color: var(--p357-gold);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    margin-top: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Decorative gold line under hero text */
.p357-hero-overlay::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--p357-gold);
    margin: 1.8rem auto 0;
    opacity: 0.7;
}

/* ===========================
   Content Area
   =========================== */
.entry-content {
    max-width: 800px;
    margin: 0 auto;
}

.site-content .ast-container {
    max-width: 1100px;
}

/* Remove Astra's default page title area if still showing */
.ast-page-builder-template .entry-header,
.page .entry-header {
    display: none;
}

/* ===========================
   Info Cards (Home page)
   =========================== */
.p357-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.p357-info-card {
    background: var(--p357-white);
    border: 1px solid rgba(26, 39, 68, 0.1);
    border-top: 4px solid var(--p357-gold);
    border-radius: 4px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(26, 39, 68, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.p357-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 39, 68, 0.12);
}

.p357-info-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--p357-navy);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.p357-info-card p {
    color: var(--p357-charcoal);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ===========================
   CTA Section — full-width breakout
   =========================== */
.p357-cta {
    background-color: var(--p357-navy);
    color: var(--p357-white);
    text-align: center;
    padding: 3.5rem 2rem;
    /* Break out of container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 3rem;
    margin-bottom: -2em;
    border-top: 4px solid var(--p357-gold);
}

.p357-cta p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
}

.p357-cta a.p357-button {
    display: inline-block;
    background-color: var(--p357-gold);
    color: var(--p357-navy);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 36px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.p357-cta a.p357-button:hover {
    background-color: var(--p357-gold-hover);
    color: var(--p357-navy);
    transform: translateY(-1px);
}

/* ===========================
   Officer Roster
   =========================== */
.p357-officers {
    margin: 2rem 0;
    background: var(--p357-white);
    border-radius: 4px;
    padding: 0.5rem 2rem;
    border-top: 4px solid var(--p357-gold);
    box-shadow: 0 2px 12px rgba(26, 39, 68, 0.06);
}

.p357-officer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(26, 39, 68, 0.08);
}

.p357-officer:last-child {
    border-bottom: none;
}

.p357-officer .p357-title {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    color: var(--p357-navy);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.p357-officer .p357-name {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--p357-charcoal);
    font-size: 1.05rem;
}

/* ===========================
   Famous Members Section
   =========================== */
.p357-member-highlight {
    background: var(--p357-white);
    border-left: 4px solid var(--p357-gold);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 8px rgba(26, 39, 68, 0.05);
}

.p357-member-highlight h3 {
    color: var(--p357-navy);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* ===========================
   Events / Meeting Info
   =========================== */
.p357-meeting-info {
    background: var(--p357-white);
    border: 1px solid rgba(26, 39, 68, 0.1);
    border-top: 4px solid var(--p357-gold);
    border-radius: 4px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 12px rgba(26, 39, 68, 0.06);
}

.p357-meeting-info h3 {
    margin-top: 0;
}

.p357-schedule-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.p357-schedule-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(26, 39, 68, 0.08);
    font-size: 1rem;
}

.p357-schedule-list li:last-child {
    border-bottom: none;
}

.p357-schedule-list li strong {
    color: var(--p357-navy);
}

/* ===========================
   Degrees Section
   =========================== */
.p357-degree {
    background: var(--p357-white);
    border-left: 4px solid var(--p357-gold);
    padding: 1.5rem 2rem;
    margin: 1.2rem 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 8px rgba(26, 39, 68, 0.05);
}

.p357-degree h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

/* ===========================
   Contact Page
   =========================== */
.p357-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .p357-contact-grid {
        grid-template-columns: 1fr;
    }
}

.p357-contact-info {
    background: var(--p357-white);
    padding: 2rem;
    border-radius: 4px;
    border-top: 4px solid var(--p357-gold);
    box-shadow: 0 2px 12px rgba(26, 39, 68, 0.06);
}

.p357-contact-info h2 {
    margin-top: 0;
}

.p357-contact-info h2 + p {
    margin-top: 0;
}

/* ===========================
   Contact Form 7 Styling
   =========================== */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(26, 39, 68, 0.2);
    border-radius: 3px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    background: var(--p357-white);
    transition: border-color 0.3s ease;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
    border-color: var(--p357-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 169, 78, 0.2);
}

.wpcf7 input[type="submit"] {
    background-color: var(--p357-gold);
    color: var(--p357-navy);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 36px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpcf7 input[type="submit"]:hover {
    background-color: var(--p357-gold-hover);
}

.wpcf7 label {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    color: var(--p357-navy);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.3rem;
}

.wpcf7 p {
    margin-bottom: 1.2rem;
}

/* ===========================
   Gallery
   =========================== */
.wp-block-gallery {
    margin: 2rem 0;
}

.wp-block-gallery .wp-block-image {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wp-block-gallery .wp-block-image img {
    object-position: center 20%;
}

/* ===========================
   Footer
   =========================== */
.site-footer,
.ast-footer-overlay,
.site-below-footer-wrap,
.ast-builder-footer-grid-columns,
.site-footer .site-below-footer-wrap {
    background-color: var(--p357-navy) !important;
    color: var(--p357-cream) !important;
}

.site-footer a,
.site-below-footer-wrap a {
    color: var(--p357-gold) !important;
}

.site-footer a:hover,
.site-below-footer-wrap a:hover {
    color: var(--p357-gold-hover) !important;
}

.ast-small-footer,
.site-below-footer-wrap .ast-builder-layout-element {
    background-color: var(--p357-navy) !important;
    color: rgba(245, 240, 232, 0.6) !important;
}

.site-footer .ast-footer-copyright {
    color: rgba(245, 240, 232, 0.6) !important;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
}

.ast-above-footer-wrap,
.ast-above-footer-wrap .ast-builder-layout-element {
    background-color: var(--p357-navy) !important;
}

/* ===========================
   Links & Buttons
   =========================== */
a {
    color: var(--p357-gold);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--p357-gold-hover);
}

.entry-content a {
    color: var(--p357-navy);
    text-decoration: underline;
    text-decoration-color: var(--p357-gold);
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: var(--p357-gold);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .p357-hero-overlay {
        padding: 4rem 1.5rem;
    }

    .p357-hero h1 {
        font-size: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .p357-officer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .p357-info-cards {
        grid-template-columns: 1fr;
    }

    .p357-cta {
        padding: 2.5rem 1.5rem;
    }

    .p357-hero {
        margin-bottom: 1.5rem;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.p357-gold-text {
    color: var(--p357-gold);
}

.p357-navy-bg {
    background-color: var(--p357-navy);
}

.p357-divider {
    border: none;
    border-top: 2px solid var(--p357-gold);
    width: 60px;
    margin: 1.5rem auto;
}

/* ===========================
   Astra Overrides
   =========================== */

/* Ensure content area doesn't clip our breakout elements */
#primary,
.ast-primary-entry-content,
.entry-content,
article.page {
    overflow: visible !important;
}

/* Remove any default top padding Astra adds to content */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-page {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ast-separate-container .entry-content {
    padding-top: 0;
}

/* Keep the entry content padded on the sides for non-hero content */
.ast-separate-container .ast-article-single .entry-content,
.ast-separate-container .ast-article-page .entry-content {
    padding-left: 20px;
    padding-right: 20px;
}

/* Remove the white box Astra puts around content in separate container mode */
.ast-separate-container .site-content > .ast-container {
    background: transparent;
}
