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

/* SEO: görsel olarak gizli ama arama motorlarına görünür (screen-reader friendly) */
.seo-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #f6f5f0;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', 'Architects Daughter', sans-serif;
}

#scrapbook {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.section {
    position: relative;
    width: 100%;
    height: 100vh;
    /* overflow: hidden; removed so backgrounds can bleed into each other */
}

.bg-image {
    position: absolute;
    top: -5vh;
    left: 0;
    width: 100%;
    height: 110vh;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
}

/* Tape on the bottom of the background */
.bottom-tape {
    display: none; /* Gizlendi (Hidden as requested) */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    z-index: 5;
    transform: rotate(-0.5deg);
}

/* Layout for the 2 photos per background */
.photos-layout {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    position: relative;
    z-index: 10;
    padding: 10vh 6vw; 
    /* Scroll'un boşluklarda da çalışması için events'i kapat, fotoğrafın kendi açılacak */
    pointer-events: none;
}

/* Parallax container handles the scroll shift */
.parallax-container {
    display: flex;
    position: relative;
    pointer-events: auto; /* Fotoğraf kutusunu barındıran kapsayıcı tıklamayı aktarır */
}

/* 1st image: Upper Left */
.parallax-container:nth-child(1) {
    margin-bottom: 25vh; /* Pushes the first photo gently towards the upper half */
}

/* 2nd image: Lower Right */
.parallax-container:nth-child(2) {
    margin-top: 25vh; /* Pushes the second photo gently towards the lower half */
}

/* The actual photo styling */
.photo-wrapper {
    position: relative;
    width: 290px;
    background-color: #fdfbf7;
    padding: 18px 18px 55px 18px;
    border-radius: 6px;
    pointer-events: auto;
    
    box-shadow: 
        0px 2px 4px rgba(0, 0, 0, 0.1), 
        2px 15px 25px -5px rgba(0, 0, 0, 0.25), 
        inset 0 0 10px rgba(0, 0, 0, 0.02);
    
    /* Initial state (invisible until visible class added) */
    opacity: 0;
    transform: translateY(60px) rotate(0deg) scale(0.95);
}

.photo-wrapper::after {
    display: none;
}

.photo-wrapper.visible {
    /* Giriş animasyonu + yavaş süzülme animasyonu (tente lambaları gibi) */
    animation: photoFadeIn 0.7s ease-out forwards, slowPhotoSway 16s 0.7s infinite alternate ease-in-out;
}

@keyframes photoFadeIn {
    from { opacity: 0; transform: translateY(60px) rotate(0deg) scale(0.95); }
    to   { opacity: 1; transform: translateY(var(--baseY)) rotate(var(--rot)) scale(var(--scale)); }
}

@keyframes slowPhotoSway {
    0%   { transform: translateY(var(--baseY)) rotate(calc(var(--rot) - 2.5deg)) scale(var(--scale)); }
    100% { transform: translateY(calc(var(--baseY) - 24px)) rotate(calc(var(--rot) + 2.5deg)) scale(var(--scale)); }
}

.photo-image {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
    border-radius: 1px;
}

/* Fotoğraf Altı Bilgi Alanı (Time and Description container) */
.photo-info {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Saat Metni */
.photo-time {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 1.1rem;
    color: #888; /* Saati biraz daha silik/ikincil yaptık */
    font-weight: bold;
    opacity: 0.8;
}

/* Açıklama Metni (Description) */
.photo-desc {
    text-align: center;
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    font-size: 1.3rem;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
    padding: 0 5px;
}

/* Tarih Şeridi (Date Ribbon) */
.date-ribbon-wrapper {
    position: absolute;
    top: 6vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: none;
}

.date-ribbon {
    background-color: #e74c3c;
    color: #fff;
    padding: 12px 45px;
    font-size: 1.8rem;
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    border-radius: 3px;
    box-shadow: 2px 8px 15px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0,0,0,0.1);
    transform: rotate(-2deg);
    /* Yırtık bant efekti maskesi (Washi tape edges) */
    mask-image: repeating-linear-gradient(
        45deg,
        black 0%,
        black 10px,
        rgba(0,0,0,0.8) 10px,
        rgba(0,0,0,0.8) 12px
    );
    -webkit-mask-image: repeating-linear-gradient(
        45deg,
        black 0%,
        black 10px,
        rgba(0,0,0,0.8) 10px,
        rgba(0,0,0,0.8) 12px
    );
}

