/* ==========================================================================
   AstraLink — Custom Stylesheet
   Premium, minimal, calm, elegant. Clean whitespace, strong typography.
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --brand-primary: #4A3AFF;
    --brand-secondary: #7B6FEE;
    --brand-accent: #FF6B6B;
    --brand-dark: #1a1a2e;
    --brand-light: #f8f9fc;
    --brand-muted: #6c757d;
    --brand-border: #e9ecef;

    /* Bootstrap 5 overrides */
    --bs-primary: #4A3AFF;
    --bs-primary-rgb: 74, 58, 255;
    --bs-secondary: #7B6FEE;
    --bs-secondary-rgb: 123, 111, 238;
    --bs-link-color: #4A3AFF;
    --bs-link-hover-color: #7B6FEE;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */

body {
    font-family: var(--font-body);
    color: var(--brand-dark);
    background-color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.display-4,
.display-5,
.display-6 {
    letter-spacing: -0.02em;
}

.lead {
    font-weight: 400;
    line-height: 1.7;
}

a {
    color: var(--brand-primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-secondary);
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: box-shadow 0.2s ease;
}

.navbar-brand {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.brand-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--brand-dark);
    padding: 0.5rem 0.85rem;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--brand-primary);
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.navbar .dropdown-item {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.navbar .dropdown-item:hover {
    background-color: var(--brand-light);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 58, 255, 0.3);
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Bootstrap 5 utility overrides for brand colors */
.bg-primary { background-color: var(--brand-primary) !important; }
.bg-secondary { background-color: var(--brand-secondary) !important; }
.text-primary { color: var(--brand-primary) !important; }
.text-secondary { color: var(--brand-secondary) !important; }
.border-primary { border-color: var(--brand-primary) !important; }
.badge.bg-primary { background-color: var(--brand-primary) !important; }
.badge.bg-secondary { background-color: var(--brand-secondary) !important; }

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--brand-border);
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(74, 58, 255, 0.15);
}

/* Element badges */
.bg-element-fire { background-color: #e74c3c !important; color: #fff; }
.bg-element-earth { background-color: #27ae60 !important; color: #fff; }
.bg-element-air { background-color: #3498db !important; color: #fff; }
.bg-element-water { background-color: #2980b9 !important; color: #fff; }

/* Score bar */
.score-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}
.score-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    transition: width 0.6s ease;
}

/* Content body */
.content-body p { margin-bottom: 1rem; line-height: 1.7; }
.content-body h2 { margin-top: 1.5rem; margin-bottom: 0.75rem; }
.content-body ul, .content-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--brand-muted);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(180deg, var(--brand-light) 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 58, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero-visual {
    position: relative;
}

.hero-icon {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.min-vh-50 {
    min-height: 50vh;
}

/* ==========================================================================
   Calculator Cards
   ========================================================================== */

.calculator-card {
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculator-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.calculator-card__icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 58, 255, 0.08), rgba(123, 111, 238, 0.08));
    margin: 0 auto;
}

.calculator-card__icon i {
    font-size: 1.5rem;
    color: var(--brand-primary);
}

/* ==========================================================================
   Steps / How it Works
   ========================================================================== */

.step-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ==========================================================================
   Cards (general)
   ========================================================================== */

.card {
    border-radius: var(--radius-md);
}

.card.shadow-sm {
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Result Pages
   ========================================================================== */

.result-header {
    background: linear-gradient(180deg, var(--brand-light) 0%, #fff 100%);
}

/* Element distribution bars */
.element-bar.element-fire { background-color: #e74c3c; }
.element-bar.element-earth { background-color: #27ae60; }
.element-bar.element-air { background-color: #3498db; }
.element-bar.element-water { background-color: #2980b9; }

.progress {
    border-radius: var(--radius-sm);
    background-color: var(--brand-border);
}

.progress-bar {
    border-radius: var(--radius-sm);
    transition: width 0.6s ease;
}

/* Premium lock overlay */
.premium-blur {
    filter: blur(3px);
    user-select: none;
}

.premium-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    color: var(--brand-dark);
}

/* ==========================================================================
   Compatibility Score Bars
   ========================================================================== */

.overall-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 4px 20px rgba(74, 58, 255, 0.3);
}

.overall-score-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

.score-bar {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.score-bar-fill {
    transition: width 0.8s ease;
    border-radius: var(--radius-sm);
}

.score-bar-romance { background: linear-gradient(90deg, #ff6b6b, #ee5a5a); }
.score-bar-communication { background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary)); }
.score-bar-conflict { background: linear-gradient(90deg, #f0ad4e, #ec971f); }
.score-bar-longterm { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.score-bar-intimacy { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.score-bar-values { background: linear-gradient(90deg, #17a2b8, #138496); }

/* ==========================================================================
   Dashboard
   ========================================================================== */

.dashboard-body main {
    min-height: calc(100vh - 60px);
}

.dashboard-sidebar {
    min-height: calc(100vh - 60px);
    position: sticky;
    top: 56px;
}

.dashboard-sidebar .nav-link {
    color: var(--brand-muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.dashboard-sidebar .nav-link:hover {
    color: var(--brand-primary);
    background-color: var(--brand-light);
}

.dashboard-sidebar .nav-link.active {
    color: var(--brand-primary);
    background-color: rgba(74, 58, 255, 0.08);
    font-weight: 600;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.cta-section::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control,
.form-select {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.925rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(74, 58, 255, 0.1);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-text {
    font-size: 0.8rem;
}

/* Birth place map */
#birthMap {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
}

#cityResults .list-group-item {
    font-size: 0.85rem;
    border-left: none;
    border-right: none;
    cursor: pointer;
}

#cityResults .list-group-item:hover {
    background-color: var(--brand-light);
    color: var(--brand-primary);
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ==========================================================================
   Accordion
   ========================================================================== */

.accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-radius: var(--radius-sm) !important;
}

.accordion-button:not(.collapsed) {
    color: var(--brand-primary);
    background-color: rgba(74, 58, 255, 0.04);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--brand-border);
}

.accordion-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--brand-light);
    border-top: 1px solid var(--brand-border);
}

.site-footer h5,
.site-footer h6 {
    color: var(--brand-dark);
}

.social-links a {
    color: var(--brand-muted);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--brand-primary);
}

/* ==========================================================================
   Article / Blog
   ========================================================================== */

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.article-body blockquote {
    border-left: 3px solid var(--brand-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--brand-muted);
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-content {
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   Disclaimer
   ========================================================================== */

.disclaimer-block {
    border-left: 3px solid var(--brand-border);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumb {
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: var(--brand-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--brand-primary);
}

.breadcrumb-item.active {
    color: var(--brand-dark);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--brand-muted);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
    }

    .hero-section .d-flex.flex-wrap {
        justify-content: center;
    }

    .hero-section .d-flex.align-items-center.gap-4 {
        justify-content: center;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .overall-score-circle {
        width: 100px;
        height: 100px;
    }

    .overall-score-value {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Subtle cosmic background (very subtle)
   ========================================================================== */

.bg-cosmic {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(74, 58, 255, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(123, 111, 238, 0.02) 0%, transparent 50%),
        #fff;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .navbar,
    .site-footer,
    .cta-section,
    .premium-overlay,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .premium-blur {
        filter: none;
    }
}
