:root {
    --bg-color: #F5F5F7;
    --text-color: #4A4A4A;
    --text-white: #E2E2E5;
    --primary-color: #ED1C24;
    --about-us-color: #1A73E8;
    --areas-of-work-color: #4CAF50;
    --current-events-color: #FFA726;
    --new-case-law-color: #E53935;
    --new-case-law-bg: #e8e8ea;
    --primary-dark: #971115;
    --white: #ffffff;
    --shadow: rgba(0,0,0,0.1);
}

@font-face {
  font-family: 'Orbitron Regular';
  src: url('/fonts/Orbitron-Regular.ttf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* About Intro Section */
.about-intro {
    background: var(--bg-color);
    padding: 4rem 0;
}

.intro-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.intro-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.intro-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-logo img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

/* Team Section */
.team-section {
    padding: 5rem 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg-blue.png');
    background-size: cover;
    background-position: 50% 75%;
    opacity: 0.2; /* default desktop look */
    z-index: 1;
}

.team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2; /* keep content above */
}


@media (max-width: 1300px) {
    .team-section::before {

        width: 250%;
        opacity: 0.2;
    }
}

@media (max-width: 768px) {
    .team-section {
        padding: 3.5rem 0;
        margin-left: calc(-50vw + 50%);
        width: 100vw;
    }

    .team-section::before {
        background-image: url('assets/bg-blue.png');
        background-size: 149% auto;
        opacity: 0.10;
        top: -30%;
        left: -169%;
        width: 780%;
        height: 151%;
        transform: rotate(90deg);
    }
}



.team-section h2 {
    font-family: 'Orbitron Regular', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--about-us-color);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.team-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem auto;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.team-member {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.team-member:hover {
    transform: translateY(-10px) scale(1.2);
    background: rgba(0, 0, 0, 0.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.member-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem auto;
    border-radius: 7%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    transform: scale(1);
    
}

.team-member[data-member="mico-ljubenko"] .member-photo img {
    object-position: center 80%;
    transform: scale(1.1);
    object-fit: cover;
}

.team-member[data-member="ines-brozovic"] .member-photo img {
    transform: scale(1.26);
}

.team-member[data-member="vanja-vargec"] .member-photo img {
    transform: scale(1.4);
}

.team-member[data-member="tena-nagy"] .member-photo img {
    transform: scale(1.25);
}

.team-member[data-member="vlatka-ljubenko"] .member-photo img {
    transform: scale(1.1);
}

.team-member[data-member="kristina-simek"] .member-photo img {
    transform: scale(1.5);
}

.team-member h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.team-member p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Email styling */
.member-email {
    display: block;
    margin: 0.5rem 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.member-email:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Biography button */
.bio-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Hover + subtle animation */
.bio-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* Button "pop-in" animation on load */
.team-member {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-member::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 99%;
    height: 99%;
    border: 3px solid transparent;
    pointer-events: none;
    z-index: 2;
    border-image: linear-gradient(
        to right,
        #0d47a1,
        #1565c0,
        #1A73E8,
        #42a5f5,
        #90caf9 
    ) 1;
    clip-path: polygon(0 0, 100% 0, 100% 10%, 0 10%);
    animation: borderTrailRed 4s linear infinite;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.team-member:hover::after {
    opacity: 1;
}

.team-member {
    position: relative;
}

@keyframes borderTrailRed {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 10%, 0 10%);
    }
    25% {
        clip-path: polygon(90% 0, 100% 0, 100% 100%, 90% 100%);
    }
    50% {
        clip-path: polygon(0 90%, 100% 90%, 100% 100%, 0 100%);
    }
    75% {
        clip-path: polygon(0 0, 10% 0, 10% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 10%, 0 10%);
    }
}


/* Offices Section */
.offices-section {
    padding: 5rem 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.offices-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg-green.png');
    background-size: cover;
    background-position: 50% 60%;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 1;
}

.offices-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 247, 0.1);
    z-index: 2;
}

.offices-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.offices-section h2 {
    font-family: 'Orbitron Regular', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--areas-of-work-color);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.offices-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.office-item {
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.6;
    color: var(--text-color);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.office-item:last-child {
    border-bottom: none;
}

.office-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design for Offices Section */

@media (max-width: 768px) {
    .offices-section {
        padding: 3.5rem 0;
        margin-left: calc(-50vw + 50%);
        width: 100vw;
    }
    
    .offices-container {
        padding: 0 1rem;
    }
    
    .offices-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

/* Gallery Section */
.gallery-section {
    background-image: url('assets/bg-red.png');
    background-size: cover;
    background-position: 50% 60%;
    background-repeat: no-repeat;
    padding: 5rem 0;
    margin: 0;
    position: relative;
    overflow: hidden;

    display: flex;              /* center content */
    justify-content: center;    /* horizontally */
    align-items: center;        /* vertically */
    min-height: 300px;          /* ensures it has space */
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 245, 247, 0.75);
    z-index: 1;
}

.gallery-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.gallery-section button {
    font-family: 'Orbitron Regular', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: transparent;
    letter-spacing: 2px;
    border: 2px solid var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gallery-section button:hover {
    background: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    color: #fff;
    transform: scale(1.05);
}


.gallery-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    display: flex;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 3rem 1rem;
        min-height: 200px;
    }

    .gallery-section button {
        font-size: 1.6rem;
        padding: 0.6rem 1.5rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 2rem 1rem;
        min-height: 180px;
    }

    .gallery-section button {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
        border-radius: 6px;
    }
}


/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.gallery-modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.gallery-close:hover {
    color: var(--primary-color);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    transform: translateY(-50%);
    z-index: 1001;
}

.gallery-prev,
.gallery-next {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .intro-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-intro,
    .team-section,
    .offices-section,
    .gallery-section {
        padding: 3rem 0;
    }
    
    .intro-container,
    .team-container,
    .offices-container,
    .gallery-container {
        padding: 0 1rem;
    }
    
    .team-section h2,
    .offices-section h2,
    .gallery-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .member-photo {
        width: 200px;
        height: 200px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .gallery-nav {
        padding: 0 15px;
    }
    
    .gallery-prev,
    .gallery-next {
        font-size: 18px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .intro-text {
        font-size: 0.9rem;
    }
    
    .team-description,
    .gallery-description {
        font-size: 1rem;
    }
    
    .team-member h3 {
        font-size: 1.1rem;
    }
    
    .team-member p {
        font-size: 0.9rem;
    }
    
    .office-item {
        font-size: 1rem;
    }

    .offices-section h2{
        font-size: 1.65rem;
    }
}

.student-reference {
    margin-top: 2rem;
    text-align: center;
    margin-bottom: 4rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.1) 0%, rgba(21, 101, 192, 0.05) 100%);
    border-radius: 15px;
    border: 2px solid rgba(13, 71, 161, 0.2);
}


.student-reference p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}


@media (max-width: 480px) {

    .student-reference {
        margin-bottom: 3rem;
        padding: 1.2rem;
    }
    
    .student-reference p {
        font-size: 1rem;
    }
}

.international-partners {
    padding-top: 0.5rem;
    justify-self: center;
}

.partner-item {
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.6;
    color: var(--text-color);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.partner-item .flag {
    font-size: 1rem;
    margin-right: 0.3rem;
}

.partner-item .country {
    font-weight: 600;
    color: var(--text-color);
}

.partner-item em {
    font-style: italic;
    font-weight: 400;
    color: #666;
}

/* Adjust the domestic offices styling to differentiate */
.office-item.domestic {
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.6;
    color: var(--text-color);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .international-partners {
        margin-top: 1rem;
        padding-top: 0.5rem;
    }
    
    .partner-item {
        font-size: 0.85rem;
        padding: 0.4rem 0;
        flex-wrap: wrap;
    }
    
    .partner-item .flag {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .partner-item {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .partner-item .flag {
        font-size: 0.85rem;
        margin-right: 0.2rem;
    }
}

@media (max-width: 1024px) {
    .hero-image:first-child::after {
        background: rgba(0,0,0,0.75) !important;
    }
}