/* Ana konteyner: Üç sütunu yan yana tutar ve yüksekliği eşitler */
.pGaleri-mektup {
    display: flex;
    flex-direction: row;
    align-items: stretch; 
    justify-content: center;
    gap: 15px;
    margin: 20px auto;
    width: 100%;
    max-width: 1080px; /* Genişlik: 250_thumb + 15_gap + 500_main + 15_gap + 250_info */
    box-sizing: border-box;
    min-height: 100%; 
}
/* Sol Wrapper (A+D): Thumbnail'ler ve Sol Ok */
.pGaleri-mektup .pGaleri-images-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Ok sağa yaslansın */
    width: 250px;
    flex-shrink: 0; /* Küçülmesin */
    min-height: 100%;
}
/* Küçük resimler (thumbs) - A */
.pGaleri-mektup .pGaleri-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 50px;   
    box-sizing: border-box;
    overflow-y: auto; /* Çok fazla thumb varsa scroll */
    max-height: 470px; /* thumblarda kaçıncıdan sonra scroll çıkar 
                         470px/58px = 9.dan itibaren  */ 
    scrollbar-width: thin;                    
    scrollbar-color: #c4161c  #e0e0e0;  /* thumb (tutamaç), track (bg) */
}
/* webkit sacmaligi */
.pGaleri-mektup .pGaleri-images::-webkit-scrollbar {
    width: 5px;  /* Dikey scrollbar genişliği */
    height: 5px; /* Yatay scrollbar yüksekliği (mobil için önemli) */
}
.pGaleri-mektup .pGaleri-images::-webkit-scrollbar-track {
    background: #e0e0e0; 
    border-radius: 3px; 
}
.pGaleri-mektup .pGaleri-images::-webkit-scrollbar-thumb {
    background-color: #c4161c;  
    border-radius: 3px;   
}
.pGaleri-mektup .pGaleri-images::-webkit-scrollbar-thumb:hover {
    background-color: #a01015; /* Hoverda biraz daha koyu */
}
/* webkit sacmaligi bitti */

.pGaleri-mektup .pGaleri-images .pGaleri-thumb {
    display: block;
    width: 100%; 
    height: auto; 
    max-height: 50px; 
    object-fit: cover; /* Tasanlari kırp */
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.pGaleri-mektup .pGaleri-images .pGaleri-thumb.active { border-color: #c4161c; }
/* Sol Ok - D */
.pGaleri-mektup .pGaleri-solok {
    width: 100%;
    text-align: right;
    margin-top: auto;
    padding-top: 10px; 
}
/* Orta Sütun Wrapper (B+E): Ana Fotoğraf ve Alt Metin */
.pGaleri-mektup .pGaleri-center-column {
    display: flex;
    flex-direction: column;
    width: 500px; /* Sabit genislik - muşteri istegi */
    flex-shrink: 0;
    gap: 10px;
    box-sizing: border-box;
    min-height: 100%;
}
/* Ana fotoğraf konteyneri  */
.pGaleri-mektup .pGaleri-main-container {
    display: flex;
    position: relative;
    align-items: center;
    width: 100%;
    height: 400px; /* Sabit yükseklik - müşteri isteği */
    box-sizing: border-box;
}
/* Ana fotoğraf alanı - B */
.pGaleri-mektup .pGaleri-main {
    display: flex;
    width: 100%;
    height: 100%;
   align-items: flex-start;
    justify-content: center; 
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    background-color: none;
}
.pGaleri-mektup .pGaleri-main img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
}
/* Yeni Eklenen OK navigasyonu */
.pGaleri-mektup .pGaleri-main-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.7);
    color: #c4161c;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.pGaleri-mektup .pGaleri-main-nav.pGaleri-prev {left: 10px;}
.pGaleri-mektup .pGaleri-main-nav.pGaleri-next {right: 10px;}
.pGaleri-mektup .pGaleri-main-nav:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
/* Fotoğraf Alt Metin Alanı - E */
.pGaleri-mektup .pGaleri-main-alt {
    width: 100%;
    padding: 10px;
    background-color: #e7e7e7;
    border: 1px solid #ddd;
    box-sizing: border-box;
    font-size: 0.9em;
    line-height: 1.4;
    word-wrap: break-word; 
}
/* Sağ Wrapper (C+F): Bilgi Alanı ve Sağ Ok */
.pGaleri-mektup .pGaleri-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    width: 250px; 
    flex-shrink: 0;
    min-height: 100%;
}
/* Bilgi alanı - C */
.pGaleri-mektup .pGaleri-info {
    width: 100%;
    height: auto;  
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto; 
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #e7e7e7;
    box-sizing: border-box;
    font-size: 0.95em;
    line-height: 1.4;
}
/* Sağ Ok - F */
.pGaleri-mektup .pGaleri-sagok {
    width: 100%;
    text-align: left;
    margin-top: auto; 
    padding-top: 10px; 
}
/* Görsel Açıklaması */
.pGaleri-mektup .pGaleri-description {
    word-wrap: break-word;  
    padding-bottom: 10px;  
}
.pGaleri-mektup .pGaleri-description:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.pGaleri-mektup .pGaleri-description img { 
    max-width: 100%;
    height: auto;
    margin-top: 5px;
}
/* Statik Meta Bilgiler */
.pGaleri-mektup .pGaleri-meta-static p {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    word-wrap: break-word;     
}
.pGaleri-mektup .pGaleri-meta-static p:last-child { margin-bottom: 0;}
.pGaleri-mektup .pGaleri-meta-static p strong {
    display: inline-block;
    min-width: 60px; 
    margin-right: 3px;
    font-weight: bold;
}
.pGaleri-mektup .pGaleri-meta-static a {
    word-break: break-all; 
    color: #c4161c; 
    text-decoration: underline;
}
.pGaleri-mektup .pGaleri-meta-static a:hover {text-decoration: none;}
/* Navigasyon Okları (Shortcode'dan gelen) */
.pGaleri-mektup .piraye-nav-link {
    font-size: 0.9em;
    color: #c4161c; 
    text-decoration: none;
    line-height: 1.3;
    padding: 5px 8px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    display: inline-block;
    border: 1px solid transparent;
}
.pGaleri-mektup .piraye-nav-link:hover {
    background-color: rgba(200, 200, 200, 0.2);
    border-color: #ccc;
}
/* Lightbox Stilleri
------------------------------------------------------- */
#acilGan {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); 
    display: none; /* JS ile acilacak */
    align-items: center;
    justify-content: center;
    z-index: 99999; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
}
#acilGan.visible { 
    display: flex;
    opacity: 1;
}
#acilGan img {
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 92%; 
    max-height: 92%;
    display: block;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
