/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f4f4f4;
    color: #333;

    padding-top: 60px;   /* prostor za header */
    padding-bottom: 0;   /* defaultno nula */
}

/* GLOBAL LINKOVI */
a {
    text-decoration: none;
    color: inherit;   /* preuzima boju iz konteksta */
}
a:hover {
    color: #0077cc;   /* blago naglašavanje */
}

/* GLOBAL CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* HEADER */
.main-header {
    background-color: #0077cc;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: center;   /* centriraj meni */
}

.main-nav {
    width: 100%;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;   /* meni po sredini */
    gap: 30px;
    padding: 15px 0;
    margin: 0;
}
.nav-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: #ddd;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HERO */
.hero-section {
    background: #0077cc;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
}
.hero-section h1 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}
.hero-section p {
    font-size: 1rem;
}

/* GRID */
.apartmani {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
    align-items: stretch;
}

.apartman {
    background: white;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.apartman:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.apartman img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}
.apartman h2 {
    margin: 5px 0;
    font-size: 1.2rem;
}
.apartman p {
    flex-grow: 1;
    margin: 5px 0 10px;
    font-size: 0.95rem;
}

/* linkovi unutar kartice */
.apartman a {
    text-decoration: none;
}
.apartman a:hover {
    color: #0077cc;
}

/* BUTTON – Rezerviši */
.btn {
    margin-top: auto;
    display: inline-block;
    padding: 8px 15px;
    background: #0077cc;
    color: #fff;             /* uvijek bijeli tekst */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}
.btn:hover {
    background: #005fa3;
}

/* ADMIN DUGMAD – Odobri / Odbij */
.btn-action {
    padding: 8px 14px;        /* ujednačeno punjenje */
    min-width: 90px;          /* iste širine */
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    margin: 2px;
    transition: background 0.3s ease;
}
.btn-approve {
    background: #28a745;
    color: #fff;
}
.btn-approve:hover { background: #218838; }
.btn-reject {
    background: #dc3545;
    color: #fff;
}
.btn-reject:hover { background: #c82333; }

/* FOOTER */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 14px;
    margin-top: 0;
    padding: 6px 0;
}
footer .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .apartmani {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .apartmani {
        grid-template-columns: 1fr;
    }
    footer {
        font-size: 12px;
        padding: 4px 0;
        position: static; /* nije fiksiran na telefonu */
    }
}
/* Desktop: fiksni footer */
@media (min-width: 769px) {
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        line-height: 40px;
        z-index: 900;
    }
    body {
        padding-bottom: 40px; /* prostor za fiksni footer samo na desktopu */
    }
}
