/*
Theme Name: Darmediatama - Google Search Engine
Description: WordPress theme yang mirip dengan Google Search Engine - clean, minimal, dan fokus pada pencarian
Author: Darmediatama
Author URI: https://darmediatama.com
Version: 1.0
*/

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: arial, sans-serif;
    font-size: 14px;
    color: #3c4043;
    background-color: #fff;
    line-height: 1.58;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Google-like Layout */
.google-container {
    margin-left: 0px;
    width: 1039px;
    transform: translatex(0px) translatey(0px);
}

/* Header - Google Style */
.google-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 6px 0;
    border-bottom: 1px solid #dadce0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    margin-left: 38px !important;
}

.google-logo {
    display: flex;
    align-items: center;
}

.google-logo img {
    height: 92px;
    width: 272px;
}

.google-logo h1 {
    font-size: 38px;
    font-weight: normal;
    font-family: arial, sans-serif;
    margin: 0;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.google-logo .logo-g { color: #4285f4; }
.google-logo .logo-o1 { color: #ea4335; }
.google-logo .logo-o2 { color: #fbbc05; }
.google-logo .logo-g2 { color: #4285f4; }
.google-logo .logo-l { color: #34a853; }
.google-logo .logo-e { color: #ea4335; }

/* Navigation */
.google-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-direction: row;
}

.nav-menu,
.google-nav ul {
    display: flex !important;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li,
.google-nav li {
    display: flex;
    align-items: center;
}

.nav-menu li a,
.google-nav a {
    color: #3c4043;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: block;
}

.nav-menu li a:hover,
.google-nav a:hover {
    background-color: #f1f3f4;
}

/* Search Bar - Google Style */
.google-search-container {
    display: flex;
    justify-content: center;
    margin: 30px auto;
    max-width: 900px;
    width: 100%;
}

.google-search-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.google-search-box {
    width: 100%;
    max-width: 700px;
    min-width: 320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    height: 44px;
    background: #fff;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    transition: box-shadow 0.2s;
}

.google-search-box:hover,
.google-search-box:focus-within {
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.24);
}

.search-icon {
    padding: 0 14px;
    min-height: 20px;
    height: 20px;
    color: #9aa0a6;
}

.google-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #3c4043;
    padding: 0;
    height: 42px;
    background: transparent;
}

.voice-search {
    padding: 0 14px;
    min-height: 22px;
    height: 22px;
    cursor: pointer;
    color: #4285f4;
}

/* Search Results */
.search-results {
    max-width: none;
    margin: 0 auto;
    padding: none;
    width: 100%;
    box-sizing: border-box;
}

.search-stats {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 20px;
}

.search-result {
    margin-bottom: 36px;
}

.result-url {
    color: #1a0dab;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 3px;
    word-wrap: break-word;
}

.result-title {
    color: #1a0dab;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 3px;
    text-decoration: none;
    display: block;
}

.result-title:hover {
    text-decoration: underline;
}

.result-title:visited {
    color: #681da8;
}

.result-snippet {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    max-width: 600px;
}

.result-date {
    color: #70757a;
    font-size: 12px;
    margin-bottom: 3px;
}

/* Pagination - Google Style */
.google-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.pagination-item {
    display: inline-block;
    padding: 12px 16px;
    color: #4285f4;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.pagination-item:hover {
    background-color: #f1f3f4;
}

.pagination-item.current {
    color: #3c4043;
    font-weight: bold;
    background-color: #4285f4;
    color: white;
}

/* Homepage Style */
.google-homepage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    flex: 1 0 auto;
}

.homepage-logo {
    margin-bottom: 30px;
}

.homepage-logo h1 {
    font-size: 90px;
    font-weight: normal;
    font-family: arial, sans-serif;
    margin: 0;
}

.search-buttons {
    margin: 30px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.google-btn {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-family: arial, sans-serif;
    font-size: 14px;
    margin: 11px 4px;
    padding: 0 20px;
    line-height: 27px;
    height: 36px;
    min-width: 54px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.google-btn:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f1f3f4;
    border: 1px solid #dadce0;
    color: #202124;
}

/* Footer - Google Style */
.google-footer {
    background: #f2f2f2;
    border-top: 1px solid #e4e4e4;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-country {
    padding: 15px 30px;
    border-bottom: 1px solid #dadce0;
    font-size: 15px;
    color: rgba(0,0,0,.54);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-left,
.footer-right {
    display: flex;
    gap: 30px;
    padding: 15px;
}

.footer-links a {
    color: #70757a;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Single Post/Page Styles */
.single .single-content, .page .single-content {
    max-width: 700px;
    margin: 40px auto 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(60,64,67,.08);
    padding: 40px 32px;
    font-size: 17px;
    color: #3c4043;
    line-height: 1.7;
    text-align: justify;
}
.single .post-title, .page .post-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a0dab;
    margin-bottom: 18px;
    line-height: 1.2;
}
.single .post-meta, .page .post-meta {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 24px;
}
/* Artikel post styling agar rapi dan mudah dibaca */
.single-post-container {
    max-width: 800px;
    margin: 0 0 0 220px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(60,64,67,.08);
}
.single-post {
    font-family: 'Roboto', Arial, sans-serif;
    color: #3c4043;
    font-size: 16px;
    line-height: 1.7;
}
.single-post .post-title {
    color: #1a0dab;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.2;
    text-align: left;
}
.single-post .post-meta {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 24px;
    font-style: italic;
}
.single-post .post-content {
    color: #3c4043;
    font-size: 16px;
    line-height: 1.7;
    text-align: justify;
}
.single-post .post-content p {
    margin-bottom: 18px;
    font-size: 16px;
    color: #3c4043;
}
.single-post .post-content h3, .single-post .post-content h2 {
    font-size: 22px;
    color: #222;
    font-weight: 700;
    margin: 32px 0 16px 0;
    line-height: 1.3;
}
.single-post .post-content h1 {
    font-size: 28px;
    color: #1a0dab;
    font-weight: 700;
    margin: 36px 0 18px 0;
    line-height: 1.2;
}
.single-post .post-content ul, .single-post .post-content ol {
    margin: 18px 0 18px 24px;
    padding-left: 18px;
}
.single-post .post-content blockquote {
    border-left: 4px solid #4285f4;
    background: #f8f9fa;
    color: #555;
    margin: 24px 0;
    padding: 18px 24px;
    font-style: italic;
    border-radius: 8px;
}
.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 18px 0;
    display: block;
}
.single .post-thumbnail, .page .post-thumbnail {
    margin-bottom: 28px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(60,64,67,.10);
}
.single .post-thumbnail img, .page .post-thumbnail img {
    display: block;
    max-width: 100%;
    height: auto;
    width: auto;
    margin: 0 auto 28px auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,64,67,.10);
}
/* Featured image full width */
.post-featured-image {
    width: 100%;
    margin-bottom: 18px;
}
.post-featured-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.single .single-content img, .page .single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 18px 0;
    display: block;
}
.single .single-content h2, .page .single-content h2 {
    font-size: 24px;
    margin: 32px 0 16px 0;
    color: #222;
    font-weight: 600;
}
.single .single-content h3, .page .single-content h3 {
    font-size: 20px;
    margin: 28px 0 12px 0;
    color: #333;
    font-weight: 500;
}
.single .single-content ul, .page .single-content ul {
    margin: 18px 0 18px 24px;
    padding-left: 18px;
}
.single .single-content blockquote, .page .single-content blockquote {
    border-left: 4px solid #4285f4;
    background: #f8f9fa;
    color: #555;
    margin: 24px 0;
    padding: 18px 24px;
    font-style: italic;
    border-radius: 8px;
}
.single .single-content pre, .page .single-content pre {
    background: #f1f3f4;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 15px;
}
.single .single-content code, .page .single-content code {
    background: #f1f3f4;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 15px;
}
.single .single-content a, .page .single-content a {
    color: #1a0dab;
    text-decoration: underline;
    transition: color 0.2s;
}
.single .single-content a:hover, .page .single-content a:hover {
    color: #ea4335;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .google-search-container {
        max-width: 98vw;
    }
}

@media (max-width: 900px) {
    .google-search-box {
        max-width: 98vw;
    }
    .search-results {
        max-width: 98vw;
        padding: 10px;
    }
}

@media (max-width: 700px) {
    .search-results {
        max-width: 100vw;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .google-search-box {
        min-width: 0;
        max-width: 100vw;
    }
    .search-results {
        max-width: 100vw;
        padding: 5px;
    }
    .result-title {
        font-size: 16px;
    }
    .result-snippet {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .google-search-container {
        margin: 20px;
        max-width: none;
        width: 100%;
    }
    
    .homepage-logo h1 {
        font-size: 60px;
    }
    
    .search-results {
        padding: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-left,
    .footer-right {
        justify-content: center;
    }
}

/* Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 8px 20px;
    cursor: pointer;
    color: #3c4043;
    font-size: 16px;
    border-bottom: 1px solid #f1f3f4;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background-color: #f1f3f4;
}

/* Tambahan khusus untuk .highlighted agar bisa dipakai di elemen lain jika diperlukan */
.highlighted {
    background-color: #f1f3f4 !important;
}

/* Akhir tambahan .highlighted */

.suggestion-item:last-child {
    border-bottom: none;
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
}

.no-results h2 {
    font-size: 20px;
    font-weight: normal;
    color: #3c4043;
    margin-bottom: 15px;
}

.no-results p {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Featured Snippet Style */
.featured-snippet {
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background: #f8f9fa;
}

.featured-snippet-title {
    color: #1a0dab;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.featured-snippet-content {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.58;
}
/* Advanced Search Features */
.search-filters {
    max-width: 652px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.filter-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #dadce0;
    padding-bottom: 10px;
}

.filter-tab {
    color: #70757a;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
}

/* Search Tools */
.search-tools {
    max-width: 652px;
    margin: 0 auto;
    padding: 0 20px 15px;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 20px;
}

.tools-toggle {
    color: #70757a;
    font-size: 13px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.tools-menu {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ebebeb;
}

.tools-menu.active {
    display: block;
}

.tool-group {
    margin-bottom: 15px;
}

.tool-label {
    color: #3c4043;
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

.tool-select {
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    color: #3c4043;
    background: white;
}

/* Enhanced Suggestions */
.suggestion-section {
    padding: 8px 20px;
    color: #70757a;
    font-size: 12px;
    border-bottom: 1px solid #f1f3f4;
    background: #f8f9fa;
}

.suggestion-icon {
    margin-right: 12px;
    vertical-align: middle;
    fill: #70757a;
}

.history-item .suggestion-icon {
    fill: #70757a;
}

/* Voice Search Animation */
.voice-search.listening {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Search Result Enhancements */
.result-thumbnail {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.result-thumbnail img {
    width: 120px;
    height: 90px;
    object-fit: cover;
}

.result-actions {
    margin-top: 10px;
}

.result-action {
    color: #1a0dab;
    font-size: 12px;
    text-decoration: none;
    margin-right: 15px;
}

.result-action:hover {
    text-decoration: underline;
}

/* Knowledge Panel */
.knowledge-panel {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 350px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
}

.knowledge-panel.show {
    display: block;
}

.knowledge-title {
    font-size: 22px;
    color: #3c4043;
    margin-bottom: 10px;
}

.knowledge-subtitle {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 15px;
}

.knowledge-content {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.58;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .knowledge-panel {
        position: static;
        width: auto;
        margin: 20px;
        margin-top: 0;
    }
    
    .result-thumbnail {
        float: none;
        margin: 10px 0;
        text-align: center;
    }
    
    .filter-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 15px;
    }
    
    .filter-tab {
        display: inline-block;
        margin-right: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #202124;
        color: #e8eaed;
    }
    
    .google-search-box {
        background: #303134;
        border-color: #5f6368;
    }
    
    .google-search-input {
        color: #e8eaed;
    }
    
    .google-search-input::placeholder {
        color: #9aa0a6;
    }
    
    .result-title {
        color: #8ab4f8;
    }
    
    .result-title:visited {
        color: #c58af9;
    }
    
    .result-snippet {
        color: #bdc1c6;
    }
    
    .google-footer {
        background: #171717;
        border-color: #3c4043;
    }
    
    .search-suggestions {
        background: #303134;
        border-color: #5f6368;
    }
    
    .suggestion-item:hover {
        background: #3c4043;
    }
}

/* Print Styles */
@media print {
    .google-header,
    .google-search-container,
    .google-footer,
    .search-tools,
    .google-pagination {
        display: none;
    }
    
    .search-results {
        max-width: none;
        padding: 0;
    }
    
    .search-result {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .result-title {
        color: #000 !important;
    }
}