html, body {
    height: 100%;
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


body > * {
    flex-shrink: 0;
}

.site-footer {
    margin-top: auto;
}
/* Sunset Torrevieja - Final Stylesheet
   Architecture: Node.js + Express + EJS
*/

/* --- 1. Zmienne i Reset --- */
:root {
    --primary: #ff8c42;    /* Sunset Orange */
    --secondary: #005f73;  /* Ocean Blue */
    --light-bg: #fdf2e9;   /* Soft Sunset Tint */
    --white: #ffffff;
    --dark: #333;
    --gray: #666;
    --border: #eee;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- 2. Nawigacja --- */
nav {
    background: var(--white);
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Added for mobile responsiveness */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
}

.nav_links {
    display: flex;
    list-style: none;
}

.nav_links li {
    margin-left: 30px;
}

.nav_links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 400;
    transition: color 0.3s;
}

.nav_links a:hover {
    color: var(--primary);
}

/* Menu Toggle Placeholder */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

/* --- 3. Sekcja Hero --- */
.hero { 
    height: 85vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 20px;
    flex-direction: column; 
    color: white;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1519046904884-53103b34b206?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 10px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p { 
    font-size: 1.2rem; 
    max-width: 700px;
}

/* --- 4. Booking Widget (MODERNIZACJA DATY) --- */
.booking-widget { 
    background: var(--white); 
    padding: 35px; 
    border-radius: 15px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    width: 100%; 
    max-width: 1000px; 
    margin-top: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    color: var(--dark);
    text-align: left;
}

.input-group { 
    flex: 1; 
    min-width: 150px; 
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
    text-transform: uppercase;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 30px; 
    font-family: inherit;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus, 
.input-group select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 8px rgba(255, 140, 66, 0.2);
}

.btn-book {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 30px; 
    transition: background 0.3s;
    text-transform: uppercase;
}

.btn-book:hover { 
    background: #e6762d; 
}

/* --- 5. Features --- */
.features { 
    padding: 80px 0; 
    background: #f9f9f9; 
    text-align: center; 
}

.section-title { 
    text-align: center; 
    margin-bottom: 50px; 
    font-size: 2.5rem; 
    color: var(--secondary);
}

.feature-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}

.feature-item .icon { 
    font-size: 2.5rem; 
    display: block; 
    margin-bottom: 15px; 
}

/* --- 6. Karty Apartamentów (DODATKOWA PRZESTRZEŃ) --- */
.apartments { 
    padding: 100px 0; 
}

.apt-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); 
    gap: 50px; 
}

.apt-card { 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.08); 
    transition: transform 0.3s; 
    background: white; 
    display: flex;
    flex-direction: column;
}

.apt-card:hover { 
    transform: translateY(-12px); 
}

.apt-img { 
    height: 280px; 
    background-size: cover; 
    background-position: center; 
}

.img-a { background-image: url('https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?auto=format&fit=crop&w=800&q=80'); }
.img-b { background-image: url('https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?auto=format&fit=crop&w=800&q=80'); }

.apt-content { 
    padding: 45px 35px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apt-spec-icons {
    display: flex;
    justify-content: space-between;
    background: var(--light-bg);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0 30px; 
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.apt-desc {
    margin-bottom: 45px; 
    line-height: 1.8; 
    color: var(--gray);
    min-height: 5.5em;
}

.apt-footer {
    margin-top: auto;
}

.btn-outline {
    display: inline-block;
    padding: 14px 35px; 
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: 0.3s;
    text-align: center;
    width: fit-content;
}

.btn-outline:hover { 
    background: var(--primary); 
    color: white; 
}

/* --- 7. News & Blog --- */
.news { padding: 80px 0; background-color: #f4f7f8; }
.blog { padding: 80px 0; background-color: var(--white); }

.post-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.post-card { 
    background: var(--white); 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.post-card:hover { transform: translateY(-5px); }

.post-content { padding: 25px; }

.post-date { 
    color: var(--primary); 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 10px;
    display: block;
}

.post-content h3 { margin-bottom: 10px; color: var(--secondary); }
.post-content p { font-size: 0.95rem; color: var(--gray); margin-bottom: 15px; }

.read-more {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

/* --- 8. Kontakt i Stopka --- */
.contact { padding: 80px 0; background: var(--secondary); color: white; }
.contact-flex { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info, .contact-form { flex: 1; min-width: 300px; }

.contact-form input, 
.contact-form textarea { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border-radius: 4px; 
    border: none; 
}

footer { 
    background: #222; 
    color: #ccc; 
    padding: 40px 0; 
    text-align: center; 
}

.footer_inner a {
    color: #f8d7b8;
    text-decoration: none;
}

.footer_inner a:hover {
    color: #ffffff;
}

/* --- 9. Responsywność (UPDATED) --- */
@media (max-width: 768px) {
    /* Hero Adjustments */
    .hero { height: auto; padding: 100px 20px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }

    /* Mobile Menu Logic */
    .menu-toggle { display: flex; }
    
    .nav_links { 
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    /* Style when active (use JS to toggle .active class) */
    .nav_links.active {
        left: 0;
    }

    .nav_links li {
        margin: 15px 0;
    }

    /* Grid & Layout Adjustments */
    .booking-widget { 
        flex-direction: column; 
        width: 95%; 
        padding: 25px; 
        gap: 15px;
    }
    
    .input-group { width: 100%; }
    .btn-book { width: 100%; }

    /* Fix for small screens where cards might overflow */
    .apt-grid { 
        grid-template-columns: 1fr; 
        padding: 0 10px;
    }
    
    .post-grid { grid-template-columns: 1fr; }

    .contact-flex { flex-direction: column; gap: 30px; }
    .contact-info, .contact-form { min-width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .section-title { font-size: 1.8rem; }
    .apt-content { padding: 25px 20px; }
    .apt-spec-icons { flex-direction: column; gap: 10px; align-items: center; }
}

/* =========================================
   UKŁAD STRONY APARTAMENTU
   ========================================= */

/* Domyślny wygląd (Telefony komórkowe) - jedna kolumna pod drugą */
.apt-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px; /* Nieco mniejszy odstęp na telefonach */
}

/* Właściwość pozwalająca na "przypięcie" panelu zniknie na małych ekranach */
.booking-sidebar .booking-widget {
    position: static;
}

/* Ekrany większe niż tablet (np. Laptopy, PC) - podział na dwie kolumny */
@media (min-width: 992px) {
    .apt-layout {
        grid-template-columns: 1fr 400px;
        gap: 60px;
    }

    /* Przywracamy przyklejanie panelu rezerwacji na dużych ekranach */
    .booking-sidebar .booking-widget {
        position: sticky;
        top: 120px;
    }
}