/* Reset & Base Styles */
:root {
    --primary-color: #004d99; /* Deep Government Blue */
    --secondary-color: #e63946; /* Accent Red/Orange */
    --accent-color: #00b4d8; /* Bright Blue */
    --text-dark: #1d3557;
    --text-light: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 5px 20px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
    /* Layout helpers for fixed top bar + header (desktop) */
    --topbar-height: 40px;
    --header-height: 80px;
}

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

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    /* Make room for fixed top bar + header on desktop */
    padding-top: calc(var(--topbar-height) + var(--header-height));
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

/* Top Bar */
.top-bar {
    background-color: var(--primary-color);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info span {
    margin-right: 20px;
}

.top-info i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.top-social a {
    color: rgba(255,255,255,0.8);
    margin-left: 15px;
}

.top-social a:hover {
    color: var(--white);
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease, top 0.25s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav {
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

/* SVG logo in header */
.logo-image {
    height: 52px;
    width: auto;
    display: block;
}

/* Header style when page is scrolled (JS toggles .sticky) */
header.sticky {
    padding: 10px 0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    background-color: rgba(255,255,255,0.98);
}

/* When top bar is hidden on scroll */
body.topbar-hidden {
    padding-top: var(--header-height);
}

body.topbar-hidden .top-bar {
    transform: translateY(-100%);
    opacity: 0;
}

body.topbar-hidden header {
    top: 0;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.burger {
    display: block;
    cursor: pointer;
    z-index: 1001; /* Ensure above nav */
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px;
    transition: var(--transition);
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    height: 85vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

/* Hero background slider */
.hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;      /* vertically centered */
    justify-content: flex-start;
    text-align: left;
    color: var(--white);
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Overlay + content inside each hero slide */
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    /* Slightly lighter gradient so images are more visible */
    background: linear-gradient(rgba(0, 50, 100, 0.45), rgba(0, 20, 50, 0.65));
    z-index: 1;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    max-width: 50%;
    padding: 40px 80px; /* move content a bit more to the right */
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero-slide-content h2 {
    font-size: 40px;
    margin-bottom: 18px;
    color: #ffffff; /* cleaner white title */
    position: relative;
}

.hero-slide-content h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.hero-slide-content p {
    font-size: 18px;
    max-width: 620px;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

/* Optional subtle badge above the title for hierarchy */
.hero-slide-content::before {
    content: 'Naselja općine';
    display: inline-block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    padding: 6px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255,255,255,0.9);
}

/* Hero slider controls */
.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after {
    font-size: 18px;
}

.hero-slider .swiper-pagination-bullet {
    background: rgba(255,255,255,0.85);
    opacity: 1;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--secondary-color);
}

@media (max-width: 768px) {
    .hero-slide-content h2 {
        font-size: 30px;
    }

    .hero-slide-content p {
        font-size: 16px;
        max-width: 100%;
    }

    .hero-slide-content {
        max-width: 100%;
        padding: 30px 24px;
    }

    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        display: none;
    }
}

/* Features / Quick Links */
.features {
    padding: 80px 0;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

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

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--secondary-color);
}

.icon-box {
    width: 70px;
    height: 70px;
    background-color: rgba(0, 77, 153, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 28px;
    transition: var(--transition);
}

.feature-card:hover .icon-box {
    background-color: var(--primary-color);
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.read-more i {
    margin-left: 5px;
    font-size: 12px;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

.experience-badge .years {
    display: block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.section-subtitle {
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.check-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    font-weight: 600;
}

.check-list li i {
    color: var(--secondary-color);
    margin-right: 15px;
    font-size: 18px;
}

.check-list {
    margin-bottom: 30px;
}

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background-color: var(--white);
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4 / 3; /* same visual height for all images */
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    display: block;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 77, 153, 0.08), rgba(0, 77, 153, 0.35));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery {
        padding: 60px 0;
    }
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.text-center {
    text-align: center;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto 50px;
    border-radius: 2px;
}

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

/* City Highlights Slider */
.city-slider-section {
    padding: 80px 0 100px;
    background-color: var(--white);
    overflow: hidden;
}

.city-slider-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.city-slider {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.city-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.city-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 77, 153, 0.7), rgba(0, 77, 153, 0.1));
}

.city-slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 30px 40px;
    max-width: 60%;
}

.city-slide-content h3 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--white);
}

