@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.matrix-container {
    font-family: 'Poppins', sans-serif;
    width: 90%;
    margin: 0 auto;
    background-color: #F6F2E4 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.semester-heading {
    color: #333333;
    margin-bottom: 0px;
    background-color: #F6F2E4;
    border-bottom: none !important;
    font-size: 19px;
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.semester-heading .matrix-btn {
    flex: 0 0 auto;
}

.semester-heading-text {
    flex: 0 0 auto;
    min-width: 160px;
    text-align: center;
}

.matrix-table {
    border-collapse: separate;
    display: table;
    table-layout: auto;
    font-size: 14px;
    background-color: #F6F2E4;
    border: none;
    margin: 0 auto;
}

.matrix-table tr,
.matrix-table tr:nth-child(even),
.matrix-table tr:nth-child(odd),
.matrix-table td,
.matrix-table th {
    background-color: #F6F2E4 !important;
    border: none !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.month-header {
    width: auto;
    padding: 0px;
    border: none;
    height: 50px;
}

.month-label {
    background-color: #2F4F4F;
    color: white;
    padding: 4px 12px;
    display: inline-block;
    transform: rotate(-7deg); 
    transform-origin: center;
}

.domain-cell {
    display: flex-start;
    align-items: center;
    max-width: 250px;
    min-width: 250px;
    padding: 0px;
    border: none;
    text-align: center;
    height:85px;
}

.topic-cell {
    display: flex-start;
    align-items: center;
    justify-content: center;
    width: 230px;
    min-width: 230px;
    padding: 0px;
    border: none;
    text-align: center;
    height: 85px;
}

.domain-leader-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
}

.domain-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-left: 10px;
}

.domain-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.domain-title {
    font-weight: 300;
    font-size: 0.9em;
}

.topic-card-container {
    background-color: #FFFEF9;
    padding: 4px;
    margin: 8px;
    position: relative;
    height: 85px;
    min-height: 85px;
    width: 221px;
    max-width: 221px;
    min-width: 221px;
    margin-left: auto;  
    margin-right: auto;
    box-sizing: border-box;
    border-radius: 3px; 
    border: 1px solid #91908A; 
    box-shadow: 0 1px 0px #B8B5AB;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.topic-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center; 
    position: relative;
    justify-content: center;
    align-items: center;
}

.topic-card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-align: center;
    font-size: 14px;
    line-height: 1.25;
}

.topic-card-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: #666666;
    font-size: 0.85em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
}

.topic-leader-image-container {
    position: absolute;
    bottom: -9px;
    right: -7px;
    border-radius: 50%;
    background-color: white;
    padding: 0;
    box-shadow: 1px 2px 0px #b8b5ab;
    width: 50px;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f6f2e4;
}

.topic-leader-image {
    width: 100%;    
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.domain-leader-image {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #F6F2E4 !important;
    background-color: white !important;
    z-index: 1 !important;
    position: relative !important;
}

td .domain-cell > div {
    align-items: center !important;
}

.matrix-table td.domain-cell {
    width: auto;
    text-align: center;
}

.matrix-container {
    width: 100%;
}

.empty-cell {
    display: none;
}

.matrix-nav-center {
    margin-bottom: 5px;
    display:none; 
    justify-content:center; 
    align-items:center;
}

.semester-navigation {
    display: block;
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
}

.matrix-btn {
    background: #c36;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.matrix-btn:hover {
    background: #a02a4a;
}

.matrix-btn:disabled {
    background: #e6a3b8 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    border: none;
    opacity: 1;
}

.mobile-matrix-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    font-family: 'Poppins', sans-serif;
}

.mobile-topic-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.mobile-topic-card-container {
    background-color: #FFFEF9;
    padding: 0 4px;
    margin: 8px;
    position: relative;
    height: 110px;
    min-height: 110px;
    width: 250px;
    max-width: 250px;
    min-width: 250px;
    margin-left: auto;  
    margin-right: auto;
    box-sizing: border-box;
    border-radius: 3px; 
    border: 1px solid #91908A; 
    box-shadow: 0 1px 0px #B8B5AB;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.mobile-topic-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center; 
    position: relative;
    justify-content: flex-start;
    align-items: center;
}

.title-subtitle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90px;
}

.mobile-topic-card-title {
    font-weight: 600;
    margin: 0 0 3px 0;  /* top right bottom left */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-align: center; 
    font-size: 14px;
    line-height: 1.25;
}

.mobile-topic-card-subtitle {
    font-size: 11.9px;  
    line-height: 1.25;
    margin: 0 0 0 0;  /* top right bottom left */
}

.mobile-topic-card-domain {
    font-weight: 800;
    color: #444444;
    font-size: 11px;
    text-transform: uppercase;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;  /* Position at bottom of card */
    height: 16px;  /* Fixed height for domain */
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}


