/* ============================================
   PRO STAR GOOGLE - Public Site CSS
   Responsive: Large / Medium / Small screens
   ============================================ */

:root {
    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --text: #202124;
    --text-light: #5f6368;
    --border: #c0c4c9;
    --border-focus: #1a73e8;
    --bg: #fff;
    --radius: 28px;
    --shadow-search: 0 2px 8px rgba(32,33,36,0.15);
    --shadow-search-hover: 0 2px 12px rgba(32,33,36,0.25);

    /* Responsive sizing — overridden per breakpoint */
    --logo-width: 420px;
    --star-size: 54px;
    --star-top: -18px;
    --star-right: -28px;
    --search-max-width: 720px;
    --search-font: 18px;
    --search-pad: 16px 20px;
    --submit-font: 15px;
    --submit-pad: 12px 28px;
    --mode-font: 15px;
    --mode-pad: 8px 20px;
    --dock-icon: 52px;
    --dock-label: 12px;
    --dock-gap: 16px;
    --footer-font: 13px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Screen-reader only (visible to crawlers and assistive tech) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---- Layout shell ---- */
.site-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* ---- Logo ---- */
.logo-section {
    margin-bottom: 28px;
    text-align: center;
}
.logo-wrap {
    position: relative;
    display: inline-block;
}
.logo-google {
    width: var(--logo-width);
    max-width: 90vw;
    height: auto;
    display: block;
}
.logo-star {
    position: absolute;
    top: var(--star-top);
    right: var(--star-right);
    width: var(--star-size);
    height: auto;
    pointer-events: none;
}

/* ---- Search area ---- */
.search-section {
    width: 100%;
    max-width: var(--search-max-width);
    margin-bottom: 24px;
}

/* Search mode tabs */
.search-modes {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
}
.search-mode-btn {
    padding: var(--mode-pad);
    font-size: var(--mode-font);
    font-weight: 500;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.search-mode-btn:hover { background: rgba(0,0,0,0.05); }
.search-mode-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Search box — darker border, more presence */
.search-form { position: relative; }
.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-search);
    transition: box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
}
.search-wrapper:hover {
    box-shadow: var(--shadow-search-hover);
    border-color: #a0a4a8;
}
.search-wrapper:focus-within {
    box-shadow: var(--shadow-search-hover);
    border-color: var(--border-focus);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: var(--search-pad);
    font-size: var(--search-font);
    font-family: inherit;
    background: transparent;
    color: var(--text);
    min-width: 0;
}
.search-input::placeholder { color: #9aa0a6; }

/* Voice search button */
.voice-btn {
    display: none; /* hidden if not supported, shown via JS */
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 4px;
    border-radius: 50%;
    transition: background 0.15s;
    flex-shrink: 0;
}
.voice-btn:hover { background: rgba(0,0,0,0.05); }
.voice-btn svg { width: 24px; height: 24px; }
.voice-btn.listening { animation: voicePulse 1s ease-in-out infinite; }
@keyframes voicePulse {
    0%, 100% { background: rgba(234,67,53,0.08); }
    50% { background: rgba(234,67,53,0.2); }
}

/* Submit button */
.search-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: var(--submit-pad);
    font-size: var(--submit-font);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin: 5px;
    border-radius: 22px;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-submit:hover { background: var(--primary-hover); }

/* City selector */
.city-row {
    display: flex;
    justify-content: center;
    margin-top: 14px;
    opacity: 1;
    transition: opacity 0.2s, max-height 0.3s;
    max-height: 60px;
    overflow: hidden;
}
.city-row.hidden { opacity: 0; max-height: 0; margin-top: 0; }
.city-select {
    padding: 8px 36px 8px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg);
    color: var(--text-light);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    transition: border-color 0.15s;
}
.city-select:focus { border-color: var(--primary); }

/* Affiliate notice */
.affiliate-notice {
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 10px;
    opacity: 0.6;
}

