/**
 * ALBERTA NORWEG - Shared Components Styles 
 */
:root {
    --primary-orange: #EC7C26;
    --primary-orange-light: #f5a55a;
    --white: #FFFFFF;
    --dark-gray: #2d2d2d;
    --medium-gray: #666666;
    --light-gray: #f8f9fa;
    --border-gray: #e0e0e0;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: var(--dark-gray);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
    position: relative;
    overscroll-behavior-x: none;
}

main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

section {
    overflow-x: hidden;
}

/* Prevent AOS animations from causing horizontal overflow */
[data-aos] {
    overflow-anchor: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

#header-placeholder {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* ============ HEADER / NAVIGATION ============ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem 5%;
}

/* Base state for all internal pages (white BG) */
header.internal {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem 5%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    height: 100px;
    min-width: 280px;
}

.logo img {
    width: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    object-fit: contain;
}

.logo .logo-white {
    height: 100px;
    opacity: 1;
}

.logo .logo-orange {
    height: 50px;
    opacity: 0;
}

header.scrolled .logo .logo-white,
header.internal .logo .logo-white {
    opacity: 0;
}

header.scrolled .logo .logo-orange,
header.internal .logo .logo-orange {
    opacity: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-orange);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    transform: scaleX(1);
}

header.scrolled nav ul li a,
header.internal nav ul li a {
    color: var(--dark-gray);
}

nav ul li:not(:last-child)::after {
    content: '|';
    color: rgba(255, 255, 255, 0.3);
    margin-left: 0.5rem;
}

header.scrolled nav ul li:not(:last-child)::after,
header.internal nav ul li:not(:last-child)::after {
    color: rgba(102, 102, 102, 0.3);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-orange) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

header.scrolled .menu-toggle span,
header.internal .menu-toggle span {
    background: var(--dark-gray);
}

/* ============ FOOTER ============ */
footer {
    background: var(--primary-orange);
    color: var(--white);
    padding: 80px 5% 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 60px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    color: var(--white);
}

.footer-logo {
    height: 90px;
    margin-bottom: 2rem;
}

.footer-copy {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    opacity: 0.85;
}

.footer-links a:hover {
    opacity: 1;
    transform: translateX(5px);
}

.footer-contact-info {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.footer-contact-info a {
    color: var(--white);
    text-decoration: none;
}

.footer-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
    margin: 50px auto 0;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 1200px;
}

.footer-logos-row img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: var(--transition);
}

.footer-logos-row img.with-bg {
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    filter: none;
    height: 55px;
}

.footer-bottom-bar {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============ PROJECT DETAIL PAGES ============ */
.project-hero {
    height: 70vh;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.project-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: heroZoomIn 15s ease-out forwards;
}

@keyframes heroZoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

@keyframes autoZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.project-hero-content {
    position: relative;
    z-index: 5;
    padding: 60px 5%;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.project-hero-content .category {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.project-hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.project-hero-content .location {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-hero-content .location i {
    color: var(--primary-orange);
}

/* About Project Section */
.about-project {
    padding: 100px 5%;
    background-color: var(--white);
}

.about-project-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-project-text h2 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 20px;
}

.about-project-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 2px;
}

.about-project-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.about-project-image {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: var(--shadow-hover);
    line-height: 0;
    font-size: 0;
}

.about-project-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    animation: autoZoom 8s linear infinite alternate;
}

/* Data Project Section */
.data-project {
    padding: 100px 5%;
    background-color: var(--white);
}

.data-project-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.data-project-image {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: var(--shadow-hover);
    line-height: 0;
    font-size: 0;
}

.data-project-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    animation: autoZoom 8s linear infinite alternate;
}

.project-specs {
    background: var(--white);
    border-radius: 0;
    padding: 30px;
    box-shadow: var(--shadow);
}

.project-specs h3 {
    font-size: 1.3rem;
    color: var(--dark-gray);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-gray);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-gray);
}

.spec-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-orange);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spec-icon i {
    color: white;
    font-size: 1rem;
}

.spec-content {
    flex: 1;
}

.spec-content label {
    display: block;
    font-size: 0.7rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.spec-content span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-gray);
}

/* Photo Mosaic Gallery - Simplified */
.photo-mosaic {
    padding: 100px 5%;
    background-color: var(--white);
}

.mosaic-header {
    text-align: center;
    margin-bottom: 60px;
}

.mosaic-header h2 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    position: relative;
    display: inline-block;
}

.mosaic-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 2px;
}

.mosaic-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    line-height: 0;
}

.mosaic-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}


/* Back to Projects */
.back-to-projects {
    padding: 60px 5%;
    text-align: center;
    background-color: var(--white);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-orange);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(236, 124, 38, 0.3);
    transition: var(--transition);
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(236, 124, 38, 0.4);
}

.back-btn i {
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-5px);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease;
}

.lightbox-nav:hover {
    color: var(--primary-orange);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {

    html,
    body,
    main,
    section,
    #header-placeholder {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
    }

    nav ul.active {
        transform: translateX(0);
    }

    nav ul li::after {
        display: none;
    }

    nav ul li a {
        color: var(--dark-gray);
        font-size: 1.2rem;
    }

    header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.8rem 5% !important;
        background: rgba(0, 0, 0, 0.5);
        /* Darker backdrop on mobile to ensure white elements are visible over hero */
    }

    /* Logo responsiveness on mobile */
    .logo {
        min-width: unset;
        width: 160px;
        /* Reduced further to ensure space */
        height: 50px;
    }

    .logo .logo-white {
        height: 50px;
    }

    .logo .logo-orange {
        height: 40px;
    }

    /* Target the nav directly to avoid taking space in flexbox on mobile */
    nav#main-nav {
        width: 0;
        height: 0;
        overflow: visible;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .menu-toggle span {
        width: 22px;
        height: 2px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }

    header.scrolled,
    header.internal {
        padding: 0.6rem 5% !important;
        background: rgba(255, 255, 255, 0.95) !important;
    }

    header.scrolled .menu-toggle,
    header.internal .menu-toggle {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Project pages responsive */
    .project-hero {
        height: 60vh;
        min-height: 400px;
    }

    .project-hero-content h1 {
        font-size: 2.5rem;
    }

    .about-project-container,
    .data-project-container {
        grid-template-columns: 1fr;
    }

    .about-project-image img,
    .data-project-image img {
        height: 350px;
    }

    .mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }

    .mosaic-item,
    .mosaic-item:nth-child(1),
    .mosaic-item:nth-child(4),
    .mosaic-item:nth-child(6),
    .mosaic-item:nth-child(8) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 2rem;
    }
}