* { box-sizing: border-box; }

body {
    font-family: 'JetBrains Mono', monospace;
    background: #f8f9fa;
    color: #222;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* ====================== HEADER ====================== */
.header {
    background: #080808;
    color: white;
    padding: 15px 15px;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Merriweather', serif;
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
}
.header.hidden { transform: translateY(-100%); }

/* ====================== NAVBAR ====================== */
.navbar {
    background: #DA291C;
    padding: 6px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.navbar .nav-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}
.nav-container::-webkit-scrollbar { display: none !important; }
.navbar{
    color: #FFE083;
}
.navbar a {
    color: #FFE083;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
    white-space: nowrap;
}
.navbar a:hover { color: #ffffff; text-decoration: none; }

/* ====================== CONTAINER ====================== */
.container, .definition {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 25px;
}

/* ====================== BREADCRUMBS ====================== */
.breadcrumbs { font-size: 14px; margin-bottom: 25px; color: #555; word-break: break-all; }
.breadcrumbs a { color: #DA291C; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ====================== TABLES ====================== */
table { width: 100%; border-collapse: collapse; }
thead { border: 2px solid #eee; }
th { background: #f8f8f8; padding: 16px 20px; text-align: left; color: #444; font-weight: 600; border: 1px solid #ddd; }
td { padding: 14px 20px; border: 1px solid #eee; }
tr:hover { background: #f9f9f9; }

/* ====================== LINKS ====================== */
a { color: #DA291C; text-decoration: none; }
a:hover { text-decoration: underline; }
.dir { color: #DA291C; font-weight: 500; }
.small { color: #666; font-size: 13px; }
.highlight { background: #fde8e7; padding: 1px 4px; border-radius: 3px; font-weight: bold; }

/* ====================== HOME CARDS ====================== */
.tech-section { padding: 0; background: #f8f9fa; }

.h2-text {
    text-align: center;
    font-size: 2.6rem;
    margin-bottom: 60px;
    color: #1A0A0A;
    font-family: 'Merriweather', serif;
}
.h2-text p { color: #555; font-size: 1.1rem; margin-top: 0; }

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 25px 60px;
}

.tech-card {
    padding: 45px 30px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}
.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}
.tech-card h3 {
    font-size: 2.1rem;
    margin: 0 0 14px 0;
    color: #1A0A0A;
    font-weight: 700;
}
.tech-card p {
    color: #444;
    font-size: 1.05rem;
    margin-bottom: 35px;
    min-height: 48px;
}
.tech-card .btn {
    background: #DA291C;
    color: white;
    padding: 14px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.tech-card .btn:hover { background: #b5201a; transform: scale(1.05); text-decoration: none; }

.tech-card.wroclaw { background: #B3FFE6; }
.tech-card.sys     { background: #D1B3FF; }

/* ====================== LAYOUT / SIDENAV ====================== */
.layout-wrapper {
    display: flex;
    align-items: stretch;
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 25px;
    gap: 0;
}

.sidenav {
    width: 240px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    position: sticky;
    top: 45px;
    max-height: calc(100vh - 45px);
    flex-shrink: 0;
}
.sidenav-section { padding: 12px 0; border-bottom: 1px solid #eee; }
.sidenav-section:last-child { border-bottom: none; }
.sidenav-heading {
    font-family: 'Merriweather', serif;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 18px;
    margin: 0;
}
.sidenav a {
    display: block;
    padding: 8px 18px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.5;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.sidenav a:hover {
    background: #fff3b0;
    color: #1A0A0A;
    text-decoration: none;
    border-left: 3px solid #ffa31a;
}
.sidenav a.active {
    background: #fde8e7;
    color: #DA291C;
    font-weight: 600;
    border-left: 3px solid #DA291C;
}

.sidenav-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 1100;
    background: #DA291C;
    color: white;
    border: none;
    padding: 12px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border-radius: 6px;
}
.sidenav-overlay { display: none; }

.main-content { flex: 1; min-width: 0; padding: 0 0 0 30px; }
.main-content img { max-width: 100%; height: auto; display: block; }

/* ====================== ICON ====================== */
.icon { font-size: 24px; width: 42px; display: inline-block; text-align: center; }

/* ====================== SHARE BUTTON ====================== */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 16px 12px 12px;
    padding: 10px 16px;
    background: #DA291C;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.share-btn:hover { background: #b5201a; }
.share-btn svg { flex-shrink: 0; }

.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1A0A0A;
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====================== FOOTER ====================== */
.footer {
    background: #080808;
    color: #ddd;
    padding: 50px 0 35px;
    margin-top: 80px;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 25px;
}
.footer-left p { margin: 8px 0; font-size: 1.05rem; }
.footer-left strong { color: white; }
.footer-link { color: #ffa31a; text-decoration: none; font-weight: 500; }
.footer-link:hover { text-decoration: underline; }
.footer-right { text-align: right; }
.copyright { color: #aaa; font-size: 0.95rem; margin-bottom: 8px; }
.license { color: #777; font-size: 0.85rem; line-height: 1.5; max-width: 420px; }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
    .layout-wrapper { padding: 0 15px; margin: 20px auto; }
    .main-content { padding: 0 0 0 20px; }
}

@media (max-width: 768px) {
    .layout-wrapper { display: block; padding: 0 12px; }
    .main-content { padding: 0; margin-top: 16px; }
    .container, .definition { padding: 0 12px; }
    td, th { padding: 10px 12px; }

    .sidenav {
        position: fixed;
        top: 0; left: 0;
        height: 100%;
        max-height: 100%;
        width: 260px;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.2);
    }
    .sidenav.open { transform: translateX(0); }
    .sidenav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .sidenav-overlay.open { opacity: 1; pointer-events: all; }
    .sidenav-toggle { display: block; }

    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-left { align-items: center; display: flex; flex-direction: column; }
    .footer-right { text-align: center; }
    .license { max-width: 100%; }

    .tech-grid { padding: 0 12px 40px; gap: 16px; }
    .tech-card { padding: 28px 18px; }
    .tech-card h3 { font-size: 1.6rem; }
    .h2-text { font-size: 1.8rem; margin-bottom: 30px; }

    .main-content iframe { height: 65vh !important; }
}

@media (max-width: 480px) {
    .header { font-size: 18px; padding: 12px 12px; }
    .header img { height: 32px !important; }
    .navbar { padding: 5px 10px; }
    .navbar a { font-size: 13px; }
    .navbar .nav-container { gap: 10px; }
    .tech-card h3 { font-size: 1.25rem; }
    .h2-text { font-size: 1.4rem; }
    .sidenav-toggle { padding: 10px 14px; font-size: 13px; bottom: 16px; right: 14px; }
    .main-content iframe { height: 55vh !important; }
    .footer { margin-top: 40px; padding: 30px 0 20px; }
}
