/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100vw; /* Ensure container doesn't exceed viewport width */
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7); /* White overlay with 70% opacity */
    z-index: 0;
}

.container section {
    width: 80%;
    max-width: 100%; /* Prevent sections from exceeding container */
    padding: 60px 20px;
    text-align: center;
    background-color: white;
    margin-bottom: 20px;
    border-radius: 8px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
    border: 2px solid #2E8B57;
    box-sizing: border-box; /* Include border in width calculation */
}

.program {
    width: 100% !important;
    max-width: 100vw; /* Prevent exceeding viewport */
    margin-top: 0px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border: none !important;
    background-image: url('../images/background_spartanac.png');
    background-size: cover;
    background-position: center;
    position: relative;
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
    overflow: hidden; /* Prevent content overflow */
}

.program::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.603); /* Semi-transparent overlay */
    z-index: 0;
}

.program-text, .program-image {
    position: relative;
    z-index: 1; /* Ensure text and image appear above the overlay */
}

.program-text {
    width: 60%;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
}

.program-text p {
    font-size: 1.2rem;
    color: #555; /* Darker text for better readability */
    margin-bottom: 20px;
    font-weight: 500;
}

.program-image {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.program-image img {
    width: 100%;
    height: auto;
}

section h2 {
    font-size: 3rem;
    color: #2a7a62; /* Red color from logo */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: #2a7a62; /* Green background to match logo */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 139, 87, 0.3); /* Green shadow */
}

.btn:hover {
    background: #1d751d; /* Darker green on hover */
    box-shadow: 0 4px 12px rgba(46, 139, 87, 0.4); /* Stronger green shadow on hover */
}

/* Baner */
.banner {
    width: 100%;
    position: relative;
    background-image: url('../images/banner.jpg'); /* Ili placeholder */
    background-size: cover;
    background-position: center;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.banner .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.63);
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.logo {
    margin-bottom: 20px;
}

/* O nama */

.about {
    width: 100% !important;
    margin-top: 0px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    border: none !important;
    background-image: url('../images/team-background.jpg');
    background-size: 100% 100%; /* Stretch the image to cover the entire container */
    background-repeat: no-repeat; /* Prevent repetition */
    background-position: center;
    margin-bottom: 0px !important;
}

.about-text {
    width: 70%;
    padding: 20px;
    text-align: center;
}

.about-text h2 {
    font-size: 3rem;
    color: #5ebb9f; /* Red color to match headings */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
}

.about-text p {
    font-size: 1.2rem;
    color: #ffffff; /* Darker text for better readability */
    margin-bottom: 20px;
    font-weight: 500;
}

.team {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.member img {
    width: 100%;
    max-width: 550px;
    height: 350px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.member p {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #ffffff; /* Green color to match logo */
    font-size: 2.5rem;
}

/* Galerija */

.gallery {
    width: 100% !important;
    margin-top: 0px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: none !important;
    background-image: url('../images/gallery-background.png');
    background-size: cover;
    background-position: center;
    margin-bottom: 0px !important;
}

.gallery .images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
}

.gallery img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Kontakt */
.contact p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.contact a {
    color: #DC143C; /* Red color to match headings */
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
    color: #B22222; /* Darker red on hover */
}

/* Fullscreen prikaz slike */
.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1999;
}

.fullscreen.active {
    display: flex;
}

.fullscreen img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.contact {
    width: 100% !important;
    margin-top: 0px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    border: none !important;
    background-image: linear-gradient(rgba(255, 255, 255, 0.562), rgba(255, 255, 255, 0.74)), url('../images/background_spartanac.png');
    background-size: cover;
    background-position: center;
    margin-bottom: 0px !important;
}

.allinfo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mapa {
    width: 70%;
    height: 500px;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mapa iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.contact-info {
    width: 40%;
    padding: 20px;
    text-align: center;
    font-weight: 600;
}

.contact-info a {
    color: white; /* Green color to match logo */
    text-decoration: none;
    font-weight: bold;
}

.contact-info p {
    margin: 10px 0;
    font-size: 1.1rem;
    background-color: #2a7a62;
    color: white;
    padding: 20px;
    border-radius: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}


/* About us PAGE */

.about-section {
    width: 80% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
    border: none !important;
}

.team-section {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
    background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('../images/background_spartanac.png');
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.team-section p{
    font-size: 1.2rem;
    color: #555; /* Darker text for better readability */
    margin-bottom: 20px;
    font-weight: 500;
}

.philosophy-section {
    width: 80% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: #2a7a62 !important;
}

.philosophy-section h2 {
    font-size: 3rem;
    color: #ffffff; /* White color for better contrast */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow */
}

.philosophy-section p{
    font-size: 1.2rem;
    color: #ffffff; /* White color for better contrast */
    margin-bottom: 20px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .banner {
        height: 70vh;
    }

    .logo {
        width: 300px;
    }

    .team {
        flex-direction: column;
        gap: 20px;
    }

    .member p {
        padding: 0px 200px;
    }

    .container section {
        width: 95%;
        padding: 40px 15px;
    }

    .member img {
        max-width: 80%;
        
    }

    .program {
        flex-direction: column;
        padding: 20px;
    }

    .program-text {
        width: 100%;
        padding: 10px;
    }

    .program-image {
        width: 100%;
        margin-top: 20px;
    }

    .about {
        flex-direction: column;
        padding-bottom: 100px !important;
    }

    .about-text {
        padding-top: 50px;
        width: 90%;
    }

    .gallery .images {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .allinfo {
        flex-direction: column;
    }

    .mapa {
        width: 90%;
        height: 300px;
        margin: 20px auto;
    }

    .contact-info {
        width: 90%;
        margin: 0 auto;
        padding: 20px;
    }
}
