:root {
    --deep-black: #121212;
    --dark-gray: #1E1E1E;
    --medium-gray: #2C2C2C;
    --accent-red: #f05454;
    --light-gray: #383838;
    --text-light: #E0E0E0;
}

html {
    scroll-behavior: smooth;
}

/* General Styles for Body */
body {
    font-family: 'Roboto', 'Arial', sans-serif;
    margin: 0;
    background-color: var(--deep-black);
    color: var(--text-light);
    line-height: 1.6;
}

/* Header Styling */


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, var(--deep-black), var(--dark-gray));
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

/* Add this new class */
header.details-active {
    opacity: 0;
    pointer-events: none;
}

header .logo {
    max-width: 250px;
    transition: all 0.4s ease;
    border-radius: 10px;
}

header .logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}


/* Navigation Button Styling */
#openNav {
    background: var(--medium-gray);
    color: var(--text-light);
    border: none;
    font-size: 1.5rem;
    padding: 0.8em 2em;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#openNav:hover {
    background: var(--accent-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

/* Navigation Bar Styling */
#sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: linear-gradient(180deg, #1f1f1f, #2c2c2c);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: all 0.4s ease;
    z-index: 1001;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    padding: 1em 0;
}

#sidebar.active {
    left: 0;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 2em 0;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

#sidebar ul li {
    text-align: center;
    width: 100%;
}

#sidebar ul li a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 1.5rem;
    transition: color 0.3s, background-color 0.3s, transform 0.3s;
    display: block;
    padding: 1em 0;
    border-radius: 8px;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background-color: #f05454; /* Red hover effect */
    transform: scale(1.05);
}

/* Gumb za zatvaranje navigacije */
#sidebar #closeNav {
    align-self: flex-end;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 2rem;
    padding: 0.5em 1em;
    cursor: pointer;
    transition: color 0.3s;
}

#sidebar #closeNav:hover {
    color: #f44336;
}

/* Main Section Styling */
main {
    display: flex;
    flex-direction: column;
    gap: 3em;
    margin: 3em auto;
    padding: 0 2em;
    background: #383838; /* Slightly lighter gray for contrast */
}

/* Section Styling */
section {
    padding: 6em 4em; /* Increased padding for larger containers */
    text-align: center;
    background: #292929; /* Unified container design */
    color: #f5f5f5;
    margin: 3em auto; /* Increased margin for spacing */
    max-width: 90%; /* Wider section containers */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease-in-out;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background-color: #333333;
}

/* Section Headers Styling */
section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: #f05454; /* Accent color matching logo */
    font-weight: 700;
    margin-bottom: 1em;
    position: relative;
}

section h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background: #f05454;
    display: block;
    margin: 0.5em auto;
    border-radius: 2px;
}



/* Sponsors Section */
#sponsors .sponsors-gallery {
    display: flex;
    gap: 2em;
    justify-content: center;
    flex-wrap: wrap;
}

#sponsors .sponsors-gallery img {
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    transition: transform 0.4s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#sponsors .sponsors-gallery img:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Footer Styling */
footer {
    background: linear-gradient(165deg, #1a1a1a 0%, #121212 100%);
    position: relative;
    padding: 6rem 2rem 3rem;
    color: var(--text-light);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
}

/* Modern Geometric Top Border */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #f05454 30%,
        #f05454 70%,
        transparent 100%
    );
}

/* Footer Content Container */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 0 1rem;
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-section h3 {
    color: #f05454;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #f05454;
    border-radius: 2px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 1.2rem;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #f05454;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Information */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #e0e0e0;
}

.contact-item i {
    color: #f05454;
    font-size: 1.2rem;
    width: 20px;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #f05454;
    transform: translateY(-3px);
}

.social-links i {
    color: #e0e0e0;
    font-size: 1.2rem;
}

/* Newsletter Subscription */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    transition: background-color 0.3s ease;
}

.newsletter-form input:focus {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #f05454;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #e04444;
    transform: translateY(-2px);
}

/* Bottom Bar */
.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: #f05454;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #e04444;
}

