html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    background-image: url('../logo/tlo.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;           /* DODAJ TO */
    background-attachment: fixed;     /* DODAJ TO jeśli chcesz efekt przyklejenia */
    color: #fff;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

@media (max-width: 768px) {
    body {
        background-size: cover;
        background-position: center center;
    }
    main {
        padding-top: 80px;
    }
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo img {
    border-radius: 15px;
    margin-top: 3.5px;
    margin-left: 0.8vw;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 150px); /* Adjust height based on header and footer */
}

.book-appointment-wrapper {
    display: flex;
    margin-top: 3vh;
    background-color: rgba(238, 0, 186, 0.8);
    width: 180px;
    left: 0;
    right: 0;
    border: 3px solid white;
    border-radius: 10px;
}

/* Przycisk tylko na szerokość napisu */
.book-appointment {
    width: auto;
    min-width: 120px;
    max-width: 100vw;
    padding: 16px 40px;
    font-size: 18px;
    margin: 0;
    display: inline-block;
    text-decoration: none;
    color: rgb(255, 255, 255);
}

.book-appointment-wrapper:hover {
    background-color: #e78cbd; /* Darker pink on hover */
}

@media (max-width: 900px) {
    .book-appointment-wrapper {
        margin-top: 25px;
        width: 163px;
        margin-bottom: -5px;
    }
    .book-appointment {
        font-size: 18px;
        padding: 14px 28px;
    }
}

.btn {
    background-color: #ff69b4;
    color: white;
    padding: 10px 25px;
    margin: 0 10px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
    border: 1px solid black;
}

.btn:hover {
    background-color: #ff1493;
}

/* Kontener Instagrama */
.instagram-feed {
    margin-top: 50px;
    max-width: 1100px;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 240, 245, 0.95);
    border: 3px solid #ff69b4;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(255, 105, 180, 0.15);
    padding: 30px 20px 20px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

.instagram-feed h2 {
    margin-bottom: 20px;
    color: #ff69b4;
    font-size: 28px;
    font-weight: bold;
}

/* Logo Instagrama */
.instagram-feed .instagram-logo {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    border: 2px solid #ff69b4;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

/* Elfsight Widget - wymuszenie szerokości */
.elfsight-app-cceed049-e2c4-4777-8581-5d7c1a7863c1 {
    width: 100% !important;
    max-width: 1000px !important;
    min-width: 360px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin-left: 130px !important;
}

/* Responsywność na urządzeniach mobilnych */
@media (max-width: 900px) {
    html, body {
        overflow-x: hidden;
    }
    
    .instagram-feed {
        max-width: 90vw;
        padding: 10px 2vw 10px 2vw;
    }
    .elfsight-app-cceed049-e2c4-4777-8581-5d7c1a7863c1 {
        max-width: 99vw !important;
        min-width: 220px;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        transform: none !important;
    }
    .instagram-feed h2 {
        font-size: 18px;
        margin-top: 35px;
    }
}

/* STOPKA */
.footer {
    flex-shrink: 0;
    width: 100vw;
    background-color: rgb(214, 162, 171);
    text-align: center;
    padding: 8px 0;
    position: relative;
    bottom: 0;
    left: 0;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 10px;
}

.footer ul li a {
    color: #ff69b4;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: #ff1493;
}

.mobilebreak {
    display: none;
}

@media (max-width: 768px) {
    .footer {
        margin-top: -5px;
        width: 100vw;
        margin-left: 0;
        padding: 6px 0;
        left: 0;
        right: 0;
        position: relative;
    }
    .footer ul {
        padding-bottom: 10px;
    }
    .mobilebreakoff {
        display: block;
        margin-top: -75px;
    }
}

/* --- NAWIGACJA --- */
nav {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(238, 0, 159, 0.8);
    padding: 10px 0 10px 0;
    height: 70px;
    width: 100vw;
    margin-left: -10px;
    margin-top: -8px;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-left: -14vh;
    width: 100%;
    font-size: 0.95em;
}

.nav-user-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    height: 100%;
    margin-right: 35px;
}

.btn.nav-btn {
    margin: 0 10px;
    border-radius: 8px;
    border: 3px solid #fff;
    background: rgba(185, 65, 145, 0.986);
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(255,105,180,0.10);
    transition: background 0.3s, border 0.3s;
}

.btn.nav-btn:hover {
    background: #e78cbd;
}

.nav-user-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    scale: 0.95;
    padding: 0;
    height: 48px;
    margin-right: 20px;
    text-decoration: none;
    width: 48px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #ff69b4;
    box-shadow: 0 2px 8px rgba(255,105,180,0.10);
    transition: border 0.3s;
}

