:root {
    --primary-color: #2980b9;
    --primary-light: #3498db;
    --primary-dark: #2c3e50;
    --secondary-color: #7f8c8d;
    --success-color: #27ae60;
    --light-bg: #f7fafc;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--primary-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER STYLES */
.header {
    background-color: var(--primary-dark);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    flex-shrink: 0;
    margin-right: 20px;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.stat-item {
    margin-left: 15px;
    white-space: nowrap;
}

.stat-label {
    font-weight: bold;
    font-size: 12px;
    opacity: 0.8;
    margin-right: 3px;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
}

/* Logo styles - UPDATED with aggressive overrides */
.logo-container {
    display: flex;
    align-items: center;
}

.logo, #site-logo {
    width: auto !important;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    margin-right: 15px !important;
}

.logo img, #site-logo img {
    max-height: 50px !important;
    width: auto !important;
    max-width: 100% !important;
    filter: none !important; /* Explicitly remove any filters */
    opacity: 1 !important; /* Ensure full opacity */
}

/* Topics List - Enhanced for better contrast and vertically centered with more space */
.topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    list-style-type: none;
    padding: 0;
    margin-bottom: 30px;
}

.topic-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 0 12px; /* Keep horizontal padding */
    height: 60px; /* Increased from 50px to create more space */
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 3px solid var(--primary-color);
    display: flex;
    align-items: center; /* Keeps text vertically centered */
}

.topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25), 0 5px 10px rgba(0,0,0,0.22);
    background-color: #ffffff;
}

.topic-link {
    color: #1a5085;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    display: block;
    width: 100%;
    padding: 0;
    line-height: 1.2; /* Reduced from the default of 1.6 to make multi-line text tighter */
}

.topic-link:hover {
    color: #2980b9;
    text-decoration: none;
}

/* Subtopics Styles */
.topic-header {
    margin-bottom: 20px;
}

.topic-name {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtopics-container {
    column-count: 1;
    width: 100%;
}

.subtopics-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.subtopic-item {
    background-color: #f8f9fa;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    break-inside: avoid;
    page-break-inside: avoid;
}

.subtopic-link {
    color: #2980b9;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.subtopic-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.subtopic-description {
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Navigation */
.navigation {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-right: 10px;
    color: #2980b9;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.header-back-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: var(--transition);
}

.header-back-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.nav-separator {
    margin: 0 10px;
    color: #7f8c8d;
}

/* Featured Content */
.featured-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    gap: 30px;
    align-items: center;
}

.featured-video {
    flex: 0 0 350px;
    background: #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-video i {
    font-size: 40px;
    color: var(--primary-color);
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.featured-video:hover i {
    color: #e74c3c;
    transform: scale(1.1);
}

.featured-text {
    flex: 1;
}

.featured-text h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.featured-text .btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 15px;
    transition: var(--transition);
}

.featured-text .btn:hover {
    background: var(--primary-dark);
}

/* Featured content controls */
.featured-controls {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.control-btn {
    background-color: var(--primary-light);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    transition: var(--transition);
}

.control-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.featured-controls .btn {
    margin: 0 15px;
}

/* Fix for featured blocks alignment */
.featured-block h2 {
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px; /* Add consistent margin bottom */
}

/* Reset margins in the featured content rotator */
#featured-content-rotator {
    margin-top: 0;
}

#featured-content-rotator p {
    margin-top: 0;
}

/* Ensure consistent spacing in both blocks */
.featured-block p {
    margin-top: 0;
    margin-bottom: 15px;
}

/* For the video container, reduce top margin */
.responsive-video-container {
    margin-top: 0;
}

/* About Section */
.about-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.about-section h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;

}
.about-text {
    flex: 1;
    min-width: 300px;

}

about-content {
    display: flex;
    flex-direction: row; /* Ensures the image appears on the left */
    align-items: center;
    gap: 20px;
}

.about-image {
    flex: 0 0 500px; /* Doubled the image size */
    max-width: 500px; /* Ensures the image maintains the correct size */
    border-radius: var(--border-radius);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}