/* Realistic Push Pin */
.pin {
    position: absolute;
    top: 14px; /* Scaled perfectly for the new thick padding */
    left: 50%;
    transform: translateX(-50%);
    width: 18px; /* Slightly larger pin for the bigger photo */
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 4px 4px, #fbd2d2, #e74c3c 40%, #c0392b);
    box-shadow: 
        2px 4px 6px rgba(0, 0, 0, 0.4),
        inset -2px -3px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Pin needle shadow */
.pin::after { 
    content: '';
    position: absolute;
    top: 14px;
    left: 9px;
    width: 2px;
    height: 15px;
    background: rgba(0, 0, 0, 0.3);
    transform: rotate(35deg);
    transform-origin: top left;
    filter: blur(1px);
    z-index: -1;
}

/* Pin highlight */
.pin::before { 
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    filter: blur(0.5px);
}

/* Rastgele Çiçek Süslemeleri (Flower Stickers) */
.flower-sticker {
    position: absolute;
    width: 480px; 
    height: auto;
    z-index: 40; 
    pointer-events: none;
    /* Gölgeler kaldırıldı (Ciddi performans artışı sağlar) */
    will-change: transform;
    /* Aşırı yavaş süzülme animasyonu */
    animation: slowFlowerSway 10s infinite alternate ease-in-out;
}

@keyframes slowFlowerSway {
    0% {
        transform: translate(var(--tx), var(--ty)) rotate(calc(var(--rot) - 3deg)) scaleX(var(--faceFlip, 1)) scale(var(--scale));
    }
    100% {
        transform: translate(var(--tx), calc(var(--ty) - 25px)) rotate(calc(var(--rot) + 3deg)) scaleX(var(--faceFlip, 1)) scale(var(--scale));
    }
}

/* Kelebek Animasyonu (Butterfly Animation) */
.butterfly-wrapper {
    position: absolute; /* Ekranda sabit durmaz, sayfayla (section) birlikte kayar! */
    z-index: 50;
    pointer-events: none;
    will-change: transform;
}



.butterfly-anim {
    width: 200px; 
    height: auto;
    /* filter: drop-shadow KESİNLİKLE kaldırıldı. Sürekli hareket eden objelerde gölge FPS katilidir! */
    animation: flutterRotate 2.5s ease-in-out infinite;
}

/* Sola dönüş negatif derecedir. 70'te başlar, 100 ile 40 arasında gidip gelir */
@keyframes flutterRotate {
    0%   { transform: rotate(-70deg); }
    25%  { transform: rotate(-100deg); }
    75%  { transform: rotate(-40deg); }
    100% { transform: rotate(-70deg); }
}

@media (max-width: 768px) {
    .butterfly-anim {
        width: 130px; /* Mobilde de biraz daha belirgin hale getirildi */
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .photo-wrapper {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .photos-layout {
        flex-direction: column;
        justify-content: space-evenly; /* Stack them evenly */
        padding: 8vh 5vw;
    }
    
    .parallax-container:nth-child(1),
    .parallax-container:nth-child(2) {
        align-self: center; /* Center them on mobile so they don't look broken */
        margin-top: 0;
        margin-bottom: 0;
    }

    .photo-wrapper {
        width: 80vw; /* Keep it nice and visible on mobile */
        padding: 12px 12px 40px 12px;
    }
}

/* --- Lightbox Modal --- */
#lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox .photo-wrapper {
    width: 80vw;
    max-width: 600px;
    transform: none !important; /* Animasyonları ezer */
    opacity: 1 !important;
    padding: 25px 25px 80px 25px; /* Daha büyük polaroid hissi */
    border-radius: 8px;
    box-shadow: 5px 20px 50px rgba(0,0,0,0.5);
    cursor: default;
}

#lightbox .photo-time { font-size: 1.4rem; }
#lightbox .photo-desc { font-size: 1.8rem; }
#lightbox .pin { top: 18px; width: 22px; height: 22px; }
#lightbox .pin::after { top: 18px; left: 11px; height: 18px; }

/* Kağıttan Oklar (Paper Arrows) */
.paper-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background-color: #fdfbf7;
    border-radius: 4px;
    box-shadow: 2px 5px 15px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    /* Yırtık kağıt görünümü */
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2,5 Q5,0 10,5 T20,2 T30,5 T40,2 T50,5 T60,2 T70,5 T80,2 T90,5 T98,2 L98,95 Q95,100 90,95 T80,98 T70,95 T60,98 T50,95 T40,98 T30,95 T20,98 T10,95 T2,98 Z'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2,5 Q5,0 10,5 T20,2 T30,5 T40,2 T50,5 T60,2 T70,5 T80,2 T90,5 T98,2 L98,95 Q95,100 90,95 T80,98 T70,95 T60,98 T50,95 T40,98 T30,95 T20,98 T10,95 T2,98 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
}

.paper-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 4px 10px 25px rgba(0,0,0,0.5);
}

.paper-arrow svg {
    width: 35px;
    height: 35px;
    filter: drop-shadow(1px 2px 1px rgba(0,0,0,0.2));
}

#lb-prev { left: 4vw; }
#lb-next { right: 4vw; }

/* Kaydırma Animasyonları (Slide) */
.slide-next-out { animation: slideNextOut 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-next-in { animation: slideNextIn 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-prev-out { animation: slidePrevOut 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1); }
.slide-prev-in { animation: slidePrevIn 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1); }

@keyframes slideNextOut {
    to { transform: translateX(-100vw) rotate(-10deg); opacity: 0; }
}
@keyframes slideNextIn {
    from { transform: translateX(100vw) rotate(10deg); opacity: 0; }
    to { transform: translateX(0) rotate(0deg); opacity: 1; }
}
@keyframes slidePrevOut {
    to { transform: translateX(100vw) rotate(10deg); opacity: 0; }
}
@keyframes slidePrevIn {
    from { transform: translateX(-100vw) rotate(-10deg); opacity: 0; }
    to { transform: translateX(0) rotate(0deg); opacity: 1; }
}

@media (max-width: 768px) {
    #lightbox .photo-wrapper { 
        width: 75vw; /* Telefonda çok daha küçük ve kibar */
        padding: 10px 10px 40px 10px; 
        border-radius: 4px;
    }
    #lightbox .photo-time { font-size: 1rem; }
    #lightbox .photo-desc { font-size: 1.3rem; }
    
    .paper-arrow { width: 40px; height: 40px; }
    .paper-arrow svg { width: 18px; height: 18px; }
    
    #lb-prev { left: 3vw; }
    #lb-next { right: 3vw; }
    
    /* Telefondaki Çarpı Butonu boyutu */
    #lb-close {
        top: 2vh !important;
        right: 3vw !important;
        width: 40px;
        height: 40px;
    }
}