/* ─── Google Exact SERP & Homepage Styles ─────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Google Sans", Arial, sans-serif;
    color: #202124;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE (Google 1:1)
═══════════════════════════════════════════════════════════════════════════ */
.google-home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-nav-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    font-size: 13px;
    color: rgba(0,0,0,0.87);
}

.home-nav-top a:hover {
    text-decoration: underline;
}

.home-nav-top .btn-signin {
    background: #1a73e8;
    color: #fff;
    padding: 9px 23px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}
.home-nav-top .btn-signin:hover {
    background: #1b66c9;
    box-shadow: 0 1px 2px rgba(60,64,67,0.3);
    text-decoration: none;
}

.home-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px 100px;
}

.home-logo {
    margin-bottom: 26px;
}

.home-search-box {
    width: 100%;
    max-width: 584px;
    height: 46px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    transition: box-shadow .2s, border-color .2s;
    background: #fff;
}

.home-search-box:hover,
.home-search-box:focus-within {
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    border-color: rgba(223,225,229,0);
}

.home-search-box input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    padding: 0 10px;
    background: transparent;
}

.home-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-buttons {
    margin-top: 26px;
    display: flex;
    gap: 12px;
}

.home-buttons button,
.home-buttons input[type="submit"] {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    padding: 0 16px;
    height: 36px;
    cursor: pointer;
    user-select: none;
}

.home-buttons button:hover,
.home-buttons input[type="submit"]:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    color: #202124;
}

.home-footer {
    background: #f2f2f2;
    color: #70757a;
    font-size: 14px;
}

.home-footer-location {
    padding: 15px 30px;
    border-bottom: 1px solid #dadce0;
}

.home-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 30px;
}

.home-footer-links div {
    display: flex;
    gap: 27px;
}

.home-footer-links a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH RESULTS (Google SERP 1:1)
═══════════════════════════════════════════════════════════════════════════ */
.serp-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    border-bottom: 1px solid #ebebeb;
}

.serp-header-top {
    display: flex;
    align-items: center;
    padding: 20px 24px 12px 24px;
    gap: 28px;
}

.serp-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.serp-search-wrapper {
    flex: 1;
    max-width: 692px;
}

.serp-search-box {
    display: flex;
    align-items: center;
    height: 44px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
    padding: 0 16px;
    gap: 10px;
}

.serp-search-box:hover,
.serp-search-box:focus-within {
    box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
}

.serp-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    background: transparent;
}

.serp-nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Tabs Bar (All, Images, Videos, News, etc.) */
.serp-tabs {
    display: flex;
    gap: 24px;
    padding-left: 178px;
    font-size: 14px;
    color: #5f6368;
    overflow-x: auto;
}

.serp-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0 12px 0;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.serp-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.serp-tab:hover:not(.active) {
    color: #202124;
}

/* Main Search Container */
.serp-body {
    padding-left: 178px;
    padding-right: 24px;
    max-width: 870px;
    padding-top: 12px;
    padding-bottom: 60px;
}

.serp-stats {
    font-size: 14px;
    color: #70757a;
    margin-bottom: 24px;
    line-height: 20px;
}

/* Search Result Cards */
.g-card {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.g-source {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.g-favicon-wrap {
    width: 26px;
    height: 26px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.g-favicon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.g-site-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.g-site-name {
    font-size: 14px;
    color: #202124;
    font-weight: 400;
}

.g-site-url {
    font-size: 12px;
    color: #4d5156;
}

.g-menu-dot {
    margin-left: auto;
    color: #70757a;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
}

.g-title {
    font-size: 20px;
    line-height: 1.3;
    color: #1a0dab;
    cursor: pointer;
    margin-bottom: 4px;
    font-weight: 400;
    display: inline-block;
}

.g-title:hover {
    text-decoration: underline;
}

.g-title:visited {
    color: #681da8;
}

.g-snippet {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.58;
    word-wrap: break-word;
}

/* Sitelinks Box (Google Top Result Extension) */
.g-sitelinks-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    padding-left: 14px;
    border-left: 2px solid #e8eaed;
}

.g-sitelink-item a {
    color: #1a0dab;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 400;
}

.g-sitelink-item a:hover {
    text-decoration: underline;
}

.g-sitelink-item p {
    font-size: 13px;
    color: #4d5156;
    margin-top: 2px;
    line-height: 1.4;
}

/* "People also ask" Widget */
.paa-box {
    border: 1px solid #dadce0;
    border-radius: 8px;
    margin: 28px 0;
    overflow: hidden;
}

.paa-title {
    font-size: 18px;
    font-weight: 400;
    padding: 14px 16px;
    border-bottom: 1px solid #dadce0;
    color: #202124;
}

.paa-item {
    border-bottom: 1px solid #dadce0;
    padding: 12px 16px;
    font-size: 14px;
    color: #202124;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.paa-item:last-child {
    border-bottom: none;
}

.paa-item:hover {
    background: #f8f9fa;
}

.paa-arrow {
    color: #70757a;
    font-size: 12px;
}

/* Related Searches Grid */
.serp-related {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
}

.serp-related-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: #202124;
    font-weight: 400;
}

.serp-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.serp-related-chip {
    background: #f1f3f4;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s;
}

.serp-related-chip:hover {
    background: #e8eaed;
}

.serp-related-icon {
    color: #5f6368;
    flex-shrink: 0;
}

/* Google Bottom Logo Pagination (Gooooooooooogle) */
.g-pagination-container {
    margin: 45px 0 55px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.g-pagination-row {
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.g-logo-cap {
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 24px;
}

.g-pagination-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 22px;
}

.g-logo-o {
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.g-logo-o.active-o {
    font-size: 42px;
}

.g-pagination-col a {
    color: #4285f4;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 6px;
    margin-top: 4px;
}

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

.g-pagination-col .current {
    color: #202124;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 6px;
    margin-top: 4px;
    cursor: default;
}

.g-nav-col {
    margin: 0 16px;
}

.g-nav-col a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #4285f4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.g-nav-col a:hover {
    text-decoration: underline;
}

.g-nav-arrow {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: #4285f4;
    margin-bottom: 4px;
}

.g-col-b { color: #4285f4; }
.g-col-r { color: #ea4335; }
.g-col-y { color: #fbbc05; }
.g-col-g { color: #34a853; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .serp-tabs,
    .serp-body {
        padding-left: 20px;
    }
    .serp-header-top {
        flex-direction: column;
        align-items: stretch;
    }
    .serp-nav-right {
        display: none;
    }
    .g-sitelinks-grid,
    .serp-related-grid {
        grid-template-columns: 1fr;
    }
}