.nav-user-label {
    display: block;                /* <-- zamiast flex */
    position: absolute;
    right: 100%;
    margin-right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    font-weight: 600;
    font-size: 1em;
    white-space: nowrap;           /* <-- najważniejsze */
    min-width: unset;
    max-width: unset;
    text-align: right;
    line-height: 1.1;
    pointer-events: none;
    z-index: 2;
    word-break: normal;
    overflow: hidden;              /* jeśli chcesz uciąć */
    text-overflow: ellipsis;       /* jeśli chcesz uciąć */
}

.nav-user-label.admin {
    color: #ffffff;
}

@media (max-width: 768px) {
    .nav-user-btn {
        scale: 1;
        height: 40px;
        width: 40px;
        border-radius: 8px;
        border: 2px solid #fff;
        background: #ff69b4;
        box-shadow: 0 2px 8px rgba(255,105,180,0.10);
        position: static;
        order: 2;
    }
    .nav-user-label {
        font-size: 0.95em;
        min-width: 250px;
        max-width: 350px;
        right: 105%;
        top: 50%;
        transform: translateY(-50%);
        text-align: right;
        line-height: 1.1;
    }
    .nav-user-area {
        position: absolute;
        right: 70px; /* 10px (hamburger) + 40px odstępu + 10px marginesu */
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0;
        margin-top: 0;
        z-index: 1001;
        margin-top: -22px;
    }
}

.nav-user-icon {
    font-size: 28px;
    color: #fff;
    transition: color 0.2s;
}

.nav-user-btn:hover .nav-user-icon {
    color: #ffb7db;
}
.hamburger span {
    display: none;
}
.hamburger {
    display: none;
}
.mobile-menu {
    display: none;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    nav {
        position: fixed;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 4px 8px;
        height: 88px;
        background-color: rgba(255, 105, 180, 0.95);
        z-index: 1000;
        width: 100vw;          /* <-- popraw z 96vw na 100vw */
        margin-left: 0;        /* <-- popraw z -8px na 0 */
        margin-top: -8px;         /* <-- popraw z -8px na 0 */
        left: 0;               /* <-- dodaj */
        right: 0;              /* <-- dodaj */
        box-sizing: border-box;/* <-- dodaj */
    }
    .logo {
        display: flex;
        align-items: center;
        margin-left: -54px;
    }
    .logo img {
        height: 114px;
        width: 275px;
        margin-top: 3px;
        scale: 0.66;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(255,105,180,0.10);
    }
    .nav-user-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 175px;
        margin-right: 0;
        scale: 1;
        margin-top: 43px;
        height: 40px;
        width: 40px;
        border-radius: 8px;
        border: 2px solid #fff;
        background: #ff69b4;
        box-shadow: 0 2px 8px rgba(255,105,180,0.10);
        position: static;
        order: 2;
    }
    .nav-user-icon {
        font-size: 26px;
        color: #fff;
        margin: 0;
        transition: color 0.2s;
    }
    .nav-user-btn:hover .nav-user-icon {
        color: #ffb7db;
    }
    .nav-links {
        display: none !important;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        cursor: pointer;
        position: absolute;
        right: 20px;      /* <-- 10px od prawej krawędzi */
        top: 50%;
        transform: translateY(-50%);
        background: #ff69b4;
        border-radius: 8px;
        border: 2px solid #fff;
        order: 3;
        margin-left: 0;   /* <-- usuń auto */
        margin-right: 0;
        z-index: 1100;
    }
    .hamburger span {
        display: block;
        height: 4px;
        width: 28px;
        background: #fff;
        margin: 4px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
    .mobile-menu {
        display: none;
        position: absolute;
        top: 68px;
        right: 8px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(255,105,180,0.15);
        z-index: 999;
        min-width: 160px;
        padding: 3px 0;
        animation: fadeInMenu 0.2s;
    }
    .mobile-menu.active {
        display: block;
    }
    .mobile-menu a {
        display: block;
        padding: 12px 24px;
        color: #b34183;
        text-decoration: none;
        font-weight: 600;
        font-size: 1.05em;
        border-bottom: 1px solid #eee;
        transition: background 0.2s, color 0.2s;
    }
    .mobile-menu a:last-child {
        border-bottom: none;
    }
    .mobile-menu a:hover {
        background: #ffe4f1;
        color: #ff1493;
    }
    /* Ukryj desktopowy napis użytkownika */
    .mobile-user-menu {
        right: 80px;
    }
    @keyframes fadeInMenu {
        from { opacity: 0; transform: translateY(-10px);}
        to { opacity: 1; transform: translateY(0);}
    }
}

