/* 
    Chris Colls Aesthetic Refine - Kadir Karademir
    Architecture: Sectional Modular
*/

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

/* Bell MT Pro - Regular */
@font-face {
    font-family: 'Bell MT Pro';
    src: url('../fonts/7a3b3c954fe4928c-s.p.woff2') format('woff2'),
        url('../fonts/afced419ffd45178-s.p.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Bell MT Pro - Italic */
@font-face {
    font-family: 'Bell MT Pro';
    src: url('../fonts/0efb80a53172c9ef-s.p.woff2') format('woff2'),
        url('../fonts/f18c3a5455a9a9a5-s.p.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --section-gap: 15vh;
    /* Responsive vertical whitespace */
    --font-main: 'Playfair Display', serif;
    --font-size-tiny: 16px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

/* --- Centered Minimal Header --- */
header {
    width: 100%;
    padding: 30px 50px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    z-index: 1000;
    background: #fff;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 50px 10px;
    backdrop-filter: blur(10px);
}

.logo {
    display: block;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.logo img {
    height: 18px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #666;
}

nav a {
    color: inherit;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

nav a:hover {
    color: #000;
}

/* --- Desktop Nav Specifics --- */
.nav-separator {
    color: #ccc;
    font-size: 10px;
}

.nav-social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    /* space between icon and text */
}

.nav-icon {
    height: 14px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    vertical-align: middle;
    background: transparent !important;
    border: none;
    mix-blend-mode: normal;
}

nav a:hover .nav-icon {
    opacity: 1;
}

/* Hide Mobile Elements on Desktop */
.menu-trigger,
.menu-close-trigger,
.menu-overlay {
    display: none;
}

/* Blur effect for main content */
body.menu-open main {
    filter: blur(5px);
    pointer-events: none;
}

body.menu-open {
    overflow: hidden;
}

/* --- Mobile Menu (1024px and below) --- */
@media (max-width: 1024px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 20px 5%;
    }

    header.scrolled {
        padding: 15px 5%;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 0;
    }

    nav {
        display: none;
    }

    .menu-trigger {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1100;
        position: relative;
        width: 40px;
        height: 40px;
    }

    .menu-trigger span {
        display: block;
        width: 20px;
        height: 1px;
        background: #000;
        margin: 6px auto;
        transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    }

    .menu-trigger.active span {
        background: #fff;
    }

    .menu-trigger.active span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-trigger.active span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .menu-close-trigger {
        display: flex;
        position: absolute;
        top: 40px;
        left: 20px;
        background: none;
        border: none;
        cursor: pointer;
        width: 30px;
        height: 30px;
        z-index: 1200;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .close-line {
        display: block;
        width: 24px;
        height: 1px;
        background: #fff;
        transition: all 0.3s ease;
    }

    .close-line:first-child {
        transform: rotate(45deg) translateY(0.5px);
    }

    .close-line:last-child {
        transform: rotate(-45deg) translateY(-0.5px);
    }

    .menu-overlay {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        z-index: 1050;
        justify-content: flex-start;
        align-items: flex-start;
        padding-left: 20%;
        padding-top: 15vh;
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .menu-items {
        list-style: none;
        padding: 0;
        text-align: left;
    }

    .menu-items li {
        margin: 25px 0;
    }

    .menu-items a {
        font-family: 'Montserrat', sans-serif;
        font-size: 24px;
        letter-spacing: 5px;
        color: #fff;
        text-decoration: none;
        text-transform: uppercase;
        font-weight: 300;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
    }

    .menu-items a:hover {
        opacity: 0.5;
    }

    .menu-nav-icon {
        height: 16px;
        width: auto;
        margin-right: 15px;
        filter: invert(1);
        opacity: 0.9;
    }

    .menu-social-link {
        font-size: 14px !important;
        letter-spacing: 3px !important;
        color: #eee !important;
    }
}

/* --- Container & General Text --- */
main {
    padding: 180px 18%;
    /* Refined offset and inward focus */
    padding-bottom: 250px;
}

.layout-section {
    margin-bottom: var(--section-gap);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.media-caption {
    font-family: 'Bell MT Pro', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    line-height: 28px;
    margin-top: 12px;
    font-style: normal;
    letter-spacing: 0.01em;
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

.media-caption em {
    font-family: 'Bell MT Pro', Georgia, serif;
    font-style: italic;
    color: #555;
    font-weight: 400;
    opacity: 1;
    /* Reset previous opacity */
}

.media-container,
.video-wrapper {
    position: relative;
    width: 100%;
    min-height: 30vh;
    /* Reserve space for lazy loading to prevent anchor scroll shifts */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: transparent;
}

.media-container img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 65vh;
    display: block;
    object-fit: contain;
}

.media-container video,
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Layout Modules --- */

/* Standard Section Spacing */
.layout-section {
    margin-bottom: 15vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* 1. Single Image + Text (Two Columns) */
.layout-single-text-left,
.layout-single-text-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
    align-items: center;
    /* Vertically centered */
}

/* Reverse logic for text-right */
.layout-single-text-right .text-block {
    order: 2;
}

.layout-single-text-right .media-block {
    order: 1;
}

/* 2. Single Image Center (Full Width Focus) */
.layout-single-center {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.layout-single-center .media-container {
    justify-content: center;
    margin-bottom: 20px;
}

/* 3. Dual Images (Side by Side) */
.layout-dual {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.dual-image-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    height: 65vh;

    /* Reduced globally to ensure proportional horizontal fit without extreme crop */
}

.dual-image-wrapper .media-block {
    height: 100%;
    display: flex;
    justify-content: center;
}

.dual-image-wrapper .media-container {
    height: 100%;
    width: auto;
}

.dual-image-wrapper img {
    height: 100%;
    width: auto;
    object-fit: cover;
    /* Prevents stretching if forcefully squeezed */
    max-width: 100%;
}

.layout-dual .media-container {
    flex: 1;
    /* Stretch container to fill block */
    width: 100%;
    height: 100%;
    /* Ensure it takes full height */
}

.layout-dual .media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevent squishing, crop to fill equal height */
    max-height: none;
    /* Override global max-height to ensure equal stretching */
}

/* 4. Quad Images (2x2 Grid) */
.layout-quad {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 450px));
    /* Consistent with Dual layout */
    justify-content: center;
    /* Magnet effect: Gridi ortaya topla */
    gap: 15px;
    /* Unified with Dual layout */
    width: 100%;
    align-items: start;
}

.layout-quad .media-block {
    width: 100%;
}

.layout-quad .media-container {
    width: 100%;
}

/* Fade-in Animation (IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.text-block {
    text-align: left;
}

.media-caption-group {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    flex-basis: 100%;
    /* For flex containers like .layout-dual */
    grid-column: 1 / -1;
    /* For grid containers like .layout-quad */
}

/* Inherit styles from .media-caption */
.media-caption-group .media-caption {
    display: inline-block;
    margin-bottom: 0;
}

/* Removed fixed aspect-ratio classes */

/* Video Wrapper Ratio Control */
.video-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
}

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

/* --- Bio Styling --- */
.about-editorial {
    position: relative;
    padding-top: 80px;
}

/* Full-Width 100vw Divider */
.about-editorial::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background-color: #000;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
    align-items: flex-start;
}

.section-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.875rem;
    line-height: 2.25rem;
    letter-spacing: 2px;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 80px;
    color: #000;
    text-align: left;
}

.editorial-bio {
    max-width: 800px;
}

.bio-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 3rem;
    color: #333;
    font-size: 18px;
}

