@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    line-height: 1.6;
}

header {
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header nav {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    gap: 40px;
}

header nav li {
    margin: 0;
}

header nav a {
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #666;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 400;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 1em;
    margin-bottom: 60px;
    font-weight: 400;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 2px;
    margin-bottom: 40px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    background-color: #ddd;
    text-decoration: none;
    color: inherit;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.grid-item:hover .overlay {
    opacity: 1;
}

.grid-item .overlay-text {
    color: white;
    text-align: right;
    line-height: 1.3;
    width: 100%;
    margin: 0;
    padding: 0;
    word-wrap: normal;
    hyphens: none;
    overflow-wrap: break-word;
    word-break: normal;
}

.overlay-title {
    font-size: clamp(1.4em, 3vw, 2.2em);
    font-weight: 700;
    margin: 0 0 8px 0;
    padding: 0;
    display: block;
    line-height: 1.1;
    word-wrap: normal;
    overflow-wrap: break-word;
    hyphens: none;
    word-break: normal;
}

.overlay-subtitle {
    font-size: clamp(0.7em, 1.5vw, 0.9em);
    font-weight: 400;
    opacity: 0.9;
    display: block;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    word-wrap: normal;
    overflow-wrap: break-word;
    hyphens: none;
    word-break: normal;
}

/* Grid item size variations */
.item-wide {
    grid-column: span 2;
}

.item-tall {
    grid-row: span 2;
}

.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

/* Enhanced responsive design */
@media (max-width: 800px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        grid-auto-rows: 200px;
    }
    
    .item-wide,
    .item-large {
        grid-column: span 2;
    }
    
    .item-tall,
    .item-large {
        grid-row: span 1;
    }
    
    main {
        padding: 40px 15px;
    }
    
    .grid-item .overlay {
        padding: 12px;
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    /* Darker overlay for light images on mobile */
    .grid-item.light-image .overlay {
        background-color: rgba(0, 0, 0, 0.6);
    }
    
    .grid-item:hover .overlay {
        opacity: 1;
    }
    
    .overlay-title {
        font-size: clamp(1.3em, 5vw, 1.8em);
    }
    
    .overlay-subtitle {
        font-size: clamp(0.8em, 3vw, 1em);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .item-wide,
    .item-tall,
    .item-large {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .grid-item .overlay {
        opacity: 1; /* Always show overlay on mobile */
        background-color: rgba(0, 0, 0, 0.3); /* 0.3 opacity */
    }
    
    .grid-item.light-image .overlay {
        background-color: rgba(0, 0, 0, 0.6); 
    }
    
    .overlay-title {
        font-size: clamp(1.4em, 6vw, 2em);
    }
    
    .overlay-subtitle {
        font-size: clamp(0.9em, 4vw, 1.1em);
    }
}

/* Project Page Styles */
.hero-banner {
    position: relative;
    height: 50vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 2;
    transition: background 0.3s ease;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 0 2rem 0;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
    width: 100%;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: bold;
    margin: 0;
    color: white;
    text-shadow: none;
    text-align: left;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: normal;
    margin: 0.5rem 0 0 0;
    color: white;
    text-shadow: none;
    text-align: left;
    opacity: 0.9;
}

.project-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-tags {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.tag {
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #333;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 4rem;
}

.project-description p {
    margin-bottom: 1.5rem;
}

.project-description h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2f2f2f;
    margin-top: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section divider - thick horizontal line */
.section-divider {
    border: none;
    height: 5px;
    background-color: #333;
    margin: 3rem 0;
    width: 100%;
}

.project-questions {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.project-questions h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    color: #333;
    font-weight: 600;
}

.project-questions h4:first-of-type {
    margin-top: 0;
}

.project-questions p {
    margin-bottom: 0;
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.gallery-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
}

.project-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.3s ease;
}

.project-gallery img:hover {
    opacity: 0.8;
}

.project-gallery video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.3s ease;
}

/* Content gallery */
.content-gallery {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns, 12), 1fr);
    gap: 2px;
    margin: 2rem 0;
}

.content-gallery img {
    width: 100%;
    height: var(--gallery-height, 200px);
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.3s ease;
    grid-column: span var(--column-span, 4);
}

.content-gallery img:hover {
    opacity: 0.8;
}

.content-gallery video {
    width: 100%;
    height: var(--gallery-height, 200px);
    object-fit: cover;
    border-radius: 0;
    grid-column: span var(--column-span, 4);
}

/* Video container */
.content-gallery .video-container {
    grid-column: span var(--column-span, 4);
}

/* Responsive design for project pages */
@media (max-width: 800px) {
    .hero-banner {
        height: 25vh;
        min-height: 200px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem; 
    }
    
    .project-content {
        padding: 2rem 5%;
    }
    
    .project-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .project-description h3 {
        font-size: 1.1rem;
    }
    
    .project-questions h4 {
        font-size: 1rem;
    }
    
    .project-questions p {
        font-size: 0.9rem;
    }
    
    .project-tags {
        flex-wrap: wrap;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
    
    /* Content gallery mobile */
    .content-gallery {
        grid-template-columns: 1fr;
    }
    
    .content-gallery img,
    .content-gallery video {
        grid-column: span 1; /* Force images to full width */
        height: auto;
        min-height: 200px;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .project-content {
        padding: 1.5rem 4%;
    }
    
    .project-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .project-description h3 {
        font-size: 1rem;
    }
    
    .project-questions h4 {
        font-size: 0.95rem;
    }
    
    .project-questions p {
        font-size: 0.85rem;
    }
    
    .content-gallery img,
    .content-gallery video {
        min-height: 150px;
        max-height: 300px;
    }
}

/* Gallery Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

.lightbox-image {
    width: auto;
    max-width: 90%;
    height: 65vh;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    transition: height 0.3s ease, max-height 0.3s ease;
    cursor: zoom-in;
}

.lightbox-image.zoomed {
    height: 100vh;
    max-height: 100vh;
    cursor: zoom-out;
}

.lightbox-video {
    width: auto;
    max-width: 90%;
    height: 55vh;
    max-height: 55vh;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #ccc;
    font-size: 4rem;
    cursor: pointer;
    padding: 1rem;
    transition: color 0.3s ease;
    z-index: 1002;
    font-family: inherit;
    line-height: 1;
}

.lightbox-nav:hover {
    color: white;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-thumbnails {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    width: calc(100vw - 4rem);
    overflow-x: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.lightbox-thumbnail {
    width: 10vw;
    min-width: 60px;
    max-width: 100px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
}

.lightbox-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: white;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #D3D3D3;
    font-size: 6rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.lightbox-close:hover {
    color: #999;
}

/* Mobile lightbox */
@media (max-width: 768px) {
    .lightbox-image {
        width: 90%;
        max-height: 50vh;
    }
    
    .lightbox-video {
        width: 90%;
        max-height: 40vh;
    }
    
    .lightbox-nav {
        font-size: 1.5rem;
        padding: 0.75rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-thumbnails {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        width: calc(100vw - 2rem);
        padding: 0.5rem;
    }
    
    .lightbox-thumbnail {
        width: 15vw;
        min-width: 50px;
        max-width: 80px;
        height: 50px;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }
}

/* Video Controls */
.video-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.gallery-video-with-controls {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.gallery-video-with-controls:hover {
    transform: scale(1.05);
}

.video-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: #F2F2F2;
    border-radius: 2px;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #F2F2F2;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #F2F2F2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.mute-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mute-button.muted {
    background-image: url('../contentfiles/pics/muteicon.png');
}

.mute-button.unmuted {
    background-image: url('../contentfiles/pics/volumeicon.png');
}

.mute-button:hover {
    opacity: 0.8;
}

/* Footer image - full width */
.footer-image {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.footer-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.footer-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.footer-image:hover::after {
    opacity: 0;
}