/*
Theme Name: Birštono gimnazija
Theme URI: https://birstonogimnazija.lt
Author: Jūsų Vardas
Description: Unikali tema Birštono gimnazijai, sukurta nuo nulio.
Version: 1.0
Text Domain: birstonogimnazija
*/

/* ==========================================================================
   1. BAZINIAI NUSTATYMAI IR KINTAMIEJI
   ========================================================================== */
html {
    scroll-behavior: smooth !important;
}

:root {
    --bg-primary: #09774A; /* Mokyklos žalia */
    --accent-color: #ffda44; /* Geltona / Auksinė */
    --text-color: #333333;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1; /* Priverčia puslapio apačią visada likti pačioje apačioje */
}

/* ==========================================================================
   2. HEADER (ANTRAŠTĖ) IR VIRŠUTINĖ JUOSTA
   ========================================================================== */
.custom-header {
    position: relative;
    background-color: var(--bg-primary);
    color: white;
    z-index: 1050 !important; /* Antraštė visada virš visų elementų */
}

.custom-header a {
    color: white;
    text-decoration: none;
}

.top-bar {
    padding-top: 5px;
    padding-bottom: 5px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
}

.contact-info {
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-info i {
    margin-right: 5px;
    font-size: 0.9rem;
}

.social-icons a {
    margin-left: 12px;
    transition: opacity 0.3s;
}

.social-icons a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   3. PAGRINDINĖ NAVIGACIJA (1-ASIS LYGIS)
   ========================================================================== */
.navbar {
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-nav {
    width: 100%;
    justify-content: center;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 15px !important;
    margin: 0 5px;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: var(--accent-color) !important;
}

/* Aktyvaus meniu punkto pabraukimas */
.navbar-nav .nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Vienodas aukštis (65px) kompiuterių ekranuose */
@media (min-width: 992px) {
    .top-bar,
    .navbar {
        height: 65px;
    }

    .navbar-nav > li {
        height: 65px;
    }

    .navbar-nav > li > a.nav-link {
        line-height: 65px; /* Vertikalus centravimas */
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: flex;
        align-items: center;
    }
}

/* ==========================================================================
   4. WORDPRESS IŠSKLEIDŽIAMAS MENIU (SUB-MENU)
   ========================================================================== */
@media (min-width: 992px) {
    .navbar-nav li {
        position: relative !important;
    }

    /* 1-ojo lygio išskleidžiamas meniu (atsidaro po žalia juosta) */
    .navbar-nav .sub-menu {
        position: absolute !important;
        top: 65px !important; /* Lygiai po 65px meniu juosta */
        left: 0 !important;
        display: none !important;
        min-width: 240px;
        background-color: rgba(9, 119, 74, 0.6) !important; /* Skaidrumas (0.6 vietoje 0.98) */
        backdrop-filter: blur(10px); /* Sulieja foną po meniu */
        -webkit-backdrop-filter: blur(10px);
        list-style: none;
        padding: 10px 0;
        margin: 0;
        z-index: 9999;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

    /* 2-ojo lygio išskleidžiamas meniu (atsidaro dešinėje) */
    .navbar-nav .sub-menu .sub-menu {
        top: 0 !important;
        left: 100% !important; /* 100% į dešinę */
        margin-top: 0 !important;
        margin-left: 2px !important;
        border-radius: 8px;
    }

    /* Parodome meniu tik užvedus pelę */
    .navbar-nav li:hover > .sub-menu {
        display: block !important;
        animation: fadeIn 0.2s ease-in-out;
    }

    /* Išskleidžiamo meniu nuorodų stilius */
    .navbar-nav .sub-menu a {
        display: block;
        padding: 10px 20px;
        color: white !important;
        text-decoration: none;
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.4;
        transition: all 0.3s ease;
    }

    .navbar-nav .sub-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--accent-color) !important;
        padding-left: 25px; /* Nežymus pasislinkimas į dešinę */
    }
}

/* Meniu animacija */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. HERO / PRISTATYMO SEKCIJA
   ========================================================================== */
.hero-section {
    background: url('images/hero-1.jpg') center/cover no-repeat;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(10, 107, 70, 0.4) 0%, rgba(10, 107, 70, 0.3) 100%);
}

