/* Shared styles for all course landing pages */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    margin: 0;
    padding: 0;
}

.wrap {
    max-width: 1000px;
    margin: 32px auto;
    padding: 16px;
}

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.hero {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 40px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* Prevent global .hero { height:100vh } from affecting course pages */
.wrap .card > .hero,
.card .hero {
    height: auto !important;
    min-height: 0 !important;
}

.hero-copy {
    flex: 1;
    min-width: 300px;
}

.hero-calendar {
    flex: 0 0 280px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.title {
    margin: 0 0 8px !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.subtitle {
    margin: 0 0 12px !important;
    color: #64748b !important;
    font-size: 1.1rem !important;
}

.price {
    font-weight: 800;
    color: #2563eb;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Small stock badge under price */
.stock-badge {
    display: inline-block;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

/* Disabled/greyed primary button */
.btn.btn-disabled,
.btn[aria-disabled="true"],
.btn.disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.soldout-note {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.95rem;
}

.cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(37,99,235,0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,99,235,0.35);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    cursor: not-allowed;
    opacity: .7;
}

.content {
    padding: 32px; /* Restored original padding */
    border-top: 1px solid #f1f5f9;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.aside {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
}

.content h2 {
    color: #0f172a;
    font-size: 1.5rem;
    margin-bottom: 16px; /* Restored original margins */
}

.content p {
    line-height: 1.6;
    color: #475569;
    margin-bottom: 16px;
    font-size: 1rem;
}

.aside h3 {
    color: #0f172a;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.aside ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.8;
    color: #64748b;
}

.small-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px; /* Reduced margin since it follows subtitle directly */
    margin-bottom: 24px; /* Add space before main content */
}

.pill {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 999px;
    font-size: .9rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pill:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
}

/* Course option subtitle styling */
.course-options-subtitle {
    margin: 8px 0 8px; /* small top margin under CTA */
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left !important; /* ensure left alignment even when hero text is centered on mobile */
    display: block;
}

/* Calendar styling for group courses */
.calendar-section {
    color: #0f172a;
    font-size: 1.2rem;
    margin-bottom: 16px;
    text-align: center;
}

.calendar {
    display: flex;
    gap: 12px;
    overflow: auto;
    padding-bottom: 8px;
    justify-content: center;
}

.month {
    min-width: 240px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    flex-shrink: 0;
}

.month-header {
    background: #2563eb;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px 10px 0 0;
    font-weight: 700;
    text-align: center;
    font-size: .9rem;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.d {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f8fafc;
    font-size: .85rem;
}

.d.header {
    font-weight: 600;
    background: #f8fafc;
    font-size: .75rem;
    color: #64748b;
}

.hit {
    background: #2563eb;
    font-weight: 700;
    color: white;
}

/* Responsive design */
@media(min-width: 900px) {
    .grid {
        grid-template-columns: 2fr 1fr;
    }
}

@media(max-width: 768px) {
    .hero {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-calendar {
        flex: none;
        align-self: center;
    }
    
    .cta {
        justify-content: center;
    }
    
    .small-links {
        justify-content: center;
    }
    
    .calendar {
        justify-content: center;
    }
}
