﻿/* ========================================
   TeamSoft Learning Platform - Custom Styles
   File: wwwroot/css/app.css
   ======================================== */

/* Root Variables for Easy Theme Customization */
:root {
    --primary-color: #14b8a6;
    --primary-hover: #0d9488;
    --secondary-color: #10b981;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* ========================================
   Global Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

/* ========================================
   Loading Spinner
   ======================================== */

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Transitions & Animations
   ======================================== */

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ========================================
   Card & Shadow Effects
   ======================================== */

.hover\:shadow-lg:hover {
    box-shadow: var(--shadow-lg);
}

.hover\:shadow-xl:hover {
    box-shadow: var(--shadow-xl);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Card Hover Animation */
.course-card,
.category-card,
.training-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .course-card:hover,
    .category-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
    }

    .training-card:hover {
        transform: scale(1.02);
        box-shadow: var(--shadow-xl);
    }

/* ========================================
   Button Styles & Effects
   ======================================== */

button {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

    button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Ripple Effect */
    button:active::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        animation: ripple 0.6s ease-out;
    }

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Primary Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: none;
    transition: background-color 0.3s ease;
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
    }

/* ========================================
   Image Effects
   ======================================== */

/* Grayscale Filter */
.grayscale {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

    .grayscale:hover {
        filter: grayscale(0%);
    }

/* Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
}

    .image-zoom img {
        transition: transform 0.5s ease;
    }

    .image-zoom:hover img {
        transform: scale(1.1);
    }

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-hover);
    }

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

/* ========================================
   Typography Enhancements
   ======================================== */

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Text Shadow for Headers */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Badge & Tag Styles
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-success {
    background-color: var(--secondary-color);
    color: white;
}

/* ========================================
   Pulse Animation
   ======================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Live Indicator Pulse */
.live-pulse {
    position: relative;
}

    .live-pulse::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-color: currentColor;
        opacity: 0.6;
        animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ========================================
   Skeleton Loading Animation
   ======================================== */

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background-color: #e0e0e0;
    background-image: linear-gradient( 90deg, #e0e0e0 0px, #f0f0f0 40px, #e0e0e0 80px );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

/* ========================================
   Focus & Accessibility
   ======================================== */

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus Visible (for keyboard navigation) */
button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Remove outline for mouse clicks */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Grid & Layout Helpers
   ======================================== */

.container-custom {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* ========================================
   Responsive Design Utilities
   ======================================== */

/* Mobile-first responsive adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .section-spacing {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 768px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

/* Backdrop Blur */
.backdrop-blur {
    backdrop-filter: blur(8px);
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hover Scale */
.hover-scale:hover {
    transform: scale(1.05);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ========================================
   Card Rating Stars
   ======================================== */

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

    .rating-stars i {
        color: #fbbf24;
    }

/* ========================================
   Testimonial Card Styles
   ======================================== */

.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .testimonial-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

/* ========================================
   Gradient Backgrounds
   ======================================== */

.gradient-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   Blazor Error UI
   ======================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ========================================
   End of Stylesheet
   ======================================== */
