/*
Theme Name: Spruce Hill Community Association
Description: A modernized version of the existing SHCA website design
Version: 1.0
Author: Custom Theme
*/

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Color Variables (Based on Current Site) */
:root {
    --header-dark: #404040;
    --primary-green: #4a7c59;
    --active-green: #6b9b6b;
    --donate-brown: #8B4513;
    --light-gray: #f5f5f5;
    --sidebar-gray: #e8e8e8;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
}

/* Header Styles - Matching Current Design */
.site-header {
    background-color: var(--header-dark);
    padding: 8px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.site-logo img {
    height: 75px;
    width: auto;
}

/* Navigation - Horizontal like current site */
.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 16px;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    border-radius: 3px;
    margin: 0 1px;
    transition: background-color 0.3s ease;
}

.main-navigation a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Active/current page styling */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-page-ancestor > a {
    background-color: var(--active-green);
}

/* Donate button special styling */
.main-navigation .donate-link a {
    background-color: var(--donate-brown);
}

.main-navigation .donate-link a:hover {
    background-color: #A0522D;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
}

/* Main Content Container */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    min-height: 500px;
}

/* Header Photo - Like Current Site */
.header-photo {
    width: 100%;
    height: 180px;
    background-image: url('images/headerphoto.jpg');
    background-size: cover;
    background-position: center;
    background-color: var(--sidebar-gray);
}

/* Two Column Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
}

.content-area {
    padding: 25px 30px;
}

/* Page Headers */
.page-header {
    margin-bottom: 20px;
}

.page-title,
.entry-title {
    color: var(--primary-green);
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: strong;
}

/* Content Styling */
.page-content,
.entry-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
}

.page-content p,
.entry-content p {
    margin-bottom: 15px;
}

.page-content h2,
.entry-content h2 {
    color: var(--primary-green);
    font-size: 18px;
    margin: 25px 0 15px 0;
    font-weight: bold;
}

.page-content h3,
.entry-content h3 {
    color: var(--primary-green);
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: bold;
}

/* Links - Matching current site green */
.page-content a,
.entry-content a {
    color: var(--primary-green);
    text-decoration: underline;
}

.page-content a:hover,
.entry-content a:hover {
    color: var(--active-green);
}

/* Committee Lists - Like current site */
.committee-list {
    list-style: none;
    margin: 20px 0;
}

.committee-list li {
    margin-bottom: 8px;
}

.committee-list a {
    color: var(--primary-green);
    text-decoration: underline;
    font-size: 14px;
}

.committee-list a:hover {
    color: var(--active-green);
}

/* Thank You Sections */
.thank-you-section {
    background-color: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid var(--primary-green);
}

.thank-you-section h2 {
    color: var(--primary-green);
    font-size: 18px;
    margin-bottom: 15px;
}

/* Sponsor Tables */
.sponsor-table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

.sponsor-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    vertical-align: top;
}

/* Sidebar Image Widget */
.sidebar-image-widget {
    padding: 0 !important;
    margin-bottom: 20px;
}

.sidebar-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Sidebar - Matching current design */
.sidebar {
    background-color: var(--sidebar-gray);
    padding: 20px 15px;
}

.widget {
    background-color: var(--white);
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.widget-title {
    color: var(--primary-green);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--active-green);
}

.widget p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.widget ul {
    list-style: none;
    font-size: 13px;
}

.widget li {
    padding: 3px 0;
    border-bottom: 0px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--primary-green);
    text-decoration: underline;
}

.widget a:hover {
    color: var(--active-green);
}

/* Event Styling */
.event-card {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-green);
}

.event-card h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 14px;
}

.event-card p {
    font-size: 12px;
    margin-bottom: 3px;
}

/* Buttons - Simple styling like current site */
.btn {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--active-green);
    color: var(--white);
}

/* Footer - Simple */
.site-footer {
    background-color: var(--header-dark);
    color: var(--white);
    padding: 25px 0 15px 0;
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
}

.footer-bottom {
    color: #ccc;
}

/* Image Styling */
.wp-block-image img,
.page-content img,
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* Neighborhood Photos Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.photo-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Homepage Blog Posts - Improved Styling */
.latest-posts {
    margin: 30px 0;
}

.latest-posts h2 {
    color: var(--primary-green);
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--active-green);
}

.post-item {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-item:last-child {
    margin-bottom: 0;
}

.post-content h3 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.3;
}

.post-content h3 a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
}

.post-content h3 a:hover {
    color: var(--active-green);
    text-decoration: underline;
}

.post-meta {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 12px;
    font-style: italic;
}

.post-excerpt,
.post-full-content {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.post-excerpt p,
.post-full-content p {
    margin-bottom: 8px;
}

.post-item .btn {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.post-item .btn:hover {
    background-color: var(--active-green);
    color: var(--white);
}

/* When posts have featured images */
.post-item.has-thumbnail {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.post-thumbnail {
    flex-shrink: 0;
}

.post-thumbnail img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.post-item.has-thumbnail .post-content {
    flex: 1;
}

/* Mobile responsive for blog posts */
@media (max-width: 768px) {
    .post-item.has-thumbnail {
        flex-direction: column;
        gap: 12px;
    }
    
    .post-thumbnail img {
        width: 100%;
        height: 120px;
    }
    
    .post-item {
        padding: 15px;
    }
    
    .post-content h3 {
        font-size: 16px;
    }
}

/* Entry Meta for Posts */
.entry-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.entry-meta span {
    margin-right: 15px;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 200px;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 14px;
}

.post-navigation a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .site-logo {
        margin-bottom: 10px;
    }

    .site-logo img {
        height: 60px;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--header-dark);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation a {
        padding: 12px 20px;
        border-radius: 0;
        margin: 0;
        border-bottom: 1px solid #555;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 20px;
    }

    .sidebar {
        padding: 15px;
    }

    .header-photo {
        height: 120px;
    }

    .page-title,
    .entry-title {
        font-size: 18px;
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .site-main {
        margin: 5px;
    }

    .header-container {
        padding: 8px 15px;
    }

    .content-area {
        padding: 15px;
    }

    .sidebar {
        padding: 10px;
    }

    .widget {
        padding: 12px;
    }
}

/* WordPress Block Editor Support */
.wp-block-group {
    margin: 20px 0;
}

.wp-block-columns {
    margin: 20px 0;
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--active-green);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer {
        display: none;
    }
    
    .site-main {
        box-shadow: none;
        max-width: 100%;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}