/* ============================================
   CertifyClouds Shared Styles
   Common CSS for all subpages
   ============================================ */

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

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Brand Colors (Theme-invariant) */
    --brand-azure: #0078D4;
    --brand-azure-light: #2899F5;
    --brand-azure-dark: #005A9E;
    --brand-violet: #8B5CF6;
    --brand-violet-dark: #7C3AED;
    --brand-cyan: #06B6D4;
    --gradient-cta: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 100%);
    --glow-violet: 0 0 40px rgba(139, 92, 246, 0.4);

    /* Dark Theme (Default) */
    --bg-dark: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-input: #1E293B;
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border-subtle: rgba(0, 120, 212, 0.2);
    --nav-bg: rgba(15, 15, 26, 0.95);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Light Theme */
[data-theme="light"] {
    --bg-dark: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border-subtle: rgba(0, 120, 212, 0.15);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --glow-violet: 0 0 40px rgba(139, 92, 246, 0.25);
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #7C3AED 0%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .nav-cta { color: white; }

html.theme-transitioning, html.theme-transitioning *, html.theme-transitioning *::before, html.theme-transitioning *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* ============================================
   Navigation
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
}

/* Logo container - fixed dimensions prevent layout shifts */
.logo-container {
    position: relative;
    height: 110px;
    width: 110px;
    margin: -15px 0;
    flex-shrink: 0;
}
.logo-container img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: auto;
    transition: opacity 0.2s ease;
}
.logo-dark { opacity: 1; }
.logo-light { opacity: 0; }
[data-theme="light"] .logo-dark { opacity: 0; }
[data-theme="light"] .logo-light { opacity: 1; }

@media (max-width: 768px) {
    .logo-container {
        height: 70px;
        width: 70px;
        margin: -8px 0;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--brand-azure-light);
}

.nav-links a.active {
    color: var(--brand-azure-light);
    border-bottom: 2px solid var(--brand-cyan);
    padding-bottom: 2px;
}

.nav-cta {
    background: var(--gradient-cta);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-violet);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-content { flex-wrap: wrap; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        order: 3;
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border-subtle); border-radius: 9999px; background: transparent; color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; }
.theme-toggle:hover { border-color: var(--brand-azure); color: var(--brand-azure-light); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--brand-azure-light);
    text-decoration: none;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie-btn-accept {
    background: var(--gradient-cta);
    color: white;
    border: none;
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: var(--glow-violet);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.cookie-btn-decline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .cookie-consent {
        padding: 1rem;
    }
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}

/* ============================================
   Page Layout
   ============================================ */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-header {
    padding-top: 120px;
    padding-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-secondary);
}

.content {
    padding-bottom: 4rem;
}

/* ============================================
   Content Typography
   ============================================ */
.content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content ul {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--brand-azure-light);
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

/* ============================================
   Highlight Box
   ============================================ */
.highlight-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.highlight-box p {
    color: var(--text-secondary);
    margin: 0;
}

.highlight-box strong {
    color: var(--brand-azure-light);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-card);
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

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

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 0.5rem;
}

footer a:hover {
    color: var(--brand-azure-light);
}
