/**
 * Custom Course Grid Styles
 * Matches the design from screenshot
 *
 * @package Families_Getting_Help
 */

/* Grid Container */
.fgh-custom-course-grid {
    margin: 0 -15px;
}

.fgh-custom-course-grid .row {
    margin: 0 -15px;
}

.fgh-custom-course-grid [class*="col-"] {
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Course Card */
.fgh-course-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fgh-course-card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Course Image */
.fgh-course-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16 / 9;
}

.fgh-course-image a {
    display: block;
    height: 100%;
}

.fgh-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fgh-course-card:hover .fgh-course-image img {
    transform: scale(1.05);
}

/* Placeholder for courses without images */
.fgh-course-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.fgh-course-placeholder i {
    font-size: 60px;
    opacity: 0.5;
}

/* Course Content */
.fgh-course-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Course Title */
.fgh-course-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.fgh-course-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fgh-course-title a:hover {
    color: #1cb098;
}

/* Course Meta */
.fgh-course-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fgh-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #666;
}

.fgh-meta-item i {
    color: #1cb098;
    font-size: 16px;
}

.fgh-meta-item:first-child i {
    color: #1cb098;
}

.fgh-meta-item:nth-child(2) i {
    color: #1cb098;
}

.fgh-meta-item:nth-child(3) i {
    color: #ffa41b;
}

/* Course Button */
.fgh-course-button {
    margin-top: auto;
}

.fgh-course-button form {
    margin: 0;
}

.fgh-btn {
    display: block;
    width: 100%;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fgh-btn-enroll {
    background: #e74c3c;
    color: #fff;
    border: 2px solid #e74c3c;
}

.fgh-btn-enroll:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.fgh-btn-continue {
    background: #1cb098;
    color: #fff;
    border: 2px solid #1cb098;
}

.fgh-btn-continue:hover {
    background: #189882;
    border-color: #189882;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(28, 176, 152, 0.3);
}

/* Primary Button - Full Width with Teal Background */
.fgh-btn-primary {
    background: #1cb098 !important;
    color: #fff !important;
    border: 2px solid #1cb098 !important;
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
}

.fgh-btn-primary:hover {
    background: #189882 !important;
    border-color: #189882 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(28, 176, 152, 0.3);
}

.fgh-btn-contact,
.fgh-course-button .fgh-btn-contact {
    background: #3498db !important;
    color: #fff !important;
    border: 2px solid #3498db !important;
    text-decoration: none !important;
}

.fgh-btn-contact:hover,
.fgh-course-button .fgh-btn-contact:hover {
    background: #2980b9 !important;
    border-color: #2980b9 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Learn More Button */
.fgh-btn-learn-more {
    background: transparent;
    color: #1cb098;
    border: 2px solid #1cb098;
    margin-top: 10px;
}

.fgh-btn-learn-more:hover {
    background: #1cb098;
    border-color: #1cb098;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(28, 176, 152, 0.3);
}

/* LearnDash Payment Buttons Wrapper */
.fgh-course-button .learndash_join_button,
.fgh-course-button input[type="submit"],
.fgh-course-button button[type="submit"],
.fgh-course-button a.btn {
    display: block;
    width: 100%;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #e74c3c;
    color: #fff;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fgh-course-button .learndash_join_button:hover,
.fgh-course-button input[type="submit"]:hover,
.fgh-course-button button[type="submit"]:hover,
.fgh-course-button a.btn:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .fgh-course-title {
        font-size: 18px;
    }

    .fgh-course-meta {
        gap: 15px;
    }

    .fgh-meta-item {
        font-size: 14px;
    }

    .fgh-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .fgh-custom-course-grid [class*="col-"] {
        margin-bottom: 20px;
    }

    .fgh-course-content {
        padding: 20px;
    }
}
