/* --- Root Variables & Fonts --- */
:root {
    --scout-purple: #590083;
    --heritage-purple: #9A00D6;
    --clother: "clother", sans-serif;
    --bg-grey: #f8f9fa;
    --transition: all 0.3s ease;
}

/* --- Base Styles --- */
body { 
    font-family: var(--clother); 
    font-weight: 300; /* Clother Light as default */
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography Hierarchy --- */
h1, h2, h3, h4, .fw-bold { 
    font-weight: 700 !important; /* Clother Bold */
}

h1, .display-3 { 
    font-weight: 900 !important; /* Clother Black for Hero */
    font-size: clamp(2.2rem, 8vw, 4rem);
    letter-spacing: -1px;
}

h2, .display-5 { 
    font-size: clamp(1.8rem, 5vw, 2.8rem); 
}

.text-purple { color: var(--heritage-purple) !important; }
.bg-scout { background-color: var(--scout-purple) !important; }

/* --- Navigation --- */
.navbar-brand {
    font-weight: 900;
    letter-spacing: -1px;
}

/* --- Buttons --- */
.btn-scout { 
    background-color: var(--scout-purple); 
    color: white; 
    font-weight: 700; 
    padding: 12px 30px;
    border-radius: 800px;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-scout-light {
    border: 1px solid var(--scout-purple) !important;
    color: var(--scout-purple);
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 800px;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
}

.btn-scout:hover { 
    background-color: var(--heritage-purple); 
    color: white; 
}

.btn-scout-light:hover {
    border: 1px solid var(--scout-purple) !important;
    background-color: var(--scout-purple); 
    color: white; 
}

.btn-light:hover, .btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Ensure buttons are easy to press on mobile */
@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 20px;
    }
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(89, 0, 131, 0.7), rgba(89, 0, 131, 0.7)), 
                url('/assets/img/bg.png') center center / cover no-repeat;
    border-radius: 20px;
    padding: 60px 20px;
    position: relative;
    border: none;
}

@media (min-width: 992px) {
    .hero-section {
        border-radius: 40px;
        padding: 120px 40px;
    }
}

/* Typing Effect */
.cursor {
    font-weight: 300;
    margin-left: 4px;
    display: inline-block;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    from, to { color: transparent; }
    50% { color: white; }
}

/* --- Features & Content --- */
.feature-card {
    border: 1px solid #eee;
    transition: var(--transition);
    border-radius: 12px;
}

