/* --- CIJELI CSS KOD ZA CRONOS SPLIT --- */

/* --- Osnovni Stilovi --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #000000; color: #FFFFFF; line-height: 1.6; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
main { display: block; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; }

/* --- Gumb (Button) --- */
.btn { display: inline-block; background-color: #FFFFFF; color: #000000; padding: 12px 25px; border: 1px solid #FFFFFF; cursor: pointer; font-size: 1rem; font-weight: bold; text-transform: uppercase; transition: background-color 0.3s ease, color 0.3s ease; }
.btn:hover { background-color: transparent; color: #FFFFFF; }

/* --- Header i Navigacija --- */
header { background-color: rgba(34, 34, 34, 0.9); backdrop-filter: blur(10px); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 1rem 0; border-bottom: 1px solid #444; height: 80px; }
header .container { display: flex; justify-content: space-between; align-items: center; }
header a { color: #FFFFFF; }
.logo img { height: 40px; width: auto; vertical-align: middle; }
nav { display: flex; align-items: center; gap: 2.5rem; }
nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
nav ul li a { padding: 0.5rem 1rem; transition: color 0.3s ease; }
nav ul li a:hover, nav ul li a.active { color: #cccccc; }
.header-social-links { display: flex; gap: 12px; }
.header-social-links a { display: flex; justify-content: center; align-items: center; width: 34px; height: 34px; border: 1px solid #555; background-color: transparent; border-radius: 50%; transition: all 0.3s ease; }
.header-social-links a:hover { background-color: #FFFFFF; transform: translateY(-2px); border-color: #FFFFFF; }
.header-social-links svg { width: 16px; height: 16px; fill: #FFFFFF; transition: fill 0.3s ease; }
.header-social-links a:hover svg { fill: #000000; }

/* --- Akcijski Banner --- */
.action-banner {
    background-color: #e1e1e1;
    color: #000000;
    text-align: center;
    padding: 0.75rem 1rem;
    position: fixed;
    top: 80px; /* Visina headera */
    left: 0;
    width: 100%;
    z-index: 998; /* Ispod headera i mobilne navigacije */
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.action-banner p {
    margin: 0;
}

/* --- Mobilni Meni (Hamburger) --- */
#mobile-menu-toggle { display: none; }

/* --- Glavne Sekcije --- */
section { padding: 120px 0; }
#home { padding-top: 130px; } /* Povećano za visinu headera + bannera */
.section-bg-light { background-color: #111111; }
.hero-image-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(2, 1fr); gap: 10px; width: 100%; height: calc(100vh - 80px - 20px - 45px); } /* Smanjena visina za visinu bannera */
.hero-grid-item { position: relative; overflow: hidden; border-radius: 8px; }
.hero-grid-item a.lightbox-trigger { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; cursor: pointer; }
.hero-grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; filter: brightness(0.8); }
.hero-image-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 1.5rem; background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent); color: #fff; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left; }
.hero-image-overlay h4 { font-size: 1.2rem; font-weight: bold; margin-bottom: 0.2rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); transform: translateY(20px); transition: transform 0.4s ease; }
.hero-image-overlay p { font-size: 0.8rem; margin: 0; color: #ccc; transform: translateY(20px); transition: transform 0.4s ease 0.1s; }
.hero-grid-item:hover img { transform: scale(1.05); filter: brightness(0.5); }
.hero-grid-item:hover .hero-image-overlay { opacity: 1; }
.hero-grid-item:hover .hero-image-overlay h4, .hero-grid-item:hover .hero-image-overlay p { transform: translateY(0); }

/* --- Stilovi za 'Misija' sekciju --- */
#misija { padding-top: 30px; padding-bottom: 30px; text-align: center; }
.mission-content { max-width: 800px; margin: 0 auto; }
.hero-partners { margin-top: 3rem; color: #cccccc; font-size: 0.9em; }
.hero-partners p { margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8em; }
.partner-logos { display: flex; justify-content: center; align-items: center; }
.partner-logos .main-partner-logo { height: 100px; filter: none; opacity: 1; transition: opacity 0.3s ease; }
.partner-logos .main-partner-logo:hover { opacity: 0.9; }

/* --- Generički Carousel Stilovi --- */
#usluge, #partneri { padding-top: 60px; }
.carousel-container { position: relative; padding: 2rem 0; }
.carousel-track-container { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, white 5%, white 95%, transparent); mask-image: linear-gradient(to right, transparent, white 5%, white 95%, transparent); }

/* Updated Track to ensure items stretch to same height */
.carousel-track { display: flex; gap: 20px; align-items: stretch; }

/* Updated Item Layout for Alignment */
.carousel-item { 
    flex: 0 0 320px;
    display: flex;
    flex-direction: column; /* Stacks content vertically */
    height: auto; /* Allows flex-grow to work */
}

/* Updated H3 to fixed height so images align perfectly */
.carousel-item h3 { 
    text-align: center; 
    color: #a0a0a0; 
    margin-bottom: 15px;
    min-height: 75px; /* Forces all titles to take same space */
    display: flex;
    align-items: flex-end; /* Aligns text to bottom of the title box */
    justify-content: center;
    line-height: 1.3;
}

.item-image { 
    position: relative; 
    border-radius: 5px; 
    overflow: hidden; 
    background-color: #1a1a1a; 
    padding-top: 100%; /* Keeps it square */
    width: 100%;       /* Ensures it fills the width */
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat; 
    flex-shrink: 0;    /* Prevents image from squishing */
}

/* Klasa za placeholder slike kad ih nema */
.item-image.placeholder-img {
    background-color: #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: none;
}
.item-image.placeholder-img::after {
    content: 'Slika uskoro';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.item-image a.lightbox-trigger { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: pointer; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background-color: rgba(255, 255, 255, 0.1); border: 1px solid #555; border-radius: 50%; color: white; font-size: 24px; cursor: pointer; z-index: 10; transition: all 0.3s ease; }
.carousel-nav:hover { background-color: rgba(255, 255, 255, 0.2); }
.carousel-nav.prev { left: -75px; }
.carousel-nav.next { right: -75px; }

/* --- Cijene (Novi stilovi) --- */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-top: auto; /* Pushes price to the very bottom of the card */
    padding-top: 15px;
    width: 100%;
}

.price-box { 
    background-color: rgba(34, 34, 34, 0.5); 
    backdrop-filter: blur(8px); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    color: #FFFFFF; 
    text-align: center; 
    padding: 10px 12px; 
    border-radius: 5px; 
    font-weight: bold; 
    font-size: 1.1rem; 
    width: 100%;
}

/* Stil za staru cijenu (Prekriženo s X) */
.price-box.old {
    position: relative;
    color: #aaaaaa;
    font-size: 1rem;
    border-color: transparent;
    background-color: rgba(255, 255, 255, 0.05);
}
/* Kreiranje crvenog X pomoću pseudo elemenata */
.price-box.old::before, 
.price-box.old::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: #ff3333;
    z-index: 1;
    opacity: 0.8;
}
.price-box.old::before { transform: rotate(12deg); }
.price-box.old::after { transform: rotate(-12deg); }

/* Stil za novu cijenu */
.price-box.new {
    background-color: #b30000; /* Crvena boja Hajduka */
    color: #fff;
    border: 1px solid #ff0000;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(179, 0, 0, 0.3);
    transform: scale(1.02);
}


.partner-description { background-color: rgba(34, 34, 34, 0.5); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2rem; text-align: center; max-width: 900px; margin: 0 auto 3rem auto; border-radius: 5px; }
.partner-description p { margin-bottom: 0; color: #a0a0a0; }

/* --- O nama Sekcija --- */
#o-nama { background-color: #000; }

/* --- Kontakt Sekcija --- */
#kontakt { background-color: #000; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: flex-start; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.8rem; margin-bottom: 1rem; background-color: #1a1a1a; border: 1px solid #333; color: #FFFFFF; font-size: 1rem; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #FFFFFF; }
.contact-form .btn { width: 100%; }
.contact-info .contact-socials { display: inline-flex; gap: 15px; vertical-align: middle; margin-left: 10px; }
.contact-info .contact-socials a { display: inline-block; transition: transform 0.3s ease, fill 0.3s ease; }
.contact-info .contact-socials a:hover { transform: scale(1.15); }
.contact-info .contact-socials svg { width: 24px; height: 24px; fill: #FFFFFF; transition: fill 0.3s ease; }
.contact-info .contact-socials a[aria-label*="WhatsApp"]:hover svg { fill: #25D366; }
.contact-info .contact-socials a[aria-label*="Viber"]:hover svg { fill: #7360F2; }


/* --- Stilovi za upload datoteke i validaciju forme --- */
.file-label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: #cccccc; }
.contact-form input[type="file"] { padding: 10px; background-color: #1a1a1a; border: 1px solid #333; margin-bottom: 1rem; color: #999; font-size: 0.9rem; width: 100%; }
.contact-form input[type="file"]::file-selector-button { background-color: #444; color: #fff; border: none; padding: 8px 12px; border-radius: 3px; cursor: pointer; margin-right: 10px; transition: background-color 0.3s ease; }
.contact-form input[type="file"]::file-selector-button:hover { background-color: #555; }
.form-group { position: relative; margin-bottom: 0; }
.contact-form .form-group:last-of-type { margin-bottom: 1rem; }
.error-message { color: #ff5555; font-size: 0.8rem; display: none; margin-top: 4px; margin-bottom: 0.5rem; }
.contact-form input.invalid,
.contact-form textarea.invalid { border-color: #ff5555; }
.contact-form input.valid,
.contact-form textarea.valid { border-color: #55ff55; }

/* --- Toast Notifikacije --- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10001; display: flex; flex-direction: column; align-items: flex-end; }
.toast { background-color: #333; color: #fff; padding: 15px 20px; border-radius: 5px; margin-bottom: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); opacity: 0; transform: translateX(100%); transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background-color: #28a745; }
.toast.error { background-color: #dc3545; }


/* --- Lightbox --- */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.92); z-index: 10000; display: flex; justify-content: center; align-items: center; padding: 20px; animation: fadeIn 0.4s; }
.lightbox-content { max-width: 90%; max-height: 90%; animation: zoomIn 0.4s; object-fit: contain; }
.lightbox-close { position: absolute; top: 15px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 10002; }
.lightbox-close:hover { color: #bbb; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.8); } to { transform: scale(1); } }
.lightbox-nav { cursor: pointer; position: fixed; top: 50%; transform: translateY(-50%); width: auto; padding: 16px; color: white; font-weight: bold; font-size: 30px; transition: background-color 0.3s ease; background-color: rgba(0, 0, 0, 0.3); border: none; user-select: none; z-index: 10001; }
.lightbox-next { right: 20px; border-radius: 3px 0 0 3px; }
.lightbox-prev { left: 20px; border-radius: 0 3px 3px 0; }
.lightbox-nav:hover { background-color: rgba(0, 0, 0, 0.6); }

/* --- Footer --- */
footer { text-align: center; padding: 3rem 0; background-color: #111111; border-top: 1px solid #333; }
.social-links { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 1.5rem; }
.social-links a { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; background-color: #222; border-radius: 50%; transition: background-color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { background-color: #FFFFFF; transform: translateY(-3px); }
.social-links svg { width: 20px; height: 20px; fill: #FFFFFF; transition: fill 0.3s ease; }
.social-links a:hover svg { fill: #000000; }
.copyright-text { margin: 0; color: #a0a0a0; font-size: 0.9em; }


/* --- Responzivnost --- */
@media(max-width: 1100px) {
    .carousel-nav.prev { left: -25px; }
    .carousel-nav.next { right: -25px; }
}

@media(max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    header { height: 80px; }
    #main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(34, 34, 34, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }
    #main-nav.active {
        transform: translateY(0);
    }
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .header-social-links {
        margin-top: 2rem;
    }
    
    #mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    #mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background: #fff;
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }
    #mobile-menu-toggle.is-active span:nth-child(1) { transform: rotate(45deg); }
    #mobile-menu-toggle.is-active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
    #mobile-menu-toggle.is-active span:nth-child(3) { transform: rotate(-45deg); }

    .contact-wrapper { grid-template-columns: 1fr; }
    .carousel-container { padding: 2rem 10px; }
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .carousel-nav.prev { left: 0; }
    .carousel-nav.next { right: 0; }

    #home { padding-top: 130px; } /* Povećano za visinu headera + bannera */
    .hero-image-grid { display: block; height: auto; }
    .hero-grid-item {
        height: 250px;
        width: 100%;
        margin-bottom: 10px;
    }
    .hero-grid-item img { filter: brightness(0.5); }
    .hero-image-overlay { opacity: 1; }
    .hero-image-overlay h4, .hero-image-overlay p { transform: translateY(0); }
}

@media(max-width: 480px) {
    .hero-grid-item {
        height: 300px; 
    }
}