/* CyBEARSec Main Stylesheet */
:root {
    --primary-color: #0080ff;
    --secondary-color: #00d4ff;
    --accent-color: #ff00ff;
    --dark-bg: #1b263f;
    --darker-bg: #141d2e;
    --card-bg: #212e48;
    --text-light: #e8e8e8;
    --text-muted: #a8b2c3;
    --border-color: #2a3a5c;
    --success: #0080ff;
    --danger: #ff0040;
    --warning: #ffaa00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Ensure content appears above particles */
.container,
.navbar,
.hero-section,
.services-section,
.features-section,
.cta-section,
.site-footer,
.page-header,
main,
section {
    position: relative;
    z-index: 2;
}

/* Navigation */
.navbar {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 1rem 0;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(5, 8, 16, 0.98);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

/* Hide Bootstrap's dropdown caret but restore our custom underline */
.navbar-nav .dropdown-toggle::after {
    display: block !important;
    content: '' !important;
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border: none !important;
}

.navbar-nav .dropdown-toggle:hover::after {
    width: 80%;
}

.cyber-dropdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
    z-index: 1001;
}

.dropdown-menu {
    z-index: 1001 !important;
}

.dropdown-item {
    color: var(--text-light);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: transparent;
    padding: 2rem 0;
    margin-top: 80px;
    position: relative;
    text-align: center;
}

/* Hero Visual - Hacking Terminal */
.hack-terminal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    height: 400px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    box-shadow: 0 10px 30px rgba(0, 128, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.hack-terminal .terminal-header {
    background: var(--border-color);
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hack-terminal .terminal-title {
    color: var(--text-light);
    font-size: 12px;
    font-weight: bold;
}

.hack-terminal .terminal-body {
    padding: 20px 25px;
    flex: 1;
    color: #00ff41;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prompt-line {
    margin-bottom: 15px;
    flex-shrink: 0;
    text-align: left;
    display: flex;
    align-items: center;
}

.output-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.prompt {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.command {
    color: #00ff41;
    margin-left: 5px;
    font-size: 14px;
}

.cursor {
    color: #00ff41;
    animation: blink 1s infinite;
    font-size: 14px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.output-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    min-height: 0;
    padding-bottom: 5px;
}

.output-line {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.3;
}

.success-line {
    color: #00ff41;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    padding: 4px 0;
}

.error-line {
    color: var(--danger);
}

.hack-terminal .terminal-body::-webkit-scrollbar {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    animation: glitchAnimation 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, 1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(40% 0 40% 0); transform: translate(1px, -1px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-cyber-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-cyber-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
    color: var(--dark-bg);
}

.btn-cyber-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-cyber-secondary:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.cyber-grid {
    width: 100%;
    height: 100%;
    position: relative;
}

.grid-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Global particle canvas styling handled by JavaScript */
#particleCanvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Services Section */
.services-section {
    background: transparent;
    position: relative;
    padding: 5rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: none;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 128, 255, 0.1), transparent);
    transition: none;
}

.service-card:hover::before {
    left: 100%;
    transition: left 0.5s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 128, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Red Team Operations special styling */
.service-card.red-team:hover {
    border-color: #ff0040;
    box-shadow: 0 10px 30px rgba(255, 0, 64, 0.2);
}

.service-card.red-team:hover .service-icon {
    color: #ff0040;
}

/* Red Team card red shimmer */
.service-card.red-team::before {
    background: linear-gradient(90deg, transparent, rgba(255, 0, 64, 0.1), transparent);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* Encryption/Decryption Effects */
.encrypted-text {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    opacity: 0.7;
    letter-spacing: 1px;
}

.decrypting {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.decrypted {
    animation: decryptionComplete 0.5s ease;
    color: var(--text-light);
    text-shadow: none;
    letter-spacing: normal;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes decryptionComplete {
    0% {
        color: var(--primary-color);
        text-shadow: 0 0 10px var(--primary-color);
    }
    100% {
        color: var(--text-light);
        text-shadow: none;
    }
}

.decryption-pulse {
    animation: cardPulse 0.5s ease;
}

@keyframes cardPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 128, 255, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 10px 40px rgba(0, 255, 65, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 128, 255, 0.2);
    }
}

/* Features Section */
.features-section {
    background: transparent;
    padding: 5rem 0;
}

.feature-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: start;
    gap: 1.5rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.feature-item p {
    color: var(--text-muted);
}

.security-terminal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: #1e2936;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-body {
    padding: 20px;
    height: 300px;
    max-height: 300px;
    font-family: 'Courier New', monospace;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Hide scrollbar for terminal but keep scroll functionality */
.terminal-body::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
.terminal-body {
    scrollbar-width: none;
}

/* Hide scrollbar for IE/Edge */
.terminal-body {
    -ms-overflow-style: none;
}

#terminalText {
    color: #00ff41;
    font-size: 14px;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: transparent;
    padding: 4rem 0;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: transparent;
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-brand h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.site-footer h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.footer-contact {
    list-style: none;
}

.footer-contact li {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0 1rem;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Scrolling Hacker Icon */
.scrolling-hacker {
    position: fixed;
    right: 30px;
    top: 0;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hacker-icon-wrapper {
    position: relative;
    font-size: 40px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: hackerBob 3s ease-in-out infinite;
}

@keyframes hackerBob {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.hacker-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.3), transparent);
    border-radius: 50%;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.scan-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
}

.scan-lines span {
    position: absolute;
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
}

.scrolling-hacker.active .scan-lines span {
    animation: scanLine 1.5s ease-in-out;
}

.scan-lines span:nth-child(1) {
    top: 30%;
    animation-delay: 0s;
}

.scan-lines span:nth-child(2) {
    top: 50%;
    animation-delay: 0.2s;
}

.scan-lines span:nth-child(3) {
    top: 70%;
    animation-delay: 0.4s;
}

@keyframes scanLine {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
        transform: scaleX(0);
    }
}

.hacker-trail {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.trail-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
}

.scrolling-hacker.moving-down .trail-dot {
    animation: trailDown 0.6s ease-out;
}

.scrolling-hacker.moving-up .trail-dot {
    animation: trailUp 0.6s ease-out;
}

.trail-dot:nth-child(1) {
    animation-delay: 0s;
}

.trail-dot:nth-child(2) {
    animation-delay: 0.1s;
    top: -10px;
}

.trail-dot:nth-child(3) {
    animation-delay: 0.2s;
    top: -20px;
}

@keyframes trailDown {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes trailUp {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Hide on small screens for better mobile experience */
@media (max-width: 768px) {
    .scrolling-hacker {
        right: 15px;
        font-size: 30px;
    }

    .hacker-icon-wrapper {
        font-size: 30px;
    }

    .hacker-glow,
    .scan-lines {
        width: 50px;
        height: 50px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 2rem;
    }

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

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

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

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