/* =============================================
   Referanslar – Frontend Stilleri
   Pandastic Studio © 2026
   Fully Responsive
   ============================================= */

/* =============================================
   CSS Custom Properties
   ============================================= */
:root {
    --ps-black: #1E1E1C;
    --ps-yellow: #F6AE2D;
    --ps-red: #E0563B;
    --ps-platinum: #DADADA;
    --ps-text-white: #ffffff;
    --ps-font: 'FF Neuwelt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ps-padding-x: clamp(20px, 6vw, 80px);
    --ps-section-gap: clamp(16px, 3vw, 50px);
    --ps-radius: 4px;
    --ps-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Footer değişkenleri */
    --bg-dark: #1E1E1C;
    --bg-light: #DADADA;
    --primary-cinnabar: #E0563B;
    --accent-yellow: #F6AE2D;
    --text-color: #ffffff;
    --main-font: 'FF Neuwelt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================
   Base (scoped to .ref-page)
   ============================================= */
.ref-page {
    font-family: var(--ps-font);
    background: var(--ps-platinum);
    color: var(--ps-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

.ref-page *,
.ref-page *::before,
.ref-page *::after {
    box-sizing: border-box;
}

.ref-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   Elementor / Tema container düzeltmesi
   Her bölüm full-width olur
   ============================================= */
.ref-page .ref-section {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--ps-platinum);
}

/* =============================================
   1. HERO / ANA GÖRSEL
   ============================================= */
.ref-hero {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 var(--ps-padding-x) clamp(12px, 2vw, 20px);
    background: var(--ps-platinum);
}

.ref-hero__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--ps-radius);
    background: var(--ps-platinum);
}

.ref-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
    border-radius: var(--ps-radius);
}

.ref-hero__image-wrapper:hover .ref-hero__image {
    transform: scale(1.03);
}

/* =============================================
   2. INTRO / BAŞLIK + AÇIKLAMA
   ============================================= */
.ref-intro {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: clamp(100px, 12vw, 180px) var(--ps-padding-x) clamp(40px, 6vw, 80px);
    background: var(--ps-platinum);
}

.ref-intro__container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

/* Label — müşteri adı / kategori */
.ref-intro__label {
    display: block;
    font-size: clamp(0.75rem, 1vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: clamp(12px, 2vw, 20px);
    color: var(--ps-black);
    border-left: 4px solid var(--ps-red);
    padding-left: 15px;
}

/* H1 Başlık */
.ref-intro__title {
    font-size: clamp(1.8rem, 4.5vw, 5.5rem);
    font-weight: 900;
    line-height: 1.3;
    color: var(--ps-red);
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

/* Açıklama metni */
.ref-intro__description {
    padding-top: 0;
}

.ref-intro__description p {
    font-size: clamp(0.9rem, 1.1vw, 1.15rem);
    line-height: 1.65;
    font-weight: 500;
    color: var(--ps-black);
    margin: 0 0 clamp(12px, 1.5vw, 20px);
}

.ref-intro__description p:last-child {
    margin-bottom: 0;
}

.ref-intro__description a {
    color: var(--ps-red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--ps-transition);
}

.ref-intro__description a:hover {
    border-bottom-color: var(--ps-red);
}

/* Heading container — label + title birleşik alan */
.ref-intro__heading {
    position: relative;
}

/* =============================================
   3. VİDEO
   ============================================= */
.ref-video {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 var(--ps-padding-x) var(--ps-section-gap);
    background: var(--ps-platinum);
}

.ref-video__container {
    width: 100%;
}

.ref-video__wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--ps-radius);
    overflow: hidden;
    background: #000;
    position: relative;
}

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

.ref-video__wrapper--native {
    aspect-ratio: auto;
}

.ref-video__wrapper--native video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--ps-radius);
}

/* =============================================
   4. GALERİ
   ============================================= */
.ref-gallery {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 var(--ps-padding-x) var(--ps-section-gap);
    background: var(--ps-platinum);
}

.ref-gallery__container {
    width: 100%;
}

.ref-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 2vw, 20px);
}

.ref-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--ps-radius);
    cursor: pointer;
    background: var(--ps-platinum);
    aspect-ratio: 16 / 9;
}

.ref-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: var(--ps-radius);
}

.ref-gallery__item:hover .ref-gallery__image {
    transform: scale(1.04);
}

/* Tek görselli galeri → tam genişlik */
.ref-gallery__grid .ref-gallery__item:only-child {
    grid-column: 1 / -1;
}

/* 2 görselli galeri → her biri tam genişlik (alt alta büyük) */
.ref-gallery__grid .ref-gallery__item:first-child:nth-last-child(2),
.ref-gallery__grid .ref-gallery__item:first-child:nth-last-child(2) ~ .ref-gallery__item {
    grid-column: 1 / -1;
}

/* =============================================
   5. INSTAGRAM REELS
   ============================================= */
.ref-instagram {
    width: 100vw !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 var(--ps-padding-x) 0;
    background: var(--ps-platinum);
}

.ref-instagram__container {
    width: 100%;
}

.ref-instagram__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 2vw, 20px);
    width: 100%;
}

.ref-instagram__item {
    width: 100%;
    background: #fff;
    border-radius: var(--ps-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-instagram__item .instagram-media {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--ps-radius) !important;
    border: none !important;
    margin: 0 !important;
}

/* =============================================
   6. NAVİGASYON (ref-instagram section'ı içinde)
   ============================================= */
.ref-navigation__container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--ps-black);
    padding: clamp(12px, 2vw, 20px) 0 clamp(24px, 3vw, 40px);
    margin-top: clamp(16px, 2.5vw, 30px);
}

