﻿

/*@media (max-width: 575.98px) {
    .url-input-group {
        flex-direction: column;
    }

        .url-input-group input {
            border-radius: 10px;*/ /* full rounding for single box feel */
        /*}

        .url-input-group button {
            min-width: 0;
            width: 100%;
            margin-top: 8px;*/
            /* full rounding for stacked appearance */
            /*border-radius: 10px;
            transition: border-radius 0.2s ease;
        }

    .url-input-group {
        flex-direction: column;
    }*/

        /* keep full rounding when stacked */
        /*.url-input-group input {
            border-radius: 10px;
        }

        .url-input-group button {
            min-width: 0;
            width: 100%;
            margin-top: 8px;
            border-radius: 10px;
            transition: border-radius 0.2s ease;
        }
}

body {
    font-family: 'Montserrat',sans-serif;
    background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
    color: #fff;
}*/

/* ---------- header ---------- */
/*.backstory-header {
    padding: 100px 20px 60px;
    text-align: center
}

    .backstory-header h1 {
        font-size: 3rem;
        font-weight: 600
    }

    .backstory-header p {
        font-size: 1.25rem;
        margin-top: 20px;
        opacity: .9
    }

.navbar-search-container {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.submit-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255,255,255,.05);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(255,255,255,.1);
}*/

/* Flex items stretch to same height */
/*.input-row {
    gap: .5rem;
}*/

/* ---- Updated input styles ---- */
/*.url-input {
    background: #fff;
    color: #000;
    border: 1px solid #ced4da;
    padding: .75rem 1rem;*/ /* increased vertical padding */
    /*border-radius: .75rem;*/ /* rounded corners */
    /*font-size: 1rem;*/ /* ensure legible text */
    /*line-height: 1.5;*/ /* balanced line height */
/*}

    .url-input::placeholder {
        color: #6c757d;
        opacity: 1;
    }*/

/* ---- Updated button styles ---- */
/*.gradient-btn {
    background: linear-gradient(90deg,#ff416c,#ff4b2b) !important;
    color: #fff !important;
    font-weight: 600;
    border: 0;
    padding: .75rem 1.5rem;*/ /* increased vertical padding */
    /*border-radius: .75rem;*/ /* match input rounding */
    /*transition: background .3s, transform .2s;
    font-size: 1rem;
}

    .gradient-btn:hover {
        background: linear-gradient(90deg,#ff4b2b,#ff416c);
        transform: scale(1.03);
    }*/

/* Miscellaneous focus resets */
/*input:focus, button:focus {
    outline: none !important;
    box-shadow: none !important;
}*/

