/* ====== Bendri nustatymai ====== */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
    /* neutralus pilkas/juodas fonas per visą puslapį */
    background: radial-gradient(circle at top left, #1f2933 0, #050608 45%, #020305 100%);
    line-height: 1.6;
}

/* Konteineris */

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ====== Navigacija ====== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: linear-gradient(to right, rgba(12, 12, 14, 0.96), rgba(15, 17, 20, 0.96));
    border-bottom: 1px solid rgba(31, 31, 35, 0.9);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

/* Paliekam ir seną .topbar-inner, jei kur nors dar naudos */
.topbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: #f9fafb;
}

.logo span {
    color: #22d3ee;
}

nav a {
    margin-left: 1.3rem;
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 0.15rem;
}

nav a:hover {
    color: #e5e7eb;
    border-color: #22d3ee;
}

.nav-active {
    color: #e5e7eb;
    border-bottom-color: #22d3ee;
}

/* ====== Hero ====== */

.hero {
    background: transparent; /* jokio atskiro hero fono */
    color: #f9fafb;
    padding: 4rem 0 5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.1rem, 3vw, 2.7rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-text p {
    max-width: 40rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.hero-card {
    background: radial-gradient(circle at top left, rgba(31, 31, 35, 0.9), #050608);
    border-radius: 1.2rem;
    padding: 1.7rem 1.6rem;
    border: 1px solid rgba(75, 85, 99, 0.9);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.hero-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.hero-card p {
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
    color: #e5e7eb;
}

.hero-card ul {
    list-style: none;
}

.hero-card li {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    position: relative;
    padding-left: 1.3rem;
    color: #e5e7eb;
}

.hero-card li::before {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
}

/* Mygtukai */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #020617;
    box-shadow: 0 18px 45px rgba(6, 95, 115, 0.7);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 55px rgba(6, 95, 115, 0.9);
}

.btn-secondary {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(75, 85, 99, 0.9);
}

.btn-secondary:hover {
    border-color: #22d3ee;
    background: rgba(24, 24, 27, 0.95);
}

/* ====== Sekcijos ====== */

.section {
    padding: 4rem 0;
    background: transparent; /* jokio atskiro fono – kad nebūtų juostų */
    color: #e5e7eb;
}

.section-alt {
    background: transparent;
    position: relative;
}

.section-alt::before {
    content: none; /* išjungiam papildomą švytėjimą, kad fonas būtų visiškai lygus */
}

.section-title {
    max-width: 42rem;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    color: #f9fafb;
}

.section-title p {
    font-size: 0.95rem;
    color: #9ca3af;
}

/* Kortelės */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
    position: relative;
    z-index: 1;
}

.card {
    background: radial-gradient(circle at top left, #18181b, #050608);
    border-radius: 1rem;
    padding: 1.3rem 1.2rem;
    border: 1px solid rgba(63, 63, 70, 0.95);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.85);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: #f9fafb;
}

.card p {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 0.8rem;
}

.card ul {
    list-style: none;
    font-size: 0.86rem;
    color: #e5e7eb;
}

/* Lentelė */

.table-wrapper {
    overflow-x: auto;
    border-radius: 0.9rem;
    border: 1px solid rgba(63, 63, 70, 0.95);
    background: radial-gradient(circle at top, #18181b, #050608);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.9);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

thead {
    background: #020305;
}

th,
td {
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    text-align: left;
}

th {
    color: #f9fafb;
    font-weight: 600;
    border-bottom: 1px solid rgba(82, 82, 91, 0.95);
}

tbody tr:nth-child(odd) {
    background: rgba(15, 15, 17, 0.98);
}

tbody tr:nth-child(even) {
    background: rgba(9, 9, 11, 0.98);
}

tbody tr:hover {
    background: rgba(39, 39, 42, 0.98);
}

td {
    color: #e5e7eb;
}

.note {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Kontaktų blokas */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.contact-list {
    list-style: none;
    font-size: 0.9rem;
    margin-top: 0.7rem;
}

.contact-list li + li {
    margin-top: 0.2rem;
}

.contact-box {
    background: radial-gradient(circle at top left, #18181b, #050608);
    border-radius: 1rem;
    padding: 1.4rem 1.3rem;
    border: 1px solid rgba(82, 82, 91, 0.95);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9);
    font-size: 0.9rem;
}

.contact-box h3 {
    margin-bottom: 0.4rem;
    color: #f9fafb;
}

.contact-box p {
    margin-bottom: 0.7rem;
    color: #d1d5db;
}

.contact-box .mini {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Atsisiuntimo mygtukai */

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.6rem;
}

/* Poraktė */

.footer {
    border-top: 1px solid rgba(63, 63, 70, 0.95);
    padding: 1rem 0 1.3rem;
    background: transparent; /* kad susilietų su bendru fonu */
    color: #9ca3af;
    font-size: 0.8rem;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ====== Medžiagų grid (index puslapiui) ====== */

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.8rem;
}

.material-card {
    background: #050608;
    border-radius: 1.2rem;
    padding: 1.6rem;
    border: 1px solid rgba(82, 82, 91, 0.95);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.95);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.material-card:hover {
    transform: translateY(-6px);
    border-color: #22d3ee;
    box-shadow: 0 24px 80px rgba(34, 211, 238, 0.35);
}

.material-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0.9rem;
    margin-bottom: 1rem;
    background: #020305;
}

.material-card h3 {
    margin-bottom: 0.6rem;
}

.material-card ul {
    margin: 0.8rem 0 0.6rem;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.material-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #22d3ee;
}

.material-link:hover {
    text-decoration: underline;
}

/* ====== Medžiagų detalių puslapis (medziagos.html) ====== */

.page-dark {
    background: radial-gradient(circle at top left, #1f2933 0, #050608 45%, #020305 100%);
    color: #e5e7eb;
}

.page-main {
    padding-top: 4rem;
    background: transparent;
    color: #e5e7eb;
}

.section-narrow {
    max-width: 960px;
    margin: 0 auto;
}

.material-detail {
    padding-top: 2.5rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.detail-img {
    width: 100%;
    border-radius: 1.2rem;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
}

/* ====== „Back to top“ mygtukas ====== */

#topBtn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 15, 17, 0.96);
    color: #e5e7eb;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 60;
    transition: background 0.15s ease, transform 0.15s ease;
}

#topBtn:hover {
    background: #22d3ee;
    color: #020305;
    transform: translateY(-1px);
}

/* ====== Responsyvumas ====== */

@media (max-width: 880px) {
    .hero-grid,
    .contact-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    nav {
        display: none; /* paprastumo dėlei slepiame meniu mažame ekrane */
    }

    .hero {
        padding-top: 3.3rem;
    }

    .footer-flex {
        flex-direction: column;
        gap: 0.4rem;
    }

    .topbar-inner,
    .nav {
        padding-inline: 1rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
}
