/* ==========================================================================
   ZMIENNE I RESET - DNA wizualne "Apartamenty Good Home"
   ========================================================================== */
:root {
    --bg-dark: #1e2122;
    --bg-card: #2d3436;
    --bg-footer: #111314;
    /* Ciemniejsze tło dla stopki */
    --text-light: #f9f9f7;
    --text-muted: #b2bec3;
    --accent-brown: #523811;
    --accent-orange: #cfa313;
    --menu-gradient: linear-gradient(90deg, #523811 0%, #cfa313 20%, #523811 100%);
    --accent-gradient: linear-gradient(135deg, #cfa313 30%, #523811 100%);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.5);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    background: var(--menu-gradient);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*
.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--menu-gradient);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
*/

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Styl dla logotypu graficznego w nagłówku */
.header-logo-img {
    max-width: 240px;
    height: auto;
    display: block;
}

.header-logo-img:hover {
    filter: brightness(1.1);
}

.logo-fallback-text {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--menu-gradient);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--bg-dark);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

/* ==========================================================================
   APARTAMENTY - LAYOUT I TREŚĆ
   ========================================================================== */
.page-intro {
    text-align: center;
    padding: 20px 0 40px;
}

.page-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 300;
}

.apartment-section {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: var(--shadow);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.apt-info {
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apt-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-light);
    border-left: 4px solid var(--accent-orange);
    padding-left: 20px;
}

.apt-text {
    max-height: 125px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    color: var(--text-muted);
}

.apt-text.is-expanded {
    max-height: 1000px;
}

.ellipsis-indicator {
    color: var(--accent-orange);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.ellipsis-indicator:hover {
    opacity: 0.7;
    text-decoration: none;
}

.is-expanded .ellipsis-indicator {
    display: none;
}

.full-description {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.is-expanded .full-description {
    opacity: 1;
}

.apt-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 25px 0;
}

.apt-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature i {
    color: var(--accent-orange);
}

/* ==========================================================================
   OCENY EKSPERCKIE
   ========================================================================== */
.expert-ratings {
    margin-top: 0;
}

.rating-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-orange);
    margin-bottom: 20px;
    font-weight: 600;
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rating-label-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-icon {
    width: 16px;
    height: auto;
    filter: brightness(1.2);
}

.rating-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stars {
    color: var(--accent-orange);
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.stars .far {
    opacity: 0.2;
}

/* ==========================================================================
   WIZUALIZACJA I GALERIA
   ========================================================================== */
.apt-visuals {
    position: relative;
}

.main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: flex-end;
}

.btn-more {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(201, 133, 85, 0.4);
}

.apt-gallery {
    display: none;
    background: #252a2b;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.apt-gallery.is-visible {
    display: block;
    animation: fadeIn 0.6s ease;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-thumb img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

.gallery-thumb img:hover {
    transform: scale(1.03);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   STOPKA (FOOTER) - NOWY LAYOUT
   ========================================================================== */
.main-footer {
    background-color: var(--bg-footer);
    padding: 80px 0 40px;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

/* Grupa lewa: Nav + Adres */
.footer-group-left {
    display: flex;
    gap: 60px;
    flex: 1;
}

.footer-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-orange);
    margin-bottom: 25px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-light);
    padding-left: 5px;
}

address {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Logo centralne */
.footer-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 200px;
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-fallback {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    display: block;
    margin-top: 30px;
}

/* Grupa prawa: Kontakt */
.footer-group-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.footer-group-right .footer-col {
    text-align: right;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-col i {
    color: var(--accent-orange);
    margin-right: 8px;
}

/* Bottom Bar */
.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
}

.designer-tag {
    font-weight: 600;
    letter-spacing: 1px;
}

/* Styl komunikatu sukcesu - Konkurs */
.alert-success {
    background: rgba(207, 163, 19, 0.1); /* Subtelne tło na bazie złotego koloru marki */
    border-left: 5px solid var(--accent-orange);
    color: var(--text-light);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Montserrat', sans-serif;
    animation: slideInDown 0.5s ease-out;
}

.alert-success i {
    color: var(--accent-orange);
    font-size: 1.5rem;
}

/* Styl komunikatu błędu */
.alert-error {
    background: rgba(231, 76, 60, 0.1); /* Delikatna czerwień */
    border-left: 5px solid #e74c3c;
    color: var(--text-light);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Montserrat', sans-serif;
    animation: slideInDown 0.5s ease-out;
}

.alert-error i {
    color: #e74c3c;
    font-size: 1.5rem;
}

/* Animacja wejścia dla lepszego UX */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSYWNOŚĆ
   ========================================================================== */
@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    /* Centrowanie nagłówka i menu */
    .header-content {
        flex-direction: column;
        align-items: center; /* Centrowanie wszystkich dzieci w kolumnie */
        gap: 0;
        padding: 5px 0;
        position: relative; /* Dla pozycjonowania hamburgera */
    }

    .menu-toggle {
        display: block; /* Pokazujemy hamburgera na mobile */
        position: absolute;
        right: 20px;
        top: 10px;
    }

    .header-logo-img {
        height: 40px; /* Wysokość dopasowana do kompaktowego paska */
        width: auto;
        transition: var(--transition);
    }

    /* Wyśrodkowanie LOGO i linia oddzielająca */
    .logo {
        width: 100%;
        display: flex;          /* Używamy flexbox do centrowania obrazka */
        justify-content: center;
        padding-bottom: 20px;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

   .main-nav {
        display: none; /* Domyślnie ukrywamy menu na mobile */
        width: 100%;
        background: var(--bg-dark); /* Solidne tło pod rozwijane menu */
    }

    /* Klasa, którą doda skrypt JS po kliknięciu */
    .main-nav.is-active {
        display: block;
    }

    /* Efekt hover dla hamburgera */
    .menu-toggle i {
    color: var(--text-light) !important; /* Kolor bazowy */
    transition: var(--transition);
    display: inline-block; /* Ważne dla poprawnego działania transform: scale */
    }

    /* Stan po najechaniu - zwiększamy specyficzność */
    .header-content .menu-toggle:hover i {
        color: var(--accent-orange) !important;
        transform: scale(1.2);
    }

    .menu-toggle:hover {
        text-decoration: none;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
    }

    /* Linie oddzielające pomiędzy elementami menu */
    .main-nav ul li:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dodanie paddingów, aby linki były łatwiejsze do kliknięcia na telefonie */
    .main-nav ul li a {
        color: var(--text-light); /* Upewniamy się, że bazowy tekst jest jasny */
        text-decoration: none;
        transition: var(--transition);
        width: 100%;
        display: block;
        padding: 15px 0;
    }

    .main-nav ul li a:hover {
    color: var(--accent-orange);
    background-color: rgba(255, 255, 255, 0.05); /* Bardzo subtelne rozjaśnienie tła wiersza */
    padding-left: 10px; /* Delikatne przesunięcie tekstu - daje świetny efekt "interakcji" */
    }

    /* ***** Kontener tekstowy MOBILE ***** */
    .container {
        padding: 0 16px !important;
    }

    .apt-info {
        padding: 25px 25px !important; /* Minimalny margines boczny wewnątrz bloku tekstowego */
    }

    /* ***** Responsywność galerii: 1 kolumna na mobilkach ***** */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-group-left {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .footer-group-right {
        justify-content: center;
    }

    .footer-group-right .footer-col {
        text-align: center;
    }

    .footer-center {
        order: -1;
        margin-bottom: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}