/* Materials Page Specific Styles */
:root {
    --primary-color: #333;
    --accent-color: #4ade80;
    --bg-color: #f0f2f5;
    --text-color: #333;
    --header-bg: #fff;
    --sidebar-bg: #2eac62;
    --sidebar-text: #ecf0f1;
    --content-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --hero-bg: #f8fafc;
    --card-bg: #ffffff;
    --testimonial-bg: #f8fafc;
    --footer-bg: #2d435a;
    --footer-text: #ffffff;
    --border-color: #e2e8f0;
    --gray: #f1f5f9;
    --gray-dark: #e2e8f0;
    --text-light: #64748b;
    --primary-light: #e0f2fe;
    --danger: #ef4444;
    --white: #ffffff;
    --border-radius: 0.5rem;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --accent-color: #4ade80;
    --bg-color: #1a202c;
    --text-color: #e2e8f0;
    --header-bg: #2d3748;
    --sidebar-bg: #1a202c;
    --sidebar-text: #e2e8f0;
    --content-bg: #2d3748;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --hero-bg: #1a202c;
    --card-bg: #2d3748;
    --testimonial-bg: #2d3748;
    --footer-bg: #21293b;
    --footer-text: #e2e8f0;
    --border-color: #4a5568;
    --gray: #2d3748;
    --gray-dark: #4a5568;
    --text-light: #a0aec0;
    --primary-light: #2d3748;
    --white: #2d3748;
}

/* Header styles */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
   
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo span {
    color: var(--accent-color);
}

#mainNav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 2rem;
}

#mainNav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

#mainNav a:hover {
    color: var(--accent-color);
}



.logo span {
    color: var(--accent-color);
}

.logo:hover {
    color: var(--accent-color);
}

/* Navigation styles */

#mainNav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

#mainNav a:hover::after {
    width: 100%;
}
.dark-mode-toggle {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
    fill: var(--text-color);
}

.dark-mode-toggle .light-icon {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .dark-icon {
    opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .light-icon {
    opacity: 1;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ===========================
   Sidebar Styles
=========================== */
.sidebar {
  width: 260px;                  /* Default width */
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  scrollbar-gutter: stable;
  position: fixed;
  top: 85px;
  left: 0;
  padding-top: 15px;             /* Space for fixed header */
  overflow-y: auto;
  overflow-x: hidden;   /* Smooth squeeze */
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  transition: max-height 0.3s ease;


}



.sidebar h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sidebar-text);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-item {
    margin-bottom: 4.5rem;

}

.subtopic-item {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-top: 20px;
    border-radius: 7px;
    margin-top: 20px;
  
}

.subtopic-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 1rem;
}

.material-list {
    margin-top: 0.5rem;
}

.material-list li {
    margin-bottom: 12px;
}

.material-list a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.material-list a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

.material-list a.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}
/* ===========================
   Overlay (for mobile/tablet)
=========================== */
#contentOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
}

#contentOverlay.active {
  display: block;
}

.content-overlay.active { display: none !important; }

/* Main content */
.main-content {
    margin-left: 250px;
    padding: 0;
    min-height: calc(100vh - 80px);
    background-color: var(--content-bg);
    transition: margin-left 0.3s ease;
    padding-left: 30px;
    padding-bottom: 50px;
}

.main-content.sidebar-closed {
    margin-left: 0;;
}

.prose {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-color);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.prose h2 {
    font-size: 2rem;
    color: var(--accent-color);
}

.prose h3 {
    font-size: 1.5rem;
}

.prose p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.prose blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

.prose code {
    background-color: var(--gray);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
}

.prose pre {
    background-color: var(--gray);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-color);
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th, .prose td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.prose th {
    background-color: var(--gray);
    font-weight: 600;
    color: var(--text-color);
}

.prose td {
    color: var(--text-color);
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.navigation-buttons a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.navigation-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
    color: white;
}

.navigation-buttons span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--gray);
    color: var(--text-light);
    border-radius: 8px;
    font-weight: 600;
    cursor: not-allowed;
}

.navigation-buttons svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Footer styles */
footer {
    background-color: #21293b;
    color: var(--footer-text);
    padding: 40px 20px;
    
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    color: var(--footer-text);
}

.footer-column h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    margin-top: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--footer-text);
    font-size: 1.2rem;
    opacity: 0.8;
    transition: all 0.3s;
}

.social-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    color: var(--footer-text);
}

/* Responsive design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        
    }
    .sidebar.active {
        transform: translateX(0);
        /* Show sidebar */
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    
    .menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }
    
    #mainNav ul {
        gap: 1rem;
    }
    
    .sidebar {
        width: 280px;
       
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .navigation-buttons a,
    .navigation-buttons span {
        justify-content: center;
    }
    
    .prose h1 {
        font-size: 2rem;
    }
    
    .prose h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 29px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    #mainNav ul {
        gap: 0.5rem;
    }
    
    .sidebar {
        width: 100%;
        top: 0;
        
    }
    
    .sidebar h2{
        margin-top: 20px;
    }
    .main-content {
        padding: 1rem;
    }
    
    .prose {
        font-size: 0.9rem;
    }
    
    .prose h1 {
        font-size: 1.75rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* custom.css */

.btn-complete {
  background-color: #16a34a; /* Tailwind green-500 */
  color: white;
  padding: 12px 48px; /* Adjust spacing */
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect */
.btn-complete:hover {
  background-color: #15803d; /* Slightly darker green */
  transform: scale(1.03);
}

/* Make it responsive for smaller screens */
@media (max-width: 640px) {
  .btn-complete {
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
  }
}
