/**
 * Courses Page Styles
 * Premium UI with sophisticated animations
 * All class names prefixed with 'courses-' to avoid conflicts
 * 
 * File: assets/css/pages/courses.css
 */

/* ============================================
   COURSES HEADER V2 - REDESIGNED
   ============================================ */

.courses-header-v2 {
    position: relative;
    background: linear-gradient(135deg, 
        #fff5f7 0%, 
        #fdf2f8 25%, 
        #faf5ff 50%, 
        #fdf2f8 75%, 
        #fff5f7 100%
    );
    overflow: hidden;
    padding: 3rem 0 4rem;
}

/* Decorative Background Elements */
.courses-header-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.courses-bg-gradient-layer {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(251, 113, 133, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.06) 0%, transparent 60%);
}

.courses-floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.courses-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.15), rgba(244, 114, 182, 0.15));
    animation: courses-float-gentle 20s ease-in-out infinite;
}

.courses-shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -50px;
    animation-delay: 0s;
}

.courses-shape-2 {
    width: 200px;
    height: 200px;
    top: 30%;
    right: 10%;
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.15), rgba(168, 85, 247, 0.15));
    animation-delay: 5s;
}

.courses-shape-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: -30px;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(251, 113, 133, 0.12));
    animation-delay: 10s;
}

.courses-shape-4 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: 20%;
    background: linear-gradient(135deg, rgba(251, 207, 232, 0.2), rgba(251, 113, 133, 0.1));
    animation-delay: 15s;
}

@keyframes courses-float-gentle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(20px, -20px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translate(-15px, 15px) rotate(-5deg) scale(0.95);
    }
    75% {
        transform: translate(15px, 10px) rotate(3deg) scale(1.02);
    }
}

/* Container */
.courses-header-v2 .container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    z-index: 2;
}

/* Header Layout */
.courses-header-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .courses-header-layout {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 4rem;
    }
}

/* ============================================
   LEFT COLUMN - BADGE & TITLE
   ============================================ */

.courses-header-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Studio Badge */
.courses-studio-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(251, 113, 133, 0.2);
    border-radius: 60px;
    box-shadow: 
        0 4px 24px rgba(251, 113, 133, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: fit-content;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.courses-studio-badge:hover {
    transform: translateY(-3px) translateX(2px);
    box-shadow: 
        0 8px 32px rgba(251, 113, 133, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(251, 113, 133, 0.35);
}

.courses-badge-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb7185, #f472b6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(251, 113, 133, 0.3);
}

.courses-badge-icon-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #fb7185;
    opacity: 0;
    animation: courses-icon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes courses-icon-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.courses-badge-icon-wrapper i {
    color: #ffffff;
    font-size: 1.125rem;
    z-index: 1;
}

.courses-badge-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.courses-badge-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.courses-badge-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.01em;
}

/* Title Section */
.courses-title-wrapper {
    margin-top: 0.5rem;
}

.courses-main-title {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #111827;
    margin: 0;
}

.courses-title-line-break {
    display: block;
    height: 0.5rem;
}

.courses-gradient-title {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: courses-gradient-flow 5s linear infinite;
}

@keyframes courses-gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.courses-title-decoration {
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #f43f5e, #ec4899, #a855f7);
    opacity: 0.25;
    filter: blur(4px);
    border-radius: 3px;
}

/* Description */
.courses-header-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #6b7280;
    max-width: 600px;
    margin: 0;
}

/* ============================================
   RIGHT COLUMN - FEATURES
   ============================================ */

.courses-header-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.courses-features-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 400px;
}

.courses-feature-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(229, 231, 235, 0.6);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.courses-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.courses-feature-card:hover::before {
    left: 100%;
}

