/*
Theme Name: Twenty Twenty-Five Child - America 250
Description: Child theme of Twenty Twenty-Five for America 250 Guilford County
Template: twentytwentyfive
Version: 1.0
*/

/* Basic Typography */
body {
    font-family: Georgia, serif;
}

h2, h3, h4, h5, h6 {
    color: #bd1e2d;
}

/* Site Title Colors - Different for Homepage vs Internal Pages */
.wp-block-site-title {
    color: #262262; /* Navy blue for homepage */
}

body:not(.home) .wp-block-site-title {
    color: #ffffff; /* White on internal pages */
}

/* More specific homepage header targeting */
body.home .wp-block-site-title {
    color: #262262;
}

.home .wp-block-site-title {
    color: #262262;
}

/* Logo Management - Different Logos for Homepage vs Internal Pages */
.home .custom-logo {
    content: url('https://america250guilford.com/wp-content/uploads/2025/09/America250GuilfordLogo.png');
}

.page .custom-logo {
    content: url('https://america250guilford.com/wp-content/uploads/2025/09/America-250-Guilford-Logo-White.png');
    max-height: 80px;
    width: auto;
}

/* Page Layout and Content Styling */
.wp-block-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.7;
}

.wp-block-post-content p {
    margin-bottom: 24px;
    font-size: 1.1em;
}

.wp-block-post-content .wp-block-heading {
    margin-top: 50px;
    margin-bottom: 25px;
    padding: 20px 0;
    border-bottom: 2px solid #bd1e2d;
}

/* Fix Title Alignment Issue */
.is-layout-constrained {
    margin-left: 0;
    padding-left: 0;
}

.wp-container-core-group-is-layout-constrained {
    margin-left: 0;
    padding-left: 0;
}

/* Content Text Colors */
.wp-site-blocks p {
    color: #262262;
    line-height: 1.6;
}

.wp-block-group p {
    color: #262262;
    font-size: 1.1em;
}

/* Ensure White Background for Main Content */
.wp-site-blocks {
    background: #ffffff;
}

