/*
 * Premium SaaS Style Sheet for Cluster FMS
 * Modern Light-Dark theme, white and soft dark sections, blue & emerald accents.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Light Theme Settings */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-dark-section: #0b0f19;
    --bg-dark-card: #131c2e;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-on-dark: #f8fafc;
    --text-muted-on-dark: #94a3b8;
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-dark: rgba(255, 255, 255, 0.08);
    
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    
    /* Shared Branding Colors */
    --primary: #2563eb;
    --primary-rgb: 37, 99, 235;
    --primary-hover: #1d4ed8;
    --secondary: #10b981;
    --secondary-rgb: 16, 185, 129;
    --secondary-hover: #059669;
    
    --accent-blue: #0ea5e9;
    --accent-emerald: #10b981;
    --gradient-accent: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent-hover: linear-gradient(135deg, var(--primary-hover) 0%, var(--secondary-hover) 100%);
    --gradient-blue: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --gradient-emerald: linear-gradient(135deg, #34d399 0%, #10b981 100%);

    --radius-lg: 21px;
    --radius-md: 13px;
    --radius-sm: 8px;
    
    /* Golden Ratio Spacing System */
    --space-xs: 8px;
    --space-sm: 13px;
    --space-md: 21px;
    --space-lg: 34px;
    --space-xl: 55px;
    --space-xxl: 89px;
    --space-xxxl: 144px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-base: #07090e;
    --bg-surface: #0f1524;
    --bg-surface-hover: #162035;
    --bg-dark-section: #05070a;
    --bg-dark-card: #0c1220;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-color: rgba(255, 255, 255, 0.08);
    
    --glass-bg: rgba(15, 21, 36, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- Base Reset & Typography --- */
body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
    background: var(--gradient-emerald);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Layout Sections --- */
.section-padding {
    padding: var(--space-xxl) 0;
}

.section-padding-compact {
    padding: var(--space-xl) 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: var(--space-xl) 0;
    }
    .section-padding-compact {
        padding: var(--space-lg) 0;
    }
}

/* White Base with Soft Dark Sections */
.bg-dark-section-custom {
    background-color: var(--bg-dark-section);
    color: var(--text-on-dark);
}

.bg-dark-section-custom h1,
.bg-dark-section-custom h2,
.bg-dark-section-custom h3,
.bg-dark-section-custom h4,
.bg-dark-section-custom h5,
.bg-dark-section-custom h6 {
    color: var(--text-on-dark);
}

.bg-dark-section-custom .text-muted-custom {
    color: var(--text-muted-on-dark);
}

/* --- Navigation Header --- */
header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

header.sticky-header.scrolled {
    padding: 12px 0;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Responsive Nav Links & Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link-custom {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav-link-custom:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link-custom.active {
    color: #ffffff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

/* Style Portal Login link specifically inside header */
header.sticky-header a[href*="login"] {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

header.sticky-header a[href*="login"]:hover {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

header.sticky-header .btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

header.sticky-header .btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.mobile-nav-menu {
    display: none;
}

@media (max-width: 991px) {
    .nav-links-desktop {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-nav-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0b0f19;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
        z-index: 999;
        box-shadow: var(--shadow-md);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
    
    .mobile-nav-menu.active {
        max-height: 450px;
        padding: 16px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .mobile-nav-menu .nav-link-custom {
        display: block;
        padding: 12px 24px;
        border-radius: 0;
        color: #cbd5e1;
    }
    
    .mobile-nav-menu .nav-link-custom:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
    }
    
    .mobile-nav-menu .mobile-actions {
        padding: 12px 24px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* --- Premium Buttons --- */
/* --- Premium Buttons --- */
.btn-custom {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    border: none;
    text-decoration: none;
}

.btn-gradient {
    background: var(--gradient-accent);
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.25);
}

.btn-gradient:hover {
    background: var(--gradient-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.4);
}

.btn-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-gradient-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline-custom:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    background: var(--bg-surface-hover);
    transform: scale(1.05);
}

/* --- Glassmorphism Cards --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.2);
}

/* Dark theme specific cards */
.dark-section-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    padding: var(--space-lg);
}

.dark-section-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--secondary-rgb), 0.3);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-md);
}

.bento-item {
    grid-column: span 4;
}

.bento-item-lg {
    grid-column: span 8;
}

.bento-item-xl {
    grid-column: span 12;
}

@media (max-width: 991px) {
    .bento-item, .bento-item-lg {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .bento-item, .bento-item-lg, .bento-item-xl {
        grid-column: span 12;
    }
}

/* --- Custom Timeline --- */
.timeline-container {
    position: relative;
    padding-left: 32px;
    margin-left: 16px;
    border-left: 2px dashed var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -43px;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 4px solid var(--primary);
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.timeline-dot-emerald {
    border-color: var(--secondary);
}

.timeline-time {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* --- FAQ Accordion --- */
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-header {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    cursor: pointer;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
    padding: 0 var(--space-md);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active {
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-body {
    max-height: 200px;
    padding-bottom: var(--space-sm);
}

/* --- Statistics Counters --- */
.stat-box {
    text-align: center;
    padding: var(--space-md);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- Interactive Form Elements --- */
.form-group-custom {
    margin-bottom: var(--space-md);
    position: relative;
}

.form-label-custom {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper-custom .form-control-custom,
.input-wrapper-custom .form-select-custom {
    width: 100%;
    height: var(--space-xl);
    padding: 0 var(--space-sm) 0 var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-wrapper-custom textarea.form-control-custom {
    padding-top: var(--space-sm);
    height: auto;
    min-height: 120px;
}

.input-wrapper-custom i.input-icon {
    position: absolute;
    left: var(--space-md);
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
}

.input-wrapper-custom .form-control-custom:focus,
.input-wrapper-custom .form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
    outline: none;
    background-color: var(--bg-surface-hover);
}

.input-wrapper-custom .form-control-custom:focus ~ i.input-icon,
.input-wrapper-custom .form-select-custom:focus ~ i.input-icon {
    color: var(--primary);
}

/* Modules Checkbox Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.checkbox-custom-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-custom-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-custom-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
}

.checkbox-custom-card.checked {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
}

/* --- Animations & Floating --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element-delay {
    animation: float 7s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Background Glowing Blobs */
.glow-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .glow-blob {
    opacity: 0.15;
}

.glow-blue {
    background: var(--primary);
    top: 15%;
    left: 5%;
}

.glow-emerald {
    background: var(--secondary);
    bottom: 20%;
    right: 5%;
}

.dashboard-mockup {
    width: 100%;
    position: relative;
}

@media (min-width: 992px) {
    .dashboard-mockup {
        width: calc(100% + 50px);
        margin-right: -50px;
    }
}

.dashboard-mockup img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
}

/* --- Benefits Section Tab/Card Hover --- */
.benefit-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.benefit-badge-blue {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.benefit-badge-emerald {
    background: rgba(var(--secondary-rgb), 0.1);
    color: var(--secondary);
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-dark-section);
    color: var(--text-on-dark);
    padding: 32px 0 16px 0;
}

footer a {
    color: var(--text-muted-on-dark);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary);
}
