/* styles.css - COMPLETE VERSION WITH iOS VIDEO FIXES + NAVIGATION FIXES */

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

/* ===================
   CSS VARIABLES
   =================== */
:root {
    --accent-dark: #2c2c2c;
    --accent-hover: #404040;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #fefefe;
    --bg-section: #f8f8f8;
}

/* ===================
   GLOBAL RESET
   =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* ===================
   NAVIGATION STYLES
   =================== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #121418;
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(25px) saturate(120%);
    z-index: 1000;
    padding: 0.6rem 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

/* Logo */
.nav-logo {
    flex: 0 0 auto;
}

.nav-logo a {
    font-family: 'Playfair Display', serif;
    font-size: 2.8125rem;
    font-weight: 300;
    text-decoration: none;
    color: #FFFFFF;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


/* Navigation Menu */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}


.nav-menu a:hover {
    color: var(--accent-dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-dark);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Right Side - Instagram + Language */
.nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

/* Instagram Icon */
.nav-instagram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-instagram:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.instagram-icon {
    width: 16px !important;
    height: 16px !important;
    filter: invert(1);
    transition: transform 0.3s ease;
}


/* Desktop Language Switcher */
.nav-lang-switcher {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 0;
    overflow: hidden;
    z-index: 11;
}


.nav-lang-switcher::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--accent-dark);
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.nav-lang-switcher.ee-active::before {
    transform: translateX(100%);
}

.nav-lang-btn {
    position: relative;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    min-width: 32px;
    z-index: 2;
}


.nav-lang-btn.active {
    color: #FFFFFF;
}

.nav-lang-btn:hover {
    transform: scale(1.05);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 24px;
    height: 20px; /* Slightly bigger overall size */
    justify-content: center;
    align-items: center;
}

.hamburger span {
    width: 24px;
    height: 1px; /* Keep ultra-thin lines */
    background: #FFFFFF;
    margin: 2px 0;
    transition: 0.3s;
}

.hamburger-favicon {
    display: none;
    width: 20px; /* Bigger than hamburger lines but smaller than before */
    height: 20px;
    filter: invert(1);
}


/* Scrolled State - Override to maintain consistent #121418 background */
.home-page .nav.scrolled {
    background: #121418;
    backdrop-filter: blur(30px) saturate(140%);
}

