/**
 * CJ Technical Training - Custom Styles
 * Bootstrap 5 + PHP + MySQL Conversion
 * Maintaining original design aesthetics
 */

:root {
    --primary-blue: #1e40af;
    --primary-blue-dark: #1e3a8a;
    --primary-blue-light: #3b82f6;
    --accent-orange: #f97316;
    --accent-orange-dark: #ea580c;
    --accent-orange-light: #fb923c;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Bootstrap Overrides for Exact Color Matching */
.bg-blue-900 {
    background-color: #1e3a8a !important;
   
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--primary-blue), var(--accent-orange)) !important;
}

.text-gray-900 {
    color: #111827 !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.text-gray-700 {
    color: #374151 !important;
}

.bg-orange-500 {
    background-color: #f97316 !important;
}

.bg-orange-500:hover {
    background-color: #ea580c !important;
}

.w-12 {
    width: 3rem !important;
}

.h-12 {
    height: 3rem !important;
}

.w-16 {
    width: 4rem !important;
}

.h-16 {
    height: 4rem !important;
}

.bg-gradient-to-r {
    background: linear-gradient(to right, #1e3a8a, #1e40af, #3b82f6) !important;
}

.from-blue-900 {
    --tw-gradient-from: #1e3a8a !important;
}

.via-blue-800 {
    --tw-gradient-via: #1e40af !important;
}

.to-blue-700 {
    --tw-gradient-to: #3b82f6 !important;
}

.text-orange-400 {
    color: #fb923c !important;
}

.text-blue-100 {
    color: #dbeafe !important;
}

.text-blue-200 {
    color: #bfdbfe !important;
}

.bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.opacity-10 {
    opacity: 0.1 !important;
}

.bg-gray-50 {
    background-color: #f9fafb !important;
}

.bg-blue-600 {
    background-color: #2563eb !important;
}

.bg-blue-600:hover {
    background-color: #1d4ed8 !important;
}

.bg-yellow-500 {
    background-color: #eab308 !important;
}

.bg-green-600 {
    background-color: #16a34a !important;
}

.bg-purple-600 {
    background-color: #9333ea !important;
}

.bg-red-600 {
    background-color: #dc2626 !important;
}

.bg-amber-600 {
    background-color: #d97706 !important;
}

.bg-cyan-600 {
    background-color: #0891b2 !important;
}

.text-blue-600 {
    color: #2563eb !important;
}

.text-blue-600:hover {
    color: #1d4ed8 !important;
}

.rounded-3 {
    border-radius: 0.75rem !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
}

.from-orange-500 {
    --tw-gradient-from: #f97316 !important;
}

.to-purple-600 {
    --tw-gradient-to: #9333ea !important;
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)) !important;
}

.space-y-3 > * + * {
    margin-top: 0.75rem !important;
}

.bg-green-600 {
    background-color: #16a34a !important;
}

.bg-green-600:hover {
    background-color: #15803d !important;
}

.bg-red-600 {
    background-color: #dc2626 !important;
}

.bg-red-600:hover {
    background-color: #b91c1c !important;
}

.bg-blue-700 {
    background-color: #1d4ed8 !important;
}

.bg-blue-700:hover {
    background-color: #1e40af !important;
}

.bg-purple-600 {
    background-color: #9333ea !important;
}

.bg-purple-600:hover {
    background-color: #7c3aed !important;
}

.text-green-600 {
    color: #16a34a !important;
}

.text-red-600 {
    color: #dc2626 !important;
}

.text-blue-700 {
    color: #1d4ed8 !important;
}

.text-purple-600 {
    color: #9333ea !important;
}

/* Logo Styling */
.logo-container {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-orange) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 50%, var(--primary-blue-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

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

/* Custom Button Styles */
.btn-primary-custom {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning-custom {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-warning-custom:hover {
    background: var(--accent-orange-dark);
    border-color: var(--accent-orange-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-white {
    border: 2px solid white;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Card Styles */
.card-custom {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-orange) 100%);
    color: white;
    border: none;
    padding: 1.5rem;
}

/* Course Card Colors */
.course-card-orange .card-header-custom {
    background: var(--accent-orange);
}

.course-card-blue .card-header-custom {
    background: var(--primary-blue);
}

.course-card-yellow .card-header-custom {
    background: #eab308;
}

.course-card-green .card-header-custom {
    background: #16a34a;
}

.course-card-purple .card-header-custom {
    background: #9333ea;
}

.course-card-red .card-header-custom {
    background: #dc2626;
}

.course-card-amber .card-header-custom {
    background: #d97706;
}

.course-card-cyan .card-header-custom {
    background: #0891b2;
}

/* Stats Section */
.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Section Spacing */
.section-padding {
    padding: 5rem 0;
}

.section-padding-sm {
    padding: 3rem 0;
}

/* Background Colors */
.bg-light-custom {
    background-color: var(--bg-light);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
}

.bg-gradient-orange {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
}

/* Text Colors */
.text-primary-custom {
    color: var(--primary-blue) !important;
}

.text-warning-custom {
    color: var(--accent-orange) !important;
}

/* Form Styles */
.form-control-custom {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

.form-label-custom {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress-step {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--primary-blue);
    color: white;
}

.progress-step.completed {
    background: var(--accent-orange);
    color: white;
}

.progress-step.pending {
    background: #e5e7eb;
    color: #6b7280;
}

.progress-line {
    height: 0.25rem;
    background: #e5e7eb;
    border-radius: 0.125rem;
    transition: all 0.3s ease;
}

.progress-line.completed {
    background: var(--accent-orange);
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.testimonial-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
}

/* FAQ Accordion */
.accordion-custom .accordion-button {
    background: var(--bg-light);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 1rem 1.5rem;
}

.accordion-custom .accordion-button:not(.collapsed) {
    background: var(--primary-blue);
    color: white;
    box-shadow: none;
}

.accordion-custom .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

.accordion-custom .accordion-body {
    background: white;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1.5rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
    background: rgba(30, 64, 175, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.05);
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    width: 5rem;
    height: 5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn-primary-custom,
    .btn-warning-custom,
    .btn-outline-white {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Improve readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    h1, .display-4 { font-size: 1.75rem !important; }
    h2, .display-5 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    .lead { font-size: 1rem !important; }

    /* Tap targets */
    .site-nav .nav-link,
    .site-nav a.bg-orange-500 {
        padding: 0.75rem 0.75rem !important;
    }
    .site-nav .nav-link { min-height: 44px; display: flex; align-items: center; }
}

/* Sticky header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Slightly reduce main header height on larger screens without affecting mobile */
@media (min-width: 992px) {
    .sticky-header .d-flex.align-items-center.py-4 {
        padding-top: 1rem !important;   /* down from Bootstrap py-4 (1.5rem) */
        padding-bottom: 1rem !important;
    }
}

/* Focus styles for accessibility */
.site-nav .nav-link:focus,
.btn:focus,
.btn-primary-custom:focus,
.btn-warning-custom:focus,
.btn-outline-white:focus,
button:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
    box-shadow: none !important;
}

/* Larger mobile menu touch target */
.navbar-toggler {
    padding: 0.75rem !important;
}

/* Improve contrast for footer links */
footer a:hover {
    color: #ffffff !important;
}
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header Navigation Sizing */
.site-nav a:not(.bg-orange-500) {
    font-weight: 600;
}

@media (min-width: 992px) {
    .site-nav a:not(.bg-orange-500) {
        font-size: 1.0625rem; /* ~17px */
    }
}