html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    opacity: 0;
    animation: pageFade 0.8s ease forwards;
    height: 100%;
}
html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}


@keyframes pageFade {
    to {
        opacity: 1;
    }
}
		 
.top-bar {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;

    padding: 10px 40px;

    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 2px 12px rgba(0,0,0,0.05);

    transition: all 0.3s ease;

    flex-direction: row;
}

/* BRAND */
header {
    display: flex;
    align-items: center;

    gap: 10px;
    font-size: 1.4rem;
    color: #00518a;

    line-height: 1;

    letter-spacing: 1px;

    margin: 0;
}

.logo {
    height: 28px;
    width: auto;
    display: block;
}

.logo-title h1 {
    font-weight: 600;	
	font-family: "Poppins", sans-serif; 
}

.logo-title {
    display: flex;
    align-items: center;

    gap: 10px;

    text-decoration: none;
    color: #00518a;
}

/* NAV */
.menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

nav {
    display: flex;

    gap: 10px;

    flex-wrap: nowrap;
    white-space: nowrap;

    justify-content: center;
}

nav a {
    color: black;
    text-decoration: none;
    text-transform: uppercase;

    font-family: "Inter", sans-serif;

    font-size: 1.4rem;

    font-weight: 500;

    letter-spacing: 0.8px;

    padding: 8px 18px;

    border-radius: 8px;

    transition: all 0.25s ease;

    white-space: nowrap;

    flex-shrink: 0;
}

nav a:hover {
    background: #00518a;
    color: white;
}

/* HAMBURGER */
.hamburger {
    display: none;

    flex-direction: column;

    gap: 5px;

    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;

    background: #00518a;
    border-radius: 2px;
}

.hero {
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;

    background: url("../img/Sibenik-Podi_9.jpg") center/cover no-repeat;

    transform: scale(1);
    transition: transform 8s ease-out;

    z-index: -2;
}

.hero-content {
    position: relative;

    width: 90%;
    
    min-height: 60vh;
    margin: auto;

    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: white;
    text-align: center;
}

/* overlay */
.hero-content::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        rgba(0, 0, 0, 0.55),
        rgba(0, 0, 0, 0.25)
    );

    z-index: -1;
}

/* hover zoom */
.hero-content:hover .hero-bg {
    transform: scale(1.15);
    transition: transform 12s ease-in-out;
}

/* TITLE */
.hero-content h1 {
    position: relative;
    z-index: 1;

    font-size: clamp(1.6rem, 3vw, 3.8rem);

    font-family: "Poppins", sans-serif;
    font-weight: 600;

    letter-spacing: 1px;

    text-shadow: 0 2px 10px rgba(0,0,0,0.3);

    margin: 0;
}

/* SUBTITLE */
.hero-content p {
    font-size: clamp(0.95rem, 1vw, 1.3rem);

    font-weight: 400;

    letter-spacing: 1.2px;

    opacity: 0.9;

    text-shadow: 0 2px 10px rgba(0,0,0,0.3);

    margin-top: 10px;
}

.hero-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}



.home-projects, .home-certs {
    background: #f6f9fc;
    border-top: 1px solid rgba(0, 81, 138, 0.08);
}

.home-projects,
.home-about,
.home-certs {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    padding: 80px 20px;

    text-align: center;
}

.home-certs {
    margin-bottom: 40px;
}


/* HEADINGS */

.home-projects h2,
.home-about h2,
.home-certs h2 {

    color: #00518a;

    font-size: 2.5rem;

    font-weight: 600;

    margin-bottom: 40px;
}


/* PROJECTS */

.home-project-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}


.home-project-card {

    text-decoration: none;

    color: inherit;

    background: #00518a;



    overflow: hidden;

    transition: .25s ease;
}


.home-project-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 12px 30px rgba(0,0,0,.08);

    background: #66b2ff;

}


.home-project-card img {

    width: 100%;

    height: 240px;

    object-fit: cover;

    display: block;
}


.home-project-card h3 {

    color: white;

    font-size: 1.4rem;

    font-weight: 500;

    margin: 20px 20px 10px;
}


.home-project-card p {

    color: white;

    line-height: 1.6;

    margin: 0 20px 25px;
}


/* BUTTONS */

.home-btn {

    display: inline-block;

    margin-top: 40px;

    font-size: clamp(0.95rem, 0.6vw + 0.6rem, 1.2rem);

    padding: clamp(10px, 0.8vw, 14px) clamp(20px, 2vw, 34px);

    background: #00518a;

    color: white;

    text-decoration: none;

    border-radius: 8px;

    transition: .25s ease;
}


