/* стилови */
:root {
    --primary-color: #1a365d;
    --primary-hover: #0f2342;
    --accent-color: #d69e2e;
    --accent-hover: #b7791f;
    --text-color: #2d3748;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fdfdfd;
}

h1, h2, h3 {
    font-family: 'Merriweather', serif;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* навигација,хедер */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

header .container {
    width: 95%;
    max-width: 1380px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.08);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.2px;
    line-height: 1.1;
}

.logo-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 1.6px;
    margin-top: 3px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 5px 0;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a:hover::after {
    width: 100%;
}

/* фб линк */
.fb-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px !important;
    border-radius: 20px;
    transition: var(--transition);
}

.fb-link::after {
    display: none !important;
}

.fb-link:hover {
    background: #1877f2;
    color: var(--white) !important;
}

.fb-icon {
    fill: currentColor;
}

/* за јазик */
.lang-btn {
    background: transparent;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.lang-btn:hover {
    background: var(--accent-color);
    color: var(--white);
}

.hero {
    background: url('pocetna.jpg') no-repeat center center/cover;
    height: 75vh;
    min-height: 480px;
    position: relative;
}

.hero-overlay {
    background: rgba(15, 23, 42, 0.78);
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    color: var(--white);
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 30px auto;
    color: #e2e8f0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* копчиња */
.btn {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.section {
    padding: 70px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 12px auto 0 auto;
    border-radius: 2px;
}

.center-text {
    text-align: center;
    font-size: 1.05rem;
    margin-bottom: 35px;
    color: #4a5568;
}

/* новости*/
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.news-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.news-card p {
    font-size: 0.95rem;
    color: #4a5568;
}

/* за нас*/
.about-content {
    font-size: 1.1rem;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
    color: #4a5568;
}

.about-content p {
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 4px solid var(--accent-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-card p {
    color: #718096;
    font-weight: 600;
}

/* достапни книги и пребарување */
.search-container {
    max-width: 600px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#searchInput {
    padding: 14px 20px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 25px;
}

.book-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.book-cover {
    font-size: 3.2rem;
    margin-bottom: 12px;
}

.book-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.book-card .author {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 12px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.78rem;
    border-radius: 20px;
    margin-bottom: 18px;
    font-weight: 700;
}

.badge.available {
    background-color: #c6f6d5;
    color: #22543d;
}

.badge.unavailable {
    background-color: #fed7d7;
    color: #742a2a;
}

.btn-small {
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-small:hover {
    background-color: var(--primary-hover);
}

.btn-small.disabled {
    background-color: #cbd5e0;
    pointer-events: none;
}

.no-results {
    text-align: center;
    color: #e53e3e;
    font-weight: 600;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* форма за рез */
.reservation-form {
    max-width: 520px;
    margin: 0 auto;
    background: var(--white);
    padding: 35px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/*галерија */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 200px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 54, 93, 0.75);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 700;
    padding: 10px;
    text-align: center;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* културни настани */
.events-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 820px;
    margin: 0 auto;
}

.event-card {
    display: flex;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.event-date {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 100px;
}

.event-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.event-details {
    padding: 20px 25px;
}

.event-details h3 {
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.event-details p {
    font-size: 0.95rem;
    color: #4a5568;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    align-items: center;
}

.contact-info h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 14px;
    font-size: 1.05rem;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #a0aec0;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* COOKIE*/
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    border: 1px solid var(--accent-color);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-content p {
    font-size: 0.88rem;
    line-height: 1.4;
}

/* ФУТЕР */
footer {
    background-color: #0f172a;
    color: var(--white);
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 14px;
    }
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        flex-direction: column;
    }

    .event-date {
        flex-direction: row;
        gap: 10px;
        padding: 12px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}