/* ═══════════════════════════════════════════════════════════════════════
   RISING EDGE TECHNOLOGIES — Design System CSS (ui_design_pages)
   Corporate Dashboard Light Mode + Dark Theme
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bg-main: #f7fafc;
    --bg-card: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --brand-primary: #1a365d;
    --brand-secondary: #2c5282;
    --accent: #3182ce;
    --accent-glow: rgba(49, 130, 206, 0.15);
    --border: #e2e8f0;
    --header-gradient: linear-gradient(135deg, #1a365d, #2c5282);
    --cyan: #00f0ff;
    --cyan-dim: rgba(0, 240, 255, 0.08);
    --success: #38a169;
    --warning: #d69e2e;
}

[data-theme="dark"] {
    --bg-main: #1a202c;
    --bg-card: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --brand-primary: #90cdf4;
    --brand-secondary: #63b3ed;
    --accent: #63b3ed;
    --accent-glow: rgba(99, 179, 237, 0.15);
    --border: #4a5568;
    --header-gradient: linear-gradient(135deg, #2d3748, #1a365d);
    --cyan: #00dbe9;
    --cyan-dim: rgba(0, 219, 233, 0.1);
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ═══ CONTAINER ═══ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ═══ NAVIGATION ═══ */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 54, 93, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}
[data-theme="dark"] .nav {
    background: rgba(26, 32, 44, 0.95);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-row2 {
    background: rgba(0, 0, 0, 0.30);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.nav-row2-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}
.nav-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}
.nav-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
}
.nav-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}
.nav-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}
.nav-search-input:focus {
    background: rgba(255,255,255,0.15);
    border-color: rgba(0,240,255,0.4);
    box-shadow: 0 0 0 3px rgba(0,240,255,0.1);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff;
}
.nav-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--cyan), #3182ce);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-brand-icon svg { width: 20px; height: 20px; }
.nav-brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cyan);
    border-radius: 1px;
}
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--cyan);
    color: #1a365d;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }
.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.25);
    cursor: pointer;
}
.nav-login:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.nav-login svg { width: 16px; height: 16px; }
.nav-mobile-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
}
.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.2); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ═══ HEADER / HERO ═══ */
.hero {
    background: var(--header-gradient);
    color: #ffffff;
    padding: 6rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0,240,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(49,130,206,0.08) 0%, transparent 40%);
    pointer-events: none;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.hero .tech-labels {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══ SECTION ═══ */
.section {
    padding: 5rem 0;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
}
.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}
.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* ═══ CARDS ═══ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border-left: 5px solid var(--accent);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
}
.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; color: var(--accent); }

/* Card Variants */
.card--tutorial { border-left-color: #38a169; }
.card--tutorial .badge { color: #38a169; background: #f0fff4; }
.card--tutorial .card-icon { background: rgba(56, 161, 105, 0.1); }
.card--tutorial .card-icon svg { color: #38a169; }

.card--tool { border-left-color: #d69e2e; }
.card--tool .badge { color: #d69e2e; background: #fffbeb; }
.card--tool .card-icon { background: rgba(214, 158, 46, 0.1); }
.card--tool .card-icon svg { color: #d69e2e; }

.card--cyan { border-left-color: var(--cyan); }

/* ═══ BADGES ═══ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: #ebf8ff;
    padding: 4px 10px;
    border-radius: 9999px;
    margin-bottom: 1rem;
}
[data-theme="dark"] .badge {
    background: rgba(99, 179, 237, 0.15);
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #ffffff;
}
.btn-primary:hover { background: var(--brand-secondary); }
.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #ffffff; }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); background: var(--accent-glow); }
.btn-dark {
    background: var(--brand-primary);
    color: #ffffff;
}
.btn-dark:hover { background: var(--brand-secondary); }
.btn svg { width: 16px; height: 16px; }

/* ═══ METRICS ═══ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.metric-item {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.metric-item:hover { transform: translateY(-2px); }
.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}
.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══ TESTIMONIALS ═══ */
.testimonial-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    position: relative;
}
.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
}
.testimonial-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}
.testimonial-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.testimonial-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══ FAQ ACCORDION ═══ */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}
.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    transition: transform 0.2s;
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ═══ FOOTER ═══ */
.footer {
    background: var(--brand-primary);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}
[data-theme="dark"] .footer {
    background: #0f1724;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.footer p { font-size: 0.9rem; line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,240,255,0.3); }
    50% { box-shadow: 0 0 20px 4px rgba(0,240,255,0.1); }
}
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .nav-row2 { display: none; }
    .nav-links { display: none; }
    .nav-mobile-btn { display: flex; }
    .nav-search { max-width: 180px; margin: 0 0.75rem; }
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero h1 { font-size: 1.8rem; }
    .section { padding: 3rem 0; }
    .grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .hero-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
}

/* ═══ UTILITY ═══ */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-sm { gap: 0.75rem; }
