/* =============================================
   MASONRY PINTEREST LAYOUT - ÖZLEM YİĞİT
   ============================================= */

/* FİLTRE BÖLÜMÜ */
.filter-section {
    position: sticky;
    top: 95px;
    background: white;
    padding: 20px 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.filter-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 1px solid #E0E0E0;
    color: #666;
    font-size: 0.9em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Helvetica', sans-serif;
    text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2C2C2C;
    color: white;
    border-color: #2C2C2C;
}

/* MASONRY GRID */
.masonry-section {
    padding: 40px 5% 80px;
    background: #FAFAFA;
    margin-top: 0;
}

.masonry-grid {
    max-width: 1600px;
    margin: 0 auto;
    column-count: 4;
    column-gap: 20px;
}

.masonry-item {
    background: white;
    margin-bottom: 20px;
    break-inside: avoid;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

.masonry-item.hidden {
    display: none !important;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.masonry-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 18px;
    color: white;
    font-size: 0.85em;
    letter-spacing: 1.8px;
    font-family: 'Helvetica', sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
}

.masonry-image {
    position: relative;
    overflow: hidden;
}

.masonry-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-item:hover .masonry-image img {
    transform: scale(1.05);
}

.media-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 12px;
    font-size: 0.8em;
    border-radius: 15px;
    font-family: 'Helvetica', sans-serif;
}

.masonry-content {
    padding: 20px;
}

.masonry-content h3 {
    font-size: 1.2em;
    color: #2C2C2C;
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.masonry-content p {
    font-size: 0.95em;
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
    font-family: 'Helvetica', sans-serif;
}

.masonry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #999;
    font-family: 'Helvetica', sans-serif;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
}

.masonry-meta .likes {
    color: #C19882;
}

/* =============================================
   MODAL POPUP - DÜZELTİLMİŞ VERSİYON
   ============================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    position: relative;
    background: white;
    max-width: 900px;
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
    margin: auto;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(44, 44, 44, 0.8);
    color: white;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 4px;
}

.modal-close:hover {
    background: #C19882;
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(44, 44, 44, 0.8);
    color: white;
    border: none;
    font-size: 2em;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-nav:hover {
    background: #C19882;
}

.modal-prev {
    left: -60px;
}

.modal-next {
    right: -60px;
}

.modal-content {
    padding: 40px;
}

.modal-images {
    margin-bottom: 30px;
    margin-left: -40px;
    margin-right: -40px;
    overflow: hidden;
}

.modal-image-container {
    position: relative;
}

.modal-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 0 40px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CCC;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #C19882;
    width: 25px;
    border-radius: 4px;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-badge {
    display: inline-block;
    padding: 6px 15px;
    color: white;
    font-size: 0.75em;
    letter-spacing: 1.5px;
    font-family: 'Helvetica', sans-serif;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 2em;
    color: #2C2C2C;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: 1px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #999;
    font-family: 'Helvetica', sans-serif;
}

.modal-body {
    font-size: 1.1em;
    line-height: 2;
    color: #666;
    font-family: 'Helvetica', sans-serif;
    white-space: pre-wrap;
}

.modal-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #F0F0F0;
}

.modal-instagram-link {
    display: inline-block;
    padding: 12px 30px;
    background: #2C2C2C;
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    letter-spacing: 1px;
    transition: all 0.3s;
    font-family: 'Helvetica', sans-serif;
    text-transform: uppercase;
}

.modal-instagram-link:hover {
    background: #C19882;
}

/* =============================================
   RESPONSIVE - DÜZELTİLMİŞ
   ============================================= */

@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .filter-section {
        top: 85px;
        padding: 15px 0;
    }
    
    .masonry-section {
        padding: 80px 5% 60px;
    }
        column-count: 2;
        column-gap: 15px;
    }
    
    .masonry-item {
        margin-bottom: 15px;
    }
    
    .filter-container {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85em;
    }
    
    /* MODAL - TABİLET */
    .modal-overlay {
        padding: 20px 15px;
    }
    
    .modal-content {
        padding: 60px 25px 25px 25px;
    }
    
    .modal-images {
        margin-left: -25px;
        margin-right: -25px;
    }
    
    .modal-carousel-dots {
        padding: 0 25px;
    }
    
    .modal-title {
        font-size: 1.6em;
    }
    
    .modal-body {
        font-size: 1em;
        line-height: 1.8;
    }
    
    .modal-nav {
        width: 44px;
        height: 44px;
        font-size: 1.6em;
    }
    
    .modal-prev {
        left: -54px;
    }
    
    .modal-next {
        right: -54px;
    }
}