/* Responsive Design */
@media (max-width: 768px) {
    footer {
        padding: 4rem 1rem 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* Smooth transitions for Links and Buttons */
a, button, #openNav {
    transition: all 0.3s ease;
}

/* Projects Section */
/* Projects Section - Ultra Sharp */
#projects {
    background: #161616;
    color: white;
    padding: 3.5em;
    border-radius: 0;
    border: 2px solid rgba(240, 84, 84, 0.2);
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Individual Project Styling - Maximum Sharpness */
#projects {
    background: #161616;
    color: white;
    padding: 3.5em;
    border-radius: 0;
    border: 2px solid rgba(240, 84, 84, 0.2);
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease-in-out;
}

/* Individual Project Styling - Consistent Hover */
.project {
    margin: 0 0 4em 0;
    padding: 4em;
    background: #1d1d1d;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3),
                0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease-in-out;
}

/* Red Line for All Projects */
.project {
    border-left: 3px solid #f05454;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background-color: #333333;
}

/* Consistent Font Styling for All Project Text */
.project h3 {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5em;
    color: #f05454;
    text-align: left;
    padding: 0 0 0.5em 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    position: relative;
    text-transform: uppercase;
}

.project p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e8e8e8;
    text-align: left;
    margin-bottom: 2.5em;
    letter-spacing: 0.2px;
    font-weight: 400;
    max-width: 80ch;
    padding-right: 3em;
}

.project li{
    font-family: 'IBM Plex Sans', 'sans-serif';
    font-style: none;
    list-style: none;
}

/* Remove redundant border elements */
.project::before,
.project::after {
    display: none;
}

/* Gallery Styling with Smooth Transitions */
.project .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2em;
    margin: 3em 0;
    width: 100%;
    padding: 2em;
    background: #161616;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

.project .gallery img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project .gallery img:hover {
    transform: translateY(-5px);
    border-color: #f05454;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
}

/* Maintain responsive design */
@media (max-width: 768px) {
    .project {
        padding: 2em;
    }
    
    .project h3 {
        font-size: 2rem;
    }
    
    .project .gallery {
        padding: 1em;
        gap: 1em;
    }
    
    .project .gallery img {
        height: 250px;
    }
}
.project .gallery img:hover {
    transform: translateY(-8px);
    border-color: #f05454;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
}

/* Sharp Divider Lines */
.project + .project {
    position: relative;
}

.project + .project::before {
    content: '';
    position: absolute;
    top: -2em;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(240, 84, 84, 0.3),
        transparent
    );
}

/* Professional Selection Style */
.project p::selection {
    background: #f05454;
    color: #ffffff;
}

/* Sharp Accent Elements */
.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #f05454;
}

@media (max-width: 768px) {
    .project {
        padding: 2em;
    }
    
    .project h3 {
        font-size: 2rem;
    }
    
    .project .gallery {
        padding: 1em;
        gap: 1em;
    }
    
    .project .gallery img {
        height: 250px;
    }
}

/* Main content spacing adjustment */
main {
    gap: 0;  /* Remove gap between sections */
    margin: 0 auto;  /* Remove vertical margin */
    padding: 2em;
    background: #383838;
}

/* Section spacing adjustment */
section {
    padding: 6em 4em;
    text-align: center;
    background: #292929;
    color: #f5f5f5;
    margin: 3em auto;
    max-width: 90%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3),
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 2px rgba(255, 255, 255, 0.08);
}
section:last-child {
    margin-bottom: 0;  /* Remove margin from last section */
}

/* Lightbox Styling */
.lightbox {
    display: none; /* Skriveno dok se ne aktivira */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 0px;
}

.lightbox .close, .lightbox .prev, .lightbox .next {
    position: absolute;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5em;
    border: none;
    transition: 0.3s;
}

.lightbox .close {
    top: 20px;
    right: 20px;
}

.lightbox .prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.lightbox .next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.lightbox .close:hover, .lightbox .prev:hover, .lightbox .next:hover {
    background: rgba(255, 255, 255, 0.3);
}


