/**
 * nac_parkovi.css - Nacionalni parkovi Hrvatske - NOVA VERZIJA
 * Kompletno prepravljen layout sa flexbox-om
 */

/* ========================================
   1. OSNOVNI RESET I VARIJABLE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none !important;
}

:root {
    --primary-blue: #00a8ff;
    --dark-blue: #006699;
    --darker-blue: #001e3c;
    --light-blue: #64b5f6;
    --very-light-blue: #bbdefb;
    --accent-blue: #42a5f5;
    --navy-blue: #0d47a1;
    --text-light: #e3f2fd;
    --text-white: rgba(255, 255, 255, 0.95);
    --shadow-blue: rgba(0, 168, 255, 0.3);
    --glow-blue: rgba(0, 168, 255, 0.4);
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;   /* scrollbar je uvijek tu → nema cimanja layouta */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: var(--darker-blue);
}

/* ========================================
   2. KEYFRAME ANIMACIJE
   ======================================== */

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.6; 
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wave-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

@keyframes pattern-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

@keyframes float-particles {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, -30px) scale(1.1); }
    66% { transform: translate(30px, -20px) scale(0.9); }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) rotate(10deg) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translateY(20px) rotate(-5deg) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes sailing {
    0% { 
        left: -60px;
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(3deg);
    }
    50% {
        transform: translateY(3px) rotate(-2deg);
    }
    75% {
        transform: translateY(-3px) rotate(1deg);
    }
    100% { 
        left: calc(100% + 60px);
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes horizonGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes moonReflection {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); }
}

@keyframes waveMotion {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

/* ========================================
   3. PRELOADER
   ======================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0f1c 0%, #001e3c 50%, #0a0f1c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: white;
}

.preloader-logo-icon {
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.preloader-logo {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-light);
    font-weight: 600;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}



/* ========================================
   5. PARKS HERO SECTION
   ======================================== */

.parks-hero {
    padding: 120px 5% 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(rgba(0, 30, 60, 0.8), rgba(0, 102, 204, 0.7));
    background-image: 
        linear-gradient(rgba(0, 30, 60, 0.8), rgba(0, 102, 204, 0.7)),
        url('../images/slides/slide-1.jpg'),
        linear-gradient(rgba(0, 30, 60, 0.8), rgba(0, 102, 204, 0.7)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,0 1000,300 1000,1000 0,700"/><polygon fill="%23ffffff05" points="0,200 1000,0 1000,800 0,1000"/></svg>');
    background-size: auto, cover, auto, 100% 100%;
    background-position: center, center, center, center;
    background-attachment: scroll, fixed, scroll, scroll;
}

.parks-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, var(--shadow-blue) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.parks-hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="30" r="2" fill="%23ffffff30"/><circle cx="70" cy="20" r="1.5" fill="%23ffffff25"/><circle cx="40" cy="70" r="1" fill="%23ffffff35"/><circle cx="80" cy="60" r="2.5" fill="%23ffffff20"/></svg>');
    background-size: 200px 200px;
    animation: float-particles 15s ease-in-out infinite;
    pointer-events: none;
}

.parks-intro {
    max-width: 900px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 1;
}

.parks-intro h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, var(--text-light), var(--very-light-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s ease infinite;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
    background-size: 300% 300%;
    font-weight: 700;
    letter-spacing: -1px;
}

.parks-intro p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-white);
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   6. FILTER BUTTONS
   ======================================== */

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.filter-btn {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    border-radius: 35px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    backdrop-filter: blur(15px);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--glow-blue);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--glow-blue);
    background: var(--shadow-blue);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
    border-color: var(--primary-blue);
    box-shadow: 0 12px 35px rgba(0, 168, 255, 0.5);
    transform: translateY(-2px);
}