.credentials {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.credentials h3 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.credential-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.credential-item i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* UPDATED: Testimonial Styles - Reduced vertical height */
.testimonial-container {
    margin: 15px 0;
    padding: 5px 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-slide {
    padding: 0;
    outline: none;
}

.testimonial-slide p {
    font-size: 1em;
    margin: 0;
    text-align: center;
    font-style: italic;
    padding: 10px 20px;
    color: #555;
    position: relative;
    line-height: 1.3;
}

.testimonial-slide p:before,
.testimonial-slide p:after {
    content: '"';
    font-size: 24px;
    color: var(--primary-light);
    opacity: 0.2;
    position: absolute;
}

.testimonial-slide p:before {
    top: 0;
    left: 2px;
}

.testimonial-slide p:after {
    bottom: -5px;
    right: 2px;
}

/* Hide the testimonial author class since we don't need it anymore */
.testimonial-author {
    display: none;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 0; /* Removed margin-top completely */
    padding: 20px;
    color: var(--secondary-color);
    font-size: 14px;
    border-top: 1px solid #eee;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Video section for subtopic page */
.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Standard aspect ratio for 16:9 videos */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 8px;
}

.video-description {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.video-metadata {
    display: flex;
    font-size: 0.8em;
    color: #95a5a6;
}

.video-metadata span {
    margin-right: 15px;
}

/* Resources section for subtopic page */
.section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.resources-list {
    list-style-type: none;
    padding: 0;
}

.resource-item {
    background-color: #f8f9fa;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resource-item a {
    color: #2980b9;
    text-decoration: none;
}

.resource-item a:hover {
    text-decoration: underline;
}

/* Questions section for subtopic page */
.question-item {
    background-color: #f8f9fa;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-text {
    margin-bottom: 10px;
}

.question-metadata {
    font-size: 0.8em;
    color: #95a5a6;
}

/* Topic page two-column layout */
.topic-content {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.topic-description {
    flex: 0 0 35%;
}

.topic-description h2 {
    margin-top: 0;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.topic-description p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Single column subtopics list - Enhanced with better contrast and styling */
.subtopics-container {
    flex: 0 0 65%;
}

.subtopics-list-ordered {
    list-style-type: none;
    padding: 0;
    margin: 0;
    counter-reset: subtopic-counter;
}

.subtopic-item-ordered {
    background-color: #f8f9fa;
    margin-bottom: 8px;
    padding: 10px 15px 10px 45px; /* Adjusted padding */
    border-radius: 6px; /* Reduced for consistency with topic items */
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); /* Darker shadow */
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 3px solid var(--primary-color); /* Added border for visual interest */
}

.subtopic-item-ordered:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25), 0 5px 10px rgba(0,0,0,0.22); /* Darker shadow on hover */
    background-color: #ffffff; /* Lighter background on hover */
}

.subtopic-item-ordered:before {
    content: counter(subtopic-counter);
    counter-increment: subtopic-counter;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(41, 128, 185, 0.15);
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.subtopic-item-ordered .subtopic-link {
    color: #1a5085; /* Darker blue for better contrast */
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500; /* Medium weight for better readability */
    display: block;
    line-height: 1.2; /* Also apply the tighter line spacing to subtopic links */
}

.subtopic-item-ordered .subtopic-link:hover {
    color: #2980b9; /* Brighter blue on hover */
    text-decoration: none;
}

/* Header navigation elements */
.header-navigation {
    display: flex;
    align-items: center;
}

.header-nav-separator {
    color: white;
    margin: 0 10px;
    font-weight: bold;
}

/* Responsive styles */
@media (max-width: 768px) {
    .topic-content {
        flex-direction: column;
    }
    
    .topic-description, .subtopics-container {
        flex: 0 0 100%;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header h1 {
        margin-bottom: 10px;
    }
    
    .stats-container {
        margin-top: 10px;
    }
    
    .stat-item {
        margin-left: 0;
        margin-right: 15px;
        margin-bottom: 5px;
    }
    
    .featured-content {
        flex-direction: column;
    }
    
    .featured-video {
        width: 100%;
        flex: auto;
    }
    
    .about-image {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .navigation {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-separator {
        display: none;
    }
}

@media (max-width: 600px) {
    .subtopics-container {
        column-count: 1;
    }
    
    .logo img {
        max-height: 40px; /* Slightly smaller on very small screens */
    }
}

/* Add this to your style.css file */
/* Responsive video container for featured content - adjusted size (55% instead of 40%) */
#featured-content-rotator .responsive-video-container {
    position: relative;
    padding-bottom: 30.9375%; /* Adjusted from 22.5% (55% of original 56.25%) */
    height: 0;
    overflow: hidden;
    max-width: 55%; /* Increased from 40% to 55% */
    margin: 0 auto; /* Center the container */
}

#featured-content-rotator .responsive-video-container iframe,
#featured-content-rotator .responsive-video-container object,
#featured-content-rotator .responsive-video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.topic-instruction {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px; /* Adds space between text and topics */
    color: var(--primary-dark);
}
