/**
 * WellSpring Theme Main Styles
 *
 * Core theme styles for header, navigation, search, footer and general layout.
 * Archive headers are now handled by Elementor Page Builder.
 *
 * @package WellSpring
 * @since 1.0.0
 * @version 1.3.1
 */

/* Header Styles */
.site-header {
    background: var(--ws-background);
    border-bottom: 1px solid var(--ws-border);
    padding: var(--ws-spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    text-decoration: none;
    color: var(--ws-text);
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ws-text-light);
    margin-left: var(--ws-spacing-sm);
}

/* Navigation Styles */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--ws-spacing-xs);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-toggle-text {
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    width: 20px;
}

.menu-toggle-icon span {
    height: 2px;
    background: var(--ws-text);
    margin: 1px 0;
    transition: var(--ws-transition);
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--ws-spacing-md);
}

.primary-menu a {
    text-decoration: none;
    color: var(--ws-text);
    font-weight: 500;
    transition: var(--ws-transition);
    padding: var(--ws-spacing-xs) 0;
}

.primary-menu a:hover {
    color: var(--ws-primary);
}

/* Search Styles */
.header-search {
    margin-left: var(--ws-spacing-sm);
}

.search-toggle {
    background: none;
    border: none;
    padding: var(--ws-spacing-xs);
    cursor: pointer;
    color: var(--ws-text);
    transition: var(--ws-transition);
}

.search-toggle:hover {
    color: var(--ws-primary);
}

.search-container {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--ws-background);
    border: 1px solid var(--ws-border);
    border-radius: 4px;
    padding: var(--ws-spacing-sm);
    min-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Main Content */
.site-main {
    padding: var(--ws-spacing-xl) 0;
}

.posts-container {
    display: grid;
    gap: var(--ws-spacing-xl);
}

/* Post Styles */
.post {
    border-bottom: 1px solid var(--ws-border);
    padding-bottom: var(--ws-spacing-lg);
    margin-bottom: var(--ws-spacing-lg);
}

.post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.entry-header {
    margin-bottom: var(--ws-spacing-md);
}

.entry-title {
    margin: 0 0 var(--ws-spacing-sm) 0;
    font-size: 2rem;
    line-height: 1.2;
}

.entry-title a {
    text-decoration: none;
    color: var(--ws-text);
}

.entry-title a:hover {
    color: var(--ws-primary);
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--ws-text-light);
    margin-bottom: var(--ws-spacing-sm);
}

.entry-meta a {
    color: var(--ws-text-light);
    text-decoration: none;
}

.entry-meta a:hover {
    color: var(--ws-primary);
}

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

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

.more-link {
    display: inline-block;
    margin-top: var(--ws-spacing-sm);
    color: var(--ws-primary);
    text-decoration: none;
    font-weight: 500;
}

.more-link:hover {
    color: var(--ws-secondary);
}

/* Sidebar Styles */
.sidebar {
    margin-top: var(--ws-spacing-xl);
}

.widget {
    margin-bottom: var(--ws-spacing-xl);
}

.widget-title {
    margin: 0 0 var(--ws-spacing-md) 0;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--ws-primary);
    padding-bottom: var(--ws-spacing-xs);
}

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

.widget li {
    margin-bottom: var(--ws-spacing-xs);
}

.widget a {
    text-decoration: none;
    color: var(--ws-text);
}

.widget a:hover {
    color: var(--ws-primary);
}

/* Footer Styles */
.site-footer {
    background: var(--ws-accent);
    border-top: 1px solid var(--ws-border);
    margin-top: var(--ws-spacing-xl);
}

.footer-widgets {
    padding: var(--ws-spacing-xl) 0;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--ws-spacing-xl);
}

.footer-widget-area .widget-title {
    font-size: 1.125rem;
}

.site-info {
    background: var(--ws-text);
    color: var(--ws-background);
    padding: var(--ws-spacing-md) 0;
}

.site-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ws-spacing-md);
}

.copyright {
    font-size: 0.875rem;
}

.copyright a {
    color: var(--ws-background);
}

.theme-credit {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.footer-navigation .footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--ws-spacing-md);
}

.footer-navigation a {
    color: var(--ws-background);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-navigation a:hover {
    opacity: 0.8;
}

.social-links-list {
    display: flex;
    gap: var(--ws-spacing-sm);
}

.social-link {
    color: var(--ws-background);
    transition: var(--ws-transition);
}

.social-link:hover {
    opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--ws-spacing-md);
    right: var(--ws-spacing-md);
    background: var(--ws-primary);
    color: var(--ws-background);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: var(--ws-transition);
    z-index: 100;
}

.back-to-top:hover {
    background: var(--ws-secondary);
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    margin: var(--ws-spacing-xl) 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: var(--ws-spacing-xs) var(--ws-spacing-sm);
    margin: 0 2px;
    text-decoration: none;
    color: var(--ws-text);
    border: 1px solid var(--ws-border);
    border-radius: 4px;
    transition: var(--ws-transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--ws-primary);
    color: var(--ws-background);
    border-color: var(--ws-primary);
}

/* Comments */
.comments-area {
    margin-top: var(--ws-spacing-xl);
    padding-top: var(--ws-spacing-xl);
    border-top: 1px solid var(--ws-border);
}

.comments-title {
    margin: 0 0 var(--ws-spacing-lg) 0;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: var(--ws-spacing-lg);
    padding: var(--ws-spacing-md);
    background: var(--ws-accent);
    border-radius: 4px;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: var(--ws-spacing-sm);
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--ws-text-light);
    margin-bottom: var(--ws-spacing-sm);
}

.comment-content {
    line-height: 1.6;
}

.comment-form {
    margin-top: var(--ws-spacing-lg);
}

.comment-form p {
    margin-bottom: var(--ws-spacing-md);
}

.comment-form label {
    display: block;
    margin-bottom: var(--ws-spacing-xs);
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="password"],
.comment-form input[type="tel"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: var(--ws-spacing-sm);
    border: 1px solid var(--ws-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form input[type="submit"] {
    background: var(--ws-primary);
    color: var(--ws-background);
    border: none;
    padding: var(--ws-spacing-sm) var(--ws-spacing-lg);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--ws-transition);
}

.comment-form input[type="submit"]:hover {
    background: var(--ws-secondary);
}

/* Responsive Design */
@media (max-width: 767px) {
    .site-header .container {
        flex-direction: column;
        gap: var(--ws-spacing-sm);
    }

    .menu-toggle {
        display: flex;
    }

    .primary-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--ws-accent);
        padding: var(--ws-spacing-sm);
        border-radius: 4px;
        margin-top: var(--ws-spacing-sm);
    }

    .primary-menu.is-open {
        display: flex;
    }

    .primary-menu a {
        padding: var(--ws-spacing-sm);
        border-bottom: 1px solid var(--ws-border);
    }

    .primary-menu li:last-child a {
        border-bottom: none;
    }

    .site-info-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-navigation .footer-menu {
        flex-direction: column;
        text-align: center;
    }

    .search-container {
        position: static;
        margin-top: var(--ws-spacing-sm);
        min-width: auto;
    }
}