.home-btn:hover {

    background: #66b2ff;

    transform: translateY(-2px);
}


/* ABOUT */

.home-about p {

    max-width: 700px;

    margin: auto;

    color: #666;

    line-height: 1.7;

    font-size: 1.15rem;
}


/* CERTIFICATIONS */

.home-certs-grid {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 40px;

    flex-wrap: wrap;
}


.home-certs-grid img {

    height: 90px;

    width: auto;

    transition: .2s ease;
}


.home-certs-grid img:hover {

    transform: scale(1.05);
}

















.footer {
    background: #00518a;
    color: white;

    padding: 40px 20px 20px;

    margin-top: auto;
    line-height: 1.6;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    max-width: 1100px;
    margin: auto;
    gap: 40px;
}

/* columns */
.footer-brand,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* reset */
.footer p,
.footer h3 {
    margin: 0;
}

/* headings */
.footer h3 {
    font-size: 1.2rem;
}

/* text */
.footer p {
    
    opacity: 0.85;
}

/* links */
.footer a {
    color: white;
    text-decoration: none;
    opacity: 0.85;
    transition: 0.2s ease;
}

.footer a:hover {
    color: #66b2ff;
    opacity: 1;
}

/* SOCIAL */
.footer-social {
    display: flex;
    gap: 15px;

    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    margin: 0;
    padding: 0;
}

.footer-social a {
    color: white;

    font-size: 1.2rem;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    line-height: 0;

    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;

    transition: 0.25s ease;

    flex-shrink: 0;
}

.footer-social a:hover {
    background: #66b2ff;
    color: #001f3f;
    border-color: #66b2ff;
    transform: translateY(-3px);
}

/* bottom */
.footer-bottom {
    max-width: 1100px;
    margin: 30px auto 0;
    text-align: center;
    opacity: 0.7;
}

/* email */
.email-link {
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.email-link:hover {
    color: #66b2ff;
}

/* ISO */
.footer-iso {
    margin-top: clamp(6px, 1vw, 12px);

    display: flex;
    gap: clamp(10px, 1vw, 18px);

    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;
}

.footer-iso img {
    height: clamp(55px, 3vw, 85px);
    width: auto;

    display: block;

    transition: transform 0.2s ease;
}

.iso-link:hover img {
    transform: scale(1.05);
}

/* IMPORTANT FIX HERE */
.iso-link {
    display: inline-flex;

    padding: 0;
    margin: 0;

    line-height: 0;

    text-decoration: none;
}

/* optional swap version */
.iso-single {
    display: none;
}

.about-page {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
    line-height: 1.7;

    position: relative;
}

.about-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/background/steel2.jpg") center/cover no-repeat;
    opacity: 0.6;
    z-index: 0;
}

.about-page::after {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(255, 255, 255, 0.55);

    z-index: 0;
}

.about-page > * {
    position: relative;
    z-index: 1;
}

.about-row {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin: auto;
    padding: 60px 20px;
}

.about-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.about-text {
    flex: 1;

    margin: auto;
    line-height: 1.6;
    word-break: normal;
    
}