#acilGan .close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
#acilGan .prev,
#acilGan .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    padding: 15px 20px;
    user-select: none; 
    transition: background-color 0.2s ease;
    background: rgba(0,0,0,0.3); 
    border-radius: 5px;
}
#acilGan .prev:hover,
#acilGan .next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
#acilGan .prev {left: 15px;}
#acilGan .next {right: 15px;}

/* Mobil Görünüm (max-width: 767px)
_________________________________________________________________ */
@media (max-width: 767px) {
    .pGaleri-mektup {
        flex-direction: column; 
        max-width: 100%;
        gap: 10px;
        align-items: stretch; 
        min-height: auto;
        margin: 10px auto;
    }
    /* 1. Orta Sütun (Ana Resim + Alt Metin) */
    .pGaleri-mektup .pGaleri-center-column {
        order: 1; 
        width: 100%;
        gap: 8px;
        min-height: auto;
    }
    .pGaleri-mektup .pGaleri-main-container {
        height: 300px; /* Mobilde daha kisa yukseklik */
    }
    .pGaleri-mektup .pGaleri-main {
        min-height: auto;
        border: none;
        background-color: transparent;
    }
    .pGaleri-mektup .pGaleri-main img {max-height: 100%; }
    .pGaleri-mektup .pGaleri-main-alt {
        font-size: 0.85em;
        padding: 8px;
        border: none;
        background-color: #e7e7e7;
        width: calc(100% - 16px); /* Padding'i dus */
        margin: 0 auto; 
    }
    /* Navigasyon oklar mobilde */
    .pGaleri-mektup .pGaleri-main-nav {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    .pGaleri-mektup .pGaleri-main-nav.pGaleri-prev {left: 5px;}
    .pGaleri-mektup .pGaleri-main-nav.pGaleri-next {right: 5px;}
    /* 2. Thumbnail Alanı */
    .pGaleri-mektup .pGaleri-images-wrapper {
        order: 2; /* İkinci siraya */
        width: 100%;
        flex-direction: column; 
        align-items: stretch; 
        gap: 10px;
        padding: 10px 0;
    }
    .pGaleri-mektup .pGaleri-images {
        display: flex;
        flex-direction: row; 
        overflow-x: auto; 
        overflow-y: hidden; 
        white-space: nowrap;
        gap: 8px; 
        width: 100%; 
        max-height: 100px; 
        padding: 5px 10px; 
        box-sizing: border-box;        
    }        
    .pGaleri-mektup .pGaleri-images .pGaleri-thumb {
        display: inline-block; 
        width: auto; 
        height: 70px; 
        max-width: none; 
        max-height: 70px; 
        object-fit: cover;
        vertical-align: top; 
        border: 2px solid transparent;
    }
    .pGaleri-mektup .pGaleri-images .pGaleri-thumb.active {border-color: #c4161c; }
    .pGaleri-mektup .pGaleri-solok,
    .pGaleri-mektup .pGaleri-sagok {display: none; }
    /* 3. Bilgi Alanı */
    .pGaleri-mektup .pGaleri-info-wrapper {
        order: 3; /* Üçüncü sıraya */
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        padding: 0; 
    }
    .pGaleri-mektup .pGaleri-info {
        width: calc(100% - 16px); 
        margin: 10px auto 0 auto; 
        max-height: none; 
        font-size: 0.85em;
        padding: 8px;
        border: none;
        background-color: #e7e7e7;
        overflow-y: visible; /* Scroll yok */
    }
    .pGaleri-mektup .pGaleri-meta-static p strong { min-width: 70px; } /* Mobilde etiket genisligi */
    /* Lightbox mobil */
    #acilGan img { max-width: 95%; max-height: 95%; }
    #acilGan .close { font-size: 30px; top: 10px; right: 15px;}
    #acilGan .prev, #acilGan .next { font-size: 30px; padding: 10px 15px;}
    #acilGan .prev {left: 10px;} #acilGan .next {right: 10px;}
}