.filter-btn.active::before {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   7. PARKS PAGE LAYOUT
   ======================================== */

.parks-page {
    padding: 80px 5%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: 
        linear-gradient(180deg, #0a0f1c 0%, #001e3c 50%, #0a0f1c 100%);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.parks-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(0, 168, 255, 0.02) 50px,
            rgba(0, 168, 255, 0.02) 100px
        );
    animation: pattern-move 60s linear infinite;
    pointer-events: none;
}

.parks-page::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 168, 255, 0.1) 0%, transparent 5%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 255, 0.1) 0%, transparent 5%),
        radial-gradient(circle at 40% 40%, rgba(0, 168, 255, 0.1) 0%, transparent 5%);
    animation: float-particles 20s ease-in-out infinite;
    pointer-events: none;
}

.parks-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1rem;
}

/* ========================================
   8. PARKS FLEXBOX LAYOUT (NOVO!)
   ======================================== */

.parks-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5rem;
    margin-bottom: 4rem;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

.park-item {
    position: relative;
    height: 500px;
    width: 400px;
    min-width: 350px;
    max-width: 450px;
    flex: 0 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
    background: var(--darker-blue);
    border: 2px solid var(--shadow-blue);
    will-change: transform;
    backface-visibility: hidden;
    box-sizing: border-box;
}

.park-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.6s ease;
    border-radius: 18px 18px 0 0;
    display: block;
}

.park-item:hover {
    transform: translateY(-15px) rotateX(8deg) rotateY(8deg) scale(1.02);
    box-shadow: 
        0 25px 50px var(--glow-blue),
        0 0 80px var(--shadow-blue);
    border-color: rgba(0, 168, 255, 0.6);
}

.park-item:hover img {
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.1) contrast(1.3) saturate(1.2);
}

/* Sparkle effect */
.park-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 168, 255, 0.15) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translate(-100%, -100%);
    transition: all 1s ease;
    z-index: 5;
    pointer-events: none;
}

.park-item:hover::before {
    transform: rotate(45deg) translate(100%, 100%);
}

/* Staggered animation delays */
.park-item:nth-child(1) { animation-delay: 0.1s; }
.park-item:nth-child(2) { animation-delay: 0.2s; }
.park-item:nth-child(3) { animation-delay: 0.3s; }
.park-item:nth-child(4) { animation-delay: 0.4s; }
.park-item:nth-child(5) { animation-delay: 0.5s; }
.park-item:nth-child(6) { animation-delay: 0.6s; }
.park-item:nth-child(7) { animation-delay: 0.7s; }
.park-item:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   9. PARK OVERLAY
   ======================================== */

.park-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(
        to top, 
        rgba(10, 15, 28, 0.98) 0%, 
        rgba(10, 15, 28, 0.9) 70%,
        transparent 100%
    );
    padding: 1.5rem;
    color: white;
    transform: translateY(0);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    scroll-behavior: smooth;
    will-change: height, background;
}

.park-overlay:hover {
    height: 100%;
    background: linear-gradient(
        to top, 
        rgba(10, 15, 28, 0.98) 0%, 
        rgba(10, 15, 28, 0.95) 50%,
        rgba(10, 15, 28, 0.9) 80%,
        rgba(10, 15, 28, 0.7) 100%
    );
    justify-content: flex-start;
    padding-top: 60px;
}

.park-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--darker-blue);
    padding: 6px 14px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    border: 2px solid var(--shadow-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

/* Nacionalni parkovi - plava */
.park-item[data-category="nacionalni"] .park-badge {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
    color: white;
    border-color: var(--primary-blue);
}

/* Parkovi prirode - tamnoplava */
.park-item[data-category="priroda"] .park-badge {
    background: linear-gradient(45deg, #1976D2, #42A5F5);
    color: white;
    border-color: #1976D2;
}

/* UNESCO - zlatna */
.park-badge:contains("UNESCO") {
    background: linear-gradient(45deg, #FFD700, #FFA000) !important;
    color: #333 !important;
    border-color: #FFD700 !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.park-item:hover .park-badge {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.park-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.park-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-white);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease 0.1s;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.park-item:hover .park-description {
    opacity: 1;
    transform: translateY(0);
    max-height: none;
    -webkit-line-clamp: none;
}

.park-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease 0.2s;
}

.park-stats span {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--very-light-blue);
    background: var(--shadow-blue);
    padding: 6px 12px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* SVG ikone */
.park-stats .icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: var(--light-blue);
}

.park-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.2rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease 0.3s;
}

