/**
 * Layout Styles
 * 
 * @package ChildTheme_Clean
 */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Remove empty space after footer on all screen sizes */
.site-footer {
    margin-bottom: 0 !important;
}

/* Ensure body doesn't have excessive height */
body {
    overflow-x: hidden;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.site-header {
    background-color: #1F2937;
    color: #fff;
    padding: 1rem 0;
}

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

.site-branding .site-title a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: #fff;
}

.header-search {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form .search-field {
    padding: 0.5rem 1rem;
    border: 1px solid #374151;
    border-radius: 0.25rem;
    background-color: #111827;
    color: #fff;
    font-size: 0.875rem;
    min-width: 200px;
}

.search-form .search-field::placeholder {
    color: #9CA3AF;
}

.search-form .search-field:focus {
    outline: none;
    border-color: #3B82F6;
}

.search-form .search-submit {
    padding: 0.5rem 1rem;
    background-color: #3B82F6;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form .search-submit:hover {
    background-color: #2563EB;
}

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

.site-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Completely disable padding when hero section exists - Multiple approaches for maximum compatibility */

/* Method 1: Using body class (most reliable) - Disable ALL padding */
body.has-hero-section .site-content,
body.has-hero-section #content {
    padding: 0 !important;
    padding-top: 0 !important;
}

/* Method 2: Using :has() selector (modern browsers) - Disable ALL padding */
.site-content:has(.hero-section),
#content:has(.hero-section),
.site-content:has(> .hero-section),
#content:has(> .hero-section),
.site-content:has(> .hero-section:first-child),
#content:has(> .hero-section:first-child) {
    padding: 0 !important;
    padding-top: 0 !important;
}

/* Method 3: Additional specific override with higher specificity */
body .site-content:has(.hero-section),
body #content:has(.hero-section),
body .site-content:has(> .hero-section),
body #content:has(> .hero-section) {
    padding: 0 !important;
    padding-top: 0 !important;
}

/* Method 4: Fallback for browsers without :has() support - use negative margin */
.site-content>.hero-section:first-child,
#content>.hero-section:first-child {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.site-footer {
    background-color: #1F2937;
    color: #fff;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-navigation a {
    color: #fff;
}

.site-info {
    font-size: 0.875rem;
    color: #9CA3AF;
}