/*
Theme Name: Morning Star Zen Sangha
Theme URI: https://morningstarzensangha.org
Author: Morning Star Zen Sangha
Author URI: https://morningstarzensangha.org
Description: A custom WordPress theme for Morning Star Zen Sangha meditation group
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: morningstar-zen
*/

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

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 21px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    padding: 30px 0 0;
    border-bottom: 1px solid #ddd;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

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

.site-title {
    font-size: 64px;
    font-weight: normal;
    color: #222;
    margin: 0;
}

.site-title a {
    color: #222;
    text-decoration: none;
}

/* Navigation Styles */
.main-navigation {
    width: 100%;
    margin-top: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    background-color: transparent;
    padding: 8px 0;
    border-radius: 0;
    border-top: 1px solid #ddd;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 8px 18px;
    color: #333;
    text-decoration: none;
    background-color: transparent;
    border: none;
    border-radius: 0;
    font-size: 21px;
    transition: color 0.2s;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background-color: transparent;
    color: #000;
    font-weight: bold;
}

/* Dropdown Submenu */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-width: 220px;
    z-index: 1000;
    list-style: none;
    padding: 5px 0;
    margin-top: 2px;
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-menu .sub-menu li a:hover {
    background-color: #f5f5f5;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

/* Main Content Area */
.site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-area {
    width: 100%;
}

/* Two-column layout with sidebar */
.content-area.with-sidebar {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-area.with-sidebar .site-main {
    flex: 1;
    min-width: 0; /* prevents flex blowout with wide content */
}

/* Sidebar */
#secondary.widget-area {
    width: 280px;
    flex-shrink: 0;
}

#secondary .widget {
    margin-bottom: 30px;
}

#secondary .widget-title {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8B4513;
    color: #333;
}

/* Collapse to single column on small screens */
@media screen and (max-width: 768px) {
    .content-area.with-sidebar {
        flex-direction: column;
    }

    #secondary.widget-area {
        width: 100%;
    }
}

.entry-header h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.entry-content {
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.entry-content h3 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #333;
}

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

.entry-content img {
    margin: 20px 0;
    display: block;
}

.entry-content ul,
.entry-content ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.entry-content li {
    margin-bottom: 8px;
}

/* Welcome Section Specific Styles */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Calendar Embed */
.calendar-container {
    margin: 30px 0;
    text-align: center;
}

.calendar-container iframe {
    max-width: 100%;
    border: 1px solid #ddd;
}

/* Footer Styles */
.site-footer {
    background-color: #f5f5f5;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

/* Buttons and Links */
.button,
.wp-block-button__link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.button:hover,
.wp-block-button__link:hover {
    background-color: #0052a3;
    text-decoration: none;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
    }

    .site-title {
        font-size: 28px;
    }

    .menu-toggle {
        display: block;
        width: 100%;
    }

    .main-navigation {
        width: 100%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
    }

    .nav-menu.toggled {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .nav-menu .sub-menu {
        position: static;
        display: none;
        border: none;
        margin-top: 0;
        padding-left: 20px;
    }

    .nav-menu li.menu-item-has-children > a::after {
        content: " ▼";
        font-size: 12px;
    }

    .nav-menu li.menu-item-has-children.toggled > .sub-menu {
        display: block;
    }

    .entry-header h1 {
        font-size: 26px;
    }
}

/* WordPress Core Alignment Classes */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
    font-family: inherit;
}

input[type="submit"],
button[type="submit"] {
    background-color: #0066cc;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: #0052a3;
}

/* Contact Form 7 Specific */
.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 15px;
}

.wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

.wpcf7-response-output {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

table tr:hover {
    background-color: #f9f9f9;
}

/* Blockquotes */
blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid #0066cc;
    background-color: #f9f9f9;
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Content Blocks */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #0066cc;
    padding: 20px;
    margin: 20px 0;
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 20px 0;
}

/* Image Captions */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 14px;
    font-style: italic;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* Gallery */
.gallery {
    margin: 20px 0;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
    margin: 0 0 15px;
}

.gallery-columns-2 .gallery-item {
    max-width: 50%;
}

.gallery-columns-3 .gallery-item {
    max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
    max-width: 25%;
}

/* Pagination */
.pagination,
.posts-navigation,
.post-navigation {
    margin: 40px 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 10px;
    width: 100%;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: #e8e8e8;
}

/* Search Form Styling */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 20px 0;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    border-right: none;
}

.search-submit {
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    border: 1px solid #0066cc;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-submit:hover {
    background-color: #0052a3;
}

/* Widget Styling */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 8px;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

/* Print Styles */
@media print {
    .main-navigation,
    .menu-toggle,
    .site-footer,
    .edit-link,
    .comment-respond {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
    }
}