.highlight {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--glow-blue);
}

.park-link {
    display: inline-flex;
    align-items: center;
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
    padding: 10px 18px;
    border-radius: 25px;
    background: rgba(0, 168, 255, 0.1);
    backdrop-filter: blur(5px);
    align-self: flex-start;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease 0.4s;
}

.park-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateX(5px) scale(1.05);
    box-shadow: 0 8px 25px var(--glow-blue);
}

.park-link .icon {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.park-link:hover .icon {
    transform: translateX(3px);
}

/* ========================================
   10. LIGHTBOX
   ======================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 60px rgba(0, 168, 255, 0.5);
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}

.lightbox-close:hover {
    color: var(--primary-blue);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(10, 15, 28, 0.8);
    padding: 20px 40px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    max-width: 80%;
    border: 1px solid var(--shadow-blue);
}

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.lightbox-description {
    font-size: 1rem;
    opacity: 0.9;
    color: var(--text-white);
}

.image-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(10, 15, 28, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--shadow-blue);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 15, 28, 0.7);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
    backdrop-filter: blur(10px);
    border: 1px solid var(--shadow-blue);
}

.lightbox-nav:hover {
    background: rgba(0, 168, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
    border-radius: 0 10px 10px 0;
}

.lightbox-next {
    right: 2rem;
    border-radius: 10px 0 0 10px;
}

body.no-scroll {
    overflow: hidden;
}

/* ========================================
   11. LOADING & UTILITIES
   ======================================== */

.parks-loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* ========================================
   12. SEA HORIZON TRANSITION
   ======================================== */

.sea-horizon-transition {
    position: relative;
    height: 200px;
    margin-top: 0;
    margin-bottom: -50px;
    overflow: visible;
    z-index: 10;
    background: linear-gradient(to bottom, 
        #0a0f1c 0%, 
        rgba(10, 15, 28, 0.9) 50%,
        rgba(10, 15, 28, 0.8) 100%
    );
}

.sea-horizon-transition * {
    position: absolute;
}

.sea-horizon-transition .stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(3px 3px at 20% 30%, rgba(255,255,255,0.2), transparent),
        radial-gradient(3px 3px at 40% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 10% 60%, rgba(255,255,255,0.15), transparent),
        radial-gradient(3px 3px at 90% 40%, rgba(255,255,255,0.2), transparent);
    background-size: 300px 300px;
    animation: twinkle 5s ease-in-out infinite;
    opacity: 0.3;
}

.sea-horizon-transition .horizon {
    display: none;
}

.sea-horizon-transition .moon-reflection {
    display: none;
}

.sea-horizon-transition .waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='rgba(0,168,255,0.05)'/%3E%3C/svg%3E");
    background-size: 120% 100%;
    animation: waveMotion 8s ease-in-out infinite;
    opacity: 0.3;
}

.sea-horizon-transition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
    background-size: 150% 100%;
    animation: waveMotion 12s ease-in-out infinite reverse;
    opacity: 0.5;
}

.sea-horizon-transition .sailboat {
    position: absolute;
    bottom: 90px;
    left: -60px;
    width: 50px;
    height: 50px;
    animation: sailing 25s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 168, 255, 0.5));
}

.sea-sparkles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.8);
    animation: sparkle 3s linear infinite;
    opacity: 0.2;
}

.sea-sparkles span:nth-child(1) { top: 30%; left: 20%; animation-delay: 0s; }
.sea-sparkles span:nth-child(2) { top: 50%; left: 60%; animation-delay: 1s; }
.sea-sparkles span:nth-child(3) { top: 70%; left: 80%; animation-delay: 2s; }
.sea-sparkles span:nth-child(4) { top: 40%; left: 40%; animation-delay: 1.5s; }
.sea-sparkles span:nth-child(5) { top: 60%; left: 15%; animation-delay: 0.5s; }