#projects-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .project {
    flex: 0 0 100%; /* Show one project at a time */
    box-sizing: border-box;
  }
  
  .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1em;
    cursor: pointer;
    z-index: 10;
  }
  
  #prev-project {
    left: 10px;
  }
  
  #next-project {
    right: 10px;
  }
  
  .nav-btn:hover {
    background: rgba(240, 84, 84, 0.8);
  }

  .contacts-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.contact-person {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-title i {
    color: #f05454;
}

.contact-title strong {
    color: #f05454;
    font-size: 1.1rem;
}

.contact-details p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.contact-details i {
    color: #f05454;
    width: 20px;
    margin-right: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i.fa-map-marker-alt {
    color: #f05454;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .contacts-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-person {
        width: 100%;
    }
}

#services {
    padding: 4em 2em;
    position: relative;
    overflow: hidden;
}

.services-container {
    position: relative;
    width: 100%;
    padding: 2em 0;
}

#services-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2em;
    padding: 2em;
}

.service {
    flex: 0 0 auto;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
    padding: 2em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.service:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.service img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f05454;
    transition: transform 0.3s ease;
}

.service:hover img {
    transform: scale(1.05);
}

.service h3 {
    font-size: 1.2rem;
    color: #f05454;
    text-align: center;
    margin: 0;
    padding: 0 1em;
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(240, 84, 84, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prev-service {
    left: 20px;
}

#next-service {
    right: 20px;
}

.nav-btn:hover {
    background: rgba(240, 84, 84, 1);
}

@media (max-width: 768px) {
    .service {
        width: 250px;
    }
    
    .service img {
        width: 150px;
        height: 150px;
    }
}

.partner-section {
    padding: 40px 20px;
    text-align: center;
  }
  
  .partner-section__title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
  }
  
  .partner-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
  }
  
  .partner {
    max-width: 300px;
  }
  
  .partner__image-container {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    margin: 0 auto 20px;
  }
  
  .partner__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .partner__name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
  }
  
  .partner__description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
  }
  
  @media (max-width: 768px) {
    .partner-container {
      flex-direction: column;
      align-items: center;
    }
  
    .partner {
      margin-bottom: 30px;
    }
  }

  .partner__image-link {
    display: block;
    transition: transform 0.3s ease;
  }
  
  .partner__image-link:hover {
    transform: scale(1.05);
  }
  
  .partner__image-container {
    cursor: pointer;
  }

  /* Section Styling */
section {
    padding: 6em 4em;
    text-align: center;
    background: #292929;
    color: #f5f5f5;
    margin: 3em auto;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease-in-out;
}

/* About Section Text Styling */

#about p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.2rem;
    line-height: 2;
    text-align: left;
    color: #f0f0f0;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    letter-spacing: 0.3px;
    font-weight: 400;
    border-left: 4px solid #f05454;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

#about p:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}


/* Services Section Text Styling */
.services-intro, .services-outro {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
    color: #e0e0e0;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    letter-spacing: 0.3px;
    font-weight: 300;
}

/* About Section Text Styling */

/* Services Intro and Outro Text Styling */
.services-intro, .services-outro {
    font-family: 'Merriweather', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
    color: #f0f0f0;
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem 2rem;
    letter-spacing: 0.5px;
    font-weight: 400;
    border-left: 4px solid #f05454;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Project Description Text Styling */
.project p {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: #e8e8e8;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid #f05454;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    font-weight: 400;
}

/* Project List Items Styling */
.project ul {
    padding-left: 2rem;
    margin-top: 1rem;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #e8e8e8;
    line-height: 1.8;
}

.project li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.project li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f05454;
    font-size: 1.5rem;
}

#elektro-razdijelnici {
    padding: 4em 2em;
    position: relative;
    overflow: hidden;
    background: #161616;
    color: white;
    border: 2px solid rgba(240, 84, 84, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.panel-container {
    position: relative;
    width: 100%;
    padding: 2em 0;
    margin: 2em 0;
}

#panels-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2em;
    padding: 2em;
}

