/* Base Variables */
:root {
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --container-width: 1280px;
    --nav-height: 80px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Persistent Colors */
    --button-bg: #dc3545; /* Original Red for Buttons */
    --nav-bg: #212529;    /* Persistent Dark Nav */
    --nav-fg: #ffffff;    /* Pure White Text */
}

/* Theme: Dark (Default) */
body[data-theme="dark"] {
    --bg-dark: #121212;
    --bg-card: #1c1c1c;
    --bg-elevated: #212121;
    --text-primary: #ffffff; /* High contrast white */
    --text-secondary: #a0a0a0;
    --text-muted: #768390;
    --text-accent: #ffffff;
    --border-color: #353535;
    --border-faint: #272727;
    --accent: #dc3545; /* Brand Red */
    --accent-hover: #b22222;
}

/* Theme: Light */
body[data-theme="light"] {
    --bg-dark: #f4f7fa;
    --bg-card: #ffffff;
    --bg-elevated: #ebf0f5;
    --text-primary: #3c4249; /* Suggested Dark Slate */
    --text-secondary: #5a636d;
    --text-muted: #838e9a;
    --text-accent: #3c4249;
    --border-color: #d1d9e2;
    --border-faint: #e6ecf1;
    --accent: #dc3545; /* Brand Red stays consistent */
    --accent-hover: #b22222;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4d5e; /* Brighter Red for 'Glow' effect */
    border-color: var(--bg-dark);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-dark);
}

/* Reset & Global */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Layout Containers */
.nav-container, .footer-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .footer-container {
        padding: 0 5rem;
    }
}

/* Typography & Accent Text */
.text-accent { color: var(--text-accent); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--accent); }

/* Header & Nav */
.site-header {
    height: var(--nav-height);
    background-color: var(--nav-bg);
    color: var(--nav-fg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--nav-fg);
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 1.5rem; }

.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: -1px; display: flex; align-items: center; }
.logo img { display: block; }
.logo .accent { color: var(--accent); }

.nav-desktop-links { display: flex; gap: 2rem; }
.nav-desktop-links a { 
    font-weight: 600; 
    font-size: 0.95rem; 
    color: var(--nav-fg); 
    position: relative;
    padding: 0.5rem 0;
}

.nav-desktop-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-desktop-links a:hover::after {
    width: 100%;
    left: 0;
}

.nav-container .btn-primary {
    padding: 0.5rem 1.2rem;
    animation: cta-pulse 3s infinite;
}

@keyframes cta-pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Animated Hamburger */
.hamburger {
    width: 30px;
    height: 21px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    margin-top: 3px; /* Adjusted for verified visual alignment with logo */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: var(--transition);
    transform-origin: center;
}

#offcanvas-opener.active .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

#offcanvas-opener.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

#offcanvas-opener.active .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.auth-cluster { display: flex; gap: 1.5rem; align-items: center; }
.auth-cluster a.nav-link { color: var(--nav-fg); }

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

body.home-page .main-content {
    padding-top: 0;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Dropdown */
.nav-item-dropdown { position: relative; cursor: pointer; }
.user-display {
    background: #212121; /* Force dark elevated background */
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    border: 1px solid #353535; /* Force dark border */
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff; /* Force white text */
    transition: var(--transition);
}
.nav-item-dropdown:hover .user-display {
    border-color: var(--accent);
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem); /* Visual position */
    right: 0;
    width: 200px;
    background: #1c1c1c; /* Force dark background */
    border: 1px solid #353535; /* Force dark border */
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    display: none;
    animation: fadeIn 0.2s ease;
    z-index: 100;
}

/* Invisible bridge to prevent hover state from breaking */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
}
.nav-item-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a, .logout-btn {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    color: #ffffff; /* Force white text */
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.dropdown-menu a:hover, .logout-btn:hover { 
    background: #272727; /* Force dark hover background */
    color: var(--accent); 
}
/* Offcanvas Menu */
.offcanvas {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-card);
    z-index: 2000;
    transition: var(--transition);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.offcanvas-body {
    flex: 1;
}

/* Section Labels */
.nav-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin: 2.5rem 0 1rem;
    opacity: 0.8;
}

/* User Card */
.nav-user-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="light"] .nav-user-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.nav-user-card .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nav-user-card .avatar-circle {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
}

.nav-user-card .welcome-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nav-user-card .user-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-user-card .user-card-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

body[data-theme="light"] .nav-user-card .user-card-actions {
    border-top: 1px solid var(--border-color);
}

.nav-user-card .user-card-actions a,
.nav-user-card .user-card-actions button {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    height: 100%;
    display: flex;
    align-items: center;
    line-height: 1;
}

