@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --nav-height: 60px;
    --logo-color-start: #00e0ff;
    --logo-color-end: #00ffaa;
    
    --glass-bg: rgba(20, 20, 45, 0.85); 
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.6);
    
    --theme-primary-accent: #A583B9; 
    --theme-secondary-accent: #A583B9; 
    
    --mobile-nav-height: 50px;
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #f4f4f4;
    background: url('Liquid Metal.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 300vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
}

/* ==========================================================================
   Desktop Layout (Default)
   ========================================================================== */

.page-content {
    padding-top: 100px; 
    text-align: center; 
    color: #fff; 
    max-width: 1200px; 
    margin: 0 auto;
}

.main-heading-container {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 5px 20px var(--shadow-color);
    padding: 15px 40px; 
    display: inline-block; 
    margin-bottom: 60px; 
}

.main-heading {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

/* --- Floating Navigation (Desktop) --- */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 10px 30px var(--shadow-color);
    padding: 0 15px;
    height: var(--nav-height);
    width: 95%;
    max-width: 1200px;
    display: flex;
    flex-direction: column; /* Change to column for expansion */
    justify-content: flex-start;
    align-items: center;
    transition: top 0.3s ease-in-out, transform 0.3s ease-in-out, height 0.5s ease-in-out, border-radius 0.5s ease-in-out;
    overflow: hidden; /* Hide content when collapsed */
}

.floating-nav.nav-hidden {
    top: -100px;
    pointer-events: none;
}

/* New container for the fixed top row */
.nav-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--nav-height);
    padding: 0 15px;
    flex-shrink: 0; /* Prevent shrinking when expanded */
}