.panel {
    flex: 0 0 auto;
    width: 400px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel:hover {
    transform: translateY(-5px);
}

.panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.panel:hover img {
    transform: scale(1.05);
}

#elektro-razdijelnici .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(240, 84, 84, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

#prev-panel {
    left: 20px;
}

#next-panel {
    right: 20px;
}

#elektro-razdijelnici .nav-btn:hover {
    background: rgba(240, 84, 84, 1);
}

@media (max-width: 768px) {
    .panel {
        width: 300px;
        height: 400px;
    }
}

.projects-container {
    position: relative;
    width: 100%;
    padding: 2em 0;
  }
  
  #projects-preview-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2em;
    padding: 2em;
  }
  
  .project-preview {
    flex: 0 0 auto;
    width: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .preview-content {
    padding: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  
  .preview-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    color: #f05454;
    margin: 0;
    text-align: center;
  }
  
  .preview-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
  }
  
  .project-preview:hover {
    transform: translateY(-5px);
  }
  
  .project-preview:hover img {
    transform: scale(1.05);
  }
  
  .more-info-btn {
    background: #f05454;
    color: white;
    border: none;
    padding: 1em 2em;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .more-info-btn:hover {
    background: #e04444;
    transform: translateY(-2px);
  }
  
  /* Project Details Styling */

  #projects {
    overflow: visible !important;
    position: relative;
    z-index:auto;
}
#project-details-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-details-container.active {
    opacity: 1;
}
  

.project-details {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 60px 20px 20px 20px;
    margin: 0 auto;
    max-width: 1200px;
    min-height: 100vh;
    position: relative;
}
.project-details.active {
    opacity: 1;
}
  
.details-inner {
    background: #1d1d1d;
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    margin-top: 2rem;
}

.close-details {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
}


.close-details:hover {
    background: #e04444;
    transform: scale(1.1);
}

.project-details .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.project-details .gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-details .gallery img:hover {
    transform: scale(1.05);
}

.details-inner {
    background: #1d1d1d;
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    margin-top: 2rem;
}

.details-inner h3 {
    font-size: 2.5rem;
    color: #f05454;
    margin-bottom: 1.5rem;
}

.details-inner p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e8e8e8;
    margin-bottom: 2rem;
}

.details-inner ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    list-style-type: none;
}

.details-inner li {
    color: #e8e8e8;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    list-style: none;
}

.details-inner li::before {
    position: absolute;
    left: 0;
    color: #f05454;
}

