/* Main Content and Sidebar Layout Fix */

/* Main container with sidebar */
.site-main,
#primary,
.content-area {
    padding: 0 !important;
    margin: 0 !important;
}

/* Content with sidebar layout */
.has-sidebar .content-area,
.content-sidebar .content-area {
    display: flex !important;
    gap: 20px !important;
    padding: 20px !important;
    max-width: 100% !important;
}

/* Main content column */
#primary,
.primary-content,
article,
.hentry {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Sidebar column */
#secondary,
.widget-area,
.sidebar {
    background: rgba(26, 26, 46, 0.6) !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin: 0 !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* Entry content inside articles */
.entry-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Page and post titles */
.entry-title,
.page-title {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

/* Widget styling */
.widget {
    background: transparent !important;
    padding: 0 0 20px 0 !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
}

.widget:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.widget-title {
    color: #d4af37 !important;
    font-size: 1.3rem !important;
    margin-bottom: 15px !important;
}

/* Search widget */
.widget_search {
    width: 100% !important;
}

.widget_search form {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: stretch !important;
}

.widget_search input[type="search"],
.widget_search input[type="text"] {
    flex: 1 1 auto !important;
    padding: 12px !important;
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #f4e4bc !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    min-width: 0 !important;
    width: 100% !important;
}

.widget_search button,
.widget_search input[type="submit"] {
    padding: 12px 24px !important;
    background: #d4af37 !important;
    color: #0a0a0a !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
}

.widget_search button:hover,
.widget_search input[type="submit"]:hover {
    background: #f4e4bc !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4) !important;
}

/* Recent posts widget */
.widget_recent_entries ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget_recent_entries li {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1) !important;
}

.widget_recent_entries a {
    color: #f4e4bc !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.widget_recent_entries a:hover {
    color: #d4af37 !important;
}

/* Archive and category widgets */
.widget_archive ul,
.widget_categories ul {
    list-style: none !important;
    padding: 0 !important;
}

.widget_archive li,
.widget_categories li {
    margin-bottom: 8px !important;
}

/* Remove any default WordPress spacing */
body.page .site-content,
body.single .site-content,
body.archive .site-content {
    padding: 0 !important;
}

/* Content wrapper for pages with sidebar */
.content-sidebar-wrap,
.wrap {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .has-sidebar .content-area,
    .content-sidebar .content-area {
        flex-direction: column !important;
        padding: 15px !important;
    }
    
    #secondary,
    .widget-area,
    .sidebar {
        width: 100% !important;
        margin-top: 20px !important;
    }
}