/* ========================================
   13. FOOTER STYLING
   ======================================== */

footer {
    background: #0a0f1c;
    position: relative;
    margin-top: -50px;
    padding-top: 80px;
    z-index: 5;
}

.footer-hero .highlight {
    color: var(--primary-blue);
}

.tour-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--shadow-blue);
    color: var(--text-light);
}

.tour-note {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 168, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--light-blue);
}

.parks-card .card-content {
    padding: 20px;
}

.footer-card.parks-card {
    background: rgba(10, 15, 28, 0.1);
    border: 1px solid var(--shadow-blue);
}

.footer-card.parks-card .card-header .card-icon {
    color: var(--primary-blue);
}

/* ========================================
   14. RESPONSIVE DESIGN - FLEXBOX
   ======================================== */

@media (max-width: 1400px) {
    .parks-grid {
        gap: 2rem;
    }
    
    .park-item {
        width: 380px;
        min-width: 320px;
    }
}

@media (max-width: 1200px) {
    .parks-grid {
        gap: 1.5rem;
        padding: 0 2rem;
    }
    
    .park-item {
        width: 350px;
        min-width: 300px;
    }
}

@media (max-width: 900px) {
    .parks-grid {
        justify-content: center;
        gap: 2rem;
    }
    
    .park-item {
        width: 100%;
        max-width: 400px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .parks-hero {
        background-attachment: scroll;
        padding: 100px 3% 50px;
        min-height: 400px;
    }

    .parks-intro h1 {
        font-size: 2.8rem;
    }
    
    .parks-intro p {
        font-size: 1.1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
        padding: 0 15px;
    }
    
    .filter-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .parks-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .park-item {
        width: 100%;
        max-width: 100%;
        min-width: 280px;
        height: 450px;
    }
    
    .park-item img {
        height: 180px;
    }
    
    .park-overlay {
        height: 270px;
        padding: 1rem;
    }
    
    .park-description {
        font-size: 0.85rem;
        max-height: 100px;
        -webkit-line-clamp: 5;
    }
    
    .park-item:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-info {
        padding: 15px 25px;
        bottom: 20px;
    }
    
    .lightbox-title {
        font-size: 1.2rem;
    }
    
    .lightbox-description {
        font-size: 0.9rem;
    }

    .nav-links {
        display: none;
    }

    .language-selector {
        display: none;
    }
}

@media (max-width: 480px) {
    .parks-hero {
        padding: 100px 5% 40px;
        min-height: 350px;
    }
    
    .parks-intro h1 {
        font-size: 2.2rem;
    }
    
    .parks-intro p {
        font-size: 1rem;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .parks-page {
        padding: 60px 3%;
    }
    
    .parks-grid {
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .park-item {
        height: 420px;
        min-width: 260px;
    }
    
    .park-item img {
        height: 150px;
    }
    
    .park-overlay {
        height: 270px;
        padding: 1rem;
    }
    
    .park-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .park-description {
        font-size: 0.8rem;
        max-height: 80px;
        -webkit-line-clamp: 4;
    }
    
    .park-stats {
        margin-bottom: 0.8rem;
    }
    
    .park-stats span {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .park-highlights {
        margin-bottom: 1rem;
    }
    
    .highlight {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .park-link {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .image-counter {
        top: 20px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .lightbox-info {
        width: 90%;
        max-width: none;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
}

/* ========================================
   15. SCROLL ANIMATIONS & UTILITIES
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-blue);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--dark-blue), var(--primary-blue));
}

.park-overlay::-webkit-scrollbar {
    width: 4px;
}

.park-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.park-overlay::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 255, 0.6);
    border-radius: 2px;
}

.park-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 255, 0.8);
}

/* ========================================
   16. PERFORMANCE & ACCESSIBILITY
   ======================================== */

.parks-page {
    contain: layout style paint;
}

.park-item {
    contain: layout style;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .park-item:hover {
        transform: none;
    }
    
    .park-item:active {
        transform: scale(0.98);
    }
    
    .park-overlay {
        height: 320px;
    }
    
    .park-description,
    .park-stats,
    .park-highlights,
    .park-link {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .park-item:hover {
        transform: translateY(-5px) !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .park-item {
        border: 3px solid white;
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .park-badge {
        border: 2px solid black;
    }
}

/* Print styles */
@media print {
    .preloader,
    .nav,
    .filter-buttons,
    .lightbox,
    .sea-horizon-transition {
        display: none !important;
    }
    
    .parks-hero {
        background: var(--primary-blue) !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
    
    .park-item {
        break-inside: avoid;
        height: auto;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .park-overlay {
        position: static;
        height: auto;
        background: none;
        color: #333;
    }
}



/* ========================================
   12. FOOTER STILOVI (ako nedostaju u style.css)
   ======================================== */

/* Footer transition */
.footer-transition {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a0f1c 0%, transparent 100%);
}

.horizon-line {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 168, 255, 0.5), 
        transparent
    );
}

.horizon-glow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: radial-gradient(ellipse, 
        rgba(0, 168, 255, 0.2) 0%, 
        transparent 70%
    );
    filter: blur(20px);
}

/* Zvijezde */
.horizon-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
}

.horizon-stars span {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.horizon-stars span:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.horizon-stars span:nth-child(2) { top: 30%; left: 50%; animation-delay: 0.5s; }
.horizon-stars span:nth-child(3) { top: 15%; left: 70%; animation-delay: 1s; }
.horizon-stars span:nth-child(4) { top: 40%; left: 30%; animation-delay: 1.5s; }
.horizon-stars span:nth-child(5) { top: 25%; left: 80%; animation-delay: 2s; }

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.5);
    }
}
/* Ako footer stilovi nedostaju */
footer {
    background: #0a0f1c;
    position: relative;
    overflow: hidden;
}

/* Lightbox mora biti iznad svega */
.lightbox {
    z-index: 99999 !important;
}

.lightbox-close,
.lightbox-nav,
.lightbox-info,
.image-counter {
    z-index: 100000 !important;
}

/* ========================================
   FOOTER OPTIMIZACIJA ZA NOVI PRIJELAZ
   ======================================== */

/* Ukloni stari footer-transition */
.footer-transition {
    display: none !important;
}

/* Optimiziraj footer pozadinu */
footer {
    background: #0a0f1c;
    position: relative;
    margin-top: -50px; /* Preklapanje sa prijelazom */
    padding-top: 80px; /* Kompenzacija za preklapanje */
}

/* Ukloni nepotrebne pseudo elemente koji mogu usporavati */
footer::before {
    display: none;
}

/* Pojednostavi footer hero animaciju */
.footer-hero {
    position: relative;
    z-index: 1;
}

/* Smanji broj animiranih elemenata */
.footer-decorations {
    opacity: 0.5; /* Smanji vidljivost za bolje performanse */
}

/* Optimizacija za mobilne uređaje */
@media (max-width: 768px) {
    /* Isključi složene animacije na mobilnim */
    .sea-horizon-transition .sailboat {
        animation: none;
        left: 20%;
    }
    
    .sea-sparkles {
        display: none;
    }
    
    footer {
        margin-top: -30px;
        padding-top: 50px;
    }
}

/* Dodatna optimizacija za spore uređaje */
@media (prefers-reduced-motion: reduce) {
    .sea-horizon-transition * {
        animation: none !important;
    }
    
    .waves {
        display: none;
    }
}

/* Promjena boje horizonta */
.horizon {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 215, 0, 0.5), /* Zlatni zalazak */
        transparent
    );
}

/* Dodavanje više jedrilica */
.sailboat:nth-child(2) {
    animation-delay: 15s;
    bottom: 70px;
}



/* ========================================
   POPRAVKA ZA VIDLJIVOST PRIJELAZA
   ======================================== */

/* Osiguraj da je prijelaz vidljiv */
.sea-horizon-transition {
    position: relative;
    height: 200px; /* Povećaj visinu */
    margin-top: 0; /* Ukloni negativnu marginu */
    margin-bottom: -50px; /* Samo malo preklapanje s footerom */
    overflow: visible; /* Promijeni na visible */
    z-index: 10;
    background: linear-gradient(to bottom, 
        #0a0f1c 0%, 
        rgba(10, 15, 28, 0.9) 50%,
        rgba(10, 15, 28, 0.7) 100%
    );
}

/* Osiguraj da su elementi vidljivi */
.sea-horizon-transition * {
    position: absolute;
}

/* Povećaj kontrast za zvijezde */
.sea-horizon-transition .stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(3px 3px at 20% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(3px 3px at 40% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 10% 60%, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 90% 40%, rgba(255,255,255,0.8), transparent);
    background-size: 300px 300px;
    animation: twinkle 5s ease-in-out infinite;
}

/* Pojačaj horizont liniju */
.sea-horizon-transition .horizon {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    height: 2px; /* Deblja linija */
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(0, 168, 255, 0.5) 10%,
        rgba(0, 168, 255, 1) 50%,
        rgba(0, 168, 255, 0.5) 90%,
        transparent 100%
    );
    box-shadow: 
        0 0 30px rgba(0, 168, 255, 0.8),
        0 0 60px rgba(0, 168, 255, 0.4);
    animation: horizonGlow 4s ease-in-out infinite;
}

/* Pojačaj refleksiju mjeseca */
.sea-horizon-transition .moon-reflection {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 80px;
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(0, 168, 255, 0.2) 30%,
        rgba(0, 168, 255, 0.1) 60%,
        transparent 80%
    );
    filter: blur(15px);
    animation: moonReflection 6s ease-in-out infinite;
}

/* Vidljiviji valovi */
.sea-horizon-transition .waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='rgba(0,168,255,0.2)'/%3E%3C/svg%3E");
    background-size: 120% 100%;
    animation: waveMotion 8s ease-in-out infinite;
    opacity: 0.8;
}

/* Dodatni val za dubinu */
.sea-horizon-transition::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
    background-size: 150% 100%;
    animation: waveMotion 12s ease-in-out infinite reverse;
    opacity: 0.5;
}

