/**
 * ESOT Content block – minimal styles for topic pages.
 * Only what's needed: responsive video, basic grid for row-fluid/span6.
 */

/*
 * Custom topic pages render the title in .esot-topic-main-title; Moodle also outputs
 * the same text in #page-header. Hide the theme heading only (reversible via CSS).
 */
body.esot-custom-topic-page #page-header .page-header-headings,
body.esot-custom-topic-page #page-header .page-context-header .page-header-headings,
body.esot-custom-topic-page .page-context-header .page-header-headings {
    display: none !important;
}

body.esot-custom-topic-page #page-header .page-context-header {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Main title per topic (same style as block/section titles like Course Recommendations) */
.esot-topic-main-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
    color: inherit;
}

/* Responsive video (16:9) */
.esot-topic-content .responsive-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.esot-topic-content .responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Congresses: hide inactive panes via class (survives Moodle's HTML purifier) */
.esot-tab-hidden {
    display: none !important;
}

/* Legacy row-fluid/span6: two columns where used */
.esot-topic-content .row-fluid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.esot-topic-content .row-fluid .span6 {
    flex: 1 1 45%;
    min-width: 0;
}

/* Case studies: card layout (gradient + emoji from catalog manager per course) */
.esot-case-study-cards {
    margin-top: 1.5rem;
}
.esot-case-study-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #dee2e6;
}
.esot-case-study-card:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.esot-case-study-card-image {
    flex: 0 0 280px;
    min-height: 160px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.esot-case-study-card-emoji {
    font-size: 42px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}
.esot-case-study-card-body {
    flex: 1;
    min-width: 280px;
}
.esot-case-study-card-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}
.esot-case-study-card-subtitle {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}
.esot-case-study-card-description {
    margin-bottom: 1rem;
    line-height: 1.6;
}
.esot-case-study-card-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}
.esot-topic-content-case-studies .esot-case-intro {
    margin-bottom: 0;
}
