/* Global styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Logo styles */
.logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.homepage-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 0;
    margin-top: -190px;
}

.homepage-content .logo-container {
    text-align: center;
    margin: 0 auto 30px;
}

.homepage-content .logo {
    max-width: 300px;
}

.search-container, .search-box-container {
    width: 100%;
}

.homepage-content .search-container {
    max-width: 584px;
    margin: 0 auto;
}

/* Site header */
.site-header {
    padding: 15px 0;
    background-color: #fff;
}

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

.logo-link {
    display: block;

}

.search-box-container {
    flex-grow: 1;
    max-width: 692px;
}

/* Search results page */
.search-page .site-main {
    padding: 20px 0;
    min-height: 500px;
}

.results-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.results-column {
    min-height: 500px;
}

.sidebar-column {
    padding-top: 10px;
}

/* Related searches styles */
.related-searches {
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.related-searches-title {
    font-size: 18px;
    font-weight: normal;
    color: #666;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.related-searches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-search-item {
    color: #1a0dab;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    padding: 5px 0;
    display: block;
}

.related-search-item:hover {
    text-decoration: underline;
}

/* Footer styles - Google-like */
.site-footer {
    padding: 15px 0;
    background-color: #f2f2f2;
    border-top: 1px solid #e4e4e4;
    margin-top: auto;
    color: #70757a;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-link {
    color: #70757a;
    text-decoration: none;
    font-size: 14px;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: #70757a;
    font-size: 14px;
}

/* Google CSE Overrides */
.gsc-control-cse {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.gsc-search-box {
    margin-bottom: 0 !important;
    max-width: 100% !important;
}

/* Google-like search box */
.gsc-input-box {
    border-radius: 24px !important;
    border: 1px solid #dfe1e5 !important;
    box-shadow: 0 2px 8px 1px rgba(64, 60, 67, .24) !important;
    border-color: transparent !important;
    height: 44px !important;
    width: 100% !important;
    max-width: 584px !important;
    margin: 0 auto !important;
    position: relative !important;
}

.gsc-input-box:hover {
    box-shadow: 0 1px 6px rgba(32,33,36,.28) !important;
    border-color: rgba(223,225,229,0) !important;
}

/* Position the search input correctly */
.gsib_a {
    padding: 10px 16px 10px 45px !important;
    width: calc(100% - 60px) !important;
}

/* Hide default search button */
.gsc-search-button, .gsc-search-button-v2 {
    display: none !important;
}

/* Remove placeholder styling */
input.gsc-input::placeholder {
    opacity: 0 !important;
    color: transparent !important;
}

/* Hide Google search elements */
.gsc-cursor-box, .gsc-results .gsc-cursor-box, .gsc-cursor, .gsc-results .gsc-cursor,
.gcsc-find-more-on-google, .gcsc-find-more-on-google-root, .gcsc-more-maybe-branding-root,
.gcsc-branding, .gsc-branding, .gcsc-branding-text, .gsc-branding-text,
.gcsc-branding-img-noclear, .gsc-branding-img-noclear, .gcsc-branding-img, .gsc-branding-img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Custom pagination styling */
.custom-pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 10px 0;
}

.custom-pagination a,
.custom-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin-right: 5px;
    color: #4285f4;
    text-decoration: none;
}

.custom-pagination span.current {
    color: #000;
    font-weight: bold;
}

.custom-pagination a:hover {
    text-decoration: underline;
}

/* Desktop/Mobile visibility control */
.mobile-related-keywords-section {
    display: none;
}

.desktop-related-searches {
    display: block;
}

/* Search box wrapper for positioning */
.search-wrapper {
    position: relative;
    max-width: 584px;
    margin: 0 auto;
    width: 100%;
}

/* Search icon styling */
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    fill: #9aa0a6;
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
    /* Layout adjustments */
    .homepage-content {
        margin-top: 0;
        padding-top: 100px;
        justify-content: flex-start;
    }
    
    .homepage-content .logo {
        max-width: 160px;
    }
    
    .logo {
        max-width: 100px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Grid adjustments */
    .results-grid {
        display: flex;
        flex-direction: column;
    }
    
    .sidebar-column {
        order: 3;
        margin-top: 20px;
        border-top: 1px solid #eee;
        padding-top: 20px;
    }
    
    .results-column {
        order: 1;
    }
    
    /* Pagination adjustments */
    .custom-pagination {
        flex-wrap: wrap;
        justify-content: center;
        margin: 15px 0;
    }
    
    .custom-pagination a,
    .custom-pagination span {
        margin: 5px;
    }
    
    .custom-pagination > *:nth-child(n+9) {
        display: none !important;
    }
    
    /* Related searches visibility */
    .desktop-related-searches {
        display: none;
    }
    
    .mobile-related-keywords-section {
        display: block;
        background-color: #f8f9fa;
        padding: 16px;
        margin: 0 -15px;
    }
    
    /* Mobile related keywords styling */
    .mobile-related-keywords-title {
        font-size: 16px;
        font-weight: 500;
        color: #202124;
        margin: 0 0 12px 0;
    }
    
    .mobile-related-keywords-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-related-keywords-item {
        padding: 12px 0;
        border-bottom: 1px solid #dadce0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-related-keywords-item:last-child {
        border-bottom: none;
    }
    
    .mobile-related-keywords-link {
        color: #202124;
        text-decoration: none;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .mobile-related-keywords-search-icon {
        width: 20px;
        height: 20px;
        opacity: 0.54;
    }
    
    /* Footer adjustments */
    .footer-links {
        align-items: center;
        gap: 10px;
    }
}