.details-inner p, .details-inner li {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #f0f0f0;
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid #f05454;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
  
.project-details .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.project-details .gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-details .gallery img:hover {
    transform: scale(1.05);
}
  
  @media (max-width: 768px) {
    .project-details {
        padding: 10px;
    }
    
    .details-inner {
        padding: 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-details .gallery img {
        height: 200px;
    }
}

body.modal-open {
    overflow: hidden;
    width: 100%;
    position: fixed;
}

.details-inner p:hover, .details-inner li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.details-inner h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 2.8rem;
    color: #f05454;
    margin: 0 0 2.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 3px solid rgba(240, 84, 84, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-align: center;
}

.details-inner ul {
    margin: 0.5rem 0 2rem 2rem;
    padding: 0;
    list-style-type: none;
}

.details-inner li {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
}

.details-inner li::before {
    content: '•';
    position: absolute;
    left: 1rem;
    color: #f05454;
    font-size: 1.5rem;
    line-height: 1.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    #about p,
    .details-inner p,
    .details-inner li {
        font-size: 1.1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .details-inner h3 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .details-inner ul {
        margin: 0.5rem 0 1.5rem 1rem;
    }

    .details-inner li {
        padding-left: 2rem;
    }

    .project-details {
        padding: 10px;
    }
    
    .details-inner {
        padding: 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-details .gallery img {
        height: 200px;
    }
}

/* Image Lightbox */
.lightbox-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100001;
    justify-content: center;
    align-items: center;
}

.lightbox-container.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(240, 84, 84, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(240, 84, 84, 1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(240, 84, 84, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100002;
}

.lightbox-close:hover {
    background: rgba(240, 84, 84, 1);
    transform: scale(1.1);
}

.project-details .gallery img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-details .gallery img:hover {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }

    .lightbox-content {
        max-width: 95%;
    }
}

/* Modal and scroll fixes */
body.modal-open {
    overflow: hidden;
    padding-right: 17px; /* Prevent layout shift when scrollbar disappears */
}

#project-details-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-details-container.active {
    opacity: 1;
}

.project-details {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding-top: 60px; /* Add space for close button */
    margin: 0 auto;
    max-width: 1200px;
}

.project-details.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure header transitions smoothly */
header {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

header.details-active {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

/* Fix z-index stacking context */
.close-details {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    width: 40px;
    height: 40px;
    background: #f05454;
    border: none;
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-details:hover {
    background: #e04444;
    transform: scale(1.1);
}

#project-details-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-details-container.active {
    opacity: 1;
}

.project-details {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 60px 20px 20px 20px;
    margin: 0 auto;
    max-width: 1200px;
    min-height: 100vh;
    position: relative;
}

.project-details.active {
    opacity: 1;
}

body.modal-open {
    overflow: hidden;
}

/* Ensure close button stays fixed */
.close-details {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
}

#project-details-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-details-container.active {
    opacity: 1;
}

.project-details {
    position: relative;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 60px 20px 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.project-details.active {
    opacity: 1;
}

/* Modal base styles */
#project-details-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#project-details-container.active {
    opacity: 1;
}

.project-details {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 60px 20px 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.project-details.active {
    opacity: 1;
}

/* Modal open state */
body.modal-open {
    overflow: hidden;
}

/* Ensure content doesn't shift when scrollbar disappears */
body {
    padding-right: calc(100vw - 100%);
}

body.modal-open {
    padding-right: 17px; /* Width of the scrollbar */
}

/* Ensure sidebar doesn't move when modal opens */
#sidebar {
    padding-right: 0;
}

body.modal-open #sidebar {
    padding-right: 17px;
}

.projects-container {
    position: relative;
    width: 100%;
    padding: 2em 0;
  }
  
  #projects-preview-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2em;
    padding: 2em;
  }
  
  .project-preview {
    flex: 0 0 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .preview-content {
    display: flex;
    flex-direction: column;
    height: 500px; /* Fixed height */
    padding: 1.5em;
  }
  
  .preview-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    color: #f05454;
    text-align: center;
    margin: 0 0 1.5em 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 70px; /* Fixed height for title */
  }
  
  .preview-content img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    margin-bottom: 1.5em;
  }
  
  .more-info-btn {
    background: #f05454;
    color: white;
    border: none;
    padding: 1em 2em;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto; /* Push button to bottom */
    align-self: center; /* Center horizontally */
  }
  
  .project-preview:hover {
    transform: translateY(-5px);
  }
  
  .project-preview:hover img {
    transform: scale(1.05);
  }
  
  .more-info-btn:hover {
    background: #e04444;
    transform: translateY(-2px);
  }
  
  .projects-container {
    position: relative;
    width: 100%;
    padding: 2em 0;
  }
  
  #projects-preview-wrapper {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2em;
    padding: 2em;
  }
  
  .project-preview {
    flex: 0 0 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .preview-content {
    display: flex;
    flex-direction: column;
    height: 520px; /* Slightly increased for larger titles */
    padding: 1.5em;
  }
  
  .preview-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    color: #f05454;
    text-align: center;
    margin: 0 0 1.5em 0;
    height: 90px; /* Increased height for longer titles */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    padding: 0 0.5em;
  }
  
  .preview-content img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    margin-bottom: 1.5em;
  }
  
  .more-info-btn {
    background: #f05454;
    color: white;
    border: none;
    padding: 1em 2em;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: center;
  }
  
  .project-preview:hover {
    transform: translateY(-5px);
  }
  
  .project-preview:hover img {
    transform: scale(1.05);
  }
  
  .more-info-btn:hover {
    background: #e04444;
    transform: translateY(-2px);
  }
  
  