/**
 * Apartman.css - Stilovi za stranicu apartmana
 * Apartmani Šimićev - Moderni apartment layout s 3D efektima
 */

/* ========================================
   1. KEYFRAME ANIMACIJE
   ======================================== */

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

@keyframes float-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes card-hover {
    0%, 100% { 
        transform: translateY(0) rotateX(0deg); 
    }
    50% { 
        transform: translateY(-5px) rotateX(2deg); 
    }
}

@keyframes star-shine {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

@keyframes shimmer-line {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes modal-appear {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ========================================
   2. APARTMENT HERO SECTION
   ======================================== */

.apartment-hero {
    padding: 120px 5% 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    /* Fallback boja ako slika ne postoji */
    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;
	
}

.apartment-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, 
            transparent 30%, 
            rgba(255, 255, 255, 0.05) 50%, 
            transparent 70%
        );
    animation: shimmer-line 6s ease-in-out infinite;
    pointer-events: none;
}

.apartment-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(10, 15, 28, 0.6) 50%, 
        #0a0f1c 100%
    );
    pointer-events: none;
}

.apartment-intro {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.apartment-badge-hero {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: linear-gradient(135deg, 
        rgba(0, 168, 255, 0.9) 0%, 
        rgba(0, 102, 204, 0.95) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.4);
}

.apartment-badge-hero .stars {
    display: flex;
    gap: 4px;
    font-size: 1.2rem;
}

.apartment-badge-hero .stars i {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: star-shine 3s ease-in-out infinite;
}

.apartment-badge-hero .stars i:nth-child(1) { animation-delay: 0s; }
.apartment-badge-hero .stars i:nth-child(2) { animation-delay: 0.5s; }
.apartment-badge-hero .stars i:nth-child(3) { animation-delay: 1s; }

.apartment-badge-hero span {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.apartment-intro h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, 
        #fff 0%, 
        #00a8ff 50%, 
        #fff 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-flow 4s ease infinite;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.apartment-subtitle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.apartment-subtitle span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.apartment-subtitle .separator {
    background: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 0;
    font-size: 1.5rem;
}

.apartment-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 168, 255, 0.3), 
        transparent
    );
    transition: left 0.8s ease;
}

.feature-highlight:hover {
    border-color: #00a8ff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 168, 255, 0.4);
}

.feature-highlight:hover::before {
    left: 100%;
}

.feature-highlight i {
    font-size: 1.2rem;
    color: #00a8ff;
}

/* ========================================
   3. APARTMENT PAGE LAYOUT
   ======================================== */

.apartment-page {
    padding: 80px 5% 60px;
    min-height: 100vh;
    position: relative;
    background: 
        linear-gradient(180deg, #0a0f1c 0%, #001e3c 30%, #0a0f1c 100%),
        radial-gradient(ellipse at top left, rgba(0, 168, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0, 102, 204, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

.apartment-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(0, 168, 255, 0.02) 100px,
            rgba(0, 168, 255, 0.02) 200px
        );
    pointer-events: none;
    opacity: 0.5;
}

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

/* ========================================
   4. QUICK INFO CARDS
   ======================================== */

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: float-in 0.8s ease forwards;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }

.info-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 168, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 168, 255, 0.3);
    animation: card-hover 2s ease-in-out infinite;
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #00a8ff, #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.4);
}

.info-icon i {
    font-size: 2rem;
    color: white;
}

.info-card h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   5. PHOTO GALLERY
   ======================================== */

.photo-gallery {
    margin-bottom: 5rem;
}

.photo-gallery h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #fff, #00a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: float-in 0.6s ease forwards;
}

.gallery-item.main-photo {
    grid-column: span 2;
    height: 400px;
}

.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 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(0.9) contrast(1.1);
}

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

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7) contrast(1.3);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
}

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

.gallery-overlay i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00a8ff;
}

.gallery-overlay span {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   6. EQUIPMENT SECTION
   ======================================== */

.equipment-section {
    margin-bottom: 5rem;
}

.equipment-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #fff, #00a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.equipment-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.equipment-category:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 168, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 168, 255, 0.2);
}

.equipment-category h3 {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.equipment-category h3 i {
    color: #00a8ff;
    font-size: 1.5rem;
}

.equipment-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.equipment-category li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.equipment-category li:last-child {
    border-bottom: none;
}

.equipment-category li:hover {
    color: #fff;
    transform: translateX(10px);
}

.equipment-category li i {
    color: #4caf50;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ========================================
   7. APARTMENT CTA
   ======================================== */

.apartment-cta {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, 
        rgba(0, 168, 255, 0.1) 0%, 
        rgba(0, 102, 204, 0.15) 100%
    );
    border-radius: 25px;
    border: 1px solid rgba(0, 168, 255, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
}

.apartment-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.03) 50%, 
        transparent 70%
    );
    animation: shimmer-line 8s ease-in-out infinite;
}

.apartment-cta h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #00a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.apartment-cta p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-tertiary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #00a8ff, #0066cc);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.btn-tertiary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-tertiary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 168, 255, 0.4);
}

.btn-tertiary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00a8ff;
}

.price-note {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
}