/* smooth icon ? spinner / countdown switch */
/*#analyze-icon, #analyze-spinner {
    transition: opacity .3s,width .3s
}

.fade-out {
    opacity: 0;
    width: 0;
    overflow: hidden
}

.spinner-wrapper {
    display: inline-flex;
    align-items: center;
    opacity: 0;
    width: 0;
    overflow: hidden
}

    .spinner-wrapper.show {
        opacity: 1;
        width: auto
    }

.icon {
    font-size: 1.3rem;
    margin-right: 10px;
    color: #ff4b2b
}

.footer {
    text-align: center;
    margin-top: 80px;
    font-size: .9rem;
    opacity: .6
}

.btn {
    border-radius: 0.4rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}







.backstory-hero-section {
    
    border-radius: 2rem;
    position: relative;
    overflow: hidden;
}

.display-5 {
    color: #fff;
    letter-spacing: -0.01em;
}

.step-minicard {
    background: rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1.1rem 1rem 1rem 1rem;
    margin: 0.4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 105px;
    box-shadow: 0 1px 10px 0 rgba(34,197,94,0.06);
    border: 1.5px solid rgba(34,197,94,0.12);
}

.step-num {
    background: #22c55e;
    color: #143626;
    font-weight: 700;
    font-size: 1.18rem;
    border-radius: 50%;
    width: 2.3rem;
    height: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5em;
    box-shadow: 0 1px 8px #22c55e33;
}

.step-desc {
    color: #f2f2f2;
    font-size: 1.04rem;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 700px) {
    .display-5 {
        font-size: 1.35rem;
    }

    .step-minicard {
        min-height: 82px;
        padding: 0.85rem 0.5rem;
    }
}

.story-news-card {
    background: #fff;
    border-radius: 1.25rem !important;
    box-shadow: 0 1px 10px 0 rgba(20,30,40,0.10);
    transition: box-shadow 0.15s, background 0.2s;
    display: flex;
    align-items: center;
    border: 0;
    gap: 1.2rem;
}

    .story-news-card:hover {
        box-shadow: 0 8px 32px rgba(40,80,150,0.18);
        background: #f6faff;
    }

.story-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px 0 rgba(50,60,80,0.11);
    font-size: 1.7rem;
    color: #fff;
    flex-shrink: 0;
    background: #00b4d8;*/ /* will be overridden by inline style */
    /*transition: background .18s;
}

    .story-icon i {
        color: #fff !important;
        opacity: 1;
    }

.story-link, .story-link:visited {
    text-decoration: none;
    color: #1a2233;
}

    .story-link:hover {
        text-decoration: underline;
        color: #0077b6;
    }

.story-title {
    font-size: 1.14rem;
    margin-bottom: 0.25rem;
    letter-spacing: -.01em;
}

.story-summary {
    font-size: 1.01rem;
    color: #485262;
}*/

/* Responsive tweaks */
/*@media (max-width: 700px) {
    .story-news-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
        gap: 0.75rem;
    }

    .story-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}*/


/* ---------------------------------------------------- */
/* Root variables                                       */
/* ---------------------------------------------------- */
:root {
    --navbar-height: 56px;
}

/* ---------------------------------------------------- */
/* Global body & layout                                 */
/* ---------------------------------------------------- */
body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container,
.container-fluid {
    max-width: 1100px;
}

main {
    flex-grow: 1;
    padding-bottom: 40px;
}

/* ---------------------------------------------------- */
/* Header & Navbar                                      */
/* ---------------------------------------------------- */
header .navbar {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 600;
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: #ccc !important;
}

    .navbar-nav .nav-link:hover {
        color: #fff !important;
    }

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

    .navbar-toggler .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

/* ---------------------------------------------------- */
/* Navbar Search Dropdown                               */
/* ---------------------------------------------------- */
.navbar-search-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    padding: 20px 30px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    z-index: 1050;
}

    .navbar-search-container.show {
        max-height: 200px;
        opacity: 1;
    }

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 25px;
    padding: 0;
    user-select: none;
    transition: color 0.3s ease;
}

    .close-btn:hover {
        color: #ff4b2b;
    }

/* ---------------------------------------------------- */
/* Toasts & Footer                                      */
/* ---------------------------------------------------- */
.toast-container {
    z-index: 1080;
}

footer {
    background-color: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    text-align: center;
    padding: 20px 0;
}

.footer {
    text-align: center;
    margin-top: 80px;
    font-size: .9rem;
    opacity: .6;
}

/* ---------------------------------------------------- */
/* Hero / Header Section                                */
/* ---------------------------------------------------- */
.backstory-header {
    padding: 100px 20px 60px;
    text-align: center;
}

    .backstory-header h1 {
        font-size: 3rem;
        font-weight: 600;
    }

    .backstory-header p {
        font-size: 1.25rem;
        margin-top: 20px;
        opacity: .9;
    }

/* ---------------------------------------------------- */
/* Submit Form                                          */
/* ---------------------------------------------------- */
.submit-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.input-row {
    gap: .5rem;
}

.url-input {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ced4da;
    padding: .75rem 1rem;
    border-radius: .75rem;
    font-size: 1rem;
    line-height: 1.5;
}

    .url-input::placeholder {
        color: #6c757d;
        opacity: 1;
    }