.courses-feature-card:hover {
    transform: translateX(8px) translateY(-4px);
    border-color: rgba(251, 113, 133, 0.3);
    box-shadow: 
        0 12px 32px rgba(251, 113, 133, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.courses-feature-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.courses-feature-card:hover .courses-feature-icon-box {
    transform: rotate(10deg) scale(1.1);
}

.courses-feature-card-1 .courses-feature-icon-box {
    background: linear-gradient(135deg, #fda4af, #fb7185);
    box-shadow: 0 8px 20px rgba(251, 113, 133, 0.3);
}

.courses-feature-card-2 .courses-feature-icon-box {
    background: linear-gradient(135deg, #c084fc, #a855f7);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.courses-feature-card-3 .courses-feature-icon-box {
    background: linear-gradient(135deg, #f9a8d4, #ec4899);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.courses-feature-icon-box i {
    color: #ffffff;
    font-size: 1.5rem;
}

.courses-feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.courses-feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

.courses-feature-subtitle {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

/* ============================================
   COURSES LISTING SECTION
   ============================================ */

.courses-listing-section {
    background: linear-gradient(to bottom,
        #ffffff 0%,
        #f9fafb 100%);
    min-height: 100vh;
    padding: 3rem 0;
}

.courses-listing-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   FILTER PANEL
   ============================================ */

.courses-filter-panel {
    margin-bottom: 3rem;
}

.courses-filter-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(251, 113, 133, 0.08);
    border: 1px solid #f3f4f6;
    padding: 2rem;
    transition: all 0.3s ease;
}

.courses-filter-card:hover {
    box-shadow: 0 25px 50px rgba(251, 113, 133, 0.12);
}

.courses-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .courses-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .courses-filter-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .courses-filter-item-submit {
        display: flex;
        align-items: flex-end;
    }
}

/* Filter Labels */
.courses-filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.courses-label-icon {
    font-size: 0.875rem;
}

.courses-filter-label .fa-search {
    color: #fb7185;
}

.courses-filter-label .fa-tag {
    color: #a855f7;
}

/* Input Wrapper */
.courses-input-wrapper {
    position: relative;
}

.courses-filter-input,
.courses-filter-select {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 2.75rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    font-size: 0.9375rem;
    color: #1f2937;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.courses-filter-input:focus,
.courses-filter-select:focus {
    outline: none;
    border-color: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.1);
}

.courses-filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.courses-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

/* Submit Button */
.courses-filter-submit-btn {
    position: relative;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #fb7185 0%, #f472b6 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 8px 16px rgba(251, 113, 133, 0.3);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.courses-filter-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(251, 113, 133, 0.4);
}

.courses-filter-submit-btn:active {
    transform: translateY(0);
}

.courses-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.5s ease;
}

.courses-filter-submit-btn:hover .courses-btn-shine {
    left: 100%;
}

/* Active Filters */
.courses-active-filters {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.courses-active-filters-label {
    color: #6b7280;
    font-weight: 600;
}

.courses-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.courses-filter-tag-search {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.courses-filter-tag-category {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 1px solid #d8b4fe;
    color: #9333ea;
}

.courses-filter-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.courses-filter-clear-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
}

/* ============================================
   RESULTS HEADER
   ============================================ */

.courses-results-header {
    margin-bottom: 2rem;
}

.courses-results-count {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.courses-results-count i {
    color: #fb7185;
    font-size: 1rem;
}

.courses-count-number {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.courses-count-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.courses-count-total {
    color: #9ca3af;
    font-weight: 500;
}

/* ============================================
   COURSES GRID
   ============================================ */

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.courses-card-wrapper {
    height: 100%;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.courses-card-wrapper:hover {
    transform: translateY(-12px) scale(1.02);
    z-index: 10;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.courses-empty-state {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    margin-top: 2rem;
}

.courses-empty-state-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        #f9fafb 0%,
        #fdf2f8 50%,
        #faf5ff 100%);
    border-radius: 1.5rem;
}

.courses-empty-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.courses-empty-bg-orb-1 {
    width: 200px;
    height: 200px;
    background: #fca5a5;
    top: 40px;
    right: 40px;
}

.courses-empty-bg-orb-2 {
    width: 250px;
    height: 250px;
    background: #d8b4fe;
    bottom: 40px;
    left: 40px;
}

.courses-empty-content {
    position: relative;
    text-align: center;
    padding: 5rem 1.5rem;
    border: 2px dashed #e5e7eb;
    border-radius: 1.5rem;
}

.courses-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.courses-empty-icon i {
    font-size: 2rem;
    color: #9ca3af;
}

.courses-empty-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.courses-empty-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 28rem;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.courses-empty-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #fb7185 0%, #f472b6 100%);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(251, 113, 133, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.courses-empty-action-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 24px rgba(251, 113, 133, 0.4);
}

.courses-empty-action-btn:active {
    transform: translateY(0) scale(1);
}

/* ============================================
   PAGINATION
   ============================================ */

.courses-pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1023px) {
    .courses-header-v2 {
        padding: 2.5rem 0 3rem;
    }
}

@media (max-width: 767px) {
    .courses-header-v2 {
        padding: 2rem 0 2.5rem;
    }

    .courses-header-layout {
        gap: 2rem;
    }

    .courses-main-title {
        font-size: 2rem;
    }

    .courses-header-description {
        font-size: 1rem;
    }

    .courses-filter-card {
        padding: 1.5rem;
    }

    .courses-empty-content {
        padding: 3rem 1rem;
    }

    .courses-empty-title {
        font-size: 1.5rem;
    }

    .courses-features-list {
        gap: 1rem;
    }

    .courses-feature-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .courses-studio-badge {
        padding: 0.75rem 1.25rem;
        gap: 0.875rem;
    }

    .courses-badge-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .courses-badge-icon-wrapper i {
        font-size: 1rem;
    }

    .courses-feature-icon-box {
        width: 48px;
        height: 48px;
    }

    .courses-feature-icon-box i {
        font-size: 1.25rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.courses-filter-input:focus-visible,
.courses-filter-select:focus-visible,
.courses-filter-submit-btn:focus-visible,
.courses-filter-clear-btn:focus-visible,
.courses-empty-action-btn:focus-visible {
    outline: 3px solid #fb7185;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .courses-header-background,
    .courses-floating-shapes,
    .courses-empty-state-bg,
    .courses-btn-shine {
        display: none;
    }

    .courses-header-v2,
    .courses-listing-section {
        background: white;
        padding: 1rem 0;
    }
}

/* ============================================
   HERO OFFSET FIX – COURSES PAGE
   ============================================ */

.courses-header-v2 {
    padding-top: calc(var(--navbar-height) + 2.5rem);
}
@media (max-width: 768px) {
    .courses-header-v2 {
        padding-top: calc(var(--navbar-height) + 1.75rem);
    }
}