.home-page .nav.scrolled .nav-logo a {
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.home-page .nav.scrolled .nav-menu a {
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.home-page .nav.scrolled .hamburger span {
    background: #FFFFFF;
}

.home-page .nav.scrolled .nav-instagram {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.home-page .nav.scrolled .instagram-icon {
    filter: invert(1);
}

.home-page .nav.scrolled .nav-lang-switcher {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.home-page .nav.scrolled .nav-lang-btn {
    color: rgba(255, 255, 255, 0.6);
}

.home-page .nav.scrolled .nav-lang-btn.active {
    color: #FFFFFF;
}

/* ===================
   LANGUAGE SWITCHING
   =================== */
.content-en, .content-ee { 
    color: inherit !important;
    opacity: 1 !important;
}

/* Estonian mode - show EE, hide EN */
body.lang-ee .content-en { 
    display: none !important; 
}
body.lang-ee .content-ee { 
    display: block !important; 
    color: inherit !important;
    opacity: 1 !important;
}

/* English mode (default) - show EN, hide EE */
body:not(.lang-ee) .content-en { 
    display: block !important; 
    color: inherit !important;
    opacity: 1 !important;
}
body:not(.lang-ee) .content-ee { 
    display: none !important; 
}

/* Navigation specific language switching */
.nav-menu .content-en,
.nav-menu .content-ee {
    display: inline !important;
}

body.lang-ee .nav-menu .content-en { 
    display: none !important; 
}
body.lang-ee .nav-menu .content-ee { 
    display: inline !important; 
}

body:not(.lang-ee) .nav-menu .content-en { 
    display: inline !important; 
}
body:not(.lang-ee) .nav-menu .content-ee { 
    display: none !important; 
}

/* Project page specific - FORCE BLOCK DISPLAY */
.project-title.content-en,
.project-title.content-ee,
.project-subtitle.content-en,
.project-subtitle.content-ee {
    display: block !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ===================
   HERO SECTION - iOS VIDEO NUCLEAR SOLUTION
   =================== */
.hero {
    height: 85vh; /* Between 70vh and 100vh - good balance */
    min-height: 500px; /* Slightly higher minimum */
    max-height: 700px; /* Higher maximum for larger screens */
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    
    /* Hide all video controls - NUCLEAR APPROACH */
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: none !important;
    
    /* iOS-specific control hiding */
    -webkit-media-controls: none !important;
    -webkit-media-controls-start-playback-button: none !important;
    -webkit-media-controls-enclosure: none !important;
    -webkit-media-controls-panel: none !important;
    -webkit-media-controls-play-button: none !important;
    -webkit-media-controls-timeline-container: none !important;
    -webkit-media-controls-current-time-display: none !important;
    -webkit-media-controls-time-remaining-display: none !important;
    -webkit-media-controls-timeline: none !important;
    -webkit-media-controls-volume-slider-container: none !important;
    -webkit-media-controls-volume-slider: none !important;
    -webkit-media-controls-mute-button: none !important;
    -webkit-media-controls-fullscreen-button: none !important;
}

/* Force hide video controls - ALL VENDORS + iOS SPECIFIC */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls-play-button,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-current-time-display,
.hero-video::-webkit-media-controls-time-remaining-display,
.hero-video::-webkit-media-controls-timeline,
.hero-video::-webkit-media-controls-volume-slider,
.hero-video::-webkit-media-controls-mute-button,
.hero-video::-webkit-media-controls-fullscreen-button,
.hero-video::-webkit-media-controls-enclosure,
.hero-video::-webkit-media-controls-timeline-container,
.hero-video::-webkit-media-controls-volume-slider-container {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.hero-video::-moz-media-controls {
    display: none !important;
}

/* iOS Safari specific hiding */
.hero-video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
}

/* ===================
   SHARED COMPONENTS
   =================== */
.section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 300;
    color: var(--text-dark);
}

/* ===================
   FILMS SECTION
   =================== */
.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.film-card {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    aspect-ratio: 16/9;
    transform-style: preserve-3d;
}

.film-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.film-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    color: #FFFFFF;
    padding: 2rem;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.film-card:hover .film-overlay {
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.film-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.film-meta {
    font-size: 0.9rem;
    color: #FFFFFF;
    opacity: 0.9;
}

/* ===================
   COMMERCIAL SECTION
   =================== */
.commercial {
    background: var(--bg-section);
}

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

.commercial-card {
    background: white;
    border-radius: 0px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    position: relative;
}

.commercial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.commercial-card img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    object-position: center center;
    min-height: 200px;
    max-height: 300px;
}

.commercial-info {
    padding: 1rem;
    text-align: center;
    background: white;
}

.commercial-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* ===================
   ABOUT SECTION WITH IMAGE
   =================== */
.about-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.about-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text-column {
    text-align: left;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.about-image-column {
    display: flex;
    justify-content: center;
}

.about-portrait {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 0px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/4; /* Ensures consistent proportions */
    object-position: center top; /* Focus on top of image for portraits */
}

/* ===================
   CONTACT SECTION
   =================== */
.contact {
    background: var(--bg-section);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-dark);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--accent-dark);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: var(--accent-hover);
}

/* ===================
   PROJECT PAGE STYLES
   =================== */
.project-hero {
    min-height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--text-dark);
    text-align: center;
    position: relative;
    padding: 1rem;
    margin-top: 80px;
}

.project-info {
    z-index: 2;
    max-width: 800px;
    padding: 0.5rem;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem !important; /* Ensure space after title */
    color: var(--text-dark);
    display: block !important; /* Force block display */
    width: 100% !important;
    line-height: 1.2 !important;
}

.project-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem !important; /* Space after subtitle */
    display: block !important; /* Force block display */
    width: 100% !important;
    line-height: 1.4 !important;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.project-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
}

.content-section {
    margin-bottom: 1.5rem;
}

/* PROJECT DESCRIPTION STYLING - NUCLEAR CENTERING - GUARANTEED FIX */
.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 1.5rem auto !important;
    padding: 0 1rem;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Target every possible text element - NUCLEAR APPROACH */
.project-description *,
.project-description p,
.project-description div,
.project-description .content-en,
.project-description .content-ee,
.project-description .content-en p,
.project-description .content-ee p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Additional nuclear centering for language divs */
.content-section .content-en,
.content-section .content-ee {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.content-section .content-en p,
.content-section .content-ee p {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
    display: block !important;
}

/* If nothing else works, force with flexbox */
.content-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

/* Video Containers */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: white;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.commercial-video-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto 1.5rem;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.commercial-video-container::before {
    content: '';
    display: block;
    padding-top: 177.78%;
}

.commercial-video-container iframe,
.commercial-video-container .video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.commercial-video-container iframe {
    border: none;
    display: none;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-poster::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -40px;
    margin-left: -40px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    z-index: 5;
}

.video-poster::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -8px;
    width: 0;
    height: 0;
    border-left: 20px solid #000;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 6;
}

.commercial-video-container .video-poster::before {
    width: 60px;
    height: 60px;
    margin-top: -30px;
    margin-left: -30px;
}

.commercial-video-container .video-poster::after {
    margin-top: -9px;
    margin-left: -6px;
    border-left: 15px solid #000;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

.video-poster:hover::before {
    background: rgba(255, 255, 255, 1);
}

.video-poster:hover::after {
    border-left-color: #333;
}

.video-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Commercial Navigation */
.commercial-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    min-width: 0;
    flex: 1;
    max-width: 250px;
}

.nav-btn:hover {
    background: var(--bg-section);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

.prev-btn {
    justify-content: flex-start;
}

.next-btn {
    justify-content: flex-end;
}

.nav-arrow {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-dark);
}

.nav-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prev-btn .nav-text {
    align-items: flex-start;
    text-align: left;
}

.next-btn .nav-text {
    align-items: flex-end;
    text-align: right;
}

.nav-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
}

