/* Reset any potential margin issues */
body {
    margin: 0;
    padding: 0;
}

.main-navigation {
    margin: 0;
    padding: 0;
}

/* Override global section styles that limit width */
#sunday-main-content section p {
    max-width: none !important;
    width: 100% !important;
}

#sunday-main-content section h3 {
    max-width: none !important;
    width: 100% !important;
}

#sunday-main-content section h1,
#sunday-main-content section h2 {
    max-width: none !important;
    width: 100% !important;
}

/* Ensure all text elements in our sections are not constrained */
#sunday-main-content p,
#sunday-main-content h1,
#sunday-main-content h2,
#sunday-main-content h3,
#sunday-main-content h4,
#sunday-main-content h5,
#sunday-main-content h6 {
    max-width: none !important;
}

/* Enhanced Parallax Hero Section */
#sunday-hero.splash-hero--sunday {
    height: 80vh;
    /* Avoid scroll jank from fixed backgrounds */
    background-attachment: scroll;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    background-position-y: 0;
    transition: background-position 0.1s ease-out;
    margin: 0;
    padding: 0;
}

#sunday-hero.splash-hero--sunday::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

#sunday-hero.splash-hero--sunday h1 {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Main Content */
#sunday-main-content.main-content {
    padding: 4rem 2rem;
    background: #f8f9fa;
    margin: 0;
    width: 100%;
}

#sunday-content-container.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#sunday-service-overview.service-overview {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#sunday-main-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

#sunday-subtitle.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

#sunday-service-highlights.service-highlights {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #333;
    background: #f8f9fa;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 2px solid #0078D4;
}

.highlight-item i {
    color: #0078D4;
}

/* Info Grid */
#sunday-info-grid.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0 auto 3rem;
    max-width: 1000px;
    width: 100%;
    justify-items: stretch;
}

#sunday-info-grid .info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #0078D4;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

#sunday-info-grid .info-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.schedule-item:last-child {
    border-bottom: none;
}

.time {
    font-weight: bold;
    color: #0078D4;
    min-width: 80px;
}

.activity {
    color: #666;
    flex: 1;
    text-align: right;
}

.location-info p {
    margin-bottom: 0.75rem;
    color: #333;
}

.location-detail {
    font-size: 0.9rem;
    color: #888;
}

.parking-info {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
}

.parking-info i {
    color: #0078D4;
    margin-right: 0.5rem;
}

.class-locations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.class-item:last-child {
    border-bottom: none;
}

.age {
    font-weight: bold;
    color: #0078D4;
    min-width: 100px;
}

.location {
    color: #666;
    flex: 1;
    text-align: right;
    font-size: 0.9rem;
}

.study-info {
    text-align: center;
}

.study-info p {
    margin: 0.5rem 0;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
}

/* Map Section */
#sunday-map-section.map-section {
    margin: 0 auto 3rem;
    text-align: center;
    max-width: 1000px;
    width: 100%;
}

#sunday-map-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.map {
    width: 100%;
    height: 100%;
    border: none;
}

/* Fellowship Section */
#sunday-fellowship-section.fellowship-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 3rem;
    text-align: center;
    max-width: 1000px;
    width: 100%;
}

#sunday-fellowship-section.fellowship-section p {
    max-width: none !important;
    width: 100% !important;
}

#sunday-fellowship-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.fellowship-section p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Ongoing Events */
#sunday-ongoing-events.ongoing-events {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
}

#sunday-ongoing-events.ongoing-events p,
#sunday-ongoing-events.ongoing-events h3 {
    max-width: none !important;
    width: 100% !important;
}

#sunday-ongoing-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #0078D4;
}

.event-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.event-details {
    color: #666;
    font-size: 0.95rem;
}

/* Desktop Specific Improvements */
@media (min-width: 769px) {
    #sunday-info-grid.info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    #sunday-service-highlights.service-highlights {
        gap: 3rem;
    }

    .highlight-item {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #sunday-hero.splash-hero--sunday {
        height: 60vh;
        background-attachment: scroll;
    }

    #sunday-hero.splash-hero--sunday h1 {
        font-size: 2.5rem;
    }

    #sunday-main-content.main-content {
        padding: 2rem 1rem;
    }

    #sunday-main-title {
        font-size: 2rem;
    }

    .service-highlights {
        flex-direction: column;
        gap: 1rem;
    }

    #sunday-info-grid.info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .schedule-item,
    .class-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .time,
    .age {
        min-width: auto;
    }

    .activity,
    .location {
        text-align: left;
    }

    .map-container {
        height: 300px;
    }
}