.hero-section h1.display-4 {
    font-size: 2.5rem !important;
    font-weight: 700;
}

.hero-section p.fs-5 {
    font-size: 0.9rem !important;
    line-height: 1.6;
}

/* Hero ženkliukas (Badge) */
.badge-custom {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Patobulintas Hero mygtukas */
.btn-custom-yellow {
    background-color: #ffda44 !important;
    color: #1a1a1a !important;
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 35px;
    border: none;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-custom-yellow:hover {
    background-color: #f7ce26 !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-custom-yellow i {
    font-size: 1.2rem;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-custom-yellow:hover i {
    transform: translateX(5px);
}

/* Statistikos kortelė (Glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    color: white;
    max-width: 550px;
    max-height: 270px;
    margin-left: auto;
}

.glass-card h6 {
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* ==========================================================================
   6. APIE MUS SEKCIJA
   ========================================================================== */
.apie-main-card {
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.apie-title {
    color: #1a202c;
    font-weight: 800;
    font-size: 1.8rem;
}

.apie-content p {
    color: #1a202c;
    font-size: 0.85rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.apie-small-card {
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apie-small-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.apie-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(9, 119, 74, 0.1);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.apie-feature-item h6, 
.apie-small-card h6 {
    color: #1a202c;
    font-size: 0.8rem;
}

.apie-feature-item p, 
.apie-small-card p {
    color: #1a202c !important;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* ==========================================================================
   7. NAUJIENŲ SEKCIJA (FACEBOOK API)
   ========================================================================== */
.news-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(9, 119, 74, 0.15);
}

.news-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-date-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: var(--bg-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-icon-fb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #1877F2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.news-text {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-read-more {
    color: var(--bg-primary);
    font-size: 0.85rem;
    transition: color 0.3s;
}

.news-card:hover .news-read-more {
    color: var(--accent-color);
}

/* ==========================================================================
   8. FOOTER / APATINĖ DALIS (Ruošinys)
   ========================================================================== */
footer {
    background-color: #212529;
    color: #adb5bd;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* ==========================================================================
   NAUDINGOS NUORODOS
   ========================================================================== */
.link-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Kortelės visada vienodo aukščio */
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(9, 119, 74, 0.15); /* Gimnazijos žalios spalvos švytėjimas */
}

.link-img-wrapper {
    height: 130px; /* Fiksuotas aukštis nuotraukai */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa; /* Labai švelniai pilkas fonas, kad išryškėtų balti logotipai */
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.link-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* Paveikslėlis niekada nebus iškraipytas ar nukirptas */
    transition: transform 0.3s ease;
}

.link-card:hover .link-img-wrapper img {
    transform: scale(1.05); /* Švelnus priartinimas užvedus pelę */
}

.link-title {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    flex-grow: 1; /* Leidžia tekstui užpildyti visą likusią kortelės erdvę */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

/* ==========================================================================
   9. KONTAKTAI (CONTACT SEKCIJA)
   ========================================================================== */
.contact-icon-wrapper {
    width: 45px;
    height: 45px;
    background-color: rgba(9, 119, 74, 0.1);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-form-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.custom-input {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: #f8fafc;
}

.custom-input:focus {
    background-color: #fff;
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(9, 119, 74, 0.1);
    outline: none;
}

.btn-custom-green {
    background-color: var(--bg-primary) !important;
    color: white !important;
    border-radius: 12px;
    transition: all 0.3s;
    border: none;
}

.btn-custom-green:hover {
    background-color: #075c39 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 119, 74, 0.25);
}

/* ==========================================================================
   10. VIDINIAI PUSLAPIAI (PAGE.PHP)
   ========================================================================== */
.page-content-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 5px 30px 30px 30px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.04);
}

.page-content-wrapper > *:first-child {
    margin-top: 0 !important;
}

/* PRIVERSTINIS REDAKTORIAUS ŠRIFTAS VISIEMS TEKSTAMS (Išmuša Montserrat) */
.page-content-wrapper, 
.page-content-wrapper li, 
.page-content-wrapper a,
.page-content-wrapper span {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    color: #1e1e1e !important; 
    font-size: 16px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

.page-content-wrapper p {
    margin-bottom: 0.75rem !important;
}

/* Paryškintas tekstas */
.page-content-wrapper strong,
.page-content-wrapper b {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-weight: 600 !important;
    color: #1e1e1e !important;
}

/* Antraštės: Segoe UI, tikslaus dydžio ir plonesnės */
.page-content-wrapper h1, 
.page-content-wrapper h2, 
.page-content-wrapper h3,
.page-content-wrapper h4,
.page-content-wrapper h5 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    color: #1e1e1e !important;
    font-weight: 600 !important;
    margin-top: 1em !important;
    margin-bottom: 0.4em !important;
    line-height: 1.3 !important;
}

/* Griežta dydžių tvarka nuo didžiausio iki mažiausio */
.page-content-wrapper h1 { font-size: 2rem !important; }
.page-content-wrapper h2 { font-size: 1.75rem !important; }
.page-content-wrapper h3 { font-size: 1.4rem !important; }
.page-content-wrapper h4 { font-size: 1.15rem !important; }
.page-content-wrapper h5 { font-size: 1rem !important; }

/* ================== NUORODŲ STILIUS ================== */
.page-content-wrapper a {
    color: #000000 !important;
    text-decoration: underline !important;
}

.page-content-wrapper a:hover {
    color: rgba(9, 119, 74, 1) !important;
}

/* Sąrašai */
.page-content-wrapper ul,
.page-content-wrapper ol {
    margin-bottom: 1rem !important;
    padding-left: 1.5rem !important;
}

.page-content-wrapper li {
    margin-bottom: 0.25rem !important;
}

.page-content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.sidebar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.04);
}

.bg-light-green {
    background-color: rgba(9, 119, 74, 0.04) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* ==========================================================================
   11. MOBILAUS MENIU SUBMENIU SUTVARKYMAS (Ištaisomas baltas fonas)
   ========================================================================== */
@media (max-width: 991.98px) {
    #mainNav .sub-menu {
        background-color: #2b3035 !important; 
        border: none !important;
        border-radius: 8px;
        padding: 10px 15px !important;
        margin-top: 5px;
        margin-bottom: 10px;
    }

    #mainNav .sub-menu li a {
        color: #ffffff !important; 
        padding: 8px 0 !important;
        display: block;
        text-decoration: none;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    }

    #mainNav .sub-menu li:last-child a {
        border-bottom: none;
    }

    #mainNav .dropdown-menu {
        background-color: #2b3035 !important;
        border: none !important;
    }
    
    #mainNav .dropdown-menu .dropdown-item {
        color: #ffffff !important;
    }
    
    #mainNav .dropdown-menu .dropdown-item:hover,
    #mainNav .dropdown-menu .dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
    }
}

/* Antrojo lygio submeniu atvaizdavimas mobiliajame telefone */
@media (max-width: 991.98px) {
    #mainNav .sub-menu .sub-menu {
        display: block !important;
        position: static !important;
        padding-left: 20px !important; /* Atitraukimas į dešinę hierarchijai parodyti */
        margin: 0 !important;
        background-color: transparent !important; /* Susilieja su pirmo lygio fonu */
        box-shadow: none !important;
    }

    #mainNav .sub-menu .sub-menu li a {
        font-size: 0.85rem !important; /* Šiek tiek mažesnis šriftas */
        color: #d1d5db !important; /* Šviesiai pilka spalva atskyrimui nuo pirmo lygio */
        border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
    }
}