/**
 * EuroForum Related Courses - Public Styles
 * Modern, responsive design for course displays
 */

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.erc-related-courses {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.erc-heading {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #1a1a1a;
    text-align: center;
}

/* ==========================================================================
   Grid Layout (Cards)
   ========================================================================== */

.erc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 0;
}

@media (max-width: 768px) {
    .erc-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Card Styles - Modern
   ========================================================================== */

.erc-style-modern .erc-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.erc-style-modern .erc-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.erc-style-modern .erc-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e9ecef;
}

.erc-style-modern .erc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.erc-style-modern .erc-card:hover .erc-card-image img {
    transform: scale(1.05);
}

.erc-style-modern .erc-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.erc-style-modern .erc-card-brand {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #cc0066;
    background: #ffe6f2;
    padding: 3px 10px;
    border-radius: 15px;
    margin-bottom: 8px;
    margin-right: 8px;
    align-self: flex-start;
}

.erc-style-modern .erc-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0066cc;
    background: #e6f2ff;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.erc-style-modern .erc-card-date {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.erc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.erc-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    white-space: nowrap;
}

.erc-style-modern .erc-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.erc-style-modern .erc-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.erc-style-modern .erc-card-title a:hover {
    color: #0066cc;
}

.erc-style-modern .erc-card-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 16px 0;
    flex: 1;
}

.erc-style-modern .erc-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.erc-style-modern .erc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.erc-style-modern .erc-meta-item .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.erc-style-modern .erc-card-price {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 16px;
}

.erc-style-modern .erc-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0066cc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
}

.erc-style-modern .erc-card-button:hover {
    background: #0052a3;
    transform: translateX(2px);
}

.erc-style-modern .erc-card-button .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ==========================================================================
   Card Styles - Minimal
   ========================================================================== */

.erc-style-minimal .erc-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.erc-style-minimal .erc-card:hover {
    border-color: #0066cc;
}

.erc-style-minimal .erc-card-image {
    display: none;
}

.erc-style-minimal .erc-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.erc-style-minimal .erc-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.erc-style-minimal .erc-card-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
}

.erc-style-minimal .erc-card-button:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Card Styles - Classic
   ========================================================================== */

.erc-style-classic .erc-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.erc-style-classic .erc-card:hover {
    border-color: #0066cc;
}

/* ==========================================================================
   List Layout
   ========================================================================== */

.erc-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.erc-list-item {
    display: flex;
    gap: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.erc-list-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.erc-list-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #e9ecef;
}

.erc-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.erc-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.erc-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.erc-list-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.erc-list-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.erc-list-title a:hover {
    color: #0066cc;
}

.erc-list-price {
    font-size: 20px;
    font-weight: 700;
    color: #0066cc;
    flex-shrink: 0;
}

.erc-list-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 12px 0;
}

.erc-list-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #0066cc;
    background: #e6f2ff;
    padding: 4px 12px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .erc-list-item {
        flex-direction: column;
    }
    
    .erc-list-image {
        width: 100%;
        height: 200px;
    }
    
    .erc-list-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   Slider Layout
   ========================================================================== */

.erc-slider {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.erc-slider-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
}

.erc-slide {
    min-width: 300px;
    flex-shrink: 0;
}

.erc-slider-prev,
.erc-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.erc-slider-prev {
    left: 0;
}

.erc-slider-next {
    right: 0;
}

.erc-slider-prev:hover,
.erc-slider-next:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

.erc-slider-prev .dashicons,
.erc-slider-next .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

@media (max-width: 768px) {
    .erc-slider {
        padding: 0 40px;
    }
    
    .erc-slide {
        min-width: 280px;
    }
    
    .erc-slider-prev,
    .erc-slider-next {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.erc-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.erc-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: erc-spin 1s linear infinite;
}

@keyframes erc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.erc-course-link:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .erc-card,
    .erc-card-image img,
    .erc-card-button,
    .erc-slider-track {
        transition: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .erc-related-courses {
        background: none;
        border: 1px solid #000;
    }
    
    .erc-card-button,
    .erc-slider-prev,
    .erc-slider-next {
        display: none;
    }
}