@media (max-width: 640px) {
    /* MODAL - MOBİL */
    .modal-overlay {
        padding: 15px 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        padding: 55px 20px 20px 20px;
    }
    
    .modal-images {
        margin-left: -20px;
        margin-right: -20px;
    }
    
    .modal-carousel-dots {
        padding: 0 20px;
        gap: 6px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
    
    .carousel-dot.active {
        width: 20px;
    }
    
    .modal-title {
        font-size: 1.4em;
        letter-spacing: 0.5px;
    }
    
    .modal-body {
        font-size: 0.95em;
        line-height: 1.7;
    }
    
    .modal-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85em;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.4em;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
        font-size: 1.5em;
    }
    
    .modal-instagram-link {
        display: block;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .filter-section {
        top: 75px;
        padding: 12px 0;
    }
    
    .masonry-section {
        padding: 70px 5% 60px;
    }
    
    /* MODAL - KÜÇÜK EKRAN */
    .modal-overlay {
        padding: 10px 5px;
        padding-top: 15px;
    }
    
    .modal-container {
        max-width: 100%;
    }
    
    .modal-content {
        padding: 50px 15px 15px 15px;
    }
    
    .modal-images {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .modal-carousel-dots {
        padding: 0 15px;
    }
    
    .modal-title {
        font-size: 1.25em;
    }
    
    .modal-body {
        font-size: 0.9em;
    }
    
    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1.2em;
    }
    
    .modal-prev {
        left: 8px;
    }
    
    .modal-next {
        right: 8px;
    }
}

/* =============================================
   LANDSCAPE MODE - Yatay telefon için
   ============================================= */
@media (max-width: 900px) and (max-height: 500px) {
    .modal-overlay {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .modal-content {
        padding: 45px 20px 20px 20px;
    }
    
    .modal-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    .modal-body {
        font-size: 0.9em;
        line-height: 1.6;
    }
    
    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1.3em;
    }
}

/* =============================================
   MODAL RESPONSİVE DÜZELTMESİ
   masonry.css dosyasına EKLE veya DEĞİŞTİR
   ============================================= */

/* Modal overlay */
.modal-overlay {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Modal overlay scrollbar - Estetik */
.modal-overlay::-webkit-scrollbar {
    width: 8px;
}

.modal-overlay::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-overlay::-webkit-scrollbar-thumb {
    background: #C19882;
    border-radius: 4px;
}

.modal-overlay::-webkit-scrollbar-thumb:hover {
    background: #D4AF8E;
}

/* Modal container düzeltmesi */
.modal-container {
    position: relative;
    background: white;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
    margin: auto;
}

/* Modal container scrollbar - Estetik */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.modal-container::-webkit-scrollbar-thumb {
    background: #C19882;
    border-radius: 3px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: #D4AF8E;
}

/* Modal görseller */
.modal-images {
    margin-bottom: 30px;
    margin-left: 0;
    margin-right: 0;
    overflow: hidden;
    width: 100%;
}

.modal-image-container {
    position: relative;
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

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

/* Modal content padding */
.modal-content {
    padding: 40px;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-body {
    font-size: 1.05em;
    line-height: 2;
    color: #666;
    font-family: 'Helvetica', sans-serif;
    white-space: pre-wrap;
}

/* TABLET (768px - 1024px) */
@media (max-width: 1024px) {
    .modal-container {
        width: 85%;
        max-height: 85vh;
    }
    
    .modal-image-container {
        max-height: 50vh;
    }
    
    .modal-image-container img {
        max-height: 50vh;
    }
    
    .modal-content {
        padding: 35px 30px;
    }
}

/* MOBİL (640px - 768px) */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 15px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-image-container {
        max-height: 40vh;
    }
    
    .modal-image-container img {
        max-height: 40vh;
        object-fit: cover;
    }
    
    .modal-content {
        padding: 60px 25px 25px 25px;
    }
    
    .modal-title {
        font-size: 1.4em;
        letter-spacing: 0.5px;
    }
    
    .modal-body {
        font-size: 0.95em;
        line-height: 1.8;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.4em;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
        font-size: 1.6em;
    }
}

/* MOBİL KÜÇÜK (480px - 640px) */
@media (max-width: 640px) {
    .modal-container {
        width: 98%;
    }
    
    .modal-image-container {
        max-height: 35vh;
    }
    
    .modal-image-container img {
        max-height: 35vh;
    }
    
    .modal-content {
        padding: 55px 20px 20px 20px;
    }
    
    .modal-title {
        font-size: 1.25em;
    }
    
    .modal-body {
        font-size: 0.9em;
        line-height: 1.7;
    }
}

/* ÇOK KÜÇÜK EKRAN (360px - 480px) */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
        padding-top: 15px;
    }
    
    .modal-container {
        width: 100%;
        max-height: 92vh;
    }
    
    .modal-image-container {
        max-height: 30vh;
    }
    
    .modal-image-container img {
        max-height: 30vh;
    }
    
    .modal-content {
        padding: 50px 15px 15px 15px;
    }
    
    .modal-title {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .modal-body {
        font-size: 0.88em;
        line-height: 1.6;
    }
    
    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1.2em;
    }
    
    .modal-prev {
        left: 8px;
    }
    
    .modal-next {
        right: 8px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
        font-size: 1.4em;
    }
}

/* LANDSCAPE MODE - Yatay telefon */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .modal-overlay {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .modal-container {
        max-height: 95vh;
    }
    
    .modal-image-container {
        max-height: 50vh;
    }
    
    .modal-image-container img {
        max-height: 50vh;
        object-fit: contain;
    }
    
    .modal-content {
        padding: 45px 20px 20px 20px;
    }
    
    .modal-body {
        font-size: 0.9em;
        line-height: 1.6;
    }
}