.editorial-bio p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    font-weight: 400;
    opacity: 0.9;
}

/* --- Footer Redesign: Final Grey Aesthetic --- */
.footer-final {
    background-color: #f9f9f9;
    padding: 100px 0;
    /* Updated as per request */
    margin-top: 40px;
    width: 100%;
    max-width: none !important;
}

.footer-content {
    max-width: 90%;
    /* Dynamic alignment with general grid */
    margin: 0 auto;
    text-align: center;
}

.footer-brand-hero {
    margin-bottom: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-main-email {
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

.footer-main-email a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-main-email a:hover {
    color: #000;
    border-bottom: 1px solid #000;
}

.footer-logo-img {
    height: 20px;
    /* Slightly larger for visibility on gray background */
    width: auto;
    opacity: 0.9;
}

.footer-offices-flex {
    display: flex;
    justify-content: center;
    gap: 120px;
    /* Generous gap between offices */
}

.footer-office-block {
    text-align: left;
    /* Left-aligned within the centered group for a structured look */
}

.office-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 0.25em;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
}

.footer-office-block p {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    line-height: 1.8;
    color: #666;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.footer-link-subtle {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.footer-link-subtle:hover {
    border-bottom: 1px solid #666;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    main {
        padding: 140px 5%;
    }

    .layout-left,
    .layout-right,
    .about-content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .layout-left .media-container {
        order: -1;
    }

    .dual-image-wrapper {
        flex-direction: row;
        height: 35vh;
        /* Scale down height on mobile to fit screen gracefully */
        gap: 10px;
    }

    .dual-image-wrapper .media-block {
        width: auto;
        height: 100%;
    }

    .dual-image-wrapper .media-container {
        width: auto;
        height: 100%;
    }

    .dual-image-wrapper img {
        width: auto;
        height: 100%;
        max-width: 100%;
    }

    .layout-quad {
        grid-template-columns: 1fr 1fr;
        /* Force 2-column grid on mobile */
        gap: 15px;
        /* Equalized horizontal & vertical spacing */
        align-items: start;
    }

    .layout-dual .media-container,
    .layout-quad .media-container {
        width: 100%;
    }

    .layout-quad img {
        width: 100%;
        height: auto;
    }

    /* Note: .layout-dual img already has object-fit: cover and height: 100% from desktop rules */

    .footer-offices-flex {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .footer-office-block {
        text-align: center;
    }

    .layout-dual .media-block,
    .layout-quad .media-block {
        width: 100%;
        max-width: 100%;
    }
}

/* --- Instagram Feed --- */
.instagram-feed {
    position: relative;
    padding: 80px 0 60px 0;
    background-color: #ffffff;
    width: 100%;
}

/* Full-Width 100vw Divider - Same as Biography */
.instagram-feed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background-color: #000;
}