.about-image img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.about-image {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-layout {
    margin: auto;
    padding: 80px 20px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    background: transparent;
}

.about-left h1,
.about-left h2,
.about-left p {
    margin-top: 0;
}

.about-left p {
    margin-bottom: 18px;
    
}

.about-left {
     flex: unset;
    max-width: 800px;
}

.about-right {
    flex: 1;
}

.about-header,
.about-intro {
    margin: 0;
}

.about-header h1,
.about-header h2 {
    color: #00518a;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 1px;
}

.about-intro {
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
}

.about-intro p {
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.about-header,
.about-layout,
.about-intro,
.about-grid {
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

.about-header,
.about-layout {
    box-sizing: border-box;
}

.info-box {
    border: 1px solid rgba(0, 81, 138, 0.15);
    padding: 30px;
    box-sizing: border-box;
    background: white;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-info-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-bottom: 40px;
}

.info-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.info-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00518a;
    border-radius: 2px 2px 0 0;
}

.info-box i {
    font-size: 1em;
    color: #00518a;
    margin-bottom: 10px;
    opacity: 0.75;
}

.info-box h3 {
    color: #00518a;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: left;
}

.info-box p {
    margin-bottom: 0;
    line-height: 1.6;
    color: #666;
}

.goals-box {
    max-width: 700px;
    margin: auto;
}

.goals-box h3 {
    color: #00518a;
}


.info-box ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.info-box li {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
}

.goals-list li i {
    width: 18px;
    text-align: center;
    color: #00518a;
}

.activity-page {
    width: 100%;
    margin: auto;
    padding: 60px 20px;
    line-height: 1.7;

    position: relative;
    
}

* {
    box-sizing: border-box;
}

.activity-content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;

    position: relative;
    z-index: 1;
}

.activity-page::before {
    content: "";
    position: absolute;
    inset: 0;

    background: url("../img/background/texture1.jpg") center/cover no-repeat;
    opacity: 0.1; /* MUCH lower than About */
    z-index: 0;

    pointer-events: none;
}

.activity-page > * {
    position: relative;
    z-index: 1;
}

.activity-header h1 {
    color: #00518a;
   
    font-weight: 500;
    letter-spacing: 1px;

    margin-bottom: 30px;
}

.activity-intro {
    margin-bottom: 40px;
}

.activity-intro p {
    color: #666;
    
}

.activity-list ul {
    list-style: none;
    padding: 0;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 18px;

    color: #666;
}

.activity-list i {
    color: #00518a;
}

.contact-page {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

.contact-header h1 {
    color: #00518a;
    font-weight: 500;
    text-align: center;
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;

    margin-bottom: 50px;
}

.contact-card h2 {
    color: #00518a;
    font-size: 2rem;
    font-weight: 500;

    margin-bottom: 1px;
}

.contact-role {
    color: #666;
    margin-top: 2px;
    margin-bottom: 18px;

    font-style: italic;
}

.contact-divider {
    width: 60%;
    height: 1px;

    margin: 15px 0;

    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 81, 138, 0.25),
        transparent
    );
}

.map-box {
    padding: 0;
    overflow: hidden;
}

.map-box iframe {
    width: 100%;
    height: 100%;

    min-height: 320px;

    border: 0;
}

.map-box {
    display: block;
    padding: 0;

    align-items: unset;
}

.contact-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 60px;
    padding-top: 20px;

    border-top: 1px solid rgba(0, 81, 138, 0.1);
}

.contact-social a {
    color: #00518a;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 81, 138, 0.3);
    border-radius: 50%;

    transition: all 0.25s ease;
}

.contact-social a:hover {
    background: #00518a;
    color: white;

    border-color: #00518a;

    transform: translateY(-3px);
}

.projects-page {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

.projects-page h1 {

    color: #00518a;
    font-weight: 500;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 60px 20px;
}

.projects-header h1 {
    color: #00518a;
    font-weight: 500;
    text-align: center;
    margin-bottom: 40px;
}

.project-card {
    background: #00518a;
    
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s ease;

    min-width: 0;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    background: #66b2ff;
}

.project-card img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
}

.project-card h3 {
    color: white;
    font-weight: 500;
    padding: 15px;
    margin: 0;
}

.project-card p {
    padding: 0 15px 15px;
    margin: 0;
    color: white;
}

/* =========================
   MODAL BACKDROP
========================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    z-index: 9999;

    justify-content: center;
    align-items: center;
    
}

/* =========================
   MODAL BOX
========================= */
.modal-content {
    background: #fafafa;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 90%;
    
    margin: auto;

    padding: 40px;

    position: relative;
    border-radius: 14px;

    box-shadow: 0 20px 60px rgba(0,0,0,0.25);

    animation: modalFade 0.25s ease;

    width: min(1000px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-weight: 500;
    color: #00518a;
}

.modal-content h3 {
    color: #333;
    margin-top: 20px;
}

.modal-content p {
    color: #555;
    line-height: 1.6;
}

/* =========================
   CLOSE BUTTON
========================= */
.close {
    position: absolute;
    top: 18px;
    right: 22px;

    font-size: 28px;
    cursor: pointer;

    color: #999;
    transition: 0.2s;
}

.close:hover {
    color: #00518a;
}

/* =========================
   MAIN IMAGE
========================= */
#modal-main-image {
    display: block;

    width: 100%;
    height: clamp(250px, 40vh, 600px);

    object-fit: cover;

    border-radius: 6px;
    margin-top: 15px;
}

/* =========================
   THUMBNAIL GALLERY
========================= */
#galleryThumbs {
    display: flex;
    gap: 10px;

    margin-top: 15px;
    flex-wrap: wrap;
}

#galleryThumbs img {
    width: clamp(60px, 4vw, 100px);
    height: clamp(45px, 3vw, 75px);

    object-fit: cover;
    cursor: pointer;

    border-radius: 4px;

    opacity: 0.7;
    transition: 0.2s ease;
}

