:root {
    --primary-blue: #003399; /* Europska/Institucionalna plava */
    --secondary-blue: #0056b3;
    --light-blue: #eef5ff;
    --primary-red: #DC143C; /* Crvena iz loga */
    --secondary-red: #B22222;
    --light-red: #ffeef0;
    --gradient-blue: linear-gradient(135deg, #003399 0%, #001a4d 100%);
    --gradient-red: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
    --gradient-tricolor: linear-gradient(135deg, #003399 0%, #DC143C 50%, #ffffff 100%);
    --gradient-blue-red: linear-gradient(135deg, #003399 0%, #DC143C 100%);
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* --- Navbar --- */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-blue) !important;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 0.75rem;
    }
    .navbar-brand img {
        height: 40px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.65rem;
    }
    .navbar-brand img {
        height: 35px;
    }
    .hero {
        background: linear-gradient(to right, #001a4d 0%, #003399 40%, #0056b3 70%, #6998D1 100%);
    }
}

.navbar-brand img {
    height: 60px;
    width: auto;
    /* Remove white background - works best when navbar is white */
    mix-blend-mode: multiply;
    /* Fallback: make white areas more transparent */
    filter: contrast(1.1) brightness(0.95);
}

/* For better white background removal on light backgrounds */
.navbar {
    background-color: var(--white);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin-left: 20px;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-blue-red);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(to right, #001a4d 0%, #003399 30%, #0056b3 60%, #6998D1 100%);
    color: var(--white);
    padding: 120px 0 80px 0;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero .col-lg-6:first-child {
    color: var(--white);
}

.hero .col-lg-6:first-child .hero-title {
    color: var(--white);
}

.hero .col-lg-6:first-child .hero-title span:last-child {
    color: var(--white);
}

.hero .col-lg-6:first-child .hero-subtitle {
    color: var(--white);
}

.hero .col-lg-6:first-child .hero-slogan {
    color: var(--white);
}

.hero::before {
    /* Abstract pattern overlay */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(220, 20, 60, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 20px;
    font-weight: 400;
}

.hero-slogan {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 2px;
}

.btn-custom {
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-custom:hover {
    background: var(--gradient-red);
    color: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(220, 20, 60, 0.4);
}

.hero-img-container {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* --- Sections General --- */
section {
    padding: 80px 0;
}

/* Blue and white gradient flow through the website */
#o-nama {
    background: linear-gradient(to bottom, #ffffff 0%, #eef5ff 50%, #d6e7ff 100%);
}

#projekti {
    background: linear-gradient(to bottom, #d6e7ff 0%, #ffffff 100%) !important;
}

#partneri {
    background: linear-gradient(to bottom, #ffffff 0%, #eef5ff 50%, #cce0ff 100%);
}

.presidency-section {
    background: linear-gradient(to bottom, #cce0ff 0%, #b3d4ff 50%, #eef5ff 100%);
}

#kontakt {
    background: linear-gradient(to bottom, #eef5ff 0%, #d6e7ff 50%, #b3d4ff 100%);
}

footer {
    background: linear-gradient(to bottom, #b3d4ff 0%, #003399 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-blue-red);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- O Nama --- */
.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-dark);
    text-align: justify;
    hyphens: auto;
    word-wrap: break-word;
}

.about-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* --- Mission & Vision Cards --- */
.mv-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(238, 245, 255, 0.3) 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    height: 100%;
    transition: transform 0.3s;
    border-top: 5px solid var(--primary-blue);
}

.mv-card:nth-child(2) {
    border-top-color: var(--primary-red);
    background: linear-gradient(135deg, var(--white) 0%, rgba(255, 238, 240, 0.3) 100%);
}

.mv-card:hover {
    transform: translateY(-10px);
}

.mv-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.mv-card:nth-child(2) .mv-icon {
    color: var(--primary-red);
}

/* --- Projects --- */
.project-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(238, 245, 255, 0.2) 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 51, 153, 0.1);
    display: flex;
    flex-direction: column;
}

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

.project-img-wrapper {
    height: 250px;
    background: var(--gradient-tricolor);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-img-wrapper img.image-clickable {
    object-fit: contain;
    padding: 10px;
}

.project-completed {
    position: relative;
}

.project-active {
    position: relative;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary-red);
}

.image-clickable {
    cursor: pointer;
    transition: transform 0.3s;
}

.image-clickable:hover {
    transform: scale(1.02);
}

.project-hero-section {
    background: linear-gradient(135deg, #003399 0%, #DC143C 50%, #ffffff 100%);
    border-radius: 20px;
    padding: 60px 40px;
    margin-bottom: 50px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.project-new-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-red);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(220, 20, 60, 0.4);
}

.project-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.project-hero-section > * {
    position: relative;
    z-index: 2;
}

.project-hero-section img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 3px solid rgba(255,255,255,0.3);
}

.project-hero-section .col-lg-6:first-child {
    display: flex;
    flex-direction: column;
}

.project-hero-section .col-lg-6:first-child .btn-link-custom {
    margin-top: auto;
}

@media (max-width: 768px) {
    .project-hero-section {
        padding: 30px 20px;
        margin-bottom: 25px !important;
    }
    section {
        padding: 40px 0 !important;
    }
    .section-title {
        margin-bottom: 25px !important;
    }
    .container > .row {
        margin-bottom: 25px !important;
    }
    .row.mb-5, .row.mb-4 {
        margin-bottom: 25px !important;
    }
    .row.mt-5, .row.mt-4 {
        margin-top: 25px !important;
    }
    .mb-5, .mb-4 {
        margin-bottom: 25px !important;
    }
    .mt-5, .mt-4 {
        margin-top: 25px !important;
    }
    h4.text-center, h3.text-center {
        margin-bottom: 25px !important;
    }
    .project-hero-section + .project-hero-section {
        margin-top: 25px !important;
    }
    .fade-in + .fade-in {
        margin-top: 25px !important;
    }
    .row.g-4 {
        gap: 25px !important;
    }
    .project-card {
        margin-bottom: 25px !important;
    }
    .mv-card {
        margin-bottom: 25px !important;
    }
    .col-12.fade-in {
        margin-bottom: 25px !important;
    }
    .col-12.fade-in:last-child {
        margin-bottom: 0 !important;
    }
    h2.section-title {
        margin-bottom: 25px !important;
    }
    h5.mb-4.mt-5 {
        margin-top: 12px !important;
        margin-bottom: 12px !important;
    }
    .col-12.fade-in h5 {
        margin-top: 12px !important;
        margin-bottom: 12px !important;
    }
}

.project-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-body .btn-link-custom {
    margin-top: auto;
}

.project-title {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.project-card:nth-child(2) .project-title {
    color: var(--primary-red);
}

.project-card:nth-child(3) .project-title {
    color: var(--primary-blue);
}

.btn-link-custom {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-link-custom:hover {
    color: var(--primary-red);
    transform: translateX(5px);
}

.btn-red {
    background: var(--gradient-red);
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(220, 20, 60, 0.3);
    color: white;
}

/* --- Sponsors & Partners --- */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
    margin-top: 40px;
}

.sponsor-logo {
    max-width: 100%;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
    filter: grayscale(100%);
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Logo grid styles with highlight animation */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
    padding: 40px 20px;
}

.logo-grid img {
    max-width: 180px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s, filter 0.3s, box-shadow 0.3s;
    filter: grayscale(100%) opacity(0.6);
    padding: 15px;
    border-radius: 8px;
}

.logo-grid img.highlight {
    transform: scale(1.15);
    filter: grayscale(0%) opacity(1);
    box-shadow: 0 10px 30px rgba(0, 51, 153, 0.3);
    z-index: 10;
    position: relative;
}

.logo-grid img:hover {
    transform: scale(1.1);
    filter: grayscale(0%) opacity(1);
}

#partneri-grid {
    gap: 30px;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
}

@media (max-width: 768px) {
    .logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
        padding: 20px 10px;
    }

    .logo-grid img {
        max-width: 140px;
        max-height: 80px;
    }
}

/* Conference slideshow styles */
.conference-slideshow {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.slideshow-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.slideshow-container img.active {
    opacity: 1;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 51, 153, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background 0.3s;
}

.slideshow-nav:hover {
    background: rgba(0, 51, 153, 1);
}

.slideshow-nav.prev {
    left: 10px;
}

.slideshow-nav.next {
    right: 10px;
}

.slideshow-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slideshow-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.slideshow-indicator.active {
    background: var(--primary-blue);
}

@media (max-width: 768px) {
    .slideshow-container {
        height: 400px;
    }

    .slideshow-nav {
        padding: 10px 15px;
        font-size: 18px;
    }

}

/* --- Presidency --- */
.presidency-section {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-red) 100%);
}

.president-container {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,51,153,0.15);
}