/* Veća jedrilica */
.sea-horizon-transition .sailboat {
    position: absolute;
    bottom: 90px;
    left: -60px;
    width: 50px;
    height: 50px;
    animation: sailing 25s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 168, 255, 0.5));
}

/* Svjetlucanje vidljivije */
.sea-sparkles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: sparkle 3s linear infinite;
}

/* Dodatni sjaj */
.sea-horizon-transition::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        transparent 60%,
        rgba(0, 168, 255, 0.05) 80%,
        rgba(0, 168, 255, 0.1) 100%
    );
    pointer-events: none;
}

/* Ukloni suvišne stilove koji mogu sakriti prijelaz */
.gallery-page {
    padding-bottom: 60px !important; /* Smanji padding */
}

.gallery-page::after {
    display: none !important; /* Privremeno ugasi */
}

/* Osiguraj vidljivost footera */
footer {
    position: relative;
    z-index: 5;
    background: #0a0f1c !important;
}

/* Debug - privremeno dodaj border da vidiš gdje je prijelaz */
.sea-horizon-transition {
    /* border: 2px solid red; */ /* Ukloni ovo nakon testiranja */
}

/* Animacije */
@keyframes sparkle {
    0%, 100% { 
        opacity: 0;
        transform: scale(0) translateY(0);
    }
    50% { 
        opacity: 1;
        transform: scale(1) translateY(-10px);
    }
}

@keyframes sailing {
    0% { 
        left: -60px;
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(3deg);
    }
    50% {
        transform: translateY(3px) rotate(-2deg);
    }
    75% {
        transform: translateY(-3px) rotate(1deg);
    }
    100% { 
        left: calc(100% + 60px);
        transform: translateY(0) rotate(0deg);
    }
}