/* America 250 Countdown Styling */
.america250-countdown {
    text-align: center;
    background: rgb(255, 255, 255);
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 20px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 400px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.countdown-number {
    font-size: 4.5em;
    font-weight: bold;
    color: #bd1e2d;
    line-height: 1;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #262262;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.countdown-subtitle {
    font-size: 1em;
    color: #262262;
    font-style: italic;
}

.countdown-time {
    font-size: 1.5em;
    color: #262262;
    font-weight: bold;
    margin: 10px 0;
}

/* Homepage Featured Events Section */
.events-section {
    background: rgb(85, 139, 208);
    background: rgba(85, 139, 208, 0.2);
    padding: 40px 20px;
    margin: 20px 0;
}

.wp-block-columns {
    background: rgb(85, 139, 208);
    background: rgba(85, 139, 208, 0.2);
    padding: 40px 20px;
}

.wp-block-column {
    border: 1px solid rgb(189, 30, 45);
    border: 1px solid rgba(189, 30, 45, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    background: rgb(255, 255, 255);
    background: rgba(255, 255, 255, 0.7);
}

/* Navigation Styling */
.wp-block-navigation a {
    color: #262262;
}

.wp-block-navigation a:hover {
    color: #bd1e2d;
}

/* Mission Statement Section */
.mission-section {
    background: #ffffff;
    padding: 40px 20px;
    text-align: center;
}

.mission-section p {
    color: #262262;
    font-size: 1.2em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* About Page Alternate Section Backgrounds */
.about-section {
    padding: 40px 0;
    margin: 30px 0;
}

.about-section:nth-child(even) {
    background: rgb(85, 139, 208);
    background: rgba(85, 139, 208, 0.1);
    padding: 40px 20px;
    border-radius: 8px;
}

/* Footer Styling */
footer,
.wp-block-template-part {
    background: #262262;
    background-color: #262262;
    color: #ffffff;
    padding: 15px 20px;
    text-align: center;
}

footer p,
.wp-block-template-part p,
body footer p,
body .wp-block-template-part p,
.wp-site-blocks footer p,
.wp-site-blocks .wp-block-template-part p,
.has-small-font-size,
.wp-block-group.is-layout-flex p,
.wp-block-group.is-layout-flex .has-small-font-size,
div.wp-block-group.is-layout-flex p {
    font-size: 0.7rem;
    color: #ffffff;
    margin: 5px 0;
    line-height: 1.4;
}

footer a,
.wp-block-template-part a {
    color: #558bd0;
    text-decoration: none;
}

footer a:hover,
.wp-block-template-part a:hover {
    color: #ffffff;
}

/* Page title alignment fix without !important */
.wp-block-post-title {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    position: relative;
    left: 0;
    color: #262262;
    font-size: 2em;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Target more specifically */
body.page .wp-block-post-title {
    margin-left: 0;
    padding-left: 0;
}

/* Override any container margins */
.entry-content .wp-block-post-title {
    margin-left: 0;
    text-align: left;
}

/* More aggressive spacing fixes */
.wp-block-post-content {
    margin-top: 0;
    padding-top: 0;
}

/* Target any containers between title and content */
.entry-header {
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-content {
    margin-top: 0;
    padding-top: 0;
}

/* Target WordPress core group blocks that might be adding space */
.wp-block-group {
    margin-top: 0;
    padding-top: 0;
}

/* Zero out any spacing on the first content element */
.wp-block-post-content > *:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Section headings stay red with underlines */
.wp-block-post-content .wp-block-heading {
    color: #bd1e2d;
    border-bottom: 2px solid #bd1e2d;
    margin-top: 30px;
    margin-bottom: 15px;
    padding: 15px 0;
}

/* Multiple ways to target homepage title */
.front-page .wp-block-site-title {
    color: #262262;
}

/* Tighten spacing between title and navigation */
.wp-block-site-title {
    margin-bottom: 10px;
}

/* Reduce navigation top margin */
.wp-block-navigation {
    margin-top: 0;
    padding-top: 0;
}

/* Target the header container */
.wp-site-blocks header {
    padding-bottom: 10px;
}

/* Style images in content */
.wp-block-image {
    margin: 30px 0;
    text-align: center;
}

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

/* Reduce paragraph spacing */
.wp-block-post-content p {
    margin-bottom: 18px;
}

/* Tighten up general block spacing */
.wp-block-post-content > * {
    margin-top: 0;
    margin-bottom: 20px;
}

/* More realistic flag waving */
@keyframes flagWave {
    0%, 100% { 
        transform: translateY(0px) scaleY(1); 
    }
    20% { 
        transform: translateY(-1px) scaleY(1.002); 
    }
    40% { 
        transform: translateY(1px) scaleY(0.998); 
    }
    60% { 
        transform: translateY(-0.5px) scaleY(1.001); 
    }
    80% { 
        transform: translateY(0.5px) scaleY(0.999); 
    }
}

/* Apply with slower, more natural timing */
.wp-block-cover {
    animation: flagWave 6s ease-in-out infinite;
}

/* Dropdown styling for all pages */
body.home .wp-block-navigation .wp-block-navigation__submenu-container,
body.page .wp-block-navigation .wp-block-navigation__submenu-container,
.wp-block-navigation .wp-block-navigation__submenu-container {
    background: #ffffff;
    border: 1px solid #bd1e2d;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body.home .wp-block-navigation .wp-block-navigation__submenu-container a,
body.page .wp-block-navigation .wp-block-navigation__submenu-container a,
.wp-block-navigation .wp-block-navigation__submenu-container a {
    color: #262262;
    padding: 10px 15px;
    text-decoration: none;
}

body.home .wp-block-navigation .wp-block-navigation__submenu-container a:hover,
body.page .wp-block-navigation .wp-block-navigation__submenu-container a:hover,
.wp-block-navigation .wp-block-navigation__submenu-container a:hover {
    color: #bd1e2d;
    background: rgb(85, 139, 208);
    background: rgba(85, 139, 208, 0.1);
}

/* COMPLETE HISTORICAL FACTS SLIDER FIX */
.historical-facts-slider {
    position: relative;
    height: auto;
    min-height: 350px; /* Increase to fit text + padding + 300px image */
    overflow: hidden;
    width: 100%;
    margin-top: 0;
}

.fact-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    padding: 15px;
    text-align: center;
}

.fact-slide.active {
    opacity: 1;
}

.fact-slide p {
    text-align: left;
    width: 100%;
    margin: 0 0 1px 0; /* Minimal bottom spacing */
}

.fact-slide img {
    max-width: 90%;
    max-height: 330px; /* Reduce to fit within container */
    height: auto;
    width: auto;
    margin: 0 auto;
    display: block;
}



/* COMPLETE SPONSOR LOGO SLIDER FIX */
.sponsor-logos-slider {
    position: relative;
    height: 300px;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
}

.sponsor-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.sponsor-slide img {
    max-width: 95%; /* Increase from 85% */
    max-height: 300px; /* Increase from 120px */
    width: auto;
    height: auto;
    filter: grayscale(10%) opacity(0.95);
    transition: filter 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
}

.sponsor-slide a {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.sponsor-slide a:hover {
    transform: scale(1.05);
}

.sponsor-slide img:hover,
.sponsor-slide a:hover img {
    filter: grayscale(0%) opacity(1);
}

/* Loading indicator */
.sponsor-logos-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;

    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.sponsor-logos-slider.loaded::before {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .sponsor-logos-slider {
        height: 300px;
        padding: 5px;
    }
    
    .sponsor-slide {
        padding: 5px;
    }
    
    .sponsor-slide img {
        max-width: 100%;
        max-height: 80px;
    }
    
    .fact-slide img {
        max-width: 80%;
    }
}