.instagram-feed .insta-slider-container {
    margin-left: -5%;
    /* Break out of main horizontal padding slightly for wider slider view */
    margin-right: -5%;
    width: auto;
    padding: 0 5%;
}

.insta-header {
    text-align: center;
    margin-bottom: 40px;
}

.insta-handle {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    font-weight: 400;
}

.insta-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0 5%;
}

.insta-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 24px;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insta-nav:hover {
    background: #fff;
    color: #000;
}

.insta-prev {
    left: 2%;
}

.insta-next {
    right: 2%;
}

.insta-slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    /* Adjusted for button clicks */
    cursor: grab;
    overflow-x: auto;
    /* Allow native scroll but hide scrollbar */
    scrollbar-width: none;
    /* Hide for Firefox */
    -ms-overflow-style: none;
    /* Hide for IE/Edge */
    scroll-behavior: smooth;
}

.insta-slider-track::-webkit-scrollbar {
    display: none;
    /* Hide for Chrome/Safari */
}

.insta-slider-track:active {
    cursor: grabbing;
}

.insta-slide {
    flex: 0 0 calc(20% - 16px);
    /* 5 images per row on desktop */
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.insta-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.insta-slide:hover img {
    opacity: 0.8;
}

@media (max-width: 1200px) {
    .insta-slide {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .insta-slide {
        flex: 0 0 calc(50% - 10px);
    }
}

/* --- Request Portfolio Section --- */
.request-portfolio {
    text-align: center;
    padding: 120px 0;
    margin-bottom: 0 !important;
}

.request-text {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 50px;
    color: #000;
}

.request-button {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    border: 1px solid #000;
    padding: 22px 60px;
    transition: all 0.3s ease;
    background: transparent;
}

.request-button:hover {
    background-color: #000;
    color: #ffffff;
}

/* --- Lightbox System --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.lightbox-content img,
.lightbox-content iframe {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-content iframe {
    width: 80vw;
    height: 45vw;
    /* 16:9 ratio approx */
}

/* Lightbox Close Trigger */
.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

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

.lightbox-close .close-line {
    background: #fff;
}

.video-wrapper.is-portrait {
    width: 100%;
    /* Genişliği biraz daha artıralım, 450px yerine 600px veya vh bazlı yapalım */
    max-width: 550px;
    margin: 40px auto;
    /* Üstten ve alttan biraz nefes payı bırakalım */
    aspect-ratio: 9 / 16;
    background: transparent;

    /* Masaüstünde çok uzun olup ekranın altından taşmaması için yükseklik sınırı */
    max-height: 85vh;
}

/* Mobilde ekranı daha iyi kaplaması için */
@media (max-width: 768px) {
    .video-wrapper.is-portrait {
        max-width: 90%;
        /* Mobilde ekranın neredeyse tamamını kullansın */
        margin: 20px auto;
    }
}