/**
 * Galerija.css - Reorganizovan i popravljen
 * Apartmani Šimićev
 */

/* ========================================
   1. 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 bubble-rise {
    0% {
        bottom: -20px;
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

@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);
    }
}

/* ========================================
   2. GALLERY HERO SECTION
   ======================================== */

/* ISPRAVLJENI GALLERY HERO - jednostavni efekti koji rade */
.gallery-hero {
    padding: 120px 5% 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    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');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* JEDNOSTAVNI MJEHURIČI - vidljivi i funkcionalni */
.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.4) 0%, transparent 5%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 255, 0.5) 0%, transparent 6%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 4%),
        radial-gradient(circle at 60% 70%, rgba(0, 168, 255, 0.4) 0%, transparent 5%),
        radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.35) 0%, transparent 4%),
        radial-gradient(circle at 10% 30%, rgba(0, 168, 255, 0.3) 0%, transparent 4%);
    background-size: 
        200px 200px, 150px 150px, 120px 120px,
        180px 180px, 140px 140px, 160px 160px;
    animation: simpleBubbles 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Glatki prijelaz prema dolje - ZADRŽAN */
.gallery-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(10, 15, 28, 0.5) 50%, 
        #0a0f1c 100%
    );
    pointer-events: none;
    z-index: 10;
}

.gallery-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 20;
}

.gallery-intro h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #00a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-size: 200% 200%;
}

.gallery-intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* JEDNOSTAVNE ANIMACIJE */
@keyframes simpleBubbles {
    0%, 100% { 
        background-position: 
            20% 80%, 80% 20%, 40% 40%, 
            60% 70%, 90% 60%, 10% 30%;
    }
    50% { 
        background-position: 
            25% 75%, 75% 25%, 45% 35%, 
            55% 75%, 85% 55%, 15% 35%;
    }
}

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

/* ========================================
   3. 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: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 168, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

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

.filter-btn:hover {
    border-color: #00a8ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.3);
}

.filter-btn.active {
    background: #00a8ff;
    border-color: #00a8ff;
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.4);
}

/* ========================================
   4. WAVE TRANSITION
   ======================================== */

.gallery-wave-transition {
    position: relative;
    width: 100%;
    height: 150px;
    margin-top: -2px;
    overflow: hidden;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(10, 15, 28, 0.4) 50%, 
        #0a0f1c 100%
    );
}

.gallery-wave-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 88.7'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-56.8-405.4-60.6C164 1.5 74.7 45.4 0 87.8V0h800v56.9z' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave-move 10s linear infinite;
}

.gallery-wave-transition::after {
    content: '';
    position: absolute;
    top: 30px;
    left: -100%;
    width: 200%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 88.7'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-56.8-405.4-60.6C164 1.5 74.7 45.4 0 87.8V0h800v56.9z' fill='rgba(0,168,255,0.1)'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave-move 15s linear infinite reverse;
}

.bubble-transition {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble-transition span {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: bubble-rise 15s infinite ease-in-out;
}

.bubble-transition span:nth-child(1) {
    width: 20px;
    height: 20px;
    left: 10%;
    animation-delay: 0s;
}

.bubble-transition span:nth-child(2) {
    width: 15px;
    height: 15px;
    left: 30%;
    animation-delay: 2s;
}

.bubble-transition span:nth-child(3) {
    width: 25px;
    height: 25px;
    left: 50%;
    animation-delay: 4s;
}

.bubble-transition span:nth-child(4) {
    width: 18px;
    height: 18px;
    left: 70%;
    animation-delay: 6s;
}

.bubble-transition span:nth-child(5) {
    width: 22px;
    height: 22px;
    left: 90%;
    animation-delay: 8s;
}

/* ========================================
   5. GALLERY PAGE LAYOUT
   ======================================== */

.gallery-page {
    padding: 60px 5%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: 
        linear-gradient(180deg, #0a0f1c 0%, #001e3c 50%, #0a0f1c 100%),
        radial-gradient(ellipse at top, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 168, 255, 0.1) 0%, transparent 50%);
    background-size: 100% 100%, 100% 50%, 100% 50%;
    background-position: center, top, bottom;
    background-repeat: no-repeat;
}

.gallery-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;
}

.gallery-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;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ========================================
   6. GALLERY GRID
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.gallery-item {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    background: #1a1f2e;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-10px) rotateX(5deg) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 168, 255, 0.4),
        0 0 60px rgba(0, 168, 255, 0.2);
}

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

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

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

/* Staggered animation */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }
.gallery-item:nth-child(13) { animation-delay: 1.3s; }
.gallery-item:nth-child(14) { animation-delay: 1.4s; }
.gallery-item:nth-child(15) { animation-delay: 1.5s; }

/* ========================================
   7. GALLERY OVERLAY
   ======================================== */

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    z-index: 10;
    pointer-events: none;
}

.gallery-overlay h3,
.gallery-overlay p {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    color: white;
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    pointer-events: all;
}

.gallery-item:hover .gallery-overlay h3 {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

/* ========================================
   8. LIGHTBOX
   ======================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

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

.lightbox-close:hover {
    color: #00a8ff;
    transform: rotate(90deg);
}

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

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.lightbox-description {
    font-size: 1rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.image-counter {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
    backdrop-filter: blur(5px);
}

.lightbox-nav:hover {
    background: rgba(0, 168, 255, 0.7);
}

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

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

/* ========================================
   9. LOADING & UTILITIES
   ======================================== */

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

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

/* ========================================
   10. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-intro h1 {
        font-size: 2.5rem;
    }
    
    .gallery-intro p {
        font-size: 1.1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .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;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 100px 5% 40px;
        min-height: 300px;
    }
    
    .gallery-intro h1 {
        font-size: 2rem;
    }
    
    .gallery-intro p {
        font-size: 1rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .gallery-page {
        padding: 40px 5%;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .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;
    }
}

/* ========================================
   11. DODATNE POPRAVKE
   ======================================== */

/* Popravka za wave transition - sakrij ako ne radi */
.gallery-wave-transition {
    display: none;
}

/* Osiguraj da pattern animacija ne pravi probleme */
.gallery-page::before {
    display: none; /* Privremeno ugašeno */
}

/* Popravka za gallery items vidljivost */
.gallery-item {
    background: #1a1f2e;
    position: relative;
    z-index: 1;
}

/* Osiguraj da overlay radi */
.gallery-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Loading animation popravka */
.gallery-loading .spinner {
    display: inline-block;
}

/* Filter button z-index popravka */
.filter-buttons {
    position: relative;
    z-index: 10;
}

/* Popravka za mobilni meni */
@media (max-width: 768px) {
    .gallery-hero {
        background-attachment: scroll; /* Fixni background ne radi dobro na mobilnim */
    }
    
    .filter-buttons {
        padding: 0 10px;
    }
}

/* ========================================
   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);
    }
}