/**
 * Chemistry Hub - Free Trial Section Styles
 * Matching Course Grid Card Design Exactly
 */

/* =====================================================
   Free Trial Section
   ===================================================== */
.ch-free-trial {
    background: linear-gradient(180deg, hsl(222, 60%, 18%) 0%, hsl(222, 60%, 14%) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ch-free-trial-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
}

.ch-free-trial-bg-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #fff;
}

.ch-free-trial-bg-circle:nth-child(1) {
    width: 128px;
    height: 128px;
    top: 40px;
    left: 40px;
}

.ch-free-trial-bg-circle:nth-child(2) {
    width: 192px;
    height: 192px;
    bottom: 80px;
    right: 80px;
}

.ch-free-trial-bg-circle:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 33.33%;
}

.ch-free-trial-content {
    position: relative;
    z-index: 10;
}

/* Header - Centered */
.ch-free-trial-header {
    margin-bottom: 3rem;
}

.ch-free-trial-header.ch-centered {
    text-align: center;
}

.ch-free-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.ch-free-trial-badge svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #facc15;
}

.ch-free-trial-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}

@media (min-width: 768px) {
    .ch-free-trial-title {
        font-size: 2.25rem;
    }
}

.ch-free-trial-title span, .ch-gradient-text {
    color: hsl(152, 76%, 50%);
    background: linear-gradient(90deg, hsl(152, 76%, 50%), hsl(152, 76%, 40%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ch-free-trial-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
    text-align: center;
}

.ch-free-trial-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ch-free-trial-features.ch-centered {
    justify-content: center;
}

.ch-free-trial-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #fff;
    font-size: 1rem;
}

.ch-free-trial-feature svg,
.ch-free-trial-feature i {
    color: #fff;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.5rem;
}

/* Trial Grid - Responsive */
.ch-free-trial-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .ch-free-trial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ch-free-trial-grid {
        grid-template-columns: 1fr;
    }
}

/* Trial Card - Matching Course Card Design Exactly */
.ch-trial-card, .ch-course-card {
    background-color: #ffffff;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ch-trial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ch-trial-card:hover .ch-trial-image img {
    transform: scale(1.1);
}

.ch-trial-card:hover .ch-trial-play {
    opacity: 1;
}

.ch-trial-card:hover .ch-trial-title {
    color: var(--ch-secondary, hsl(152, 76%, 40%));
}

/* Trial Image */
.ch-trial-image, .ch-course-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.ch-trial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ch-trial-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsl(222 60% 22% / 0.6), transparent);
}

/* Badges - Matching Course Card */
.ch-trial-badges, .ch-course-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.ch-trial-badge, .ch-course-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ch-trial-badge.level, .ch-course-badge.level {
    background-color: var(--ch-primary, hsl(222, 60%, 22%));
    color: white;
}

.ch-trial-badge.free, .ch-course-badge.free {
    background-color: var(--ch-secondary, hsl(152, 76%, 40%));
    color: white;
}

/* Play Button - Matching Course Card */
.ch-trial-play, .ch-course-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.ch-trial-play-btn {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background-color: var(--ch-secondary, hsl(152, 76%, 40%));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px hsl(152 76% 40% / 0.5);
}

.ch-trial-play-btn svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
    margin-right: -2px;
}

/* Trial Content */
.ch-trial-content, .ch-course-content {
    padding: 1.5rem;
}

.ch-trial-title, .ch-course-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--ch-primary, hsl(222, 60%, 22%));
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* Centered Text */
.ch-centered-text {
    text-align: center;
    margin: 0 auto;
    display: block;
}

.ch-centered-stats {
    justify-content: center;
    text-align: center;
}

.ch-centered-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ch-centered-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 150px;
}

.ch-trial-description, .ch-course-description {
    color: var(--ch-muted-foreground, hsl(215, 16%, 47%));
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Trial Stats - Matching Course Card */
.ch-trial-stats, .ch-course-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--ch-muted-foreground, hsl(215, 16%, 47%));
    margin-bottom: 1rem;
}

.ch-trial-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ch-trial-stat svg {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--ch-secondary, hsl(152, 76%, 40%));
}

/* Trial CTA Button - Matching Course Card */
.ch-trial-cta, .ch-course-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--ch-primary, hsl(222, 60%, 22%));
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.ch-trial-cta:hover {
    background-color: hsl(222, 60%, 22%, 0.9);
}

.ch-trial-cta svg {
    width: 1rem;
    height: 1rem;
}

/* More Button - Centered */
.ch-free-trial-more {
    margin-top: 3rem;
}

.ch-free-trial-more.ch-centered {
    text-align: center;
}

.ch-free-trial-more .ch-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: var(--ch-primary, hsl(222, 60%, 22%));
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ch-free-trial-more .ch-btn-primary:hover {
    background-color: hsl(222, 60%, 22%, 0.9);
}

/* Empty State */
.ch-free-trial-empty {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.ch-free-trial-empty p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
}
