/* Global Styling */
/* Base layout */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    color: #333;
}

img, video {
    max-width: 100%;
    height: auto;
}

header {
    background-color: #0d1b2a;
    color: #fff;
    padding: 20px;
    text-align: center;
}

/* Responsive hero layout used on the homepage */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-logo {
    max-width: min(80vw, 420px);
    height: auto;
}

.hero-text {
    text-align: center;
}

/* Override inline header layout on index.html to wrap nicely on small screens */
header > div {
    display: flex; /* already inline, but ensures specificity */
    flex-wrap: wrap;
    gap: 16px;
}

header > div img[alt="Secra Linux Logo"] {
    width: min(80vw, 420px) !important;
    height: auto !important;
    margin-right: 0 !important;
}

header > div > div {
    flex-shrink: 1 !important;
    max-width: 100%;
}

nav {
    background-color: #142b47;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 8px;
    border-radius: 4px;
}

nav a:hover {
    color: #0d6efd;
}

nav a.active {
    background-color: rgba(255,255,255,0.12);
}

main {
    max-width: 900px;
    margin: 32px auto;
    background-color: #fff;
    padding: 20px 24px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    overflow-wrap: anywhere;
}

/* Fix: remove excessive inline bottom margin on intro paragraph in index.html */
main > p[style*="margin-bottom: 100px"] {
    margin-bottom: 1em !important;
}

h1, h2 {
    color: #0d1b2a;
}

header h1 {
    color: #ffffff;
}

button.download {
    background-color: #0d6efd;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

button.download:hover {
    background-color: #084298;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #0d1b2a;
    color: #fff;
    margin-top: 30px;
}

.tux-download-wrapper {
    position: relative;
    width: fit-content;
    margin: 40px auto;
}

.tux-on-button {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    height: 80px;
    z-index: 10;
}

/* Mobile tweaks */
@media (max-width: 680px) {
    header {
        padding: 16px 12px;
    }

    main {
        margin: 20px 12px;
        padding: 16px;
    }

    .tux-on-button {
        height: 64px;
        bottom: 40px;
    }

    button.download {
        width: 100%;
    }
}
