/* Site-wide styles - Mind Engineer Ali Theme */
/* Colors: #fafafa (bg), #ffffff (surface), #1a1a1a (text), #2d3748 (primary), #4a5568 (accent) */

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-primary: #2d3748;
    --color-accent: #4a5568;
    --color-border: #e2e8f0;
    --color-muted: #6b7280;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 0;
    background-color: var(--color-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--color-text);
}

/* Navbar */
.navbar {
    background-color: var(--color-surface) !important;
    border-bottom: 1px solid var(--color-border);
}

.navbar-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--color-text) !important;
}

.navbar-nav .nav-link {
    color: var(--color-accent) !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--color-primary) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Cards */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

/* Tables */
.table {
    color: var(--color-text);
}

.table th {
    font-weight: 600;
    color: var(--color-text);
    border-color: var(--color-border);
}

.table td {
    border-color: var(--color-border);
}

/* Footer */
footer {
    margin-top: auto;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

footer a {
    text-decoration: none;
    color: var(--color-muted);
}

footer a:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

/* Content protection styles */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Form styles */
.form-control {
    border-color: var(--color-border);
    color: var(--color-text);
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(45, 55, 72, 0.15);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--color-accent);
}

/* Links */
a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-accent);
}

/* Badges */
.badge {
    font-weight: 500;
}

.badge.bg-primary {
    background-color: var(--color-primary) !important;
}

.badge.bg-secondary {
    background-color: var(--color-accent) !important;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}

/* Page sections */
.section-header {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

/* Stat cards */
.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--color-muted);
    margin: 0;
}

/* Course cards */
.course-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.1);
}

/* Progress bar */
.progress {
    background-color: var(--color-border);
    border-radius: 0.25rem;
}

.progress-bar {
    background-color: var(--color-primary);
}

/* Muted text */
.text-muted {
    color: var(--color-muted) !important;
}

/* Mobile Responsive Styles */
@media (max-width: 767.98px) {
    /* Typography scaling for mobile */
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Hero section mobile */
    .hero-section {
        padding: 2rem 1rem !important;
        min-height: auto !important;
    }
    
    /* Service cards mobile */
    .service-card {
        padding: 1.25rem !important;
    }
    
    /* Stat cards mobile */
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-card h3,
    .stat-card .font-display.fw-bold {
        font-size: 1.5rem !important;
    }
    
    /* Footer mobile */
    footer .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }
    
    footer .text-md-end {
        text-align: center !important;
    }
    
    /* Button sizing for mobile */
    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Section padding mobile */
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 575.98px) {
    /* Extra small screens */
    .d-flex.flex-sm-row {
        flex-direction: column !important;
    }
    
    .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
    
    /* Full width buttons on very small screens */
    .btn-lg {
        width: 100%;
        justify-content: center !important;
        text-align: center !important;
    }
    
    /* Reduce spacing on smaller screens */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Stack credentials badge content */
    .d-inline-flex.gap-2 {
        flex-direction: column;
        text-align: center;
    }
    
    .d-inline-flex.gap-2 .text-muted:first-of-type {
        display: none;
    }
}

/* Service cards centered on mobile */
@media (max-width: 767.98px) {
    .service-card {
        text-align: center;
    }
    
    .service-card > div:first-child {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .service-card ul.list-unstyled {
        display: inline-block;
        text-align: left;
    }
    
    .service-card h5,
    .service-card p {
        text-align: center;
    }
}