.feature-card:hover { 
    border-color: var(--heritage-purple);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.section-subtitle {
    text-align: center;
    margin-top: -40px;
    margin-bottom: 50px;
    color: #666;
}

/* --- Roadmap & AI Section --- */
.roadmap-container {
    background-color: var(--scout-purple);
    color: #fff;
    border-radius: 24px;
    padding: 40px 25px;
    overflow: hidden;
}

@media (min-width: 992px) {
    .roadmap-container {
        border-radius: 40px;
        padding: 80px 60px;
    }
}

.coming-soon-badge {
    background-color: var(--heritage-purple) !important;
    font-weight: 700;
    font-style: italic; 
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Skeleton & AI UI Mockups */
.skeleton-ui {
    background: rgba(255,255,255,0.1);
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border-radius: 12px;
    margin: 0 auto;
}

.line { 
    height: 10px; 
    background: rgba(255,255,255,0.2); 
    margin-bottom: 10px; 
    border-radius: 5px; 
}

.line.short { width: 60%; }

.grid-skeleton { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 10px; 
    margin-top: 20px; 
}

.grid-skeleton div { 
    height: 40px; 
    background: rgba(255,255,255,0.2); 
    border-radius: 5px; 
}

/* --- Templates Grid --- */
.templates { padding: clamp(40px, 8vw, 80px) 0; background: #fff; }

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.template-thumb {
    height: 180px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background-color: #eee;
    transition: var(--transition);
}

.template-thumb:hover {
    transform: scale(1.02);
}

/* --- Pricing Cards --- */
.pricing-card {
    border-radius: 20px;
    border: 1px solid #eee;
    transition: var(--transition);
    background: white;
}

.pricing-card.featured {
    border: 2px solid var(--scout-purple);
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .pricing-card.featured {
        transform: scale(1);
        margin: 20px 0;
    }
}

/* --- Utils --- */
.max-width-700 { max-width: 700px; margin: 0 auto; }
.shadow-hover:hover { box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important; }
.transition { transition: var(--transition); }

/* Styling for the top-bar hover state */
.hover-purple:hover {
    color: var(--scout-purple) !important;
}

/* Ensure the navbar collapse looks like a clean menu on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #fff;
        padding: 1.5rem;
        border-radius: 15px;
        margin-top: 15px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
}

/* Prevents the logo from getting squashed on tiny screens */
.navbar-brand img {
    min-width: 110px;
}

/* Custom class to be added via JavaScript */
.nav-scrolled {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; /* Bootstrap's shadow-sm */
}

/* Smooth transition for the shadow and padding */
.transition-all {
    transition: all 0.3s ease-in-out;
}

.error-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}
.error-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900 !important;
    color: var(--scout-purple);
    line-height: 1;
    margin-bottom: 0;
    opacity: 0.2;
    position: absolute;
    z-index: -1;
}
.error-content {
    z-index: 1;
}
.compass-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.bg-success-subtle {
    background-color: #d1e7dd; /* Bootstrap success light */
    transition: transform 0.2s ease;
}
.bg-success-subtle:hover {
    transform: scale(1.05);
    background-color: #c1dcd0;
}
/* Subtle pulse on the icon */
.bi-patch-check-fill {
    animation: status-pulse 2s infinite;
}
@keyframes status-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.site-notif {
    /* Vital: High Z-index to beat Bootstrap modals/cards */
    z-index: 999999 !important; 
    position: fixed;
    top: 20px; /* Distance from top */
    left: 50%;
    transform: translateX(-50%); /* Only center horizontally */
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    pointer-events: none; /* Container doesn't block clicks, but children do */
}

.site-notif div {
    pointer-events: auto;
    display: flex;
    align-items: center; /* Vertically centers all children */
    justify-content: flex-start; /* Keeps content to the left */
    margin-bottom: 10px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
    padding: 5px; /* Added padding to ensure the icon isn't touching the edge */
}

.site-notif .icon {
    margin-right: 12px;
    font-size: 2rem;
    line-height: 1; /* Prevents the icon's box from being taller than the icon itself */
    display: flex; 
    align-items: center; 
    justify-content: center;
}
/* Re-applying your solid branding */
.site-notif .success { background-color: rgba(0, 149, 112, 0.849) !important; }
.site-notif .warning { background-color: #f79743c2 !important; }
.site-notif .danger  { background-color: #f74343c9 !important; }
.site-notif .info    { background-color: #437ff7ce !important; }


.site-notif .close {
    margin-left: auto;
    cursor: pointer !important;
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.7;
    transition: 0.2s;
}

.site-notif .close:hover {
    opacity: 1;
}

#wrapper {
    overflow-x: hidden;
    min-height: calc(100 vh - 70px); /* Height minus navbar */
    transition: all 0.3s ease;
}

#sidebar-wrapper {
    min-width: 250px;
    max-width: 250px;
    min-height: 100vh;
    transition: margin .25s ease-out;
}

#sidebar-wrapper .list-group-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    color: #495057;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: #f8f9fa;
    color: var(--scout-purple);
}

#sidebar-wrapper .active-scout {
    background-color: rgba(89, 0, 131, 0.1) !important;
    color: #590083 !important;
    border-left: 4px solid #590083 !important;
    font-weight: 600;
}

.sidebar-heading {
    letter-spacing: 1px;
}

/* DEFAULT STATE FOR MOBILE (Hidden) */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        margin-left: -250px; /* Moves it off-screen to the left */
        position: fixed;
        z-index: 1050;
        height: 100%;
    }

    /* THE MAGIC: When #wrapper has the .toggled class, move sidebar to 0 */
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

/* DESKTOP BEHAVIOR (Optional: Toggle to hide on big screens too) */
@media (min-width: 992px) {
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -250px;
    }
}

#logout-progress {
    width: 0%; 
    background-color: #9A00D6; 
    /* Increased reliability with a direct transition property */
    transition: width 3.0s linear !important; 
}