/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    background-image: url(img/backg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* Header Styles */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    position: relative;
}

header .logo {
    padding: 0;
    margin: 0;
}

header .logo img {
    width: 150px;
    padding: 0;
    margin: 0;
}

header .auth-buttons {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 20px;
    top: 20px;
    top: 50%;
    transform: translateY(-50%);
}

header .auth-buttons a button {
    padding: 10px 20px;
    background-color: #535353;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

header .auth-buttons a button:hover {
    background-color: #686767;
}

header .burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
}

header .burger-menu .line {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* Animacija za linije burger menija kada se otvori */
header .burger-menu.open .line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

header .burger-menu.open .line:nth-child(2) {
    opacity: 0;
}

header .burger-menu.open .line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Stilovi za auth-buttons kada je meni otvoren */
.menu-container {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background-color: #444;
    z-index: 10;
    transition: all 0.3s ease;
}

.menu-container.open {
    display: flex;
}

.menu-container .auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.menu-container .auth-buttons a {
    margin: 10px 0;
    width: 80%;
    text-align: center;
}

.menu-container .auth-buttons a button {
    width: 100%;
    padding: 10px;
    background-color: #555;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.menu-container .auth-buttons a button:hover {
    background-color: #777;
}

/* Kontejner za loader */
/* Overlay za loader - inicijalno sakriven */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* taman overlay */
    z-index: 9999;
    display: none; /* ❗ ovo je bilo ključno */
    justify-content: center;
    align-items: center;
}

/* Centriranje sadržaja unutar overlay-a */
.loader-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Slika loadera */
.loader-image {
    width: 400px;  /* Možeš prilagoditi veličinu slike */
    height: auto;
    margin-bottom: 20px;
    transition: opacity 1s ease-in-out;
}

.loader-image[style*="display: block"] {
    opacity: 1;
}

/* Animacija učitavanja ispod slike */
.loader-animation {
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border: 4px solid transparent;
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite; /* Animacija rotacije */
}

/* Animacija za rotaciju */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section Styles */
section {
    margin: 20px auto;
    padding: 20px;
    max-width: 800px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

section h2 {
    margin-top: 0;
    text-align: center;
}

.ai-quote {
    font-style: italic;
    color: #6b4c3b;
    font-size: 1.1rem;
    margin-top: 10px;
    transition: opacity 0.5s ease;
    text-align: center;
    background-color: #b3cf66;
    padding: 10px;
    border-radius: 10px;
}

.query-form form{
    margin-top: 40px;
}

/* Category Tabs Switcher */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px auto 20px;
    max-width: 800px;
    padding: 0 20px;
}

