/* css/history.css */

/* Navigation Bar Styles */
nav {
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    width: 100%;
    box-sizing: border-box;
}

nav img {
    width: 150px;
}

.nav-links {
    flex: 1;
    text-align: right;
}

.nav-links ul li {
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a {
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.nav-links ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background: red;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links ul li:hover::after {
    width: 100%;
}

/* Core Section Centering and Layout */
/* 1. Reduce the general vertical padding and keep it compact */
.course-detail-section {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1px 0; /* Changed from 40px to 20px */
    box-sizing: border-box;
}

/* 2. Remove the top padding completely when one section follows another */
.course-detail-section + .course-detail-section {
    padding-top: 0;
}

/* 3. Force the content column to contain its floating images cleanly */
.about-col {
    display: flow-root; 
}

.detail-split-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr !important;
    gap: 40px;
    align-items: flex-start;
    width: 90%;
    max-width: 1100px; 
    margin: 0 auto; 
}

/* Typography Styling */
.about-col h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #deb887; 
}

.about-col h3 {
    text-align: left !important;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 5px;
    color: #deb887;
    font-weight: 700;
}

.about-col p {
    padding: 5px 0;
    line-height: 1.6;
    color: #e0e0e0;
    font-size: 15px;
    text-align: justify;
}

/* Inline Headings for Perfect Text Wrapping */
.wiki_heading {
    font-size: 20px;
    color: #deb887;
    font-weight: 700;
    margin-right: 5px;
}

/* Sidebar Elements */
.detail-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 80px; 
}

.media-box img {
    border: 1px solid #333;
    padding: 5px;
    background: #111;
    width: 100%;
    display: block;
}

/* Floating Left Image Details */
.media-box-left {
    float: left;
    width: 45%; 
    margin-right: 20px; 
    margin-bottom: 10px;
    margin-top: 5px;
}

.media-box-left img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

/* Captions and Credits */
.para-credit {
    font-size: 10px !important;
    color: #888888 !important;
    text-align: right; 
    padding: 4px 0 0 0 !important;
    line-height: 1.2;
}

.media-box-left .para-1 {
    font-size: 12px;
    color: #ffffff;
    text-align: center;
    margin-top: 5px;
    padding: 0;
}

.media-box .para-1 {
    font-size: 12px;
    color: #888888;
    text-align: center;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .detail-split-grid {
        grid-template-columns: 1fr !important;
    }
    .media-box-left {
        float: none;
        width: 100%;
        margin-right: 0;
    }
}

/* Removes the empty sidebar column space when there is no sidebar */
.widegrid {
    grid-template-columns: 1fr !important;
    max-width: 900px; 
    margin: 0 auto;
}

/* 1. Eliminate any bottom margin from the header wrapper */
.sub-header {
    margin-bottom: 0;
}

/* 2. Remove the top padding from the first section directly below the header */
.sub-header + .course-detail-section {
    padding-top: 0;
}

/* 3. Prevent the first heading inside the column from pushing itself down */
.about-col > *:first-child {
    margin-top: 0 !important;
}

.contact-cards-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto 25px auto;
}

.contact-card {
    background-color: #000000;
    border: 1px solid #000000;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 210px;
    flex: 1;
    max-width: 240px;
    text-align: left;
}

.icon-box {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
    padding: 7px; 
    box-sizing: border-box; 
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.card-details h3 {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.card-details p {
    font-size: 10px;
    color: #b0b0b0;
    margin: 2px 0 0 0;
    word-break: break-all;
}

.footer-text {
    color: #ffffff;
    font-size: 13px;
    margin-top: 20px;
    letter-spacing: 0.5px;
}