/* ============================================================
   NOMEDA HAIR BOUTIQUE — STYLE.CSS (galutinė versija su hover fix)
   ============================================================ */

/* I. KINTAMIEJI */
:root {
    --primary-color: #E4D6BB;
    --primary-transparent: rgba(228, 214, 187, .95);
    --secondary-color: #2b1d0e;
    --accent-color: #a67c52;
    --text-color: #333;
    --dark-hover-color: #3e2c18;

    --shadow-light: 0 4px 8px rgba(0, 0, 0, .2);
    --shadow-button: 0 6px 20px rgba(0, 0, 0, .15);
    --shadow-deep: 0 8px 25px rgba(0, 0, 0, .2);
    --shadow-x: 0 12px 28px rgba(0, 0, 0, .28);

    --footer-h: 56px;
    --tr: color .3s ease, background-color .3s ease,
        transform .3s ease, box-shadow .3s ease;
}

/* II. RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%
}

/* III. A11Y – paslėpta SEO H1 */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* IV. BODY */
body {
    background-color: var(--primary-color);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, "Noto Sans", sans-serif;
    color: var(--text-color);
    line-height: 1.6;

    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: var(--footer-h);
}

/* V. NUORODOS */
a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: var(--tr)
}

a:hover {
    color: var(--secondary-color);
    transform: translateY(-1px)
}

a:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px
}

/* VI. CENTRINIS BLOKAS */
.centerDiv {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================================
   VII. LOGO — vienodas dydis visur + hover veikia (jokio transform anim ant IMG)
   ============================================================ */
.logo {
    text-align: center;
    margin-bottom: 24px;
    /* Įėjimas per konteinerį: galima naudoti translate čia, hover bus ant IMG */
    opacity: 0;
    transform: translateY(20px);
    animation: logoBlockIn 0.8s ease-out forwards 0.15s;
}

.logo img {
    width: 300px !important;
    height: auto !important;
    aspect-ratio: 300 / 184;
    display: block;
    margin: 0 auto;
    max-width: none !important;

    /* IMG įėjimas tik opacity — jokių transform, kad hover vėliau dominuotų */
    opacity: 0;
    animation: logoImgFade 0.9s ease-out forwards 0.35s;

    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25));
    transition: transform .25s ease, filter .25s ease;
}

/* Desktop hover efektas (veiks, nes IMG neturi transform animacijų) */
@media (min-width:769px) {
    .logo img:hover {
        transform: translateY(-6px) scale(1.06);
        filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .28));
    }
}

/* Mobile proporcingai */
@media (max-width:768px) {
    .logo img {
        width: 240px !important;
        aspect-ratio: 300/184;
        height: auto !important
    }
}

@media (max-width:480px) {
    .logo img {
        width: 200px !important;
        aspect-ratio: 300/184
    }
}

/* ============================================================
   VIII. NAVIGACIJA — scena po logo (be transform anim ant pačių mygtukų)
   ============================================================ */
.text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 6px 0 18px;
    margin-bottom: 24px;

    /* Blokas pasirodo po logo */
    opacity: 0;
    transform: translateY(10px);
    animation: navBlockIn .7s ease-out forwards .55s;
}

.text a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1;
    min-width: 140px;
    padding: 12px 18px;
    border-radius: 26px;

    background: var(--primary-transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: var(--shadow-button);

    font-size: 16px;
    color: var(--secondary-color);
    letter-spacing: .5px;
    position: relative;
    overflow: hidden;
    transition: var(--tr);

    /* Įėjimas tik su opacity + šešėlio „įsijungimu“, be transform */
    opacity: 0;
    box-shadow: none;
    animation: menuItemFade .6s ease-out forwards;
}

.text a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(43, 29, 14, .1), transparent);
    transform: translateX(-100%);
    transition: transform .45s ease;
}

/* Hover – pakėlimas (dabar veiks, nes transform neužimtas animacijos) */
.text a:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: var(--shadow-x);
    background: var(--primary-color);
}

.text a:hover::before {
    transform: translateX(100%)
}

.text a[aria-current="page"] {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(43, 29, 14, .15) inset;
    pointer-events: none;
}

/* Stagger – vėlinimas */
.text a:nth-child(1) {
    animation-delay: .70s
}

.text a:nth-child(2) {
    animation-delay: .82s
}

.text a:nth-child(3) {
    animation-delay: .94s
}

/* Mobile – meniu tokio pat pločio kaip logo */
@media (max-width:768px) {
    :root {
        --logo-w: 180px
    }

    .text {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0 16px;
        width: var(--logo-w) !important;
        margin: 0 auto !important;
    }

    .text a {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ============================================================
   IX. GALERIJA
   ============================================================ */
.imgDiv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    animation: fadeInUp 1s ease-out .6s both;
    margin-bottom: 80px;
}

.imgDiv a {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-deep);
    transition: var(--tr);
    position: relative
}

.imgDiv a:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .3)
}

.imgDiv img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform .3s ease
}

.imgDiv a:hover img {
    transform: scale(1.1)
}

/* ============================================================
   X. KONTAKTAI
   ============================================================ */