.tab-btn {
    flex: 1;
    max-width: 300px;
    padding: 15px 30px;
    background-color: #fff;
    border: 2px solid #CE9C7B;
    border-radius: 10px;
    color: #CE9C7B;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    -webkit-tap-highlight-color: rgba(206, 156, 123, 0.3);
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.tab-btn:hover {
    background-color: #fff8f3;
    border-color: #b88968;
    color: #b88968;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(206, 156, 123, 0.3);
}

.tab-btn.active {
    background-color: #CE9C7B;
    color: #fff;
    border-color: #CE9C7B;
    box-shadow: 0 4px 8px rgba(206, 156, 123, 0.4);
}

.tab-btn.active:hover {
    background-color: #b88968;
    border-color: #b88968;
    transform: translateY(-2px);
}

.category-form {
    display: none !important;
    visibility: hidden;
}

.category-form.active {
    display: flex !important;
    flex-direction: column;
    visibility: visible;
}

/* Body background classes for different categories */
body.category-meal {
    background-image: url(img/backg.jpg);
}

body.category-sweety {
    background-image: url(img/backg-sweety.jpg); /* Treba dodati ovu sliku */
}

/* Responsive za tab switcher */
@media (max-width: 768px) {
    .category-tabs {
        flex-direction: column;
        gap: 15px;
        margin: 20px auto 15px;
    }
    
    .tab-btn {
        max-width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Forma Styles */
form {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 0 auto;
}

form label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* sprečava iOS stilizaciju */
    -moz-appearance: none;
    appearance: none;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form textarea:focus,
form select:focus {
    border-color: #CE9C7B;
    box-shadow: 0 0 5px rgba(206, 156, 123, 0.5);
    outline: none;
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

form button {
    padding: 12px 20px;
    background-color: #CE9C7B;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #b88968;
}

form button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(206, 156, 123, 0.5);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

/* Global */

label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none; /* sprečava iOS stilizaciju */
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #CE9C7B;
    box-shadow: 0 0 5px rgba(206, 156, 123, 0.5);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button {
    padding: 12px 20px;
    background-color: #CE9C7B;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b88968;
}

button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(206, 156, 123, 0.5);
}

/* Message Styles */
.message {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #e0e0e0;
    border-radius: 4px;
}

/* Payment Form Styles */
.payment-form p {
    font-weight: bold;
}

.payment-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Response Styles */
.response {
    margin-top: 20px;
}

.response button {
    padding: 10px;
    background-color: #ce9c7b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.response button:hover {
    background-color: #795b48;
}

/* Osnovni stil za share container */
.response .share {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Unapređeni stil za share linkove */
.response .share a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #474747;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    border: 1px solid #CE9C7B;
    box-shadow: 2px 3px 5px rgba(206, 156, 123, 0.3);
    background-color: white;
}

.response .share a:hover {
    background-color: #CE9C7B;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 2px 4px 8px rgba(206, 156, 123, 0.4);
}

/* Osnovni stil za share container */
.share {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Unapređeni stil za share linkove */
.share a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #474747;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    border: 1px solid #CE9C7B;
    box-shadow: 2px 3px 5px rgba(206, 156, 123, 0.3);
    background-color: white;
}

.share a:hover {
    background-color: #CE9C7B;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 2px 4px 8px rgba(206, 156, 123, 0.4);
}

/* Toast notifikacija */
.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #CE9C7B;
    color: white;
    border-radius: 5px;
    box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.2);
    display: none;
    animation: slideIn 0.3s, slideOut 0.3s 2.7s forwards;
    z-index: 1000;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}


/* Blog Archive Styles */
.blog-archive {
    padding: 20px;
    max-width: 945px;
    margin: 0 auto;
    margin-top: 30px;
}

.blog-archive h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.blog-archive .blog-subtitle{
    text-align: center;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.heart-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('img/heart-empty.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transition: background-image 0.3s;
}

.heart-icon.active {
    background-image: url('img/heart-filled.svg');
}

.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    display: none;
    animation: slideIn 0.3s, slideOut 0.3s 3s forwards;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes slideIn {
    from {transform: translateX(100%);}
    to {transform: translateX(0);}
}

@keyframes slideOut {
    from {transform: translateX(0);}
    to {transform: translateX(100%);}
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.blog-post {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin: 0 0 10px;
}

.blog-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.blog-content small {
    font-size: 0.875rem;
    color: #999;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.blog-header h2 {
    margin: 0;
    flex: 1;
}

.favorite-btn-large {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.favorite-btn-large .heart-icon {
    width: 30px;
    height: 30px;
}

.favorite-btn-large:hover {
    transform: scale(1.1);
}

.favorite-recipes {
    margin: 2rem 0;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.favorite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.favorite-recipe-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.favorite-recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.favorite-recipe-card a {
    text-decoration: none;
    color: inherit; /* da zadržimo originalnu boju teksta */
}

.favorite-recipe-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.recipe-content {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-content h3 {
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
    color: #333;
}

.remove-favorite {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.no-favorites {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-favorites a {
    color: #007bff;
    text-decoration: underline;
}

/* Tag Filter Styles */
.tag-filter {
    padding: 20px;
    max-width: 945px;
    margin: 20px auto;
    text-align: center;
}

.tag-filter h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: #333;
}

.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.tag-list li {
    display: inline-block;
    margin-top: 10px;
}

.tag-list li a {
    background-color: #7A7A7A;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
}

.tag-list li a:hover {
    background-color: #fff !important;
    border: 1px solid #ce9c7b;
    color: #ce9c7b;
}

/* Blog Single Styles */
.blog-single {
    padding: 20px;
}

.blog-single h2 {
    margin: 0 0 10px;
}

.blog-single p {
    margin: 5px 0;
}

.blog-single img {
    margin-left: auto;
    margin-right: auto;
    display: block;
    margin-bottom: 30px;
    width: 100% !important;
    height: auto !important;
}

.single-tags a{
    text-decoration: none;
    text-transform: uppercase;
}

.share-section {
    margin: 30px 0;
    padding: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.share-section h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #474747;
}

.copy-button{
    cursor: pointer;
}

/* Add Blog Styles */
.add-blog {
    padding: 20px;
}

.add-blog form {
    display: flex;
    flex-direction: column;
}

.add-blog label {
    margin: 5px 0;
}

.add-blog input,
.add-blog textarea {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.add-blog button {
    padding: 10px 20px;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-blog button:hover {
    background-color: #0056b3;
}

textarea#meta_description {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    font-family: inherit;
}

#char_count {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 15px;
    text-align: right;
}

/* Welcome Name Styles */
.welcome-name {
    margin-top: 10px;
    padding: 8px 13px;
    color: #ce9c7b;
}

.custom-line {
    position: relative;
}

.custom-line::after {
    content: '';
    display: block;
    width: 80%; /* Prilagođena širina linije */
    height: 2px; /* Debljina linije */
    background-color: #ce9c7b; /* Boja linije */
    position: absolute;
    bottom: 0; /* Razmak ispod teksta */
    left: 50%; /* Pomera početak linije na sredinu elementa */
    transform: translateX(-50%); /* Centriranje linije */
}

/* Edit Button Styles */
.edit-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #f39c12;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.edit-button:hover {
    background-color: #e67e22;
}

/* Button Styles */
#read-more {
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 10px 20px;
    background-color: #CE9C7B;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

#read-more:hover {
    background-color: #AA8166;
}

#read-more:focus {
    outline: none;
    box-shadow: 0 0 5px #AA8166;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
    font-size: 14px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 15px 15px 0px 0;
    margin-bottom: 3px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    padding: 10px;
    min-width: 250px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 20px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #CE9C7B;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #CE9C7B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

footer p {
    margin: 0;
    color: #ccc;
}

.toggle-response {
    background-color: #CE9C7B;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 12px;
    margin-top: 5px;
}

.toggle-response:hover {
    background-color: #8d6b54;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    background-color: #f4f4f4;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #ddd;
}

#load-more {
    display: block;
    padding: 10px 20px;
    margin: 20px auto;
    background-color: #CE9C7B;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#load-more:hover {
    background-color: #7c5e4a;
}

.payment-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.package-cards {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.package-card {
    background-color: #f4f4f4;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px;
    width: 40%;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.package-card.selected {
    border-color: #CE9C7B;
    box-shadow: 0 0 10px rgba(206, 156, 123, 0.5);
}

.package-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.package-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: #333;
}

.package-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.package-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.package-card button {
    padding: 10px 20px;
    background-color: #CE9C7B;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.package-card button:hover {
    background-color: #a97c60;
}

.load-more {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #CE9C7B;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more:hover {
    background-color: #b77f65;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #555;
}

.success-container {
    padding: 40px 20px;
    animation: fadeIn 1s ease-in;
    margin-top: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.success-container ul{
    list-style: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-queries-message {
    background-color: #fff8f8;
    border: 1px solid #ffcaca;
    padding: 20px;
    border-radius: 8px;
    margin: 30px auto;
    text-align: center;
    max-width: 600px;
}

.empty-queries-message h3 {
    color: #cc0000;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.cta-button {
    background-color: #cc0000;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
}

.cta-button:hover {
    background-color: #990000;
}

.expired-access {
    text-align: center;
    padding: 60px 20px;
}
.expired-access h2 {
    font-size: 2rem;
    color: #e74c3c;
}
.expired-access p {
    font-size: 1.2rem;
    margin-top: 10px;
}
.expired-access .btn-upgrade {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #f39c12;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.no-access-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff4f0;
    border: 1px solid #f0c0b0;
    border-radius: 12px;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.no-access-container h2 {
    color: #d9534f;
    margin-bottom: 20px;
}

.no-access-container p {
    font-size: 16px;
    margin: 10px 0;
    color: #333;
}

.no-access-container ul {
    text-align: left;
    display: inline-block;
    margin: 20px auto;
    padding-left: 20px;
    color: #555;
}

.no-access-container li {
    margin-bottom: 8px;
}

.no-access-container .btn-upgrade {
    background-color: #ce9c7b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    margin-top: 20px;
    display: inline-block;
}

.no-access-container .btn-upgrade:hover {
    background-color: #a97a5b;
}


.account-box {
    max-width: 500px;
    margin: 20px auto;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px 30px;
    font-size: 16px;
    line-height: 1.7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.account-box p {
    margin: 10px 0;
}

.info-note {
    color: #555;
    font-style: italic;
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #ce9c7b;
    transition: width 0.4s ease;
}

.tooltip-icon {
    cursor: help;
    margin-left: 6px;
    font-size: 14px;
    color: #666;
}
.tooltip-icon:hover {
    color: #000;
}

.tooltip-icon {
    position: relative;
    cursor: help;
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    white-space: pre-line;
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 13px;
    top: -60px;
    left: 0;
    width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.tooltip-icon:hover::after {
    opacity: 1;
}

.how-it-works {
    margin: 50px auto;
    padding: 30px;
    max-width: 800px;
    background-color: #fdfdfd;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    text-align: center;
}

.how-it-works h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 26px;
}

.how-it-works .steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.how-it-works .step {
    font-size: 18px;
    padding: 12px 20px;
    background-color: #fff;
    border-left: 4px solid #d9a07e;
    border-radius: 6px;
    text-align: left;
    transition: all 0.3s ease;
}

.how-it-works .step:hover {
    background-color: #f7f2ef;
}

.why-free {
    max-width: 700px;
    margin: 50px auto;
    background-color: #fff9f7;
    padding: 30px;
    border: 2px dashed #d9a07e;
    border-radius: 10px;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    text-align: center;
}

.why-free h2 {
    color: #d48b63;
    font-size: 24px;
    margin-bottom: 10px;
}

.sticky-cta {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 50vw;
    transform: translateX(-50%);
    background-color: #d9a07e;
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9999;
    cursor: pointer;
    transition: bottom 0.2s ease-in-out;
    max-width: 90vw;
}

@supports (-webkit-touch-callout: none) {
  .sticky-cta {
    /* Posebno za iOS Safari */
    left: 50%;
    transform: translateX(-50%);
  }
}

.faq-answer {
    display: none;
    margin: 10px 0 20px;
    color: #444;
    padding-left: 10px;
    border-left: 3px solid #d9a07e;
}

.faq-question {
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #d9a07e;
}

.pricing-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.pricing-card {
    background-color: #fff8f3;
    border: 2px solid #d9a07e;
    border-radius: 12px;
    padding: 30px 25px;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
}

.pricing-card:hover {
    transform: scale(1.03);
}

.pricing-card h3 {
    margin-top: 0;
    color: #ce9c7b;
    font-size: 22px;
}

.pricing-card .price {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    color: #555;
}

.pricing-card ul li {
    margin: 8px 0;
}

.pricing-card .btn-login {
    background-color: #d9a07e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.pricing-card .btn-login:hover {
    background-color: #c78d6a;
}

/* Premium stil */
.pricing-card.premium {
    border-color: #bd815a;
    background-color: #fff3ec;
}

.new-user-hint {
  background-color: #fff6f0;
  border: 1px solid #f0d8c3;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.new-user-hint p {
  margin: 0;
  font-size: 18px;
  color: #a95f3d;
  font-weight: bold;
}

.learn-more-link {
  display: inline-block;
  margin-top: 8px;
  text-decoration: none;
  font-weight: bold;
  color: #d78c5d;
  font-size: 17px;
  transition: color 0.2s ease-in-out;
}

.learn-more-link:hover {
  color: #b15e34;
  text-decoration: underline;
}


/* Media Queries for Responsive Design */
@media (max-width: 768px) {

    section {
        max-width: 80%;
    }

    .main-content,
    .more-content {
        text-align: justify;
        padding: 10px 20px;
    }

    .pricing-cards {
        align-items: center;
    }

    .pricing-card {
        width: 90%;
    }

    body.menu-open .sticky-cta {
        opacity: 0 !important;
        pointer-events: none;
        min-width: 60vw;
    }
    .sticky-cta{
        min-width: 65vw;
    }
    
    #recipeSelect{
        max-width: 90vw;
    }

    /* BURGER MENU */
    header .burger-menu {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 2000;
    }

    /* MODERAN OVERLAY */
    .menu-overlay {
        background-color: rgba(0, 0, 0, 0.95) !important;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1000;
    }

    .menu-overlay.active {
        display: flex !important;
    }

    .menu-content {
        text-align: center;
        color: #fff;
        width: 90%;
    }

    .menu-content button#close-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 2rem;
        color: #fff;
        z-index: 999;
    }

    .menu-list {
        list-style: none;
        padding: 0;
        margin-top: 60px;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .menu-list li a {
        display: block;
        padding: 14px 24px;
        background: #e29578;
        color: #fff;
        border-radius: 8px;
        font-size: 1.2rem;
        font-weight: bold;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }

    .menu-list li a:hover {
        background: #d5805d;
    }

    /* SAKRI STARE AUTH DUGMICE NA MOBILNOM */
    header .auth-buttons {
        display: none !important;
    }

    /* BLOG SECTION */
    .blog-archive {
        padding: 10px;
    }

    .blog-content h3 {
        font-size: 1.2rem;
    }

    .blog-content p {
        font-size: 0.9rem;
    }

    .blog-content small {
        font-size: 0.8rem;
    }

    .blog-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    /* TAGS */
    .tag-list li a {
        padding: 6px 12px;
    }

    #more-content {
        display: none;
    }

    #read-more {
        display: block;
        width: 100%;
    }

    /* FORM */
    form {
        padding: 15px;
        max-width: 100%;
    }

    form label {
        font-size: 14px;
    }

    form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form textarea,
    form select {
        font-size: 14px;
        padding: 10px;
    }

    form button {
        font-size: 16px;
        padding: 10px;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-column {
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-column h4,
    .footer-links li,
    .footer p {
        text-align: center;
    }

    .package-cards {
        flex-direction: column;
        align-items: center;
    }

    .package-card {
        width: 80%;
        margin-bottom: 20px;
    }

    .loader-image {
        width: 85%;
        height: auto;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 15px;
    }

    .nutritional-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 600px;
    }

    .nutritional-table th,
    .nutritional-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    .nutritional-table th {
        background-color: #f4f4f4;
        font-weight: bold;
    }

    /* Recipe Badges */
    .recipe-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 15px 0;
        align-items: center;
    }

    .recipe-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background-color: #f0f0f0;
        border-radius: 20px;
        font-size: 14px;
        color: #333;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .recipe-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .recipe-badge i {
        font-size: 14px;
        color: #4CAF50;
    }

    .recipe-badge.difficulty-easy {
        background-color: #e8f5e9;
        color: #2e7d32;
    }

    .recipe-badge.difficulty-easy i {
        color: #2e7d32;
    }

    .recipe-badge.difficulty-medium {
        background-color: #fff3e0;
        color: #e65100;
    }

    .recipe-badge.difficulty-medium i {
        color: #e65100;
    }

    .recipe-badge.difficulty-hard {
        background-color: #ffebee;
        color: #c62828;
    }

    .recipe-badge.difficulty-hard i {
        color: #c62828;
    }

    /* Recipe Tips */
    .recipe-tip {
        background-color: #e3f2fd;
        padding: 15px;
        border-left: 4px solid #2196F3;
        border-radius: 4px;
        margin: 15px 0;
        font-style: normal;
    }

    .recipe-tip strong {
        color: #1976D2;
    }

    .recipe-additional-tips {
        background-color: #f5f5f5;
        padding: 15px;
        border-radius: 8px;
        margin: 15px 0;
    }

    .recipe-tip-item {
        margin: 10px 0;
        padding: 10px;
        background-color: #fff;
        border-radius: 4px;
        border-left: 3px solid #4CAF50;
    }

    .recipe-tip-item strong {
        color: #2e7d32;
        display: block;
        margin-bottom: 5px;
    }

    /* Error Messages */
    .error-message {
        background-color: #ffebee;
        color: #c62828;
        padding: 15px 20px;
        border-radius: 8px;
        border-left: 4px solid #c62828;
        margin: 20px 0;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .query-history table,
    .query-history thead,
    .query-history tbody,
    .query-history th,
    .query-history td,
    .query-history tr {
        display: block;
    }

    .query-history tr {
        margin-bottom: 10px;
        background-color: antiquewhite;
    }

    .query-history th {
        display: none;
    }

    .query-history td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        border: 1px solid #ddd;
    }

    .query-history td:before {
        content: attr(data-label);
        font-weight: bold;
        width: 50%;
        display: inline-block;
    }

    .query-history td[data-label="Odgovor"] {
        display: flex;
        flex-direction: column;
    }

    .query-history .short-response {
        display: block;
        margin-top: 10px;
        font-size: 14px;
    }

    .query-history .toggle-response {
        margin-top: 10px;
    }
}

/* ============================================
   LEFTOVERS MODAL (Step 1: UI only)
   ============================================ */

.leftovers-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.leftovers-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.leftovers-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.leftovers-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.leftovers-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.leftovers-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.leftovers-modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #CE9C7B;
    font-size: 24px;
}

.leftovers-intro {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.leftovers-list {
    margin: 20px 0;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.leftovers-placeholder {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

/* Leftovers meals container */
.leftovers-meals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leftovers-date-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
}

.leftovers-date-header {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #CE9C7B;
    color: #CE9C7B;
    font-size: 18px;
    font-weight: bold;
}

.leftovers-meal-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leftovers-meal-item:hover {
    background-color: #f5f5f5;
    border-color: #CE9C7B;
}

.leftovers-meal-item:last-child {
    margin-bottom: 0;
}

.leftovers-checkbox {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.leftovers-meal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.leftovers-meal-content strong {
    color: #333;
    font-size: 15px;
}

.leftovers-ingredients {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.leftovers-meal-item input[type="checkbox"]:checked + .leftovers-meal-content strong {
    color: #CE9C7B;
}

.leftovers-meal-item input[type="checkbox"]:checked + .leftovers-meal-content {
    opacity: 0.9;
}

/* Selected meal item */
.leftovers-meal-item input[type="checkbox"]:checked {
    accent-color: #CE9C7B;
}

.leftovers-meal-item.selected {
    background-color: #fff7e6 !important;
    border-color: #CE9C7B !important;
    box-shadow: 0 2px 4px rgba(206, 156, 123, 0.2);
}

.leftovers-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-leftovers-generate {
    background-color: #CE9C7B;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-leftovers-generate:hover:not(:disabled) {
    background-color: #b8876a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(206, 156, 123, 0.3);
}

.btn-leftovers-generate:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-leftovers-cancel {
    background-color: #f0f0f0;
    color: #666;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-leftovers-cancel:hover {
    background-color: #e0e0e0;
}

/* Header button styling */
.btn-leftovers-header {
    background-color: #CE9C7B !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.btn-leftovers-header:hover {
    background-color: #b8876a !important;
}

.btn-leftovers-header:active {
    transform: scale(0.98);
}

/* Mobile menu item */
.leftovers-menu-item {
    background: #CE9C7B !important;
}

.leftovers-menu-item:hover {
    background: #b8876a !important;
}

/* Responsive */
@media (max-width: 768px) {
    .leftovers-modal-content {
        padding: 20px;
        width: 95%;
        max-height: 90vh;
    }
    
    .leftovers-modal-actions {
        flex-direction: column;
    }
    
    .btn-leftovers-generate,
    .btn-leftovers-cancel {
        width: 100%;
    }

    /* Recipe Badges - Mobile */
    .recipe-badges {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .recipe-badge {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 13px;
    }

    .recipe-badge i {
        font-size: 13px;
    }

    /* Recipe Tips - Mobile */
    .recipe-tip {
        padding: 12px;
        font-size: 14px;
    }

    .recipe-additional-tips {
        padding: 12px;
    }

    .recipe-tip-item {
        padding: 8px;
        font-size: 14px;
    }

    .recipe-tip-item strong {
        font-size: 13px;
    }

    /* Nutritional Table - Mobile */
    .nutritional-table {
        font-size: 12px;
    }

    .nutritional-table th,
    .nutritional-table td {
        padding: 8px 4px;
    }
}
