/* ============================================
   Academy Course - Modern Styling
   ============================================ */

:root {
    --primary-color: #1a56db;
    --secondary-color: #ff6b35;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Hero Section - Matching web_course_detail.html
   ============================================ */

.academy-course-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 90px; /* adjust if navbar is taller/shorter */
}

.hero-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2.5rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.course-image-section {
    position: relative;
    min-width: 400px;
    max-width: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.course-thumbnail,
.course-thumbnail-placeholder {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-svg {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.course-info-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    min-width: 0;
}

.course-title-container {
    margin: 0;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
    margin: 0;
}

.online-indicator {
    font-size: 1.2rem;
    font-weight: 500;
    color: #667eea;
    margin-left: 0.5rem;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 0.9rem;
}

.meta-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.course-description {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Certifier and Action Buttons Container */
.certifier-actions-container {
    display: flex;
    gap: 20px;
    margin-top: 1.5rem;
    align-items: flex-end;
    justify-content: flex-end;
}

.course-certifier-section {
    flex: 0 1 auto;
    position: relative;
    margin-top: 0;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    margin-right: auto;
}

.certifier-logo {
    max-width: 220px;
    max-height: 220px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.certifier-description {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 550;
}

/* Action Buttons Section */
.course-actions-section {
    width: 350px;
    flex-shrink: 0;
    position: relative;
    margin-top: 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   Course Details Section
   ============================================ */

.course-details-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Course Header Card */
.course-header-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.course-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-online {
    background: #dbeafe;
    color: #1e40af;
}

.badge-classroom {
    background: #fef3c7;
    color: #92400e;
}

.badge-level {
    background: #e9d5ff;
    color: #6b21a8;
}

.badge-registrar {
    background: #d1fae5;
    color: #065f46;
}

.badge-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.course-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-icon {
    width: 40px;
    height: 40px;
    padding: 0.5rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.meta-item > div {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Content Cards */
.content-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-out;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
}

.section-icon {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.content-body {
    color: var(--text-primary);
    line-height: 1.8;
}

.content-body ul,
.content-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-body li {
    margin: 0.5rem 0;
}

.content-body p {
    margin: 1rem 0;
}

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4338ca 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
}

.cta-content h3 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
}

.cta-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.125rem;
}

.btn-cta {
    background: var(--white);
    color: var(--primary-color);
    padding: 1rem 2rem;
    white-space: nowrap;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.card-sticky {
    position: sticky;
    top: 2rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* Certifier Card */
.certifier-card .certifier-content {
    text-align: center;
}

.certifier-logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}

.certifier-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--light-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.action-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(4px);
}

.action-btn:hover svg {
    stroke: var(--white);
}

/* ============================================
   Available Dates Section
   ============================================ */

.available-dates-section {
    padding: 5rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Dates Table */
.dates-table-wrapper {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dates-table {
    width: 100%;
    border-collapse: collapse;
}

.dates-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.dates-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dates-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.dates-table tbody tr:hover:not(.row-unavailable) {
    background: var(--light-bg);
    transform: scale(1.01);
}

.dates-table tbody tr.row-unavailable {
    opacity: 0.6;
    background: #f9fafb;
}

.dates-table td {
    padding: 1.5rem 1rem;
    vertical-align: middle;
}

/* Table Cell Styles */
.course-cell {
    display: flex;
    flex-direction: column;
}

.course-cell strong {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.offering-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.date-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.time-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.flexible-badge,
.contact-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.contact-badge {
    background: #dbeafe;
    color: #1e40af;
}

.days-value {
    font-weight: 600;
    color: var(--text-primary);
}

.location-cell {
    display: flex;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.location-badge.online {
    background: #dbeafe;
    color: #1e40af;
}

.location-badge.physical {
    background: #fef3c7;
    color: #92400e;
}

.location-badge svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.price-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.current-price.early-bird {
    color: #059669;
    font-size: 1.375rem;
}

.price-tag-icon {
    width: 18px;
    height: 18px;
    fill: #0d9488;
    stroke: none;
    flex-shrink: 0;
    margin-left: 0.25rem;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.current-price-vat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.spaces-cell {
    display: flex;
}

.spaces-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    min-width: 80px;
}

.spaces-badge.available {
    background: #d1fae5;
    color: #065f46;
}

.spaces-badge.limited {
    background: #fed7aa;
    color: #9a3412;
}

.spaces-badge.full {
    background: #fecaca;
    color: #991b1b;
}

/* Book Button */
.book-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.book-btn:hover:not(.btn-disabled) {
    background: #e85d22;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.book-btn.btn-disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

/* No Dates Message */
.no-dates-message {
    text-align: center;
    padding: 4rem 2rem;
}

.no-dates-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    fill: none;
    stroke: var(--text-secondary);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.5;
}

.no-dates-message h2,
.no-dates-message h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.no-dates-message .section-main-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.no-dates-message p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.no-dates-message .btn {
    width: auto;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem 3rem;
}

/* ============================================
   Scroll to Top Button
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #1e40af;
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-content {
        grid-row: 2;
    }

    .card-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
    }

    .course-image-section {
        min-width: 100%;
        max-width: 100%;
        height: 300px;
    }

    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 300px;
    }

    .course-title {
        font-size: 2rem;
    }

    .course-description {
        font-size: 1rem;
    }

    .certifier-actions-container {
        flex-direction: column;
        align-items: stretch;
    }

    .course-certifier-section {
        width: 100%;
    }

    .course-actions-section {
        width: 100%;
    }

    .section-main-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.125rem;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    /* Responsive Table */
    .dates-table-wrapper {
        overflow-x: visible;
    }

    .dates-table {
        width: 100%;
        min-width: 0;
    }

    .dates-table thead {
        display: none;
    }

    .dates-table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .dates-table td {
        display: block;
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }

    .dates-table td:last-child {
        border-bottom: none;
    }

    .dates-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-bottom: 0.4rem;
    }

    .course-cell,
    .date-cell,
    .location-cell,
    .price-cell,
    .spaces-cell {
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
    }

    .book-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .academy-course-hero {
        padding: 1rem 0;
        margin-top: 70px; /* Slightly smaller for mobile */
    }

    .hero-container {
        padding: 0 0.5rem;
    }

    .course-image-section {
        height: 250px;
    }

    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 250px;
    }

    .course-title {
        font-size: 1.75rem;
    }

    .online-indicator {
        font-size: 1rem;
    }

    .course-description {
        font-size: 0.95rem;
    }

    .course-header-card,
    .content-card,
    .sidebar-card {
        padding: 1.5rem;
    }

    .course-meta-grid {
        grid-template-columns: 1fr;
    }

    .certifier-actions-container {
        flex-direction: column;
    }

    .course-certifier-section {
        width: 100%;
    }

    .course-actions-section {
        width: 100%;
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .hero-actions,
    .quick-actions,
    .book-btn,
    .scroll-to-top,
    .cta-card {
        display: none !important;
    }

    .academy-course-hero {
        background: var(--white);
        margin-top: 0;
        padding-top: 0;
    }

    body {
        font-size: 12pt;
        color: var(--text-primary);
    }
}

