/* ========== Shared Sub-Page Styles ==========
   Extracted from inline <style> blocks duplicated across
   career.html, business.html, family.html, relationship.html, muhurta.html, matrimony.html
*/

/* ========== Inlined Auth CSS ========== */
.google-signin-btn { background: rgba(255,255,255,0.95); border: none; border-radius: 20px; padding: 7px 16px; font-size: 0.78rem; font-weight: 600; color: #5a3e1b; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: all 0.2s; white-space: nowrap; }
.google-signin-btn:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.25); background: white; }
.google-signin-btn img { width: 16px; height: 16px; }
.user-avatar-btn { background: linear-gradient(135deg, #e8d5b7, #d4a574); border: 2px solid rgba(255,255,255,0.6); border-radius: 50%; padding: 0; cursor: pointer; width: 34px; height: 34px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #5a3e1b; letter-spacing: 0.5px; }
.user-avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-avatar-btn .avatar-initials { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.user-dropdown { display: none; position: absolute; top: calc(100% + 6px); right: 0; background: white; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); min-width: 180px; z-index: 500; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); }
.user-dropdown.active { display: block; }
.user-dropdown-name { padding: 14px 16px 10px; font-size: 0.9rem; color: #333; font-weight: 600; border-bottom: 1px solid #f0e8d8; }
.user-dropdown-item { display: block; width: 100%; padding: 11px 16px; border: none; background: none; text-align: left; font-size: 0.85rem; color: #333; cursor: pointer; transition: background 0.15s; }
.user-dropdown-item:hover { background: #f9f3e8; }
.user-dropdown-signout { color: #888; border-top: 1px solid #f0e8d8; }
.user-dropdown-signout:hover { color: #c0392b; background: #fdf0f0; }
.dialog-signin { margin-bottom: 16px; padding: 14px; background: #fdfbf5; border: 1px solid #f0e8d8; border-radius: 10px; }
.dialog-signin > p { margin: 0 0 12px; font-size: 0.9rem; color: #666; text-align: center; }
.dialog-signin-options { display: flex; flex-direction: column; gap: 12px; }
.dialog-signin-options .google-signin-btn { width: 100%; justify-content: center; padding: 10px 16px; }
@media (max-width: 360px) { .google-signin-btn { padding: 5px 10px; font-size: 0.7rem; } .user-avatar-btn { width: 30px; height: 30px; font-size: 0.7rem; } }

/* ========== Inlined Profiles CSS ========== */
.profile-selector { display: none; padding: 8px 0 4px; }
.profile-selector.active { display: block; }
.profile-selector-label { font-size: 0.75rem; color: #999; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.profile-chips { display: flex; gap: 8px; flex-wrap: wrap; max-height: 76px; overflow-y: auto; }
.profile-chip { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-gold); background: white; font-size: 0.8rem; cursor: pointer; color: var(--primary-color); transition: all 0.2s; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.profile-chip:hover { background: var(--bg-cream); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.profile-chip.active { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border-color: var(--primary-color); box-shadow: 0 2px 8px rgba(139,90,43,0.3); }
.profile-type-badge { display: inline-block; font-size: 0.65rem; padding: 2px 6px; border-radius: 10px; margin-left: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.profile-type-badge.self { background: #fff9e6; color: #8b5a2b; border: 1px solid #e8d5a8; }
.profile-type-badge.bride { background: #ffe4ec; color: #b5457a; border: 1px solid #f0c4d4; }
.profile-type-badge.groom { background: #e4ecff; color: #3b5998; border: 1px solid #c4d4f0; }
.profile-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); z-index: 500; justify-content: center; align-items: center; padding: 16px; backdrop-filter: blur(2px); }
.profile-modal.active { display: flex; }
.profile-modal-content { background: white; border-radius: 14px; max-width: 440px; width: 100%; max-height: 80vh; overflow-y: auto; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.profile-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0e8d8; }
.profile-modal-header h3 { color: var(--primary-color); margin: 0; font-size: 1.1rem; }
.close-modal { font-size: 1.5rem; cursor: pointer; color: #999; line-height: 1; padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.close-modal:hover { background: #f5f0e5; color: #666; }
.profile-card { border: 1px solid #e8dcc8; border-radius: 10px; padding: 14px; margin-bottom: 10px; background: linear-gradient(135deg, #fdfbf5, #faf5eb); }
.profile-card-name { font-weight: 600; color: var(--primary-color); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.profile-card-details { font-size: 0.8rem; color: #777; margin-bottom: 10px; line-height: 1.4; }
.profile-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-card-actions button { padding: 5px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; font-size: 0.75rem; cursor: pointer; color: #555; transition: all 0.15s; }
.profile-card-actions button:hover { background: #f9f3e8; }
.profile-card-actions button.btn-danger { color: #c0392b; border-color: #e0b4b4; }
.profile-card-actions button.btn-danger:hover { background: #fdf0f0; }
.save-profile-check { margin-top: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; color: #555; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--primary-color); cursor: pointer; }
.save-profile-dialog-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); z-index: 600; display: flex; justify-content: center; align-items: center; padding: 16px; backdrop-filter: blur(2px); }
.save-profile-dialog { background: white; border-radius: 14px; max-width: 400px; width: 100%; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.save-profile-dialog .dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0e8d8; }
.save-profile-dialog .dialog-header h3 { color: var(--primary-color); margin: 0; font-size: 1.1rem; }
.save-profile-dialog .dialog-body { margin-bottom: 16px; }
.save-profile-dialog .dialog-body label { display: block; font-size: 0.85rem; color: #666; margin-bottom: 6px; }
.save-profile-dialog .dialog-body input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 0.95rem; box-sizing: border-box; }
.save-profile-dialog .dialog-body input:focus { outline: none; border-color: var(--primary-color); }
.dialog-buttons { display: flex; gap: 10px; margin-top: 16px; }
.dialog-buttons button { flex: 1; padding: 10px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.dialog-buttons .btn-cancel { background: white; border: 1px solid #ddd; color: #666; }
.dialog-buttons .btn-cancel:hover { background: #f5f5f5; }
.dialog-buttons .btn-save { background: var(--primary-color); border: 1px solid var(--primary-color); color: white; }
.dialog-buttons .btn-save:hover { opacity: 0.9; }
.no-profiles-msg { text-align: center; padding: 20px; color: #888; font-size: 0.9rem; }

/* ========== CSS Variables ========== */
:root {
    --primary-color: #8b4513;
    --secondary-color: #d4a017;
    --bg-cream: #fffbf0;
    --bg-light: #fff8dc;
    --text-dark: #1a1a1a;
    --text-brown: #5a2d0c;
    --border-gold: #d4a017;
    --success-green: #228B22;
    --warning-orange: #DAA520;
    --danger-red: #B22222;
}

/* ========== Base Styles ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f0e6 0%, #fffbf0 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========== Header ========== */
.header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    padding: 12px 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    color: white;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 2px;
}

.header p {
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
}

.back-link {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: background .2s;
    cursor: pointer;
}

.back-link:hover { background: rgba(255,255,255,.25); }

/* ========== Navigation Menu ========== */
.nav-menu {
    background: linear-gradient(135deg, #fff9e6, #fff5db);
    border-bottom: 2px solid var(--border-gold);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-gold);
    border-radius: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.nav-link .nav-icon { font-size: 1rem; }

/* Global nav on topic pages — compact single row */
.nav-global {
    padding: 6px 15px;
    gap: 4px;
    background: linear-gradient(135deg, #faf3e0, #f5ecd5);
    border-bottom: 1px solid var(--border-gold);
}
.nav-global .nav-link {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 14px;
    box-shadow: none;
}
/* Topic sub-nav keeps its original styling */
.nav-sub {
    border-top: none;
}

.sub-tab {
    padding: 6px 18px;
    background: white;
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sub-tab:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sub-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

/* ========== FAB Menu ========== */
.header-menu-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background .2s;
    background-size: cover;
    background-position: center;
}

.header-menu-btn:hover { background-color: rgba(255,255,255,.25); }

.header-menu-btn.signed-in {
    border: 2px solid rgba(255,255,255,0.6);
    background-color: transparent;
}

.fab-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: 12px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 200px;
    z-index: 200;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.fab-menu.open { display: block; }

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.fab-menu-item:hover { background: #f9f3e8; }
.fab-menu-divider { height: 1px; background: #f0e8d8; margin: 4px 0; }

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e0d5c0;
    color: #888;
    font-size: 0.8rem;
}

/* ---- SEO editorial section (crawlable long-form under the form) ---- */
.seo-article {
    background: #fff;
    border: 2px solid var(--border-gold);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 20px;
    line-height: 1.7;
    color: #444;
}
.seo-article h2 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin: 20px 0 8px;
}
.seo-article h2:first-child { margin-top: 0; }
.seo-article p { margin-bottom: 12px; font-size: 0.95rem; }
.seo-article ul { margin: 0 0 12px 20px; }
.seo-article li { margin-bottom: 6px; font-size: 0.95rem; }
.seo-article a { color: var(--primary-color); text-decoration: none; }
.seo-article a:hover { text-decoration: underline; }
.seo-article .learn-links { border-top: 1px solid #eee; margin-top: 16px; padding-top: 14px; }
/* Hide the long-form once predictions render (crawlers still see it in HTML). */
.form-area-collapsed .seo-article { display: none; }