.president-image {
    flex-shrink: 0;
}

.president-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    border: 5px solid var(--primary-blue);
    box-shadow: 0 10px 30px rgba(0,51,153,0.2);
}

.president-info h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.president-info .president-title {
    font-size: 1.5rem;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 30px;
}

.president-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 15px;
}

@media (max-width: 992px) {
    .president-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .president-image img {
        width: 250px;
        height: 250px;
    }

    .president-info h3 {
        font-size: 2.5rem;
    }
}

/* --- Contact Form --- */
.contact-form-wrapper {
    transition: all 0.3s ease;
}

.contact-form-wrapper:hover {
    box-shadow: 0 15px 50px rgba(0, 51, 153, 0.15) !important;
}

.form-control {
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background-color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 153, 0.15);
    background-color: #fff;
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
}

.btn-submit {
    background: linear-gradient(135deg, #003399 0%, #DC143C 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 51, 153, 0.4);
    background: linear-gradient(135deg, #001a4d 0%, #B22222 100%);
}

.btn-submit:active {
    transform: translateY(-1px);
}

#formMessage .alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

#formMessage .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

#formMessage .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

#formMessage .alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* --- Footer --- */
footer {
    background: #001a4d; /* Very dark blue */
    color: white;
    padding: 60px 0 20px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
    color: white;
    text-decoration: none;
}

.social-icons a {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--gradient-blue-red);
    transform: translateY(-3px);
}

/* SVG Mockups Styling */
.svg-icon { width: 60px; height: 60px; fill: var(--primary-blue); }
.svg-hero { width: 100%; height: auto; }

/* Fade In Animation Class */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: flex;
}

.cookie-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-content {
    flex: 1;
}

.cookie-banner-content p {
    margin: 0;
    color: var(--white);
    font-size: 0.95rem;
}

.cookie-banner-content a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner-content a:hover {
    color: var(--light-blue);
}

.cookie-banner-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background-color: var(--white);
    color: var(--primary-blue);
}

.cookie-btn-accept:hover {
    background-color: var(--light-blue);
    transform: translateY(-2px);
}

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

.cookie-btn-essential:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cookie-banner .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}
