/* =========================================
   MyEarth Redesign V3 - Dark Universe Theme (Default) & Light Mode
   ========================================= */

:root {
    /* Core Colors */
    --primary: #3B82F6;
    --secondary: #8B5CF6;
    --accent: #10B981;
    --gradient-main: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --gradient-text: linear-gradient(to right, #60A5FA, #A78BFA);
    
    /* Dark Mode (Default) Variables */
    --bg-body: #0B0E14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-inverse: #000; /* Text color on light backgrounds */
    --glass-bg: rgba(11, 14, 20, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --nav-bg-mobile: rgba(11, 14, 20, 0.95);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    --blob-opacity: 0.4;
    --footer-bg: #05070A;
    --footer-border: rgba(255,255,255,0.05);
    --btn-close-filter: none; /* Bootstrap close button default */
    --logo-filter: none;
    
    /* Creator Card Variables (Dark Default) - Now using generic card styles */
    --creator-bg: var(--bg-card);
    --creator-text: var(--text-main);
    --creator-muted: var(--text-muted);
    --creator-border: var(--glass-border);
}

/* Light Mode Variables */
[data-theme="light"] {
    --bg-body: #F3F4F6;
    --bg-card: rgba(255, 255, 255, 0.4); /* More transparent for glass effect */
    --bg-card-hover: rgba(255, 255, 255, 0.6);
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --text-inverse: #fff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
    --nav-bg-mobile: rgba(255, 255, 255, 0.95);
    --shadow-glow: 0 10px 30px rgba(59, 130, 246, 0.1);
    --blob-opacity: 0.2; /* Lighter blobs for light mode */
    --footer-bg: #1F2937; /* Keep footer dark for contrast */
    --footer-border: rgba(255,255,255,0.1);
    --btn-close-filter: invert(1) grayscale(100%) brightness(0); /* Turn white close btn to black */
    --logo-filter: brightness(0); /* Make logo black if needed, or keep original */
    --gradient-text: linear-gradient(to right, #2563EB, #7C3AED); /* Darker gradient for text visibility */
    
    /* Creator Card Variables (Light Mode) - Now using generic card styles */
    --creator-bg: var(--bg-card);
    --creator-text: var(--text-main);
    --creator-muted: var(--text-muted);
    --creator-border: var(--glass-border);
}

/* --- Base Reset & Typography --- */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Jost', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main); /* Changed from #fff to variable */
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Footer headings should remain white as footer is always dark */
.footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6 {
    color: #fff;
}

a {
    text-decoration: none;
    transition: 0.3s ease;
}

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

.section-padding {
    padding: 100px 0;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hover-primary:hover {
    color: var(--primary) !important;
}

.hover-primary:hover .bg-dark {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.bg-white-5 {
    background: rgba(255, 255, 255, 0.05);
}

.x-small {
    font-size: 0.75rem;
}

/* --- Background Blobs Animation --- */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--blob-opacity);
    animation: float 10s infinite ease-in-out alternate;
    transition: opacity 0.3s ease;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    opacity: calc(var(--blob-opacity) * 0.5);
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* --- Navbar --- */
.navbar {
    padding: 20px 0;
    transition: 0.4s ease;
}

.navbar.navbar-scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: var(--glass-border);
    padding: 15px 0;
}

.navbar-brand img {
    height: 40px;
    /* filter: var(--logo-filter); Optional: uncomment if logo needs adjustment in light mode */
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main) !important; /* Changed from #fff */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 10px;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

/* Dropdown Menu Items */
.dropdown-item {
    color: var(--text-main);
    transition: 0.3s;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--bg-card-hover);
    color: var(--primary);
}

/* --- Buttons --- */
.btn-glow {
    background: var(--gradient-main);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: 0.4s;
    box-shadow: var(--shadow-glow);
}

.btn-glow:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.btn-outline-glow {
    background: transparent;
    color: var(--text-main); /* Changed from #fff */
    border: 1px solid var(--text-muted); /* Changed from rgba(255,255,255,0.2) */
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline-glow:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    color: var(--primary);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 30px;
    color: #3B82F6; /* Fixed color for visibility */
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-image-wrapper {
    position: relative;
    z-index: 2;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--gradient-main);
    filter: blur(60px);
    opacity: 0.4;
    z-index: -1;
}

/* --- Bento Grid Features --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 24px;
}

.bento-item {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.bento-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.bento-item.large {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1); /* Changed to colored bg for better visibility in light mode */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary); /* Changed to primary color */
    margin-bottom: auto;
    line-height: 1;
    flex-shrink: 0;
}

.bento-item.large .bento-icon {
    background: var(--gradient-main);
    color: #fff;
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.bento-content p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* --- Stats Section --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-card {
    padding: 30px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: var(--glass-border);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main); /* Changed from #fff */
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* --- Creator Section --- */
.creator-card {
    background: var(--creator-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--creator-border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    color: var(--creator-text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Override text colors for Creator Card to ensure visibility on dark background */
.creator-card h2, .creator-card h5, .creator-card p, .creator-card .step-item h5 {
    color: var(--creator-text);
}
.creator-card .text-muted {
    color: var(--creator-muted) !important;
}

.creator-gallery {
    position: relative;
}

.creator-img-item {
    transition: transform 0.3s ease;
}

.creator-img-item:hover {
    transform: translateY(-5px);
}

.border-glass {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Simple CSS Slideshow */
.slide-item {
    opacity: 0;
    animation: slideShow 16s infinite;
}

@keyframes slideShow {
    0% { opacity: 0; }
    5% { opacity: 1; }
    25% { opacity: 1; }
    30% { opacity: 0; }
    100% { opacity: 0; }
}

.step-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    color: #fff;
}

/* --- Testimonials --- */
.testimonial-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.client-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.testimonial-card .client-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

/* --- Video Modal --- */
.bg-dark-transparent {
    background: rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.video-item {
    transition: 0.3s;
    border: 1px solid transparent;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.cursor-pointer {
    cursor: pointer;
}

.z-index-10 {
    z-index: 10;
}

/* Modal Close Button Adaptation */
.btn-close-white {
    filter: var(--btn-close-filter);
}

/* --- Footer --- */
.footer {
    background: var(--footer-bg);
    padding-top: 80px;
    padding-bottom: 30px;
    border-top: 1px solid var(--footer-border);
    color: rgba(255,255,255,0.7);
}

.footer-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 10px;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--nav-bg-mobile);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: var(--glass-border);
        border-radius: 24px;
        padding: 30px;
        margin-top: 15px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        text-align: center;
    }

    .navbar-nav {
        width: 100%;
    }

    .nav-link {
        padding: 15px 0;
        margin: 5px 0;
        border-radius: 10px;
        display: block;
        width: 100%;
    }
    
    .nav-link:hover, .nav-link.active {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .nav-link::after {
        display: none; /* Remove underline animation on mobile */
    }

    .theme-toggle {
        margin-left: 0; /* Reset margin as we use flex gap now */
        width: 44px;
        height: 44px;
    }

    .hero-title {
        font-size: 3rem;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .bento-item.large, .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .hero-section {
        text-align: center;
        padding-top: 120px;
        display: block;
    }
    
    .hero-desc {
        margin: 0 auto 40px auto;
    }
    
    .hero-image-wrapper {
        margin-top: 50px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}