/* ---- Frequently Visited ---- */
.freq-sites { width: 100%; max-width: var(--search-max-width); margin-top: 24px; }
.freq-heading {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.6;
}
.freq-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.freq-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    min-width: 64px;
    position: relative;
    transition: background 0.15s;
}
.freq-item:hover { background: rgba(0,0,0,0.04); }
.freq-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}
.freq-label {
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.freq-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.freq-item:hover .freq-remove { display: flex; }
.freq-remove:hover { background: var(--danger, #dc3545); }

/* ---- Dock / Quick links ---- */
.dock {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--dock-gap);
    margin-top: 28px;
    padding: 12px;
}
.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.15s, transform 0.15s;
    min-width: 80px;
}
.dock-item:hover {
    background: rgba(0,0,0,0.04);
    transform: translateY(-2px);
}
.dock-item img {
    width: var(--dock-icon);
    height: var(--dock-icon);
    object-fit: contain;
    border-radius: 8px;
}
.dock-label {
    font-size: var(--dock-label);
    color: var(--text-light);
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Footer ---- */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 20px 24px;
    font-size: var(--footer-font);
    color: var(--text-light);
    margin-top: auto;
}
.footer-inner { margin-bottom: 8px; }
.footer-copyright { margin-bottom: 6px; }
.footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--footer-font);
    transition: color 0.15s;
}
.footer-links a:hover { color: var(--primary); }
.footer-sep { color: var(--border); }
.footer-map-link { margin-top: 6px; }
.footer-map-link a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}
.footer-map-link a:hover { color: var(--primary); }

/* Footer verse */
.footer-verse {
    font-size: 13px;
    color: var(--text-light);
    max-width: 640px;
    margin: 10px auto 0;
    padding: 10px 18px;
    background: rgba(255,255,255,0.85);
    border-radius: 8px;
    text-align: left;
    line-height: 1.5;
    opacity: 0;
    animation: verseIn 1s ease-out 2s forwards;
}
@keyframes verseIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}
.modal-box img { max-width: 100%; height: auto; border-radius: 8px; }
.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }


/* ============================================
   RESPONSIVE BREAKPOINTS
   Large  : 1200px+  (big monitors)
   Medium : 768-1199 (laptops, tablets landscape)
   Small  : <768     (phones, tablets portrait)
   ============================================ */

/* ---- LARGE screens (1200px+) ---- */
@media (min-width: 1200px) {
    :root {
        --logo-width: 480px;
        --star-size: 62px;
        --star-top: -20px;
        --star-right: -32px;
        --search-max-width: 780px;
        --search-font: 20px;
        --search-pad: 18px 24px;
        --submit-font: 16px;
        --submit-pad: 14px 32px;
        --mode-font: 16px;
        --mode-pad: 9px 24px;
        --dock-icon: 80px;
        --dock-label: 14px;
        --dock-gap: 24px;
        --footer-font: 14px;
    }
    .logo-section { margin-bottom: 36px; }
    .search-section { margin-bottom: 28px; }
    .search-wrapper { border-width: 2px; }
    .footer-verse { max-width: 720px; font-size: 14px; }
}

/* ---- MEDIUM screens (768-1199) ---- */
@media (min-width: 768px) and (max-width: 1199px) {
    :root {
        --logo-width: 360px;
        --star-size: 48px;
        --star-top: -16px;
        --star-right: -24px;
        --search-max-width: 660px;
        --search-font: 17px;
        --search-pad: 15px 18px;
        --submit-font: 14px;
        --submit-pad: 11px 24px;
        --mode-font: 14px;
        --mode-pad: 7px 18px;
        --dock-icon: 48px;
        --dock-label: 11px;
        --dock-gap: 14px;
        --footer-font: 12px;
    }
}

/* ---- SMALL screens (<768) ---- */
@media (max-width: 767px) {
    :root {
        --logo-width: 260px;
        --star-size: 36px;
        --star-top: -12px;
        --star-right: -18px;
        --search-max-width: 100%;
        --search-font: 16px;
        --search-pad: 12px 14px;
        --submit-font: 13px;
        --submit-pad: 10px 18px;
        --mode-font: 13px;
        --mode-pad: 6px 14px;
        --dock-icon: 40px;
        --dock-label: 10px;
        --dock-gap: 10px;
        --footer-font: 11px;
    }
    .site-wrapper { padding: 16px; }
    .logo-section { margin-bottom: 20px; }
    .search-section { margin-bottom: 16px; }
    .search-modes { gap: 4px; margin-bottom: 12px; }
    .dock-item { padding: 8px 10px; min-width: 68px; }
    .footer-verse { display: none; }
    .voice-btn svg { width: 20px; height: 20px; }
}

/* ---- EXTRA SMALL (<400) ---- */
@media (max-width: 400px) {
    :root {
        --logo-width: 220px;
        --star-size: 30px;
        --star-top: -10px;
        --star-right: -14px;
        --search-font: 15px;
    }
    .search-submit { padding: 8px 14px; font-size: 12px; }
    .dock { gap: 6px; }
    .dock-item { min-width: 60px; padding: 6px 8px; }
}
