/**
 * Energy Storage Systems - Custom Styles
 * Dark Theme with Cyan/Blue Gradients
 */

/* ============================================================================
   Root Variables & Colors
   ============================================================================ */
:root {
    /* Cyan/Blue Gradient Colors (from landingpage_example) */
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --teal-500: #14b8a6;
    --green-500: #22c55e;

    /* Dark Background Colors */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--cyan-500) 0%, var(--blue-600) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 50%, var(--slate-900) 100%);
    --gradient-text: linear-gradient(90deg, var(--cyan-400) 0%, var(--blue-400) 50%, var(--teal-500) 100%);
}

/* ============================================================================
   Global Styles
   ============================================================================ */
body {
    background: var(--gradient-secondary);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bg-darker {
    background-color: #0a0f1a !important;
}

/* ============================================================================
   Typography
   ============================================================================ */
.text-cyan {
    color: var(--cyan-400) !important;
}

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

.hover-cyan:hover {
    color: var(--cyan-400) !important;
    transition: color 0.3s ease;
}

/* ============================================================================
   Navigation
   ============================================================================ */
#mainNav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#mainNav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.brand-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-400) !important;
    background: rgba(34, 211, 238, 0.1);
}

.nav-link i {
    font-size: 1rem;
}

/* ============================================================================
   Main Content
   ============================================================================ */
.main-content {
    padding-top: 80px; /* Account for fixed navbar */
    min-height: calc(100vh - 400px);
}

/* ============================================================================
   Cards & Containers
   ============================================================================ */
.card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.2);
}

.card-gradient {
    background: var(--gradient-primary);
    border: none;
}

/* ============================================================================
   Buttons
   ============================================================================ */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.5);
}

.btn-outline-cyan {
    color: var(--cyan-400);
    border: 2px solid var(--cyan-400);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-cyan:hover {
    background: var(--cyan-400);
    color: white;
    transform: scale(1.05);
}

/* ============================================================================
   Hero Section
   ============================================================================ */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg-effect {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

.hero-bg-effect::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 40px;
    width: 300px;
    height: 300px;
    background: var(--cyan-500);
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse 4s ease-in-out infinite;
}

.hero-bg-effect::after {
    content: '';
    position: absolute;
    bottom: 80px;
    right: 40px;
    width: 400px;
    height: 400px;
    background: var(--blue-500);
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse 4s ease-in-out infinite 2s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #94a3b8;
    margin-bottom: 2rem;
}

/* ============================================================================
   Feature Cards
   ============================================================================ */
.feature-card {
    position: relative;
    height: 100%;
    cursor: pointer;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.gradient-cyan-blue {
    background: linear-gradient(135deg, var(--cyan-500) 0%, var(--blue-500) 100%);
}

.gradient-blue-teal {
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--teal-500) 100%);
}

.gradient-teal-green {
    background: linear-gradient(135deg, var(--teal-500) 0%, var(--green-500) 100%);
}

.gradient-green-cyan {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--cyan-500) 100%);
}

/* ============================================================================
   Stats
   ============================================================================ */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(34, 211, 238, 0.5);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 1rem;
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer {
    margin-top: 80px;
    padding: 0 !important;
}

.footer .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
}

.footer a {
    transition: all 0.3s ease;
}

/* ============================================================================
   Utilities
   ============================================================================ */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 768px) {
    .main-content {
        padding-top: 70px;
    }

    .hero-section {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */
@media print {
    body {
        background: white !important;
    }

    #mainNav,
    .footer {
        display: none !important;
    }

    .main-content {
        padding-top: 0 !important;
    }
}
