/* Incluva - GLOBAL BRAND & DESIGN SYSTEM */

:root {
    /* Colors - Deep Slate and Radiant Gold (Premium Modern Dark Theme) */
    --bg-main: #0b0f19;
    --bg-card: #162032;
    --bg-input: #1f2d44;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #f59e0b; /* Golden Amber */
    --primary-hover: #d97706;
    --primary-rgb: 245, 158, 11;
    --secondary: #10b981; /* Emerald Green */
    --secondary-hover: #059669;
    --danger: #ef4444;
    --border: #2d3d52;
    
    /* Layout */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Accessibility Standard Settings */
    --focus-ring: 3px solid var(--primary);
    --focus-offset: 3px;
    
    /* Line/Word Spacing Defaults */
    --letter-spacing: normal;
    --word-spacing: normal;
    --line-height: 1.6;
}

/* HIGH CONTRAST DARK */
html.theme-high-contrast-dark {
    --bg-main: #000000;
    --bg-card: #000000;
    --bg-input: #000000;
    --text-main: #ffffff;
    --text-muted: #ffffff;
    --primary: #ffff00; /* Yellow */
    --primary-hover: #ffff00;
    --primary-rgb: 255, 255, 0;
    --secondary: #00ffff; /* Cyan */
    --secondary-hover: #00ffff;
    --danger: #ff00ff; /* Magenta */
    --border: #ffffff;
    --focus-ring: 5px solid #ffff00;
    --focus-offset: 4px;
}

/* HIGH CONTRAST LIGHT */
html.theme-high-contrast-light {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-main: #000000;
    --text-muted: #000000;
    --primary: #0000ff; /* Blue */
    --primary-hover: #0000ff;
    --primary-rgb: 0, 0, 255;
    --secondary: #008000; /* Green */
    --secondary-hover: #008000;
    --danger: #ff0000; /* Red */
    --border: #000000;
    --focus-ring: 5px solid #0000ff;
    --focus-offset: 4px;
}

/* DYSLEXIC FRIENDLY OVERRIDES */
html.font-dyslexic, html.font-dyslexic * {
    font-family: "Comic Sans MS", "Comic Sans", "Arial Black", sans-serif !important;
    --letter-spacing: 0.12em !important;
    --word-spacing: 0.25em !important;
    --line-height: 2.0 !important;
}

/* Text Size scaling */
html.size-large { font-size: 115%; }
html.size-xlarge { font-size: 130%; }
html.size-xxlarge { font-size: 150%; }

/* Core Reset & Accessibility Rules */
* {
    box-sizing: border-box;
    letter-spacing: var(--letter-spacing);
    word-spacing: var(--word-spacing);
    line-height: var(--line-height);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--primary);
    color: var(--bg-main);
    padding: 12px 24px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    z-index: 1000;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 20px;
    outline: var(--focus-ring);
}

/* Focus Outline Rules */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible, 
select:focus-visible,
[tabindex]:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
}

/* Screen Reader Only Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Layout Utilities */
header {
    background: rgba(22, 32, 50, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 40px;
}

html.theme-high-contrast-dark header,
html.theme-high-contrast-light header {
    background: var(--bg-card);
    backdrop-filter: none;
}

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

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

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.nav-links a:hover {
    background-color: var(--bg-input);
    color: var(--primary);
}

.nav-links a.active {
    border-color: var(--primary);
    color: var(--primary);
}

main {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-top: 0;
    color: var(--text-main);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

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

html.theme-high-contrast-dark p,
html.theme-high-contrast-light p {
    color: var(--text-main);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
}

html.theme-high-contrast-dark .card,
html.theme-high-contrast-light .card {
    box-shadow: none;
    transform: none !important;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    background-color: var(--bg-input);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition);
}

input:hover, select:hover, textarea:hover {
    border-color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-main);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-input);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-full {
    width: 100%;
}

.google-btn {
    background-color: #ffffff;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.google-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

/* Badges / Status */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--secondary); border: 1px solid var(--secondary); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--primary); border: 1px solid var(--primary); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid var(--danger); }

/* Accessibility Controls floating toolbar */
.accessibility-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.accessibility-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--bg-main);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition);
}

.accessibility-toggle:hover, .accessibility-toggle:focus {
    transform: scale(1.1);
}

.accessibility-panel {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
}

.accessibility-panel.open {
    display: block;
}

.accessibility-panel h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    color: var(--primary);
}

.accessibility-control-group {
    margin-bottom: 15px;
}

.accessibility-control-group label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.accessibility-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.accessibility-btns button {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.accessibility-btns button:hover, .accessibility-btns button:focus {
    border-color: var(--primary);
    color: var(--primary);
}

.accessibility-btns button.active {
    background-color: var(--primary);
    color: var(--bg-main);
    border-color: var(--primary);
}

/* Grid systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* Course Tabs */
.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border);
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Custom Alert Banner */
.flash-msg {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.flash-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    border-color: rgba(16, 185, 129, 0.3);
}

.flash-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-input);
    color: var(--primary);
    font-weight: 600;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Audio/Video styling */
.media-container {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

audio, video {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
}

