/*
Theme Name: Digitalsphere Theme
Theme URI: http://example.com/digitalsphere
Author: Digitalsphere Dev
Description: A bold, futuristic WordPress theme communicating innovation and power.
Version: 3.1 (Patched)
Text Domain: digitalsphere
*/

/* --- 0. CORE BEHAVIOR (NEW FIX) --- */
html {
    scroll-behavior: smooth; /* Enables smooth gliding to #contact */
}

/* --- 1. THEME IDENTITY & COLOR SYSTEM --- */
:root {
    /* Primary Backgrounds */
    --bg-dark: #050505;       /* Jet Black */
    --bg-deep: #0a0e17;       /* Deep Space Blue */
    --bg-panel: rgba(255, 255, 255, 0.05); /* Glassmorphism Base */

    /* Core Colors */
    --primary: #4F46E5;       /* Electric Indigo */
    --accent-cyan: #06b6d4;   /* Neon Cyan */
    --accent-purple: #7c3aed; /* Electric Purple */
    --accent-green: #10b981;  /* Tech Green */
    
    /* Typography */
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Text Colors */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #ffffff;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }

/* --- GLASSMORPHISM UTILITIES --- */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

/* --- BUTTONS (Gradient Glow) --- */
.btn-power {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: white;
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.btn-power:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.5); /* Purple Glow */
}

/* HERO BUTTON FIX (Crucial) */
.hero-content .btn-power, 
.hero-content a {
    position: relative;
    z-index: 100; /* Forces button above the canvas */
    pointer-events: auto; /* Ensures it recognizes clicks */
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ANIMATION UTILITIES --- */
.cursor {
    display: inline-block;
    color: var(--accent-cyan);
    font-weight: 700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

#hero-canvas {
    z-index: 1;
}

/* --- HEADER & NAV STYLES --- */

/* 1. Header Container */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: padding 0.3s ease, background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 5, 5, 0.85); /* Darker for better contrast */
    backdrop-filter: blur(10px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2. Logo */
.logo a {
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.logo span { color: var(--accent-cyan); }

/* 3. Menu Links - THE FIX FOR DOTS */
.nav-links, 
.nav-links ul, 
.nav-links li {
    list-style: none !important;      /* Kill dots on UL */
    list-style-type: none !important; /* Kill dots on LI */
    margin: 0;
    padding: 0;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.nav-links .current-menu-item a {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* --- LAYOUTS: GRIDS & SECTIONS --- */

/* Masonry Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 300px 300px;
    gap: 20px;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.project-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image { transform: scale(1.1); }

.project-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 2;
}

.project-cat {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.project-info h3 { margin: 5px 0 0; font-size: 1.5rem; }

/* Marquee */
.marquee-track { white-space: nowrap; overflow: hidden; position: relative; }
.marquee-content { display: inline-block; animation: scroll-left 25s linear infinite; }
.marquee-content span {
    font-family: var(--font-head); font-size: 4rem; font-weight: 700;
    color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15); margin-right: 60px;
}
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- MOBILE RESPONSIVENESS (FINAL FIX) --- */

/* 1. Toggle Button Default State (Hidden on Desktop) */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
}
.mobile-toggle span {
    display: block; width: 25px; height: 2px;
    background-color: white; margin: 6px 0; transition: 0.3s;
}

/* 2. Mobile Logic */
@media screen and (max-width: 768px) {
    
    /* Make Hamburger Visible */
    .mobile-toggle {
        display: block !important;
    }
    
    /* Toggle Button Animation (X shape) */
    .mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-toggle.open span:nth-child(2) { opacity: 0; }
    .mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Full Screen Menu Overlay */
    .nav-links {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off screen */
        width: 100%;
        height: 100vh;
        background: #050505;
        z-index: 1500;
        justify-content: center;
        align-items: center;
        transition: right 10.4s cubic-bezier(0.77, 0, 0.175, 1);
        padding-top: 50px;
    }

    /* Active State (Slide In) */
    .nav-links.active {
        right: 0 !important;
    }
    
    .nav-links a { font-size: 1.5rem; }

    /* Fix Grids to Stack Vertically */
    .project-grid {
        display: flex !important;
        flex-direction: column;
        gap: 30px;
    }
    
    .services-grid, .stats-grid, .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .project-card, .project-card.large {
        width: 100%;
        height: 300px;
    }
    
    /* Typography Adjustments */
    h1 { font-size: 2.5rem !important; line-height: 1.2; }
    .hero-section { padding-top: 100px; }
    .header-cta { display: none; }
}

/* --- CONTACT PAGE STYLES --- */

/* 1. The Hacked Map (Invert Colors) */
.map-frame iframe {
    /* This turns the light Google Map into a Dark Map */
    filter: invert(90%) hue-rotate(180deg) contrast(90%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.map-frame:hover iframe {
    opacity: 1; /* Brighten on hover */
}

/* 2. Cyber Form Layout */
.cyber-form {
    background: rgba(255, 255, 255, 0.02);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--accent-cyan);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}

/* 3. Neon Inputs */
.cyber-form input,
.cyber-form select,
.cyber-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    border-radius: 6px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    box-sizing: border-box; /* Fix width issues */
}

/* Focus State: The Glow */
.cyber-form input:focus,
.cyber-form select:focus,
.cyber-form textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    background: rgba(6, 182, 212, 0.05);
}

/* Mobile Fix for Split Layout */
@media (max-width: 768px) {
    .contact-interface {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

/* --- SINGLE POST / MISSION REPORT STYLES --- */

/* 1. Article Typography (Readable & Sharp) */
.mission-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1; /* Soft white/grey */
}

.mission-body p { margin-bottom: 25px; }

.mission-body h2 {
    font-size: 2rem;
    color: white;
    margin-top: 50px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-cyan);
    padding-left: 20px;
}

.mission-body h3 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-top: 40px;
}

