/**
 * Child Pages Filter for Elementor - Styles
 * Version: 1.0
 */
/*/* ___              _         _        __  __            
|_ _|__________ _| |_      | | __ _ / _|/ _| __ _ _ __ 
 | ||_  /_  / _` | __|  _  | |/ _` | |_| |_ / _` | '__|
 | | / / / / (_| | |_  | |_| | (_| |  _|  _| (_| | |   
|___/___/___\__,_|\__|  \___/ \__,_|_| |_|  \__,_|_|   */

/*          /\ /l
         ((.Y(!
          \ |/
          /  6~6,
          \ _    +-.
           \`-=--^-'
            \ \
           _/  \
          (  .  Y
         /"\ `--^--v--.
        / _ `--"T~\/~\/
       / " ~\.  !
 _    Y      Y./'
Y^|   |      |~~7
| l   |     / ./'
| `L  | Y .^/~T
|  l  ! | |/| |
| .`\/' | Y | !   Izzat Jaffar.
l  "~   j l j_L______
 \,____{ __"~ __ ,\_,\_*/
*/
/* Grid Container */
.cpf-course-grid {
    display: grid;
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* Grid Columns */
.cpf-columns-1 {
    grid-template-columns: 1fr;
}

.cpf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cpf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cpf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Course Card */
.cpf-course-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cpf-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Image */
.cpf-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8f8f8;
}

.cpf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cpf-card-image:hover img {
    transform: scale(1.05);
}

.cpf-card-image a {
    display: block;
    height: 100%;
}

/* No Image Placeholder */
.cpf-no-image .cpf-placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #999;
    font-size: 16px;
    font-weight: 500;
}

/* Card Content */
.cpf-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* HRDF Badge */
.cpf-hrdf-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Card Title */
.cpf-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.cpf-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cpf-card-title a:hover {
    color: #007cba;
}

/* Card Excerpt */
.cpf-card-excerpt {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    flex-grow: 1;
}

/* Card Footer */
.cpf-card-footer {
    margin-top: auto;
    padding-top: 15px;
}

/* Learn More Button */
.cpf-learn-more-btn {
    background: #007cba;
    color: #ffffff;
    padding: 0px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.cpf-learn-more-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.cpf-learn-more-btn:active {
    transform: translateY(0);
}

/* Message Styles */
.cpf-message {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cpf-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cpf-course-grid {
        gap: 20px;
    }
    
    .cpf-columns-3,
    .cpf-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cpf-card-content {
        padding: 20px;
    }
    
    .cpf-card-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cpf-course-grid {
        gap: 15px;
    }
    
    .cpf-columns-2,
    .cpf-columns-3,
    .cpf-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .cpf-card-image {
        height: 180px;
    }
    
    .cpf-card-content {
        padding: 15px;
    }
    
    .cpf-card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .cpf-card-excerpt {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .cpf-learn-more-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }
    
    .cpf-hrdf-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Loading Animation for Editor */
.elementor-editor-active .cpf-course-grid {
    min-height: 200px;
}

/* Print Styles */
@media print {
    .cpf-course-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .cpf-learn-more-btn {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cpf-course-card {
        border-width: 2px;
    }
    
    .cpf-hrdf-badge {
        border: 1px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cpf-course-card,
    .cpf-card-image img,
    .cpf-learn-more-btn {
        transition: none;
    }
    
    .cpf-course-card:hover {
        transform: none;
    }
    
    .cpf-card-image:hover img {
        transform: none;
    }
    
    .cpf-learn-more-btn:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.cpf-card-title a:focus,
.cpf-learn-more-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .cpf-course-card {
        background: #2d2d2d;
        border-color: #444;
        color: #fff;
    }
    
    .cpf-card-title a {
        color: #fff;
    }
    
    .cpf-card-excerpt {
        color: #ccc;
    }
    
    .cpf-message {
        background: #2d2d2d;
        border-color: #444;
        color: #ccc;
    }
    
    .cpf-no-image .cpf-placeholder-image {
        background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
        color: #888;
    }
}