:root {
    --primary-color: #4a6741;
    --secondary-color: #8b4513;
    --accent-color: #deb887;
    --text-color: #333;
    --background-light: #f5f5f5;
    --background-dark: #2c2c2c;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(74, 103, 65, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.logo {
    font-family: 'Lora', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 2rem;
    transition: var(--transition);
    text-shadow: 1px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.logo:hover {
    color: white;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links li {
    position: relative;
}

.nav-links li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -1.25rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.7rem 1.5rem;
    transition: var(--transition);
    letter-spacing: 0.5px;
    position: relative;
    border-radius: 25px;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
    margin: 6px 0;
    transition: var(--transition);
    border-radius: 2px;
}

@media (max-width: 768px) {
    nav .container {
        justify-content: space-between;
        padding: 1rem;
    }

    .logo {
        margin-right: 0;
        font-size: 1.8rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: rgba(74, 103, 65, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        gap: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        opacity: 0;
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.3rem;
        padding: 1rem 2rem;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
        background: var(--accent-color);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
        background: var(--accent-color);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Hero Section Update */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('./images/maline.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Lora', serif;
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.5);
    color: var(--accent-color);
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.4);
    font-weight: 300;
    color: white;
}

.hero-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--accent-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    border: 2px solid transparent;
}

.hero-btn:hover {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Page Header */
.page-header {
    background: 
        linear-gradient(135deg,
            rgba(44, 85, 48, 0.68),
            rgba(44, 85, 48, 0.6) 30%,
            rgba(139, 69, 19, 0.55) 60%,
            rgba(123, 160, 91, 0.6) 100%),
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
        url('images/pcelarstvo.jpg');
    background-size: cover;
    background-position: center;
    padding: 8rem 0 4rem;
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -10px 20px -10px rgba(0, 0, 0, 0.2);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at center,
            rgba(245, 222, 179, 0.02) 0%,
            rgba(44, 85, 48, 0.08) 50%,
            rgba(44, 85, 48, 0.15) 100%);
    z-index: 1;
}

.page-header h1 {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.page-header p {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

/* About Section */
.about-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(74, 103, 65, 0.05), rgba(139, 69, 19, 0.05));
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    transform: rotate(-45deg);
}

.about-section h2 {
    font-family: 'Lora', serif;
    color: var(--primary-color);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
    font-weight: 700;
}

.about-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-text {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.about-text:hover {
    transform: translateY(-5px);
}

.about-text p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.about-text p:first-of-type {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'Lora', serif;
}

/* Stats Section */
.stats-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: 'Lora', serif;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Gallery */
.gallery-section {
    padding: 6rem 0;
    background-color: var(--background-light);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: white;
    color: var(--text-color);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.gallery-item {
    width: 300px;
    height: 300px;
    margin: 15px;
    float: none;
    display: inline-block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Clear float */
.gallery-grid:after {
    content: '';
    display: block;
    clear: both;
}

@media (max-width: 768px) {
    .gallery-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .gallery-item {
        width: 250px;
        height: 250px;
        margin: 7.5px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 200px;
        height: 200px;
        margin: 5px;
    }
}

/* Category Headers */
.category-header {
    grid-column: 1 / -1;
    padding: 20px;
    margin-top: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.category-header:first-of-type {
    margin-top: 0;
}

/* Filter Buttons */
.gallery-filters {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    border-radius: 30px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.gallery-item {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
}

.hidden {
    display: none !important;
}

/* Ensure filter buttons have proper spacing and alignment */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    background: transparent;
    color: var(--primary-color);
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .gallery-filters {
        gap: 0.5rem;
        margin: 1.5rem 0;
    }
}

/* Contact Section */
.contact-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, rgba(74, 103, 65, 0.05), rgba(139, 69, 19, 0.05));
    position: relative;
}

.contact-section h2 {
    font-family: 'Lora', serif;
    color: var(--primary-color);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.contact-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
    border-radius: 2px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: justify;
}

.contact-info h3 {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.contact-info p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    text-align: justify;
}

.contact-info p:nth-child(2) {
    font-style: italic;
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-info p:nth-child(3) {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.contact-info p:nth-child(n+4) {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0.2rem;
    padding-left: 0.8rem;
    border-left: 2px solid var(--accent-color);
}

.contact-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 350px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .contact-info {
        padding: 1.2rem;
    }
    
    .contact-info h3 {
        font-size: 1.6rem;
    }
    
    .contact-map {
        height: 250px;
    }
}

/* Gallery Page Styles */
.gallery-page {
    padding: 120px 0 60px;
    background: var(--background-light);
    min-height: 100vh;
}

.gallery-page h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.gallery-page h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Filter Buttons */
.gallery-filters {
    margin: 2rem auto 3rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200%;
    height: 200%;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-content {
    transform: translateY(0);
}

.gallery-item-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-item-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.6rem 1.2rem;
    background: white;
    border: none;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-modal.active .modal-img {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.modal-prev,
.modal-next {
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-page h1 {
        font-size: 2rem;
    }

    .gallery-filters {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .gallery-item-content {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
        padding: 1rem;
    }

    .modal-nav {
        bottom: 20px;
    }

    .modal-prev,
    .modal-next {
        padding: 8px 16px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Video Section */
.video-section {
    padding: 5rem 0;
    background: var(--background-light);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--background-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Accounts for fixed navbar height */
}

.gallery-item {
    transition: var(--transition);
    display: block;
    opacity: 1;
}

.gallery-item[style*="display: none"] {
    opacity: 0;
}

.filter-btn {
    cursor: pointer;
    padding: 8px 16px;
    margin: 5px;
    border: 2px solid var(--primary-color);
    background: white;
    border-radius: 4px;
    transition: var(--transition);
    font-weight: 600;
    color: var(--primary-color);
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.gallery-filters {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