.ref-navigation__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.75rem, 1.2vw, 1.2rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ps-black);
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.ref-navigation__link:hover {
    color: var(--ps-red);
}

.ref-navigation__arrow {
    font-size: 1.1em;
    transition: transform var(--ps-transition);
}

.ref-navigation__link--prev:hover .ref-navigation__arrow {
    transform: translateX(-4px);
}

.ref-navigation__link--next:hover .ref-navigation__arrow {
    transform: translateX(4px);
}

.ref-navigation__link--next {
    margin-left: auto;
}

/* =============================================
   7. LIGHTBOX
   ============================================= */
.ref-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

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

.ref-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ref-lightbox__close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.ref-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    line-height: 1;
}

.ref-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ref-lightbox__nav--prev {
    left: 24px;
}

.ref-lightbox__nav--prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.ref-lightbox__nav--next {
    right: 24px;
}

.ref-lightbox__nav--next:hover {
    transform: translateY(-50%) translateX(3px);
}

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

.ref-lightbox__image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--ps-radius);
    transition: opacity 0.25s ease;
}

.ref-lightbox__counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

/* Body overflow lock */
body.ref-lightbox-open {
    overflow: hidden;
}

/* =============================================
   RESPONSIVE – 1440px+
   ============================================= */
@media (min-width: 1440px) {
    .ref-intro__label,
    .ref-intro__container {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =============================================
   RESPONSIVE – ≤1279px
   ============================================= */
@media (max-width: 1279px) {
    .ref-intro__container {
        gap: 30px;
    }
}

/* =============================================
   RESPONSIVE – TABLET (≤1023px)
   ============================================= */
@media (max-width: 1023px) {
    .ref-intro__container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ref-intro__description {
        max-width: 680px;
    }

    .ref-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-instagram__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* =============================================
   RESPONSIVE – MOBİL (≤767px)
   ============================================= */
@media (max-width: 767px) {
    :root {
        --ps-padding-x: 24px;
    }

    .ref-intro {
        padding: 100px 24px 32px;
    }

    .ref-hero {
        padding: 0 24px 12px;
    }

    .ref-video {
        padding: 0 24px 16px;
    }

    .ref-gallery {
        padding: 0 24px 16px;
    }

    .ref-instagram {
        padding: 0 24px;
    }


    .ref-hero__image-wrapper {
        aspect-ratio: 3 / 2;
    }

    .ref-gallery__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ref-instagram__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ref-instagram__item {
        background: transparent;
    }

    .ref-navigation__container {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    .ref-navigation__link {
        justify-content: center;
    }

    .ref-navigation__link--next {
        margin-left: 0;
    }

    /* Lightbox mobil */
    .ref-lightbox__nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .ref-lightbox__nav--prev {
        left: 12px;
    }

    .ref-lightbox__nav--next {
        right: 12px;
    }

    .ref-lightbox__close {
        top: 12px;
        right: 12px;
    }
}

/* =============================================
   RESPONSIVE – KÜÇÜK MOBİL (≤600px)
   ============================================= */
@media (max-width: 600px) {
    .ref-intro {
        padding: 100px 16px 24px;
    }

    .ref-hero {
        padding: 0 16px 12px;
    }

    .ref-video {
        padding: 0 16px 12px;
    }

    .ref-gallery {
        padding: 0 16px 12px;
    }

    .ref-instagram {
        padding: 0 16px;
    }


    .ref-intro__title {
        line-height: 1.3;
        word-break: break-word;
        hyphens: auto;
    }

    .ref-hero__image-wrapper,
    .ref-video__wrapper {
        aspect-ratio: 4 / 3;
    }

    .ref-hero__image-wrapper {
        border-radius: 2px;
    }

    .ref-navigation__link {
        letter-spacing: 0;
    }
}

/* =============================================
   RESPONSIVE – LANDSCAPE MOBİL
   ============================================= */
@media (max-height: 500px) and (orientation: landscape) {
    .ref-intro {
        padding-top: 100px;
        padding-bottom: 24px;
    }

    .ref-intro__container {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .ref-hero {
        padding: 0 24px 12px;
    }

    .ref-video {
        padding: 0 24px 12px;
    }

    .ref-hero__image-wrapper {
        aspect-ratio: 21 / 9;
    }

    .ref-instagram__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================
   ANİMASYONLAR
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
    .ref-hero__image {
        animation: refFadeIn 0.8s ease-out both;
    }

    .ref-intro__label {
        animation: refSlideUp 0.6s ease-out 0.2s both;
    }

    .ref-intro__title {
        animation: refSlideUp 0.6s ease-out 0.35s both;
    }

    .ref-intro__description {
        animation: refSlideUp 0.6s ease-out 0.5s both;
    }
}

@keyframes refFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes refSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    .ref-page {
        background: #fff;
        color: #000;
    }

    .ref-lightbox,
    .ref-instagram {
        display: none !important;
    }

    .ref-intro__title {
        color: #000;
    }

    .ref-intro__description p {
        color: #333;
    }

    .ref-hero,
    .ref-video,
    .ref-gallery,
    .ref-intro,
    .ref-instagram {
        width: 100% !important;
        left: 0;
        transform: none;
    }
}
