/* Courses Page Styles */

.courses-page {
    background-color: #f8fafc;
    position: relative;
    overflow: visible;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.courses-page #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure scrolling works */
html, body {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* RFT Academy Text Styling */
.site-title-text {
    margin-right: 0.75rem;
}

.site-title-link {
    color: #5A0B44 !important;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Arial', sans-serif;
    transition: color 0.3s ease;
}

.site-title-link:hover {
    color: #4A0A3A !important;
    text-decoration: none;
}

/* Hide White Logo */
.custom-logo {
    display: none !important;
}

/* Change Icons to Purple */
.uagb-ifb-icon-wrap svg,
.uagb-ifb-icon-wrap svg path,
.wp-block-uagb-info-box svg,
.wp-block-uagb-info-box svg path,
.uagb-infobox__content-wrap svg,
.uagb-infobox__content-wrap svg path {
    fill: #5A0B44 !important;
    color: #5A0B44 !important;
}

/* Target specific icon elements */
.uagb-ifb-icon-wrap,
.wp-block-uagb-info-box .uagb-ifb-icon-wrap {
    color: #5A0B44 !important;
}

/* Ensure SVG icons are purple */
svg {
    fill: #5A0B44 !important;
}

/* Target any icon containers */
.icon-wrap,
.icon-container,
.service-icon {
    color: #5A0B44 !important;
}

/* Center align all headings in service boxes */
.uagb-ifb-title,
.uagb-ifb-title-wrap,
.wp-block-uagb-info-box .uagb-ifb-title,
.uagb-infobox__content-wrap .uagb-ifb-title,
.uagb-heading-text,
.wp-block-uagb-advanced-heading .uagb-heading-text {
    text-align: center !important;
}

/* Center align service descriptions */
.uagb-ifb-desc,
.wp-block-uagb-info-box .uagb-ifb-desc,
.uagb-infobox__content-wrap .uagb-ifb-desc {
    text-align: center !important;
}

/* Center align the entire info box content */
.uagb-ifb-content,
.wp-block-uagb-info-box .uagb-ifb-content {
    text-align: center !important;
}

/* Smooth scroll behavior for the entire site */
html {
    scroll-behavior: smooth !important;
}

* {
    scroll-behavior: smooth !important;
}

/* Navbar styling */
.main-header-menu .menu-link,
.ast-menu-shadow .menu-link,
.ast-nav-menu .menu-link {
    color: #5A0B44 !important;
    text-decoration: none !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    padding: 0.5rem 0 !important;
    margin: 0 10px !important;
}

/* Add gap between navigation items */
.main-header-menu li,
.ast-menu-shadow li,
.ast-nav-menu li {
    margin: 0 10px !important;
}

/* Hover effect with sliding underline */
.main-header-menu .menu-link:hover,
.ast-menu-shadow .menu-link:hover,
.ast-nav-menu .menu-link:hover {
    color: #5A0B44 !important;
    text-decoration: none !important;
}

/* Sliding underline effect */
.main-header-menu .menu-link::after,
.ast-menu-shadow .menu-link::after,
.ast-nav-menu .menu-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background-color: #5A0B44 !important;
    transition: width 0.3s ease !important;
}

.main-header-menu .menu-link:hover::after,
.ast-menu-shadow .menu-link:hover::after,
.ast-nav-menu .menu-link:hover::after {
    width: 100% !important;
}

/* Hide Courses nav item on courses page */
.courses-page .menu-item.current-menu-item,
.courses-page .menu-item[href="courses.html"] {
    display: none !important;
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    flex-direction: column;
    gap: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background-color: rgba(90, 11, 68, 0.1);
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: #5A0B44;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(90, 11, 68, 0.2);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: #5A0B44;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: #5A0B44;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-header-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12);
        flex-direction: column;
        padding: 2rem 1rem;
        z-index: 1000;
        border-radius: 0 0 16px 16px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
    }
    
    .main-header-menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    
    .main-header-menu li {
        margin: 0.25rem 0 !important;
        opacity: 0;
        transform: translateY(-10px);
        animation: fadeInUp 0.3s ease-out forwards;
    }
    
    .main-header-menu.active li:nth-child(1) { animation-delay: 0.1s; }
    .main-header-menu.active li:nth-child(2) { animation-delay: 0.15s; }
    .main-header-menu.active li:nth-child(3) { animation-delay: 0.2s; }
    .main-header-menu.active li:nth-child(4) { animation-delay: 0.25s; }
    .main-header-menu.active li:nth-child(5) { animation-delay: 0.3s; }
    
    .main-header-menu .menu-link {
        margin: 0 !important;
        padding: 1rem 1.5rem !important;
        display: block;
        text-align: center;
        border-radius: 12px;
        transition: all 0.3s ease;
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    .main-header-menu .menu-link:hover {
        background-color: rgba(90, 11, 68, 0.1);
        transform: translateY(-2px);
    }
}

/* Mobile Menu Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure navbar is visible */
.courses-page .site-header {
    position: relative !important;
    z-index: 1000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 70px !important;
}

.courses-page #masthead {
    position: relative !important;
    z-index: 1000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.courses-page .ast-primary-header-bar {
    position: relative !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: rgba(90, 176, 68, 0.1) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: none !important;
    border-bottom: none !important;
    min-height: 70px !important;
}


.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 3rem;
}