/* Film navigation - handle bilingual titles */
.nav-title.content-en,
.nav-title.content-ee {
    display: block !important;
    width: 100% !important;
}

/* Language switching for navigation titles */
body.lang-ee .nav-title.content-en {
    display: none !important;
}

body.lang-ee .nav-title.content-ee {
    display: block !important;
}

body:not(.lang-ee) .nav-title.content-en {
    display: block !important;
}

body:not(.lang-ee) .nav-title.content-ee {
    display: none !important;
}

/* Credits */
.credits {
    background: var(--bg-section);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.credit-item {
    text-align: center;
}

.credit-role {
    font-size: 0.9rem;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.credit-name {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* ===================
   FILM STILL GALLERY
   =================== */
.film-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.film-still {
    width: 100%;
    height: auto;
    border-radius: 0px;
    object-fit: cover;
    aspect-ratio: 16/9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.film-still:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .film-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .film-still {
        border-radius: 0px;
    }
}

/* ===================
   LIGHTBOX
   =================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10001;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev {
    margin-left: -80px;
}

.lightbox-next {
    margin-right: -80px;
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: -40px;
        font-size: 30px;
    }
    
    .lightbox-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        margin-left: -25px;
    }
    
    .lightbox-next {
        margin-right: -25px;
    }
}

/* ===================
   MOBILE RESPONSIVE
   =================== */

/* Hide mobile-only items on desktop by default */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    /* Mobile navigation adjustments */
    .nav-container {
        position: relative;
    }
    
    /* Reduce navigation header height by 60% */
    .nav {
        padding: 0.24rem 0;
    }
    
    /* Reduce TRIIN RUUMET logo size by 40% */
    .nav-logo a {
        font-size: 2.390625rem;
    }
    
    /* Hide desktop navigation extras */
    .nav-right {
        display: none;
    }
    
    /* Show hamburger menu */
    .hamburger {
        display: flex;
    }

    .hamburger.active span {
        display: none;
    }

    .hamburger.active .hamburger-favicon {
        display: block;
    }

    /* Mobile menu styling - MORE TOP PADDING, COMPACT BOTTOM */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0 0.3rem 0; /* More top padding, less bottom */
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        z-index: 1000;
        height: auto;
        min-height: auto;
    }

    .nav-menu li {
        margin-bottom: 0.3rem; /* Reduced from 0.5rem */
    }

    .nav-menu a {
        color: #121418 !important;
        text-shadow: none;
        padding: 0.2rem 0; /* Reduced from 0.3rem */
    }

    .nav-menu a:hover {
        color: #121418 !important;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Mobile-only items - MINIMAL SPACE AFTER KONTAKT */
    .mobile-only {
        display: block !important;
        margin-top: 0.1rem !important; /* Minimal space after KONTAKT */
        padding: 0.6rem 0 0.2rem 0 !important; /* More space above icons, less below */
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile Instagram and language switcher container - COMPACT */
    .mobile-only > div {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }

    /* Mobile Instagram icon */
    .mobile-instagram {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px; /* Slightly smaller */
        height: 32px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .mobile-instagram:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: scale(1.1);
    }

    .mobile-instagram-icon {
        width: 16px !important; /* Slightly smaller */
        height: 16px !important;
        filter: invert(0);
    }

    /* Mobile language switcher - COMPACT */
    .mobile-lang-switcher {
        position: relative;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 18px; /* Slightly smaller radius */
        padding: 2px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        display: flex;
        gap: 0;
        overflow: hidden;
        z-index: 11;
    }

    .mobile-lang-switcher::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: calc(50% - 2px);
        height: calc(100% - 4px);
        background: var(--accent-dark);
        border-radius: 16px;
        transition: all 0.4s ease;
        z-index: 1;
    }

    .mobile-lang-switcher.ee-active::before {
        transform: translateX(100%);
    }

    .mobile-lang-btn {
        position: relative;
        background: transparent;
        border: none;
        color: rgba(18, 20, 24, 0.7);
        padding: 0.25rem 0.5rem; /* Reduced padding */
        cursor: pointer;
        border-radius: 16px;
        transition: all 0.3s ease;
        font-size: 0.7rem; /* Slightly smaller */
        font-weight: 500;
        letter-spacing: 0.5px;
        min-width: 26px; /* Slightly smaller */
        z-index: 2;
    }

    .mobile-lang-btn.active {
        color: #FFFFFF;
    }

    /* MOBILE HERO VIDEO - iOS optimized */
    .hero {
        height: 100vh; /* Full viewport height for mobile */
        min-height: 100vh;
        max-height: none;
    }
    
    .hero-video {
        object-fit: cover;
        object-position: center 30%; /* Focus on upper-center area of video */
        
        /* iOS MOBILE SPECIFIC FIXES - ENHANCED */
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
        
        /* Force remove any possible controls on iOS */
        pointer-events: none !important;
    }

    /* Mobile project page spacing */
    .project-hero {
        min-height: 8vh;
        padding: 0.5rem;
    }
    
    .project-title {
        font-size: 2rem;
        margin-bottom: 0.3rem;
    }
    
    .project-subtitle {
        margin-bottom: 0.5rem;
    }
    
    .project-meta {
        gap: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .project-content {
        padding: 0.5rem 1rem;
    }
    
    .content-section {
        margin-bottom: 1rem;
    }

    /* About section mobile layout */
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-text-column {
        text-align: center;
    }

    .about-portrait {
        max-width: 250px;
        margin: 0 auto; /* Center the image on mobile */
        aspect-ratio: 3/4;
        object-position: center top;
    }

    .section {
        padding: 2rem 1rem;
    }

    .films-grid {
        grid-template-columns: 1fr;
    }

    .commercial-grid {
        grid-template-columns: 1fr;
    }

    .commercial-video-container {
        max-width: 300px;
    }

    .project-description {
        text-align: center;
        padding: 0 1rem;
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    /* Mobile navigation adjustments */
    .commercial-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
    
    .nav-text {
        align-items: center !important;
        text-align: center !important;
    }
    
    .nav-title {
        font-size: 0.9rem;
    }
}