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

header, footer {
    background-color: #0E2B40;
    color: #fff;
    padding: 10px;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f2f2f2;
}

main {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
}

h1,
h2,
h3,
h4 {
    margin-bottom: 15px;
    margin-top: 30px;
}

p {
    margin-bottom: 15px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

figure {
    margin: 20px 0;
    text-align: center;
}

figcaption {
    font-size: 0.95rem;
    color: #555;
    margin-top: 5px;
}

/* Crvena podebljana slova za emocionalne triggere */
.alert-red {
    color: red;
    font-weight: bold;
}

/* Stil za logičke blokove (sekcije) */
.section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ccc;
}

.section:last-of-type {
    border-bottom: none;
}

/* Forma za narudžbu */
#order-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 40px;
}

#order-form h3 {
    margin-bottom: 20px;
    text-align: center;
}

.order-field {
    margin-bottom: 15px;
    max-width: 350px;
}

#order-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

#order-form input[type="text"],
#order-form input[type="tel"] {
    width: 100%;
    padding: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 60px;
    margin-bottom: 10px;
}

.bottom__button {
    box-shadow: 0 0 0 0 red;
    animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}


.comment__popup {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    font-size: 18px;
    line-height: 150%;
    position: relative;
    background-color: #fff;
    top: 50%;
    transform: translateY(-50%);
    margin: 30px auto;
    max-width: 386px;
}

.create__comment__title {
    margin-bottom: 35px;
}

.create__comment__field {
    background: #FFFFFF;
    border: 1px solid #8B8B8B;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}

.popup-com-btn {
    background: #0075BF;
    border-radius: 5px;
    color: #fff;
    padding: 10px;
    border: none;
    outline: none;
    cursor: pointer;
    margin-top: 35px;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.comment__modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    -webkit-transition: opacity 200ms ease-in;
    -moz-transition: opacity 200ms ease-in;
    transition: opacity 200ms ease-in;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.comment__modal__form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

/* media */

@media (max-width: 576px) {

    .comment__popup {
        max-width: 70%;
        margin: 0 auto;
    }

    .create__comment__title {
        margin: 0;
    }
}

.comment__modal.open {
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
}

.comment__popup * {
    margin: 0;
}


.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 22px;
    cursor: pointer;
}


@keyframes pulse {
    to {
        box-shadow: 0 0 0 15px transparent;
    }
}

#order-form button {
    margin-top: 20px;
    padding: 20px 25px;
    background-color: #d9534f;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    width: 100%;
    max-width: 350px;
}

#order-form button:hover {
    background-color: #c9302c;
}

/* FAQ stil */
#faq h3 {
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.faq-question {
    font-weight: bold;
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.faq-answer {
    display: none;
    margin-top: 5px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-weight: bold;
}

.faq-item.open .faq-question::after {
    content: "-";
}

.faq-item.open .faq-answer {
    display: block;
}

/* Komentari */
#comments-container {
    margin-top: 30px;
    margin-bottom: 40px;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 5px;
}

.comment {
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
}

.comment:last-of-type {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #999;
    margin-right: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

.comment-author {
    font-weight: bold;
    margin-right: 10px;
}

.comment-time {
    font-size: 0.9em;
    color: #666;
}

.comment-text {
    margin-left: 50px;
    margin-bottom: 10px;
    white-space: pre-line;
}

/* Za prikaz dodatne fotografije (ako korisnik želi prikazati nešto u samom komentaru) */
.comment-photo {
    margin-left: 50px;
    margin-bottom: 10px;
    max-width: 500px;

    /* Po želji */
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.comment-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0;
    max-width: 500px;
}

.comment-reply {
    margin-left: 50px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.comment-reply .comment-header {
    margin-bottom: 2px;
}

.reply-to {
    color: #666;
    font-size: 0.9em;
}

/* Gumb "Odgovori" */
.reply-button {
    margin-left: 50px;
    background-color: transparent;
    border: none;
    color: #337ab7;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.reply-button:hover {
    text-decoration: underline;
}

/* Forma za unos novog komentara ili odgovora */
#new-comment-form,
.reply-form {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

#new-comment-form label,
.reply-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

#new-comment-form input[type="text"],
#new-comment-form input[type="file"],
#new-comment-form textarea,
.reply-form input[type="text"],
.reply-form input[type="file"],
.reply-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#new-comment-form button,
.reply-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #337ab7;
    color: #fff;
    cursor: pointer;
}

#new-comment-form button:hover,
.reply-form button:hover {
    background-color: #285e8e;
}

/* Adaptivni dizajn (responsive) */
@media (max-width: 600px) {
    main {
        padding: 10px;
    }

    header h1 {
        font-size: 25px;
    }

    #order-form .order-field label {
        margin-bottom: 3px;
    }

    .comment-text,
    .comment-reply,
    .reply-button {
        margin-left: 0;
    }
}
@media (max-width: 600px) {
    .comment-photo {
        margin-left: 0;
    }
}