.courses-layout {
    display: flex;
    flex-direction: column;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* Search and Filter Section */
.courses-search-filter {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.search-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #5A0B44;
    box-shadow: 0 0 0 3px rgba(90, 11, 68, 0.1);
}

.search-btn {
    padding: 0.75rem 1rem;
    background: #5A0B44;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #4A0A3A;
}

.filter-dropdown-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-dropdown {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #5A0B44;
    box-shadow: 0 0 0 3px rgba(90, 11, 68, 0.1);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-options label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    padding: 0.25rem 0;
}

.filter-options input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    accent-color: #000;
}

.clear-filters-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: #e5e7eb;
}

/* Courses Main Content */
.courses-main-content {
    min-height: 500px;
    width: 100%;
    max-width: 1300px; /* Much wider content area */
    margin: 0 auto; /* Center the content */
}

.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 1300px; /* Match the courses main content width */
}

.courses-count {
    font-size: 1rem;
    color: #6b7280;
}

.courses-count span {
    font-weight: 600;
    color: #1f2937;
}

.courses-sort select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    color: #374151;
    font-size: 0.875rem;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.course-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.course-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.course-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.course-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.course-level-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-category {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.course-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.course-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
}

.course-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-students {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Course Pricing and Enroll Section */
.course-pricing {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5A0B44;
}

.original-price {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Enroll Button */
.enroll-button {
    padding: 0.5rem 1rem;
    background: #5A0B44;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.enroll-button:hover {
    background: #4A0A3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 11, 68, 0.3);
}

/* Payment Modal */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
}

.course-details {
    margin-bottom: 2rem;
}

.course-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.course-image-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.modal-course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.course-details-text {
    flex: 1;
}

.course-specs {
    margin-top: 1rem;
}

.spec-item {
    margin-bottom: 0.5rem;
    color: #6b7280;
}

.pricing-section {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.price-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.current-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #5A0B44;
}

.original-price-large {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.savings {
    color: #059669;
    font-weight: 600;
    margin: 0;
}

.payment-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    text-align: center;
}

.payment-section h3 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.payment-section p {
    color: #6b7280;
    margin: 0.5rem 0;
}

.proceed-payment {
    background: #5A0B44;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
    width: 100%;
}

.proceed-payment:hover {
    background: #4A0A3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 11, 68, 0.3);
}

.payment-note {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-search-filter {
        padding: 1rem;
    }
    
    .search-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-dropdown-section {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .filter-dropdown {
        min-width: auto;
        width: 100%;
    }
    
    .courses-main-content {
        width: 100%;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .page-title {
        font-size: 2rem;
    }

    /* Modal responsive */
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .course-info {
        flex-direction: column;
        text-align: center;
    }
    
    .course-image-large {
        align-self: center;
    }

    /* Course pricing responsive */
    .course-pricing {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .enroll-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .courses-layout {
        padding: 0 0.5rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-card {
        min-height: 250px;
    }
    
    .course-image {
        height: 150px;
    }
    
    .course-content {
        padding: 1rem;
    }
}

/* Loading and Empty States */
.courses-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.courses-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.courses-empty h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Animation for course cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Free Course Styling */
.free-price {
    color: #10b981;
    font-weight: 700;
    font-size: 1.125rem;
}

.enroll-button[data-external-url] {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.enroll-button[data-external-url]:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.enroll-button[data-external-url]:active {
    transform: translateY(0);
}