.nav-user-card .user-card-actions a:hover,
.nav-user-card .user-card-actions button:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    .offcanvas {
        width: 100%;
        left: -100%;
        border-right: none;
    }
}

.offcanvas.active { left: 0; }
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.overlay.active { opacity: 1; visibility: visible; }

.offcanvas-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.mobile-nav li { margin-bottom: 0.5rem; }
.mobile-link { 
    font-size: 1.1rem; 
    font-weight: 600; 
    padding: 0.75rem 0; 
    display: block; 
    width: 100%; 
    text-align: left; 
    transition: var(--transition);
    color: var(--text-primary);
}
.mobile-link:hover { color: var(--accent); padding-left: 5px; }
.mobile-link.accent { color: var(--accent); }
.mobile-link.accent:hover { color: var(--accent-hover); }

/* Mobile Dropdown */
.mobile-dropdown-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 0;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-dropdown-btn:hover { color: var(--accent); }
.mobile-dropdown-btn:hover .chevron { border-color: var(--accent); }

.mobile-dropdown-btn .chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-right: 5px;
}

.mobile-dropdown.active > .mobile-dropdown-btn .chevron {
    transform: rotate(-135deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    padding-left: 1.5rem;
    list-style: none;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.mobile-dropdown.active > .mobile-dropdown-content {
    max-height: 1000px; /* Large enough to fit content */
    opacity: 1;
}

.mobile-dropdown-content li a {
    font-size: 1rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.mobile-dropdown-content li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.mobile-dropdown-content li a svg {
    height: 1em;
    width: 1em;
    flex-shrink: 0;
}

/* Components */
.btn-primary {
    background-color: var(--button-bg);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }

.win-pct-badge { 
    background: linear-gradient(to right, #00bf75, #006064); 
    color: #fff; 
    padding: 0.3rem 0.8rem; 
    border-radius: 20px; 
    font-weight: 700; 
    font-size: 0.85rem; 
}

/* Hero Section */
.hero-home {
    padding: 6rem 2rem;
    position: relative;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, 0.4); /* Much lighter overall overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .hero-content {
        padding: 0 5rem;
    }
}

.hero-main {
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    border: none;
}

.hero-main h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    color: #ffffff; /* Persistent White */
}

.hero-main p {
    color: #ffffff;
    opacity: 0.9;
}

.hero-actions { display: flex; gap: 1.5rem; margin-top: 3rem; }

.hero-details {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
    .hero-details {
        min-height: 450px;
        padding: 3.5rem;
    }
}

.hero-details h2 { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    color: var(--accent); 
    margin-bottom: 2.5rem; 
    font-weight: 800;
}

.detail-item { 
    display: flex; 
    gap: 1.25rem; 
    margin-bottom: 1rem; 
    align-items: center; 
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.detail-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(220, 53, 69, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    transition: var(--transition);
}

.detail-item:hover .detail-icon-box {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}

.detail-item span { 
    color: #ffffff; 
    font-size: 1rem; 
    line-height: 1.5;
    font-weight: 500;
}

/* Performance Section */
.performance-section { 
    padding: 6rem 1rem; 
}

@media (min-width: 1024px) {
    .performance-section {
        padding: 6rem 5rem;
    }
}

.section-header { margin-bottom: 3rem; text-align: center; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }

.top-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .top-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.perf-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0; /* Remove default padding to allow header background to touch edges */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Glass-Header Isolation */
.perf-card__header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-faint);
    margin-bottom: 0;
}

.perf-card__header h3 { font-size: 1.25rem; font-weight: 700; }

.perf-card__body { 
    color: var(--text-secondary); 
    font-size: 1rem; 
    padding: 2rem;
    flex: 1;
}

.perf-card__footer {
    padding: 0 2rem 2rem;
}

.perf-card__footer a { font-weight: 600; color: var(--text-primary); border-bottom: 1px solid transparent; }
.perf-card__footer a:hover { border-color: var(--accent); color: var(--accent); }

/* interactive Shadow & Glow */
.perf-card:hover { 
    transform: translateY(-10px); 
    border-color: rgba(220, 53, 69, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(220, 53, 69, 0.1);
}

/* Shimmer Effect */
.perf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-20deg);
    transition: 0.8s;
    z-index: 2;
    pointer-events: none;
}

.perf-card:hover::before {
    left: 150%;
}

/* Confidence Meter (Micro-Data Vis) */
.confidence-meter {
    width: 100%;
    height: 4px;
    background: var(--border-faint);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.confidence-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent), #ff4d5e);
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* Overview Grid & Improvements */
.overview-grid { 
    display: grid; 
    gap: 10rem; 
    padding: 6rem 0; 
    position: relative;
}

/* Process Flow Connector */
.overview-grid::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--border-color) 10%, 
        var(--border-color) 90%, 
        transparent);
    transform: translateX(-50%);
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.05),
        0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.overview-item { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 6rem; 
    align-items: center; 
    position: relative;
    z-index: 1;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glowing Node 'Bulge' on Connector */
.overview-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overview-item:hover::before {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 
        0 0 30px 5px rgba(220, 53, 69, 0.6),
        0 0 60px 2px rgba(220, 53, 69, 0.2);
}

/* Large Background Step Numbers */
.overview-item::after {
    content: attr(data-step);
    position: absolute;
    top: -3rem;
    left: -2rem;
    font-size: 15rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.03;
    z-index: -1;
    line-height: 1;
    pointer-events: none;
}

@media (min-width: 993px) {
    .overview-item:nth-child(even) .overview-text {
        order: 2;
    }
    .overview-item:nth-child(even) .overview-image {
        order: 1;
    }
    .overview-item:nth-child(even)::after {
        left: auto;
        right: -2rem;
    }
}

.overview-text h2 { 
    font-size: 2.5rem; 
    margin-bottom: 1.5rem; 
    color: var(--text-primary); 
    font-weight: 800; 
    letter-spacing: -1px;
}

.overview-text p { 
    font-size: 1.15rem; 
    color: var(--text-secondary); 
    line-height: 1.8; 
}

/* Tilt & Glow Card Interaction */
.overview-image { 
    background: var(--bg-elevated); 
    border-radius: 28px; 
    padding: 1.5rem; 
    border: 1px solid var(--border-color); 
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.overview-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.overview-item:hover .overview-image {
    transform: translateY(-15px) scale(1.03) rotateX(2deg);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(220, 53, 69, 0.2);
}

.overview-item:hover .overview-image::after {
    opacity: 1;
}

.overview-image img { 
    width: 100%; 
    border-radius: 16px; 
    position: relative;
    z-index: 1;
}

/* Reveal Animations Styles */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .overview-grid { gap: 6rem; }
    .overview-grid::before { display: none; }
    .overview-item::before { display: none; }
    .overview-item { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .overview-item::after { font-size: 8rem; top: -1rem; left: 50%; transform: translateX(-50%); }
    .overview-text h2 { font-size: 2rem; }
}

/* Footer */
.site-footer { 
    border-top: 1px solid var(--border-faint); 
    padding: 6rem 0 3rem; 
    background: var(--bg-card); 
    margin-top: auto; 
}

.footer-top { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 5rem; 
    padding-bottom: 3rem; 
    border-bottom: 1px solid var(--border-faint); 
}

.footer-socials { 
    display: flex; 
    gap: 1.25rem; 
}

.footer-socials a { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.footer-socials svg { 
    width: 18px; 
    height: 18px; 
    fill: currentColor; 
}

.footer-socials a:hover { 
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
}



.footer-grid { 
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    align-items: flex-start; 
    gap: 6rem; 
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 0 1 400px;
}
.footer-brand .logo { margin-bottom: 1rem; display: block; }
.footer-brand p.overview { 
    color: var(--text-secondary); 
    max-width: 400px; 
    font-size: 1rem; 
    line-height: 1.6;
    margin-top: 1.5rem;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 0 1 auto;
}

.footer-nav h4 { 
    margin-bottom: 2rem; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    color: var(--text-primary); 
    font-weight: 800;
    text-align: left;
}

.footer-nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: left;
}

.footer-nav ul li { margin-bottom: 1rem; }

.footer-nav ul li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-nav ul li a svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: var(--transition);
    opacity: 0.7;
}

.footer-nav ul li a:hover { 
    color: var(--accent); 
    transform: translateX(5px);
}

.footer-nav ul li a:hover svg {
    fill: var(--accent);
    opacity: 1;
}

.contact-info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-info-row a { 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    transition: var(--transition);
    color: inherit;
    text-decoration: none;
}

.contact-info-row svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
    margin-top: 0.2rem;
    opacity: 0.7;
}