#galleryThumbs img:hover {
    opacity: 1;
    transform: scale(1.05);
}



.certificates-page {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

.certificates-page h1 {
    color: #00518a;
    font-weight: 500;
    margin-bottom: 30px;
    text-align: center;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.cert-card {
    border: 1px solid rgba(0,0,0,0.08);
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
    text-align: center;

    transition: 0.2s;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.cert-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    
    background: #f5f5f5;
    border-radius: 6px;
}

.cert-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.cert-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: clamp(0.85rem, 0.5vw + 0.6rem, 1rem);
    padding: clamp(8px, 0.6vw, 10px) clamp(14px, 1.5vw, 22px);

    border: 1px solid rgba(0,0,0,0.15);
    background: #f5f5f5;

    color: #444;
    text-decoration: none;

    border-radius: 4px;

    transition: 0.2s ease;
}

.cert-links a:hover {
    background: #eeeeee;
    border-color: rgba(0,0,0,0.25);
}

.cert-links a i {
    color: #c0392b;
}


@media (min-width: 2200px) {

    html {
        font-size: 18px;
    }

    .home-projects,
    .home-about,
    .home-certs,
    .footer-container,
    .about-page,
    .activity-content-wrapper,
    .contact-page,
    .projects-page,
    .certificates-page {
        max-width: 1600px;
    }

    .cert-card img {
        height: 300px;
    }

    .map-box iframe {
        min-height: 500px;
    }

    .home-about p {
        max-width: 1100px;
    }

    .home-certs-grid img {
        height: 120px;
    }

    .modal-content {
        width: 1500px;
        max-height: 92vh;
    }
}

@media (min-width: 3000px) {

    html {
        font-size: 20px;
    }

    .home-projects,
    .home-about,
    .home-certs,
    .footer-container,
    .about-page,
    .activity-content-wrapper,
    .contact-page,
    .projects-page,
    .certificates-page {
        max-width: 1800px;
    }

    .cert-card img {
        height: 400px;
    }

    .map-box iframe {
        min-height: 600px;
    }

    .home-certs-grid img {
        height: 150px;
    }

    .modal-content {
        width: 1700px;
        max-height: 95vh;
    }
}

@media (max-width: 1160px) {
    .top-bar {
        flex-wrap: nowrap;
        position: sticky;
    }

    .hamburger {
        display: flex;
        position: relative;
    }

    nav {
        display: flex;
        flex-direction: column;

        position: absolute;
        top: 100%;
        right: 0;

        background: rgba(255,255,255,0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        padding: 12px 16px;
        border-radius: 12px;

        box-shadow: 0 10px 25px rgba(0,0,0,0.1);

        min-width: 160px;
        z-index: 2000;

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;

        transition: all 0.25s ease;
    }

    nav.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav a {
        font-size: 1rem;
        padding: 6px 10px;
        -webkit-tap-highlight-color: transparent;

        transition: background 0.2s ease;
    }

    nav a:active,
    nav a:focus {
        background: transparent;
        outline: none;
    }

    nav a:focus {
        outline: none;
        background: rgba(0, 81, 138, 0.12);
        color: #00518a;
        border-radius: 6px;
    }

    .footer-iso {
        display: none;
    }

    .iso-single {
        display: inline-flex;  /* key: keeps layout stable */
        padding: 0;
        margin: 0;
        line-height: 0;        /* removes weird inline spacing */
        text-decoration: none;
    }

    .iso-single img {
        height: clamp(60px, 6vw, 90px);
        width: auto;
        display: block;
    }

    .iso-single:hover img {
        transform: scale(1.05);
    }
}


@media (max-width: 1024px) {

    .home-project-grid {

        grid-template-columns: repeat(2, 1fr);

        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
}

@media (max-width: 768px) {

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-layout {
        flex-direction: column;
        text-align: center;
    }

    .footer-social {
        text-align: center;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-contact,
    .footer-brand {
        align-items: center;
    }

    .footer-iso {
        justify-content: center;
    }



    .home-projects,
    .home-about,
    .home-certs {

        padding: 60px 20px;
    }

    .home-project-grid {

        grid-template-columns: 1fr;
    }

    .home-projects h2,
    .home-about h2,
    .home-certs h2 {

        font-size: 2rem;
    }

    .home-project-card img {

        height: 220px;
    }

    .home-certs-grid {

        gap: 20px;
    }

    .home-certs-grid img {

        height: 70px;
    }

    
}

@media (max-width: 480px) {

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 10px;
    }

}