/* ============================================
   Qatar Internet Systems - Main Stylesheet
   Theme: Flowing Data Streams
   Colors: Deep blue, Aqua gradients, White text
   ============================================ */

/* CSS Variables */
:root {
    --primary-dark: #0a1628;
    --primary-blue: #0d2847;
    --secondary-blue: #1a3a5c;
    --accent-aqua: #00d4ff;
    --accent-cyan: #00fff2;
    --accent-teal: #00b4d8;
    --text-white: #ffffff;
    --text-light: #e0e6ed;
    --text-muted: #8899a6;
    --gradient-flow: linear-gradient(135deg, #00d4ff 0%, #00fff2 50%, #00b4d8 100%);
    --gradient-dark: linear-gradient(180deg, #0a1628 0%, #0d2847 50%, #1a3a5c 100%);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --transition-smooth: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-dark);
    color: var(--text-white);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation - Flowing Data Streams */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 255, 242, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 180, 216, 0.05) 0%, transparent 70%);
    animation: flowBackground 20s ease-in-out infinite;
}

@keyframes flowBackground {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(-2%, 2%) rotate(-1deg); }
}

/* Flowing Lines Container */
.flow-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-aqua), transparent);
    animation: flowLine 8s linear infinite;
}

.flow-line:nth-child(1) { top: 20%; animation-delay: 0s; width: 30%; left: -30%; }
.flow-line:nth-child(2) { top: 40%; animation-delay: 2s; width: 25%; left: -25%; }
.flow-line:nth-child(3) { top: 60%; animation-delay: 4s; width: 35%; left: -35%; }
.flow-line:nth-child(4) { top: 80%; animation-delay: 6s; width: 20%; left: -20%; }
.flow-line:nth-child(5) { top: 30%; animation-delay: 1s; width: 28%; left: -28%; }
.flow-line:nth-child(6) { top: 70%; animation-delay: 3s; width: 32%; left: -32%; }

@keyframes flowLine {
    0% { transform: translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 100%)); opacity: 0; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-white);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-flow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-dark);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent-aqua);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-aqua);
    background: rgba(0, 212, 255, 0.1);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-aqua);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 30px;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(0, 212, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

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

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-visual {
    margin-top: 60px;
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Data Flow Visualization */
.data-flow {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.node {
    width: 80px;
    height: 80px;
    background: var(--secondary-blue);
    border: 2px solid var(--accent-aqua);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.node::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-aqua);
    animation: nodePulse 2s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0; }
}

.data-stream {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-aqua), var(--accent-cyan));
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.data-stream::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    background: var(--text-white);
    border-radius: 2px;
    animation: streamFlow 1.5s linear infinite;
}

@keyframes streamFlow {
    0% { left: -30px; }
    100% { left: 100%; }
}

/* Main Content */
.main-content {
    padding: 60px 0;
}

.content-section {
    margin-bottom: 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-flow);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(26, 58, 92, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 35px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-flow);
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-aqua);
    box-shadow: var(--shadow-glow);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.card p {
    color: var(--text-muted);
    line-height: 1.8;
}

.card a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-aqua);
    text-decoration: none;
    margin-top: 20px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.card a:hover {
    gap: 12px;
}

/* Info Box */
.info-box {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 25px 30px;
    margin: 40px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-box-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box-content h4 {
    color: var(--accent-aqua);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.info-box-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Disclaimer Box */
.disclaimer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 25px 30px;
    margin: 40px 0;
}

.disclaimer h4 {
    color: #ffc107;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.disclaimer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Content Article */
.article {
    background: rgba(26, 58, 92, 0.2);
    border-radius: 16px;
    padding: 50px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.article h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--text-white);
}

.article h3 {
    font-size: 1.5rem;
    margin: 35px 0 20px;
    color: var(--accent-aqua);
}

.article p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.9;
}

.article ul, .article ol {
    margin: 20px 0 20px 30px;
    color: var(--text-light);
}

.article li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.article li::marker {
    color: var(--accent-aqua);
}

/* FAQ Section */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(26, 58, 92, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-white);
    transition: var(--transition-smooth);
}

.faq-question:hover {
    background: rgba(0, 212, 255, 0.05);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--accent-aqua);
    transition: var(--transition-smooth);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.contact-card {
    background: rgba(26, 58, 92, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    border-color: var(--accent-aqua);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 25px;
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.contact-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-card a {
    color: var(--accent-aqua);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-card a:hover {
    color: var(--accent-cyan);
}

/* Footer */
.footer {
    background: rgba(10, 22, 40, 0.95);
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--accent-aqua);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent-aqua);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-flow);
    color: var(--primary-dark);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-aqua);
    color: var(--accent-aqua);
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.1);
}

/* Layers Diagram */
.layers-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 600px;
    margin: 40px auto;
}

.layer {
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: var(--transition-smooth);
}

.layer:first-child {
    border-radius: 16px 16px 0 0;
}

.layer:last-child {
    border-radius: 0 0 16px 16px;
}

.layer-core {
    background: rgba(0, 180, 216, 0.3);
}

.layer-distribution {
    background: rgba(0, 212, 255, 0.2);
}

.layer-access {
    background: rgba(0, 255, 242, 0.1);
}

.layer:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.layer h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.layer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .article {
        padding: 35px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 22, 40, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        border-bottom: 1px solid rgba(0, 212, 255, 0.2);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 12px 20px;
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .data-flow {
        flex-direction: column;
        gap: 20px;
    }
    
    .data-stream {
        width: 4px;
        height: 40px;
    }
    
    .data-stream::after {
        width: 100%;
        height: 15px;
        animation: streamFlowVertical 1.5s linear infinite;
    }
    
    @keyframes streamFlowVertical {
        0% { top: -15px; left: 0; }
        100% { top: 100%; left: 0; }
    }
    
    .article {
        padding: 25px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 25px;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 50px 0 70px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-visual {
        height: 200px;
    }
    
    .node {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .faq-question {
        padding: 20px;
        font-size: 1rem;
    }
    
    .footer-content {
        gap: 30px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-aqua { color: var(--accent-aqua); }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

/* Print Styles */
@media print {
    .header, .footer, .bg-animation, .flow-lines {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card, .article, .faq-item {
        border: 1px solid #ccc;
        background: white;
    }
}