.contact-info-row a:hover { 
    color: var(--accent); 
    transform: translateX(5px);
}

.contact-info-row a:hover svg { 
    fill: var(--accent); 
    opacity: 1;
}

.footer-bottom { 
    margin-top: 6rem; 
    padding-top: 2rem;
    border-top: 1px solid var(--border-faint);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted); 
    font-size: 0.85rem; 
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 191, 117, 0.05);
    border-radius: 100px;
    color: #00bf75;
    font-weight: 700;
    font-size: 0.75rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00bf75;
    border-radius: 50%;
    box-shadow: 0 0 8px #00bf75;
}

/* Rich Text (CKEditor) Content Theming */
.article-body, .ck-content {
    color: var(--text-secondary) !important;
}

.article-body p, .article-body li, .ck-content p, .ck-content li {
    color: inherit !important;
}

.article-body h1, .article-body h2, .article-body h3, .article-body h4, 
.ck-content h1, .ck-content h2, .ck-content h3, .ck-content h4 {
    color: var(--text-primary) !important;
}

/* Strip hardcoded inline colors from copy-pasted content */
.article-body [style*="color"], .ck-content [style*="color"] {
    color: inherit !important;
}

.article-body a, .ck-content a {
    color: var(--accent) !important;
    text-decoration: underline;
}