.momokernel-logo {
    font-weight: 700;
    font-size: 1.4rem;
    padding: 0 15px;
    background: linear-gradient(90deg, var(--logo-color-start), var(--logo-color-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.globalnav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.globalnav-item {
    position: relative;
    padding: 0 10px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.globalnav-link {
    font-size: 1rem;
    font-weight: 600;
    padding: 0 10px;
    opacity: 0.85;
}

.globalnav-link:hover {
    opacity: 1;
    color: var(--theme-secondary-accent);
}

.globalnav-link-accent {
    color: var(--theme-primary-accent);
}

/* --- Flyout Menu (Desktop - Click-based) --- */
.globalnav-flyout {
    visibility: hidden;
    opacity: 0;
    position: static; /* Change to static flow */
    width: 100%; 
    max-width: 1200px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 40px 40px; 
    box-shadow: 0 15px 50px var(--shadow-color);
    padding: 0 40px; 
    transition: opacity 0.3s ease-out, visibility 0.3s, padding 0.5s ease-in-out;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

/* Mega Menu (Desktop) - Click-based logic */
.floating-nav.menu-expanded {
    height: 350px; /* Expanded height */
    border-radius: 40px; 
    /* align-items: flex-start; REMOVED as it's now handled by nav-top-row */
    padding: 0; /* REMOVED padding from floating-nav */
    overflow: visible; /* Allow content to be visible */
}

.floating-nav.menu-expanded .globalnav-flyout {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    height: auto;
    padding: 30px 40px;
    border-top: 1px solid var(--glass-border);
}

.flyout-content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.flyout-column h4 {
    color: var(--theme-primary-accent);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

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

.flyout-column a {
    display: block;
    padding: 6px 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

.flyout-column a:hover {
    color: var(--theme-secondary-accent);
    opacity: 1;
    padding-left: 5px;
}

.flyout-teaser-column .teaser-link {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease-out; 
}

.flyout-teaser-column .teaser-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--theme-secondary-accent);
}

.flyout-teaser-column .teaser-image-placeholder {
    background: var(--theme-secondary-accent);
    width: 100%;
    height: 60px;
    border-radius: 6px;
    display: grid;
    place-content: center;
    font-weight: bold;
    color: #101020;
    margin-bottom: 5px;
}

.flyout-teaser-column .teaser-text {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.small-links a {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* --- Info Boxes and Ads --- */
.info-box-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 0;
    text-align: left;
    max-width: 1000px; 
    margin-left: auto;
    margin-right: auto;
}

.info-box {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 16px;
    height: 100%;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column; 
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border 0.3s ease-out;
}

.info-box:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px var(--shadow-color); 
    border: 1px solid var(--theme-primary-accent); 
    cursor: pointer; 
}

.info-box-title {
    color: var(--theme-primary-accent); 
    font-size: 1.4rem;
}

.ad-container {
    max-height: none; 
    margin-top: 60px; 
    background: none;
    padding: 0; 
    border-radius: 0; 
    overflow: hidden; 
    text-align: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.ad-container img {
    max-width: 100%; 
    max-height: none; 
    display: block; 
    margin: 0 auto;
    border-radius: 12px; 
}

/* --- Other Components (Downloads, Changelog, OS Cards) --- */
.page-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-left: 10px;
}

.download-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 10px;
}

.download-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.download-item:hover {
    background: rgba(20, 20, 30, 0.9);
}

.download-info {
    flex-grow: 1;
    padding-right: 20px;
}

.download-title {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1.2rem;
}

.download-description {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

.download-meta {
    font-size: 0.8rem;
    opacity: 0.6;
}

.download-links {
    display: flex;
    gap: 10px;
    flex-shrink: 0; 
}

.download-button {
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    min-width: 140px; 
    transition: transform 0.2s, opacity 0.2s;
}

.download-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.download-button.primary {
    background: var(--theme-primary-accent);
    color: #101020;
    box-shadow: 0 4px 10px rgba(165, 131, 185, 0.4);
}

.download-button.secondary {
    background: #444; 
    border: 1px solid #666;
    color: #fff;
}

.download-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.changelog-container {
    max-width: 1000px;
    margin: 40px auto 80px auto;
    padding: 0 10px;
}

.changelog-section {
    margin-bottom: 50px;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.changelog-section h2 {
    text-align: left;
    margin-bottom: 20px;
    color: var(--theme-primary-accent);
    border-bottom: 2px solid var(--theme-primary-accent);
    padding-bottom: 5px;
}

.commit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1px;
    border-radius: 8px;
    overflow: hidden;
}

.commit-item {
    background: rgba(255, 255, 255, 0.05); /* Lighter background for items */
    padding: 15px 20px;
    text-align: left;
    transition: background 0.3s ease;
    border-left: 5px solid var(--theme-secondary-accent);
    margin-bottom: 1px;
}

.commit-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.commit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.commit-message {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commit-date {
    font-size: 0.8rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.commit-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

.commit-meta a {
    color: var(--theme-primary-accent);
    font-weight: bold;
    opacity: 1;
}

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

.os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 20px; 
    margin-top: 40px;
    margin-bottom: 80px;
    padding: 0 10px;
    max-width: 1200px; 
    margin-left: auto;
    margin-right: auto;
}

.os-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px; 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border 0.3s ease-out;
    height: 100%;
}

.os-card:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px var(--shadow-color);
    border: 1px solid var(--theme-secondary-accent); 
    cursor: pointer;
}

.os-emblem-container {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 15px; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px; 
    margin-bottom: 0; 
    max-height: 500px; 
}

.os-emblem {
    width: 90px; 
    height: 90px; 
    border-radius: 50%;
    background-color: #333; 
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: none;
}

.fusionos-logo {
    background: linear-gradient(135deg, #1e90ff, #00bfff);
}
.homeos-logo {
    background: linear-gradient(135deg, #ffd700, #ffa500);
}
.macos-yosemite-logo, .os-yosemite-emblem { background: url('emblems/YosemiteDisk.png') center / cover no-repeat; }
.macos-puma-logo, .os-puma-emblem { background: url('emblems/PumaDisk.png') center / cover no-repeat; }
.macos-mojave-logo, .os-mojave-emblem { background: url('emblems/MojaveDisk.png') center / cover no-repeat; }
.macos-highsierra-logo, .os-highsierra-emblem { background: url('emblems/HighSierraDisk.png') center / cover no-repeat; }
.macos-elcapitan-logo, .os-elcapitan-emblem { background: url('emblems/ElCapitanDisk.png') center / cover no-repeat; }
.macos-mavericks-logo, .os-mavericks-emblem { background: url('emblems/MavericksDisk.png') center / cover no-repeat; }
.macos-lion-logo, .os-lion-emblem { background: url('emblems/LionDisk.png') center / cover no-repeat; }
.macos-leopard-logo, .os-leopard-emblem { background: url('emblems/LeopardDisk.png') center / cover no-repeat; }
.macos-jaguar-logo, .os-jaguar-emblem { background: url('emblems/JaguarDisk.png') center / cover no-repeat; }
.macos-cheetah-logo, .os-cheetah-emblem { background: url('emblems/CheetahDisk.png') center / cover no-repeat; }

.os-panther-emblem { background: url('emblems/PantherDisk.png') center / cover no-repeat; }
.os-tiger-emblem { background: url('emblems/TigerDisk.png') center / cover no-repeat; }
.os-snowleopard-emblem { background: url('emblems/SnowLeopardDisk.png') center / cover no-repeat; }
.os-mountainlion-emblem { background: url('emblems/MountainLionDisk.png') center / cover no-repeat; }
.os-sierra-emblem { background: url('emblems/SierraDisk.png') center / cover no-repeat; }
.os-catalina-emblem { background: url('emblems/CatalinaDisk.png') center / cover no-repeat; }
.os-bigsur-emblem { background: url('emblems/BigSurDisk.png') center / cover no-repeat; }
.os-monterey-emblem { background: url('emblems/MontereyDisk.png') center / cover no-repeat; }
.os-ventura-emblem { background: url('emblems/VenturaDisk.png') center / cover no-repeat; }
.os-sonoma-emblem { background: url('emblems/SonomaDisk.png') center / cover no-repeat; }
.os-sequoia-emblem { background: url('emblems/SequoiaDisk.png') center / cover no-repeat; }
.os-tahoe-emblem { background: url('emblems/TahoeDisk.png') center / cover no-repeat; }

.os-windows-31-emblem,
.os-windows-95-emblem,
.os-windows-98-emblem,
.os-windows-nt4-emblem,
.os-windows-me-emblem,
.os-windows-2000-emblem,
.os-windows-xp-emblem,
.os-windows-vista-emblem,
.os-windows-7-emblem,
.os-windows-8-emblem,
.os-windows-81-emblem,
.os-windows-10-emblem,
.os-windows-11-emblem {
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
}

.os-windows-31-emblem {
    background-image: url('emblems/Windows3.1Logo.png');
}

.os-windows-95-emblem,
.os-windows-98-emblem,
.os-windows-nt4-emblem {
    background-image: url('emblems/Windows95x98Logo.png');
}

.os-windows-me-emblem,
.os-windows-2000-emblem {
    background-image: url('emblems/WindowsMeLogo.png');
}

.os-windows-xp-emblem {
    background-image: url('emblems/WindowsXPLogo.png');
}

.os-windows-vista-emblem {
    background-image: url('emblems/WindowsVistaLogo.png');
}

.os-windows-7-emblem {
    background-image: url('emblems/Windows7Logo.png');
}

.os-windows-8-emblem,
.os-windows-81-emblem,
.os-windows-10-emblem {
    background-image: url('emblems/Windows8x8.1x10Logo.png');
}

.os-windows-11-emblem {
    background-image: url('emblems/Windows11Logo.png');
}

.os-card h3 {
    color: var(--theme-primary-accent);
    font-size: 1.2rem; 
    margin-top: 0;
    margin-bottom: 5px;
}

.os-card p {
    margin: 0;
    font-size: 0.9rem; 
    opacity: 0.8;
}

.os-toggle-button {
    background: var(--theme-secondary-accent);
    color: #101020;
    font-weight: 700;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(165, 131, 185, 0.4);
    transition: all 0.3s ease-out;
    display: block; 
    margin: 0 auto 40px auto;
}

.os-toggle-button:hover {
    background: var(--theme-primary-accent);
    box-shadow: 0 6px 15px rgba(165, 131, 185, 0.5);
    transform: translateY(-2px);
}

.os-collapse-content {
    max-height: 2000px; 
    overflow: hidden;
    transition: max-height 0.8s ease-in-out, opacity 0.6s ease;
    opacity: 1;
}

.os-collapse-content.collapsed {
    max-height: 0; 
    opacity: 0;
}

/* --- Hamburger Menu Icon --- */
.menu-toggle {
    display: none; 
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 2000;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.menu-toggle span:nth-child(1) {
    top: 5px;
}

.menu-toggle span:nth-child(2), .menu-toggle span:nth-child(3) {
    top: 13px;
}

.menu-toggle span:nth-child(4) {
    top: 21px;
}

.mobile-menu-open .menu-toggle span:nth-child(1) {
    top: 13px;
    width: 0%;
    left: 50%;
}

.mobile-menu-open .menu-toggle span:nth-child(2) {
    transform: rotate(45deg);
}

.mobile-menu-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg);
}

.mobile-menu-open .menu-toggle span:nth-child(4) {
    top: 13px;
    width: 0%;
    left: 50%;
}

/* --- PDF Modal Styles (Kept) --- */
.pdf-modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
}

.pdf-modal-content {
    background-color: var(--glass-bg);
    margin: 50px auto; 
    padding: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    width: 90%; 
    max-width: 1200px;
    height: calc(100vh - 100px); 
    box-shadow: 0 5px 30px var(--shadow-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pdf-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    color: var(--theme-secondary-accent);
    font-size: 1.6rem;
}

#pdf-iframe {
    flex-grow: 1; 
    width: 100%;
    background-color: #1a1a2e; 
    border-radius: 8px;
    overflow: hidden;
}

.pdf-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.pdf-modal-close:hover,
.pdf-modal-close:focus {
    color: var(--theme-primary-accent);
    text-decoration: none;
    cursor: pointer;
}

/* ==========================================================================
   Mobile Integration (Media Queries)
   ========================================================================== */

@media (max-width: 1024px) {
    
    .page-content {
        padding-top: calc(var(--mobile-nav-height) + 20px); 
    }
    
    /* --- Mobile Navigation (Fixed Top Bar) --- */
    .floating-nav {
        border-radius: 0;
        width: 100%;
        max-width: none;
        top: 0; 
        left: 0;
        transform: none; 
        height: var(--mobile-nav-height); 
        padding: 0 15px; 
        box-shadow: 0 2px 10px var(--shadow-color);
        /* Remove glass effect for a cleaner mobile look */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(20, 20, 45, 1); /* Solid background */
        border: none;
        flex-direction: row; /* Mobile nav is a row */
        overflow: hidden;
    }
    
    .floating-nav.nav-hidden {
        transform: translateY(calc(-1 * var(--mobile-nav-height)));
        top: 0;
    }
    
    .nav-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: var(--mobile-nav-height);
        padding: 0;
    }
    
    .momokernel-logo {
        font-size: 1.2rem;
        padding: 0; 
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* --- Mobile Menu Overlay --- */
    nav {
        display: none; 
        position: fixed;
        top: var(--mobile-nav-height); 
        left: 0;
        width: 100%;
        height: calc(100% - var(--mobile-nav-height));
        background-color: rgba(20, 20, 45, 0.95); /* Slightly transparent overlay */
        z-index: 999; 
        overflow-y: auto;
        padding-bottom: 20px; 
        border: none;
        border-top: 1px solid var(--glass-border);
    }
    
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    body.mobile-menu-open nav {
        display: block;
    }
    
    .globalnav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }
    
    .globalnav-item {
        margin: 0;
        width: 100%; 
        max-height: 500px; 
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .globalnav-link {
        padding: 15px 0; 
        display: block;
        font-size: 1.1rem;
        opacity: 1;
    }
    
    /* --- Mobile Flyout (Accordion) --- */
    .globalnav-flyout {
        position: static;
        visibility: hidden;
        opacity: 0;
        width: 100%;
        transform: none;
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        pointer-events: none;
        transition: max-height 0.3s ease-in-out;
        max-height: 0;
        overflow: hidden;
    }
    
    .globalnav-item.flyout-open > .globalnav-flyout {
        visibility: visible;
        opacity: 1;
        max-height: 500px;
        pointer-events: auto;
        padding: 10px 20px 20px 20px;
    }
    
    .flyout-content-grid {
        display: block;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        padding: 10px;
    }
    
    .flyout-column {
        padding: 0;
    }
    
    .flyout-column h4 {
        font-size: 0.9rem;
        margin-top: 15px;
        margin-bottom: 5px;
    }
    
    .flyout-column:first-child h4 {
        margin-top: 0;
    }
    
    .flyout-column ul {
        margin-bottom: 10px;
    }
    
    .flyout-column a {
        padding: 5px 0;
        font-size: 0.9rem;
    }
    
    .flyout-teaser-column {
        display: none; /* Hide teaser on mobile for cleaner look */
    }
    
    /* --- General Mobile Layout Adjustments --- */
    .info-box-grid {
        grid-template-columns: repeat(3, 1fr); 
        padding: 0 20px;
    }
    
    .os-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .download-info {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .download-links {
        width: 100%;
        flex-direction: row; 
    }
    
    .download-button {
        min-width: auto;
        flex-grow: 1;
    }
    
    .commit-message {
        max-width: 65%;
    }
    
    .commit-header {
        flex-direction: column;
    }
    
    .pdf-modal-content {
        margin: 20px auto;
        width: 95%;
        height: calc(100vh - 40px);
    }
}

@media (max-width: 767px) {
    .main-heading-container {
        border-radius: 30px;
        padding: 10px 20px;
        margin-bottom: 20px;
    }
    
    .main-heading {
        font-size: 1.8rem;
    }
    
    .info-box-grid {
        grid-template-columns: repeat(2, 1fr); 
        padding: 0 10px;
    }
    
    .info-box-grid.startpage-grid {
        grid-template-columns: 1fr;
    }

    .page-content h2 {
        font-size: 1.3rem;
        padding-left: 20px; 
    }
    
    .download-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .download-button {
        width: 100%;
    }
    
    .commit-message {
        max-width: 100%;
        white-space: normal;
        margin-bottom: 5px;
        display: block;
    }
    
    .commit-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .os-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .info-box-grid {
        grid-template-columns: 1fr; 
    }
    .os-grid {
        grid-template-columns: 1fr;
    }
}