.contact-info {
    background-color: var(--primary-transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 13px;
    border-radius: 15px;
    box-shadow: var(--shadow-button);
    text-align: center;
    margin-bottom: 30px;
    max-width: 500px;
    animation: fadeInUp 1s ease-out .5s both;
    border: 1px solid rgba(255, 255, 255, .3);
}

.contact-info p {
    margin-bottom: 14px;
    font-size: 16px;
    display: flex;
    align-items: baseline;
    /* Patikslinta geresniam lygiavimui */
    gap: 10px;
    flex-wrap: nowrap;
    /* UŽTIKRINA, kad nesiplėstų per kelias eilutes dideliame ekrane */
    font-weight: 600;
    white-space: nowrap;
    /* UŽTIKRINA, kad ilgiausi teksto fragmentai nesiplėstų */
    justify-content: center;
}

.contact-info p::before {
    content: attr(data-icon);
    font-size: 18px;
    color: var(--secondary-color);
    transition: color .3s ease, transform .3s ease, text-shadow .3s ease
}

.contact-info p:hover::before {
    color: var(--accent-color);
    transform: rotate(-5deg);
    text-shadow: 0 0 6px rgba(166, 124, 82, .5)
}

.contact-info strong {
    font-weight: 500
}

.contact-info span,
.contact-info a {
    font-weight: 400;
    color: inherit;
    text-decoration: none
}

.contact-info a:hover {
    color: var(--accent-color);
    text-decoration: underline
}

.map-container {
    margin-top: 30px;
    margin-bottom: 100px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    animation: fadeInUp 1s ease-out .6s both;
    max-width: 400px;
    width: 100%;
}

.map-container iframe {
    border: none;
    width: 100%;
    height: 300px
}

.back-home {
    margin: 40px 0;
    text-align: center;
    animation: fadeInUp 1s ease-out .7s both
}

.back-home a {
    font-size: 22px;
    font-weight: 400;
    color: var(--accent-color);
    display: inline-block;
    transition: var(--tr)
}

.back-home a:hover {
    color: var(--dark-hover-color);
    transform: rotate(-10deg) scale(1.2)
}

/* ============================================================
   XI. FOOTER
   ============================================================ */
.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    min-height: var(--footer-h);
    background-color: var(--primary-transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 8px 12px;
    font-weight: 400;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, .3);
    z-index: 1000;
}

/* ============================================================
   XII. ANIMACIJOS (be transform ant elementų su hover)
   ============================================================ */
@keyframes logoBlockIn {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes logoImgFade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes navBlockIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes menuItemFade {
    0% {
        opacity: 0;
        box-shadow: none
    }

    100% {
        opacity: 1;
        box-shadow: var(--shadow-button)
    }
}

/* ============================================================
   XIII. FONAI (image-set be dubliavimo)
   ============================================================ */
@media (min-width:769px) {
    body {
        background-image: image-set(url('img/fonas-desktop.webp') type('image/webp'),
                url('img/fonas.jpg') type('image/jpeg'));
    }
}

@media (max-width:768px) {
    body {
        background-image: image-set(url('img/fonas-mobile.webp') type('image/webp'),
                url('img/fonas.jpg') type('image/jpeg'));
        background-attachment: scroll;
    }
}

/* ============================================================
   XIV. RESPONSYVUMAS
   ============================================================ */
@media (max-width:768px) {
    .centerDiv {
        padding: 10px
    }

    .imgDiv {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px
    }

    .imgDiv img {
        height: 150px
    }

    .contact-info {
        width: 88%;
        padding: 20px
    }

    .contact-info p {
        font-size: 14px;
        /* ANKSČIAU BUVO flex-direction: column;, Dabar PAŠALINTA, kad išliktų viena eilutė */
        justify-content: center;
        gap: 5px
    }

    .map-container {
        width: 88%
    }

    .map-container iframe {
        height: 220px
    }

    .footer {
        font-size: 12px;
        padding: 10px
    }
}

@media (max-width:480px) {
    .text {
        width: var(--logo-w, 200px) !important;
        padding: 10px 0;
        margin: 0 auto
    }

    .text a {
        font-size: 13px;
        padding: 10px 18px;
        margin: 6px auto
    }

    .imgDiv {
        grid-template-columns: 1fr
    }
}

/* ============================================================
   XV. PRINT
   ============================================================ */
@media print {

    .footer,
    .imgDiv {
        display: none
    }

    body {
        background: #fff !important;
        background-image: none !important
    }

    .text,
    .contact-info {
        background: #fff !important;
        box-shadow: none !important;
        border: .5px solid #ddd !important
    }

    .logo img {
        filter: none !important
    }

    a[href]::after {
        content: " ("attr(href) ")";
        font-size: 90%;
        color: #666
    }
}

/* ============================================================
   XVI. HOVER GARANTAS DESKTOP'E (jei naršyklė „meluoja“)
   ============================================================ */
@media (any-hover:hover) and (pointer:fine) {
    .logo img:hover {
        transform: translateY(-6px) scale(1.06) !important;
        filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .28)) !important;
    }

    .text a:hover {
        transform: translateY(-6px) scale(1.04) !important;
        background: var(--primary-color) !important;
        box-shadow: var(--shadow-x) !important;
    }

    .imgDiv a:hover {
        transform: translateY(-8px) scale(1.02) !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, .3) !important;
    }
}