.gradient-btn {
    background: linear-gradient(90deg, #ff416c, #ff4b2b) !important;
    color: #ffffff !important;
    font-weight: 600;
    border: 0;
    padding: .75rem 1.5rem;
    border-radius: .75rem;
    transition: background .3s, transform .2s;
    font-size: 1rem;
}

    .gradient-btn:hover {
        background: linear-gradient(90deg, #ff4b2b, #ff416c);
        transform: scale(1.03);
    }

.btn {
    border-radius: .4rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.fullwidth-search-container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    /* Optional: remove box shadow and background if you want a truly seamless look */
    /* box-shadow: none; 
    background: none; */
}

/* ---------------------------------------------------- */
/* Focus & Icon / Spinner Tweaks                        */
/* ---------------------------------------------------- */
input:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

#analyze-icon,
#analyze-spinner {
    transition: opacity .3s, width .3s;
}

.fade-out {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.spinner-wrapper {
    display: inline-flex;
    align-items: center;
    opacity: 0;
    width: 0;
    overflow: hidden;
}

    .spinner-wrapper.show {
        opacity: 1;
        width: auto;
    }

.icon {
    font-size: 1.3rem;
    margin-right: 10px;
    color: #ff4b2b;
}

/* ---------------------------------------------------- */
/* Hero Elements & Cards                                */
/* ---------------------------------------------------- */
.backstory-hero-section {
    border-radius: 2rem;
    position: relative;
    overflow: hidden;
}

.display-5 {
    color: #fff;
    letter-spacing: -0.01em;
}

.step-minicard {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.1rem 1rem 1rem;
    margin: .4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 105px;
    box-shadow: 0 1px 10px rgba(34, 197, 94, 0.06);
    border: 1.5px solid rgba(34, 197, 94, 0.12);
}

.step-num {
    background: #22c55e;
    color: #143626;
    font-weight: 700;
    font-size: 1.18rem;
    border-radius: 50%;
    width: 2.3rem;
    height: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .5em;
    box-shadow: 0 1px 8px #22c55e33;
}

.step-desc {
    color: #f2f2f2;
    font-size: 1.04rem;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
}

/* ---------------------------------------------------- */
/* Story News Cards                                     */
/* ---------------------------------------------------- */
.story-news-card {
    background: #ffffff;
    border-radius: 1.25rem !important;
    box-shadow: 0 1px 10px rgba(20, 30, 40, 0.10);
    transition: box-shadow 0.15s, background 0.2s;
    display: flex;
    align-items: center;
    border: 0;
    gap: 1.2rem;
}

    .story-news-card:hover {
        box-shadow: 0 8px 32px rgba(40, 80, 150, 0.18);
        background: #f6faff;
    }

.story-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(50, 60, 80, 0.11);
    font-size: 1.7rem;
    color: #ffffff;
    flex-shrink: 0;
    background: #00b4d8;
    transition: background .18s;
}

    .story-icon i {
        color: #ffffff !important;
        opacity: 1;
    }

.story-link,
.story-link:visited {
    text-decoration: none;
    color: #1a2233;
}

    .story-link:hover {
        text-decoration: underline;
        color: #0077b6;
    }

.story-title {
    font-size: 1.14rem;
    margin-bottom: .25rem;
    letter-spacing: -.01em;
}

.story-summary {
    font-size: 1.01rem;
    color: #485262;
}

.profile-wizard-dark {
    background: linear-gradient(135deg, #142433 60%, #253b52 100%);
    color: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    position: relative;
    min-height: 300px;
    box-shadow: 0 3px 30px 0 rgba(18,30,40,0.19);
    overflow: hidden;
}

    .profile-wizard-dark h2, .profile-wizard-dark h4, .profile-wizard-dark .h5 {
        color: #fff;
        font-weight: 600;
        letter-spacing: -0.01em;
    }

    .profile-wizard-dark .lead,
    .profile-wizard-dark .text-muted,
    .profile-wizard-dark .white {
        color: #e4e6eb !important;
        opacity: 0.9;
    }

    .profile-wizard-dark .btn {
        border-radius: .8rem;
        font-weight: 600;
        font-size: 1.05rem;
        box-shadow: none;
        transition: background .2s, color .2s, border .2s;
        padding: .8rem 1.7rem;
        margin-right: .5rem;
    }

    .profile-wizard-dark .btn-primary {
        background: linear-gradient(90deg, #ff416c, #ff4b2b) !important;
        border: none;
        color: #fff !important;
    }

        .profile-wizard-dark .btn-primary:hover {
            background: linear-gradient(90deg, #ff4b2b, #ff416c) !important;
        }

    .profile-wizard-dark .btn-outline-secondary {
        color: #fff;
        border: 1.5px solid #e0e0e0;
        background: transparent;
    }

        .profile-wizard-dark .btn-outline-secondary:hover {
            background: #222d3d;
            border-color: #ff4b2b;
            color: #fff;
        }

    .profile-wizard-dark .btn-success {
        background: #22c55e;
        border: none;
        color: #143626 !important;
    }

        .profile-wizard-dark .btn-success:hover {
            background: #38d67a;
            color: #122f25 !important;
        }

    .profile-wizard-dark textarea.form-control {
        background: rgba(255,255,255,0.12);
        color: #fff;
        border: 1px solid #466180;
        border-radius: 0.75rem;
    }

        .profile-wizard-dark textarea.form-control::placeholder {
            color: #b3bdd0;
            opacity: 1;
        }

    .profile-wizard-dark hr {
        border-color: rgba(255,255,255,0.12);
    }

    .profile-wizard-dark .h6, .profile-wizard-dark .h5 {
        color: #fff;
        opacity: .95;
    }

    .profile-wizard-dark .spinner-border {
        border-color: #ff4b2b #fff #fff #fff;
    }

.profile-wizard-question-count {
    font-size: 0.98rem;
    color: #c8d0df;
    opacity: .78;
    font-weight: 400;
    z-index: 2;
    pointer-events: none;
}


/* ---------------------------------------------------- */
/* Responsive Tweaks                                    */
/* ---------------------------------------------------- */
@media (max-width: 575.98px) {
    .url-input-group {
        flex-direction: column;
    }

        .url-input-group input {
            border-radius: 10px;
        }

        .url-input-group button {
            min-width: 0;
            width: 100%;
            margin-top: 8px;
            border-radius: 10px;
            transition: border-radius 0.2s ease;
        }
}

@media (max-width: 700px) {
    .display-5 {
        font-size: 1.35rem;
    }

    .step-minicard {
        min-height: 82px;
        padding: 0.85rem 0.5rem;
    }

    .story-news-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
        gap: 0.75rem;
    }

    .story-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .profile-wizard-dark {
        padding: 1.5rem 0.7rem;
    }

    .profile-wizard-question-count {
        position: static !important;
        display: block;
        margin-bottom: .7rem;
        text-align: right;
        font-size: 0.91rem;
    }
}




/* ─── Only affect the personalization panel ───────────────────────── */
.pw-panel {
    /* pull panel down only on ≥ md */
    margin-top: 0;
}

@media (min-width: 768px) {
    .pw-panel {
        margin-top: 2.8rem;
    }
}

/* compact, gradient primary button (namespaced) */
.pw-btn-primary {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 0.75rem;
    color: #fff !important;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    transition: background .2s ease-in-out;
}

    .pw-btn-primary:hover {
        background: linear-gradient(90deg, #ff4b2b, #ff416c);
    }

/* pill-style filter buttons */
.pw-filter-btn {
    font-size: 0.93rem; /* Slightly smaller */
    font-weight: 600;
    padding: 0.38rem 1.05rem; /* Slightly less padding */
    border-radius: 50rem;
    border: 1.5px solid #ffffff3a;
    color: #fff;
    background: transparent;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1.2;
}


    .pw-filter-btn:hover {
        border-color: #ff4b2b;
    }

    .pw-filter-btn.active,
    .pw-filter-btn.active:hover {
        background: #1e63ff;
        border-color: #1e63ff;
    }

/* make sure filter buttons wrap cleanly */
.pw-panel .d-flex.flex-wrap {
    gap: 0.5rem;
}

.pw-btn-primary,
.pw-btn-primary:visited,
.pw-btn-primary:hover,
.pw-btn-primary:active {
    text-decoration: none !important;
}
.no-underline {
    text-decoration: none !important;
}

.pw-btn-secondary {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 0.75rem;
    color: #fff !important;
    background: linear-gradient(90deg, #3b5e8a 0%, #6c7a91 100%);
    transition: background .2s;
    text-decoration: none !important;
}

    .pw-btn-secondary:hover {
        background: linear-gradient(90deg, #2b4b68, #577590);
        color: #fff !important;
    }

/* === grid wrapper === */
.pw-cta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

/* === shared pill === */
.pw-cta-btn {
    flex: 1 1 calc(33.333% - .45rem); /* 3-up, auto-wrap */
    font-size: .8rem;
    font-weight: 600;
    padding: .32rem .6rem;
    border-radius: 50rem;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

/* gradient primary */
.pw-cta-primary {
    background: linear-gradient(90deg,#ff416c,#ff4b2b);
    color: #fff;
    border: none;
}

    .pw-cta-primary:hover {
        background: linear-gradient(90deg,#ff4b2b,#ff416c);
    }

/* dark translucent secondary */
.pw-cta-secondary {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}

    .pw-cta-secondary:hover {
        background: #ff4b2b;
        border-color: #ff4b2b;
    }

/* subtle tertiary (history) */
.pw-cta-tertiary {
    background: rgba(255,255,255,.03);
    color: #b0b5c1;
    border: 1px solid rgba(255,255,255,.15);
}

    .pw-cta-tertiary:hover {
        background: rgba(255,255,255,.15);
        color: #fff;
    }


/* mini pill for chosen categories */
.pw-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: .83rem;
    border-radius: 50rem;
    padding: .25rem .8rem .25rem .8rem;
    line-height: 1.1;
}

.pw-pill-close {
    background: none;
    border: none;
    color: #ff4b2b;
    font-size: 1rem;
    margin-left: .4rem;
    cursor: pointer;
    padding: 0;
}

    .pw-pill-close:hover {
        color: #ff7664
    }

/* full-width search container inherits your gradient-btn + url-input styles */
.fullwidth-search-container {
    background: rgba(255,255,255,.05);
    border-radius: .75rem;
}

/* override list-group result style for dark mode */
#categoryResults .list-group-item {
    background: rgba(255,255,255,.05);
    color: #fff;
    border: none;
}

    #categoryResults .list-group-item:hover {
        background: #1e63ff;
        cursor: pointer;
    }



/* 2 columns on medium screens */
/*@media (max-width: 991.98px) {
    .grid-sizer, .grid-item {
        width: 50%;
    }
}*/
/* 1 column on small screens */
/*@media (max-width: 767.98px) {
    .grid-sizer, .grid-item {
        width: 100%;
    }*/

    /*@media (max-width:991.98px) {
    .grid {
        column-count: 2;
    }
}

@media (max-width:575.98px) {
    .grid {
        column-count: 1;
    }

    @media (min-width: 768px) {
        .grid-sizer, .news-grid-item {
            width: 50%;
        }
    }*/
    /* 1 column on small screens */
    /*@media (max-width: 767.98px) {
        .grid-sizer, .news-grid-item {
            width: 100%;
        }
    }*/

    /* 2. Add padding to the items themselves to create the "gutter" */
    /*.news-grid-item {
        padding: 0.75rem;
    }*/