/* ==========================================
   PROFILE PHOTO WRAPPER 
   ========================================== */
.kast-media-photo-wrap {
    position: relative;
    display: inline-block;
}

/* EDIT ICON (Your Original) */
.kast-media-edit {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #C09756;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: .3s;
}

.kast-media-edit:hover {
    transform: scale(1.1);
}

/* ==========================================
   POPUP STYLES
   ========================================== */
/* POPUP BACKGROUND */
.kast-media-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .85);
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

/* POPUP BOX */
.kast-media-box {
    background: #111;
    padding: 30px;
    border-radius: 12px;
    width: 420px;
    max-width: 95%;
}

/* CLOSE BUTTON */
.kast-media-close {
    float: right;
    cursor: pointer;
    font-size: 22px;
    color: #fff;
}

/* ==========================================
   PORTFOLIO GRID 
   ========================================== */
.kast-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.kast-portfolio-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
}

/* ==========================================
   AGENCY LOGO SPECIFIC FIXES (New Addition)
   ========================================== */

/* यह एजेंसी के लोगो वाले डिब्बे को सही करेगा */
#KAST_AGENCY_LOGO_WRAP {
    position: relative !important;
    display: block !important; /* Flexbox को बंद करने के लिए */
    width: 100% !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    line-height: 0;
}

/* एजेंसी इमेज को पूरे डिब्बे में फिट करने के लिए */
#KAST_AGENCY_LOGO_WRAP img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important; /* अगर कोई रेडियस है तो उसे हटाने के लिए */
}

/* नया प्रोफेशनल "Change Photo" बटन जो हर फोटो पर दिखेगा */
.kast-pro-edit-btn {
    position: absolute !important;
    bottom: 15px !important;
    left: 15px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #D4AF37 !important;
    padding: 8px 15px !important;
    border: 1px solid #D4AF37 !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(4px);
}

.kast-pro-edit-btn:hover {
    background: #D4AF37 !important;
    color: #000 !important;
}

/* ==========================================
   PORTFOLIO GALLERY STYLES
   ========================================== */
.kast-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kast-gal-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #333;
    cursor: pointer;
}

.kast-gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.kast-gal-item img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* पोर्टफोलियो ऐड बटन */
.kast-add-portfolio-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #111;
    color: #D4AF37;
    border: 1px dashed #D4AF37;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    transition: 0.3s;
}

.kast-add-portfolio-btn:hover {
    background: #D4AF37;
    color: #000;
}
/* पोर्टफोलियो ग्रिड और होवर (Zoom Lens) */
.kast-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
.kast-gal-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #222;
}
.kast-gal-item img {
    width: 100%; height: 100%; object-fit: cover;
    display: block; cursor: zoom-in; /* Zoom Lens आइकॉन के लिए */
    transition: 0.3s ease;
}
.kast-gal-item img:hover { transform: scale(1.05); filter: brightness(1.1); }

/* GOLDEN LIGHTBOX (बड़ी फोटो दिखाने के लिए) */
#kastImagePopup {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 99999999;
    justify-content: center; align-items: center; cursor: pointer;
}
#kastPopupImg {
    max-width: 90%; max-height: 85vh;
    border: 3px solid #D4AF37; /* गोल्डन बॉर्डर जैसा स्क्रीनशॉट में है */
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,1);
    cursor: default; /* फोटो पर क्लिक करने से बंद न हो */
}

/* UPLOAD BUTTON */
.kast-add-portfolio-btn {
    display: inline-block; padding: 12px 20px; background: transparent;
    color: #D4AF37; border: 1px dashed #D4AF37; border-radius: 6px;
    font-size: 11px; font-weight: bold; text-transform: uppercase;
    cursor: pointer; margin-top: 15px;
}
/* पोर्टफोलियो टाइटल को वाइट करना */
.kast-gal-title {
    color: #ffffff !important;
    font-size: 18px !important;
    text-transform: uppercase;
}

/* ग्रिड को 3 कॉलम में फिक्स करना */
.kast-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 फोटो प्रति लाइन */
    gap: 15px !important;
}

/* डिलीट बटन (Instagram Style) */
.kast-gal-item { position: relative; }

.kast-delete-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.85);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    font-weight: bold;
    opacity: 0;
    transition: 0.3s;
}

.kast-gal-item:hover .kast-delete-photo {
    opacity: 1; /* माउस ले जाने पर दिखेगा */
}