.article-body img, .ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

body[data-theme="dark"] .dark-only { display: block; }
body[data-theme="light"] .light-only { display: block; }

.theme-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

body[data-theme="dark"] .light-only,
body[data-theme="light"] .dark-only {
    display: none !important;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Theme Icons Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.theme-toggle:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.theme-toggle svg {
    vertical-align: middle !important;
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover svg {
    transform: rotate(20deg) scale(1.1);
}

.theme-toggle .sun-icon, 
.theme-toggle .moon-icon {
    display: none;
}

body[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

body[data-theme="light"] .theme-toggle .moon-icon {
    display: block;
}

/* Media Queries */
@media (max-width: 992px) {
    .nav-desktop-links, .social-icons-mini, .auth-cluster, .nav-user-actions { display: none; }
    .hero-content { grid-template-columns: 1fr; gap: 3rem; }
    .footer-grid { 
        flex-direction: column; 
        align-items: center;
        text-align: center; 
        gap: 3rem; 
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-brand .logo {
        margin-bottom: 1rem;
    }
    
    .footer-brand p.overview { 
        margin: 0 auto 1.5rem auto; 
        text-align: center;
    }
    
    .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-nav h4 {
        text-align: center;
    }
    
    .footer-nav ul { padding: 0; text-align: center; }
    .footer-nav ul li a { justify-content: center; }
    .footer-nav ul li a:hover { transform: translateY(-2px); }
    .footer-nav address { font-style: normal; }

    .contact-info-row {
        justify-content: center;
        text-align: center;
    }
    .contact-info-row a {
        justify-content: center;
    }
    .contact-info-row a:hover {
        transform: translateY(-2px);
    }

    .overview-item { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    /* Reset alternating order for mobile (all items: Text top, Image bottom) */
    .overview-item:nth-child(even) .overview-text { order: 1; }
    .overview-item:nth-child(even) .overview-image { order: 2; }
}

@media (max-width: 768px) {
    .main-content {
        padding: 3rem 0;
    }
}

@media (max-width: 600px) {
    .hero-h1 { font-size: 2.8rem; }
}

/* --- Floating Messages / Alerts (Toasts) --- */
.message-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none; /* Let clicks pass through empty container space */
}

.alert {
    pointer-events: auto; /* Enable interactions on the alert cards themselves */
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    font-size: 0.95rem;
    line-height: 1.5;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-weight: 500;
}

.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.alert-text {
    flex-grow: 1;
}

.alert-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
    padding: 0 0 0 12px;
    margin-top: -2px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.alert-close:hover {
    color: #ffffff;
    transform: scale(1.2);
}

/* Alert Type Colors */
.alert-success {
    background: rgba(30, 70, 45, 0.92); /* Sleek Deep Emerald */
    border-color: rgba(46, 204, 113, 0.3);
}
.alert-success .alert-icon {
    background: #2ecc71;
    color: #ffffff;
}

.alert-error, .alert-danger {
    background: rgba(80, 20, 25, 0.92); /* Dark Crimson */
    border-color: rgba(231, 76, 60, 0.3);
}
.alert-error .alert-icon, .alert-danger .alert-icon {
    background: #e74c3c;
    color: #ffffff;
}

.alert-warning {
    background: rgba(90, 75, 15, 0.92); /* Dark Gold */
    border-color: rgba(241, 196, 15, 0.3);
}
.alert-warning .alert-icon {
    background: #f1c40f;
    color: #ffffff;
}

.alert-info {
    background: rgba(20, 55, 75, 0.92); /* Deep Royal Slate */
    border-color: rgba(52, 152, 219, 0.3);
}
.alert-info .alert-icon {
    background: #3498db;
    color: #ffffff;
}

/* Entry Animation */
.animate-fade-in {
    animation: slideInToast 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