/* NAVBAR - LOGOWANIE */
.user-dropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(255,105,180,0.15);
    min-width: 220px;
    z-index: 999;
    padding: 8px 0;
    animation: fadeInMenu 0.2s;
}
.user-dropdown.active {
    display: block;
}
.user-dropdown a {
    display: block;
    padding: 12px 24px;
    color: #b34183;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
}
.user-dropdown a:last-child {
    border-bottom: none;
}
.user-dropdown a:hover {
    background: #ffe4f1;
    color: #ff1493;
}

/* MOBILE USER MENU */
.mobile-user-menu {
    display: none;
    position: absolute;
    top: 68px;
    right: 38px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(255,105,180,0.15);
    z-index: 999;
    min-width: 140px;
    padding: 8px 0;
    animation: fadeInMenu 0.2s;
}
.mobile-user-menu.active {
    display: block;
}
.mobile-user-menu a {
    display: block;
    padding: 12px 24px;
    color: #b34183;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
}
.mobile-user-menu a:last-child {
    border-bottom: none;
}
.mobile-user-menu a:hover {
    background: #ffe4f1;
    color: #ff1493;
}

@media (min-width: 769px) {
    .mobile-user-menu { display: none !important; }
}
@media (max-width: 768px) {
    .user-dropdown { display: none !important; }
    .mobile-user-menu { display: none; }
    .mobile-user-menu.active { display: block; }
}

.admin-back-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    background: #ffe4f1;
    border: 2px solid #b34183;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b34183;
    font-size: 1.7em;
    z-index: 10;
    transition: background 0.18s, border 0.18s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255,105,180,0.08);
}
.admin-back-btn:hover {
    background: #ffd6ec;
    border-color: #ff69b4;
}
.admin-container {
    position: relative; /* dodaj jeśli nie masz */
}
@media (max-width: 600px) {
    .admin-back-btn {
        top: 8px;
        left: 8px;
        width: 34px;
        height: 34px;
        font-size: 1.2em;
    }
}

.nav-user-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    margin-top: 15px;
}

.admin-badge {
    display: block;
    background: #ffd700;
    color: #b34183;
    font-weight: bold;
    font-size: 0.6em;
    border-radius: 6px;
    padding: 2px 7px;
    margin-left: 0;
    margin-top: 0px;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(255,215,0,0.10);
    letter-spacing: 1px;
    text-align: center;
    min-width: 28px;
}

@media (max-width: 768px) {
    .admin-badge {
        font-size: 0.75em;
        padding: 2px 5px;
        margin-left: 0;
        margin-top: 2px;
        min-width: 24px;
    }
}