.price-note p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.price-note strong {
    color: #00a8ff;
}

/* ========================================
   8. IMAGE MODAL
   ======================================== */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal img {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modal-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    color: #ff4757;
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 71, 87, 0.2);
}

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

.modal-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;
    backdrop-filter: blur(5px);
}

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

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

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

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

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #00a8ff;
}

.modal-info p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ========================================
   9. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .gallery-item.main-photo {
        grid-column: span 1;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .apartment-hero {
        padding: 100px 5% 60px;
        min-height: 400px;
        background-attachment: scroll;
    }
    
    .apartment-intro h1 {
        font-size: 2.5rem;
    }
    
    .apartment-subtitle {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .apartment-description {
        font-size: 1.1rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .quick-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
    
    .modal-info {
        padding: 15px 25px;
        bottom: 20px;
        width: 90%;
        max-width: none;
    }
    
    .modal-nav {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .apartment-page {
        padding: 60px 3% 40px;
    }
    
    .apartment-intro h1 {
        font-size: 2rem;
    }
    
    .quick-info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .equipment-category {
        padding: 2rem 1.5rem;
    }
    
    .apartment-cta {
        padding: 3rem 1.5rem;
    }
    
    .apartment-cta h2 {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-tertiary {
        width: 100%;
        justify-content: center;
        padding: 12px 25px;
    }
    
    .gallery-item {
        height: 200px;
    }
}

/* ========================================
   10. PERFORMANSE OPTIMIZACIJE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
    }
}

/* GPU ubrzanje za smooth animacije */
.gallery-item,
.info-card,
.equipment-category,
.image-modal {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimizacija za touch uređaje */
@media (hover: none) {
    .gallery-item:hover {
        transform: none;
    }
    
    .info-card:hover {
        transform: none;
    }
    
    .gallery-overlay {
        opacity: 1;
    }
}

/* ========================================
   SEA HORIZON TRANSITION STILOVI
   ======================================== */

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

.sea-horizon-transition .horizon {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    height: 2px;
    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;
}

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

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

.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: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: sparkle 3s linear infinite;
}

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

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.8;
    }
    50% { 
        opacity: 1;
    }
}

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

@keyframes moonReflection {
    0%, 100% { 
        opacity: 0.3;
    }
    50% { 
        opacity: 0.5;
    }
}

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




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


/* Ukloni flex-direction: column za apartment-subtitle na mobilnim uređajima */

@media (max-width: 768px) {
    .apartment-subtitle {
        /* Zadržava flex-direction: row (zadana vrijednost) */
        /* flex-direction: column; - UKLONI OVU LINIJU */
        gap: 0.5rem;
        
        /* Alternativno, možeš eksplicitno postaviti row */
        flex-direction: row;
        
        /* Dodatno smanji font-size ako je potrebno za bolje uklapanje */
        font-size: 0.9rem;
    }
    
    .apartment-subtitle span {
        /* Smanji padding za bolje uklapanje na manjim ekranima */
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .apartment-subtitle .separator {
        /* Zadrži separatore vidljivima */
        display: inline-block;
        padding: 0;
        font-size: 1.2rem;
    }
}

/* Dodatne optimizacije za vrlo male ekrane */
@media (max-width: 480px) {
    .apartment-subtitle {
        gap: 0.3rem;
    }
    
    .apartment-subtitle span {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .apartment-subtitle .separator {
        font-size: 1rem;
    }
}

/* Ukloni flex-direction: column za hero-features na mobilnim uređajima */

@media (max-width: 768px) {
    .hero-features {
        /* Zadržava flex-direction: row s flex-wrap */
        /* flex-direction: column; - UKLONI OVU LINIJU */
        /* align-items: center; - UKLONI OVU LINIJU */
        
        /* Umjesto toga postavi: */
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem; /* Smanji gap za bolje uklapanje */
    }
    
    .feature-highlight {
        /* Smanji padding i font-size za bolje uklapanje */
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 0.5rem;
        
        /* Omogući da se elementi smanjuju ako je potrebno */
        flex-shrink: 1;
        min-width: 0;
    }
    
    .feature-highlight span {
        /* Omogući prelamanje teksta ako je potrebno */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .feature-highlight i {
        font-size: 1rem; /* Smanji ikone */
        flex-shrink: 0; /* Sprječava smanjivanje ikona */
    }
}

/* Dodatne optimizacije za vrlo male ekrane (iPhone SE, itd.) */
@media (max-width: 480px) {
    .hero-features {
        gap: 0.5rem;
    }
    
    .feature-highlight {
        padding: 6px 10px;
        font-size: 0.75rem;
        gap: 0.4rem;
    }
    
    .feature-highlight i {
        font-size: 0.9rem;
    }
}

/* Za vrlo uske ekrane, omogući prelamanje samo ako je stvarno potrebno */
@media (max-width: 360px) {
    .hero-features {
        /* Samo na najužim ekranima omogući column ako se baš ne mogu uklopiti */
        flex-direction: row; /* I dalje pokušaj zadržati row */
    }
    
    .feature-highlight span {
        /* Skrati najduži tekst */
        font-size: 0.7rem;
    }
}