.mission-body ul, .mission-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.mission-body li { margin-bottom: 10px; }

/* 2. Blockquotes (Cyber Style) */
.mission-body blockquote {
    background: rgba(6, 182, 212, 0.05); /* Very faint Cyan */
    border-left: 2px solid var(--accent-cyan);
    margin: 40px 0;
    padding: 30px;
    font-style: italic;
    color: white;
    font-size: 1.25rem;
}

/* 3. Images in Content */
.mission-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    margin: 30px 0;
}

/* 4. Floating Share Nodes */
.share-node {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.share-node:hover {
    border-color: currentColor; /* Uses the text color defined in HTML */
    box-shadow: 0 0 15px currentColor;
    transform: translateX(5px);
}

/* Mobile Sidebar Fix */
@media (max-width: 900px) {
    .container { flex-direction: column; }
    .mission-sidebar { 
        width: 100%; 
        order: 2; 
        margin-top: 40px;
    }
    .sticky-wrapper {
        position: static !important;
        flex-direction: row !important;
        justify-content: center;
    }
    .sticky-wrapper span { writing-mode: horizontal-tb !important; }
}

/* --- BLOG CARD INTERACTIONS --- */
.blog-grid article:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.blog-grid article:hover h3 a {
    color: var(--accent-cyan);
}

/* --- PAGINATION STYLES --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a, 
.pagination span {
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: var(--accent-cyan);
    color: black;
    border-color: var(--accent-cyan);
    font-weight: bold;
}

/* --- SLOW MOTION MENU PATCH --- */

/* 1. Slow down the Header Shrink/Background effect */
.site-header {
    transition: padding 0.6s ease, background 0.6s ease !important; 
    /* Changed from 0.3s to 0.6s */
}

/* 2. Slow down Menu Link Hovers */
.nav-links a {
    transition: all 0.9s ease !important; 
    /* Changed from 0.3s to 0.9s */
}

/* 3. Slow down the Mobile Menu Slide-In (The Big One) */
@media screen and (max-width: 768px) {
    .nav-links {
        transition: right 10.0s cubic-bezier(0.77, 0, 0.175, 1) !important; 
        /* Changed from 0.4s to 10.8s for a cinematic slide */
    }
}

/* Header Base Styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    /* Add your .glass-panel styles here (background, blur, etc.) */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1200px; /* Adjust based on your design */
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo Styles */
.logo a {
    text-decoration: none;
    font-family: var(--font-head, sans-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    max-height: 40px;
    width: auto;
}

/* Navigation */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

/* Header Actions (Button + Toggle) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none; /* Hidden on desktop by default */
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1501;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .desktop-only {
        display: none; /* Hides "Get Started" button on small screens if desired */
    }

    .nav-links {
        display: none; /* Hide menu by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(0,0,0,0.9); /* Dark background for mobile menu */
        padding: 20px;
        text-align: center;
    }

    .nav-links.active {
        display: flex; /* Show when active class is added via JS */
    }
}