/* ==========================================================================
   1. BENDRI STILIAI IR KINTAMIEJI
   ========================================================================== */
:root {
    --bg-dark: #1e293b;       /* Gilus antracitas (moderniems baldams) */
    --bg-card: #0f172a;       
    --primary: #16a34a;       /* Natūrali žalia (Gerkonių miškų/sodo motyvas) */
    --primary-hover: #15803d; /* Tamsesnė žalia užvedus pelę */
    --text-main: #f8fafc;     
    --text-muted: #94a3b8;    
    --body-bg: #f8fafc;       
    --content-bg: #ffffff;    
    --border-color: #e2e8f0;  
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--body-bg);
    color: #334155;
    display: flex;
    flex-direction: column; /* Užtikrina, kad footeris visada bus apačioje */
}

/* ==========================================================================
   2. VIRŠUTINĖ DALIS (HEADER VAIZDAS)
   ========================================================================== */
.site-header {
    background-color: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logotipas GSB.LT */
.logo a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary);
}

.nuorodos-logo {
    width: 200px;      /* Nustato tikslų plotį */
    height: auto;      /* Išlaiko teisingas proporcijas, kad nuotrauka neišsitemptų */
}

/* Navigacija kompiuterio ekrane */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
}

/* Veiksmo mygtukas (CTA) viršuje */
.header-cta .btn-contact {
    background-color: var(--primary);
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.header-cta .btn-contact:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Mobilus meniu mygtukas (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s ease;
}

/* ==========================================================================
   3. TURINIO KONTEINERIS (PAGRINDINIS APVALKALAS)
   ========================================================================== */
.page-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1; /* Svarbu: stumia footerį žemyn */
}

main {
    background: var(--content-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    min-height: 400px;
}

/* Bendros vidinių puslapių antraštės */
.page-header {
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--bg-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    color: #64748b;
    font-size: 16px;
}

/* ==========================================================================
   4. PUSLAPIŲ REIKALAVIMAI (HERO IR KORTELĖS / PASLAUGOS)
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 36px;
    color: var(--bg-dark);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p {
    font-size: 18px;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary);
    color: var(--text-main);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Paslaugų sekcija / Tinklelis */
.services-headline {
    text-align: center;
    margin-bottom: 40px;
}

.services-headline h2 {
    font-size: 28px;
    color: var(--bg-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

.services-headline p {
    color: #94a3b8;
    font-size: 16px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    color: var(--bg-dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.service-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Info sekcija puslapio apačioje */
.info-cta-block {
    margin-top: 50px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.info-cta-block h3 {
    color: var(--bg-dark);
    margin-bottom: 10px;
}

.info-cta-block p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ==========================================================================
   5. PROJEKTŲ PUSLAPIS (PROJEKTAI.PHP)
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.project-image-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

.project-image-placeholder.blue { background: #3b82f6; }
.project-image-placeholder.dark { background: #1e293b; }

.project-info {
    padding: 20px;
}

.project-tag {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.project-info h3 {
    font-size: 18px;
    color: var(--bg-dark);
    margin: 5px 0 10px 0;
}

.project-info p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   6. APIE MUS PUSLAPIS (APIE.PHP)
   ========================================================================== */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 16px;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.value-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.value-box.primary { border-left: 4px solid var(--primary); }
.value-box.dark { border-left: 4px solid var(--bg-dark); }

.value-box h4 {
    color: var(--bg-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

.value-box p {
    color: #64748b;
    font-size: 14px;
}

/* ==========================================================================
   7. KONTAKTŲ FORMA (KONTAKTAI.PHP)
   ========================================================================== */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    background: #bbf7d0;
    color: #166534;
}

.status-message.error {
    background: #fecaca;
    color: #991b1b;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 5px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ==========================================================================
   8. APATINĖ DALIS (FOOTER VAIZDAS)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-main);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto; /* Svarbu: nustumia footerį į pačią apačią */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.brand-description {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
    max-width: 320px;
}

.site-footer h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.site-footer ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer ul li a:hover {
    color: var(--text-main);
}

.contact-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* Autorinių teisių juosta */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 5px;
}

.footer-legal a:hover {
    color: var(--text-main);
}

/* ==========================================================================
   9. RESPONSIVE (PRISITAIKYMAS TELEFONAMS IR PLANŠETĖMS)
   ========================================================================== */
@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: 1fr; /* Kortelės pasidaro viena po kita */
    }
    
    .hero-section h1 {
        font-size: 28px;
    }

    .about-values {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobilus meniu */
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 30px;
        gap: 25px;
        border-bottom: 2px solid var(--primary);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .main-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .header-cta {
        width: 100%;
        text-align: center;
    }

    .header-cta .btn-contact {
        width: 100%;
    }

    /* Mobilus Footeris */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 40px;
    }

    .footer-bottom-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}