.city-slide-content p {
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.95;
    margin-bottom: 30px;
}

.city-slide--heritage {
    background-image: url('sveti-nikola-baska-voda.jpg');
}

.city-slide--services {
    background-image: url('https://images.unsplash.com/photo-1531297484001-80022131f5a1?auto=format&fit=crop&w=1600&q=80');
}

.city-slide--parks {
    background-image: url('baska.jpg');
}

/* Swiper controls styled to match theme */
.city-slider .swiper-button-prev,
.city-slider .swiper-button-next {
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.city-slider .swiper-button-prev::after,
.city-slider .swiper-button-next::after {
    font-size: 18px;
}

.city-slider .swiper-pagination-bullet {
    background: rgba(255,255,255,0.7);
    opacity: 1;
}

.city-slider .swiper-pagination-bullet-active {
    background: var(--secondary-color);
}

.city-slider .swiper-pagination {
    bottom: 18px;
}

@media (max-width: 992px) {
    .city-slider {
        height: 360px;
    }

    .city-slide-content {
        max-width: 75%;
        padding: 24px 24px 28px;
    }
}

@media (max-width: 768px) {
    .city-slider {
        height: 320px;
    }

    .city-slide-content {
        max-width: 100%;
        padding: 20px 20px 40px;
    }

    .city-slide-content h3 {
        font-size: 22px;
    }

    .city-slide-content p {
        font-size: 14px;
    }

    .city-slider .swiper-button-prev,
    .city-slider .swiper-button-next {
        display: none;
    }
}

.service-item {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.service-item:hover::before {
    width: 100%;
}

.service-item:hover h3, .service-item:hover p, .service-item:hover i {
    color: var(--white);
}

.service-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
}

.service-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.service-item p {
    color: var(--text-light);
    font-size: 15px;
    transition: var(--transition);
}

/* News Section */
.news {
    padding: 100px 0;
    background-color: var(--white);
}

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

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.news-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.2;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.news-date .day {
    display: block;
    font-size: 18px;
}

.news-date .month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
}

.news-content {
    padding: 25px;
}

.news-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.news-meta i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.news-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-card h3 a {
    color: var(--text-dark);
    transition: var(--transition);
}

.news-card h3 a:hover {
    color: var(--secondary-color);
}

.news-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 20px;
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') fixed center center/cover;
    position: relative;
    color: var(--white);
    text-align: center;
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 77, 153, 0.9);
}

.stats-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item h2 {
    font-size: 48px;
    color: var(--white);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 25px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* SVG logo in footer */
.footer-logo-image {
    height: 44px;
    width: auto;
    display: block;
}

.footer-widget p {
    color: #a0aec0;
    margin-bottom: 25px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: #a0aec0;
    font-size: 15px;
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    color: #a0aec0;
}

.contact-info li i {
    margin-right: 15px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
    color: #718096;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .about-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
}

/* Desktop-only: hide burger when not needed */
@media (min-width: 769px) {
    .burger {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Hide Report Issue Button on Mobile */
    header .btn-primary {
        display: none;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: linear-gradient(135deg, var(--primary-color), #003366);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        padding-top: 0;
        z-index: 1100; /* Above header */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links li {
        margin: 25px 0;
        opacity: 0;
    }

    .nav-links a {
        color: var(--white);
        font-size: 24px;
        font-weight: 300;
        letter-spacing: 1px;
    }

    .nav-links a::after {
        background-color: var(--secondary-color);
        height: 3px;
        bottom: -8px;
    }
    
    .burger {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1300; /* Above mobile nav overlay */
    }
    
    .burger div {
        background-color: var(--text-dark);
    }

    /* Make burger white when menu is active */
    .toggle .line1, .toggle .line2, .toggle .line3 {
        background-color: var(--white);
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    .top-bar {
        display: none;
    }

    /* On mobile the top bar is hidden, so reduce the top padding
       and let the fixed header sit at the very top */
    body {
        padding-top: var(--header-height);
    }

    header {
        top: 0;
    }

    .hero-content {
        padding-top: 40px;
    }

    .feature-card {
        margin-bottom: 20px;
    }
}

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

/* 3D Tilt Effect Styles */
.js-tilt-container {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.js-tilt-glare {
    pointer-events: none;
}

