/** Add your extra/custom CSS classes below */

/* ============================================
   Header Background - Sky Blue
   ============================================ */

/* Header/Navigation Bar - Dark Theme (matching footer) */
.md-header {
    background-color: #021736 !important;
    background: linear-gradient(135deg, #021736 0%, #021736 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.md-header__inner {
    background-color: transparent !important;
}

.md-header__button {
    color: #ffffff !important;
}

.md-header__title {
    color: #ffffff !important;
}

.md-header__topic {
    color: #d0d0d0 !important;
}

/* Navigation Tabs - Dark Theme (matching footer) */
.md-tabs {
    background-color: #021736 !important;
    background: linear-gradient(135deg, #021736 0%, #021736 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.md-tabs__link {
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.md-tabs__link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px;
}

.md-tabs__link--active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-bottom: 2px solid #ffffff;
    font-weight: 600;
}

/* ============================================
   Responsive Image Styling
   ============================================ */

/* Make all images responsive by default */
.md-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

/* Figure styling with captions */
figure {
    margin: 2rem 0;
    text-align: center;
}

figure img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

figure img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

figcaption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--md-default-fg-color--light);
    font-style: italic;
}

/* ============================================
   Glightbox Image Gallery
   ============================================ */

.glightbox {
    cursor: zoom-in;
    display: inline-block;
    width: 100%;
}

/* Grid layout for image galleries */
.md-content div[style*="grid"] {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .md-content div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Image Hover Effects
   ============================================ */

.image-hover-zoom {
    overflow: hidden;
    border-radius: 8px;
}

.image-hover-zoom img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-hover-zoom:hover img {
    transform: scale(1.08);
}

/* ============================================
   Responsive Tables
   ============================================ */

.md-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .md-content table {
        font-size: 0.85rem;
    }
}

/* ============================================
   Image Loading Animation
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-content img {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   Mobile Optimizations & Responsive Design
   ============================================ */

@media (max-width: 480px) {
    figure {
        margin: 1.5rem 0;
    }
    
    figure img {
        border-radius: 6px;
    }
    
    figcaption {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }
    
    /* Mobile Header Adjustments */
    .md-header {
        padding: 0.5rem 0;
    }
    
    .md-header__title {
        font-size: 1rem;
    }
    
    .md-tabs {
        font-size: 0.85rem;
    }
}

/* ============================================
   Dynamic & Responsive Layout Enhancements
   ============================================ */

/* Ensure full responsiveness */
.md-container {
    max-width: 100%;
    width: 100%;
}

.md-main {
    flex: 1;
}

.md-content {
    max-width: 100%;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .md-content {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .md-content h1 {
        font-size: 1.75rem;
    }
    
    .md-content h2 {
        font-size: 1.5rem;
    }
    
    .md-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .md-content {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .md-content h1 {
        font-size: 1.5rem;
    }
    
    .md-content h2 {
        font-size: 1.3rem;
    }
    
    .md-content h3 {
        font-size: 1.1rem;
    }
}

/* Dynamic Sidebar */
@media (max-width: 1220px) {
    .md-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .md-sidebar--primary {
        z-index: 100;
    }
}

/* Responsive Tables */
.md-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .md-content table {
        font-size: 0.85rem;
        display: block;
        width: 100%;
    }
    
    .md-content table thead {
        display: none;
    }
    
    .md-content table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 0.5rem;
    }
    
    .md-content table tbody td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .md-content table tbody td::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        float: left;
    }
}

/* Dynamic Code Blocks */
.md-content pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .md-content pre {
        font-size: 0.85rem;
        padding: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Dynamic Content Loading Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-content > * {
    animation: slideIn 0.5s ease-out;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .md-nav {
        font-size: 0.9rem;
    }
    
    .md-nav__title {
        font-size: 1rem;
    }
}

/* Dynamic Footer */
.md-footer {
    background-color: #021736;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .md-footer {
        padding: 1rem;
    }
    
    .md-footer__inner {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    figure img {
        box-shadow: none;
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    .glightbox {
        cursor: default;
    }
}