/* Existing Modal Styles... */

/* Portfolio Modal Styles */
.portfolio-modal .modal-dialog {
    max-width: 900px;
}

.portfolio-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.portfolio-modal .modal-header {
    border: none;
    padding: 20px 30px;
    background: #f9f9f9;
}

.portfolio-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.portfolio-modal .modal-body {
    padding: 0;
}

.portfolio-modal .modal-img-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.portfolio-modal .modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Keeps entire image visible */
    transition: transform 0.3s ease;
}

.portfolio-modal .modal-text-wrapper {
    padding: 40px;
    background: #fff;
}

.portfolio-modal .modal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-modal .modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.portfolio-modal .project-meta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.portfolio-modal .meta-item {
    margin-bottom: 10px;
}

.portfolio-modal .meta-item strong {
    color: #333;
    margin-right: 10px;
}

/* =========================================
   Aesthetic Photo Collage Grid Styles
   ========================================= */
.photo-collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for flexibility */
    grid-auto-rows: 250px;
    /* Fixed row height base */
    gap: 15px;
    padding: 20px 0;
}

.collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the grid area */
    transition: transform 0.5s ease;
}

/* Hover Effects */
.collage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.collage-item:hover img {
    transform: scale(1.05);
}

/* Specific Grid Spans for "Masonry" Look */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.item-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.item-standard {
    grid-column: span 1;
    grid-row: span 1;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .photo-collage-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    /* Reset spans for tablet to be simpler or keep them if they fit */
    .item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Existing Modal Styles... */

/* Portfolio Modal Styles */
.portfolio-modal .modal-dialog {
    max-width: 900px;
}

.portfolio-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.portfolio-modal .modal-header {
    border: none;
    padding: 20px 30px;
    background: #f9f9f9;
}

.portfolio-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.portfolio-modal .modal-body {
    padding: 0;
}

.portfolio-modal .modal-img-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.portfolio-modal .modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Keeps entire image visible */
    transition: transform 0.3s ease;
}

.portfolio-modal .modal-text-wrapper {
    padding: 40px;
    background: #fff;
}

.portfolio-modal .modal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-modal .modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.portfolio-modal .project-meta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.portfolio-modal .meta-item {
    margin-bottom: 10px;
}

.portfolio-modal .meta-item strong {
    color: #333;
    margin-right: 10px;
}

/* =========================================
   Aesthetic Photo Collage Grid Styles
   ========================================= */
.photo-collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for flexibility */
    grid-auto-rows: 250px;
    /* Fixed row height base */
    gap: 15px;
    padding: 20px 0;
}

.collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the grid area */
    transition: transform 0.5s ease;
}

/* Hover Effects */
.collage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.collage-item:hover img {
    transform: scale(1.05);
}

/* Specific Grid Spans for "Masonry" Look */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.item-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.item-standard {
    grid-column: span 1;
    grid-row: span 1;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .photo-collage-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    /* Reset spans for tablet to be simpler or keep them if they fit */
    .item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 576px) {
    .photo-collage-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .collage-item {
        height: 300px;
        /* specific height for mobile */
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

.modal-photography .modal-quote {
    color: rgba(255, 255, 255, 0.85);
    /* Agak putih (off-white/transparent) */
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    letter-spacing: 1px;
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Close Button Customization */
.modal-photography .btn-close {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1050;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-photography .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* =========================================
   Tableau Modal Styles
========================================= */
.portfolio-modal .modal-header {
    padding: 20px 30px;
    background: #f9f9f9;
}

.portfolio-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.portfolio-modal .modal-body {
    padding: 0;
}

.portfolio-modal .modal-img-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.portfolio-modal .modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Keeps entire image visible */
    transition: transform 0.3s ease;
}

.portfolio-modal .modal-text-wrapper {
    padding: 40px;
    background: #fff;
}

.portfolio-modal .modal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-modal .modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.portfolio-modal .project-meta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.portfolio-modal .meta-item {
    margin-bottom: 10px;
}

.portfolio-modal .meta-item strong {
    color: #333;
    margin-right: 10px;
}

/* =========================================
   Aesthetic Photo Collage Grid Styles
   ========================================= */
.photo-collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns for flexibility */
    grid-auto-rows: 250px;
    /* Fixed row height base */
    gap: 15px;
    padding: 20px 0;
}

.collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the grid area */
    transition: transform 0.5s ease;
}

/* Hover Effects */
.collage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.collage-item:hover img {
    transform: scale(1.05);
}

/* Specific Grid Spans for "Masonry" Look */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.item-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.item-standard {
    grid-column: span 1;
    grid-row: span 1;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .photo-collage-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    /* Reset spans for tablet to be simpler or keep them if they fit */
    .item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 576px) {
    .photo-collage-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .collage-item {
        height: 300px;
        /* specific height for mobile */
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

.modal-photography .modal-quote {
    color: rgba(255, 255, 255, 0.85);
    /* Agak putih (off-white/transparent) */
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    letter-spacing: 1px;
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Close Button Customization */
.modal-photography .btn-close {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1050;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-photography .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* =========================================
   Tableau Modal Styles
   ========================================= */
.modal-tableau .modal-content {
    border-radius: 8px;
    border: none;
    overflow: hidden;
    background-color: #1a1a1a;
    /* Dark background */
    color: #fff;
    /* White text base */
}

.modal-tableau .modal-header {
    border-bottom: 1px solid #333;
    padding: 15px 20px;
    background-color: #222;
}

.modal-tableau .modal-title {
    color: #fff;
}

.modal-tableau .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    /* White close button */
}

.modal-tableau .modal-body {
    padding: 30px;
}

.modal-tableau .tableau-img-wrapper {
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    background-color: #000;
}

.modal-tableau .tableau-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-tableau .modal-project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    /* White Title */
}

.modal-tableau .modal-description-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #f0f0f0;
    /* White Explanation */
    margin-bottom: 20px;
}

.modal-tableau .modal-disclaimer {
    font-size: 0.9rem;
    font-style: italic;
    color: #ccc;
    /* Light grey disclaimer */
    background: #2a2a2a;
    /* Darker grey background */
    padding: 10px;
    border-left: 3px solid #666;
    margin-top: 20px;
}

/* =========================================
   Invoice App Modal Styles
   ========================================= */
.modal-invoice .modal-content {
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    border: none;
}

.modal-invoice .modal-header {
    border-bottom: 1px solid #333;
    padding: 15px 20px;
    background-color: #222;
}

.modal-invoice .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-invoice .modal-body {
    padding: 30px;
}

.modal-invoice .modal-project-title {
    color: #fff;
    font-weight: 700;
}

.modal-invoice .modal-description-text {
    color: #ccc;
}

.modal-invoice .collage-item {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.modal-invoice .collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.modal-invoice .collage-item:hover img {
    transform: scale(1.1);
}

/* Slider Animation */
@keyframes portfolioSlide {

    0%,
    20% {
        transform: translateX(0);
    }

    25%,
    45% {
        transform: translateX(-25%);
    }

    50%,
    70% {
        transform: translateX(-50%);
    }

    75%,
    95% {
        transform: translateX(-75%);
    }

    100% {
        transform: translateX(0);
    }
}

.portfolio-slider-container .slider-track {
    grid-row: span 1 !important;
}

.modal-photography .modal-quote {
    color: rgba(255, 255, 255, 0.85);
    /* Agak putih (off-white/transparent) */
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    letter-spacing: 1px;
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Close Button Customization */
.modal-photography .btn-close {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1050;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-photography .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* =========================================
   Tableau Modal Styles
   ========================================= */
.modal-tableau .modal-content {
    border-radius: 8px;
    border: none;
    overflow: hidden;
    background-color: #1a1a1a;
    /* Dark background */
    color: #fff;
    /* White text base */
}

.modal-tableau .modal-header {
    border-bottom: 1px solid #333;
    padding: 15px 20px;
    background-color: #222;
}

.modal-tableau .modal-title {
    color: #fff;
}

.modal-tableau .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    /* White close button */
}

.modal-tableau .modal-body {
    padding: 30px;
}

.modal-tableau .tableau-img-wrapper {
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    background-color: #000;
}

.modal-tableau .tableau-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-tableau .modal-project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    /* White Title */
}

.modal-tableau .modal-description-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #f0f0f0;
    /* White Explanation */
    margin-bottom: 20px;
}

.modal-tableau .modal-disclaimer {
    font-size: 0.9rem;
    font-style: italic;
    color: #ccc;
    /* Light grey disclaimer */
    background: #2a2a2a;
    /* Darker grey background */
    padding: 10px;
    border-left: 3px solid #666;
    margin-top: 20px;
}

/* =========================================
   Invoice App Modal Styles
   ========================================= */
.modal-invoice .modal-content {
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    border: none;
}

.modal-invoice .modal-header {
    border-bottom: 1px solid #333;
    padding: 15px 20px;
    background-color: #222;
}

.modal-invoice .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-invoice .modal-body {
    padding: 30px;
}

.modal-invoice .modal-project-title {
    color: #fff;
    font-weight: 700;
}

.modal-invoice .modal-description-text {
    color: #ccc;
}

.modal-invoice .collage-item {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.modal-invoice .collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.modal-invoice .collage-item:hover img {
    transform: scale(1.1);
}

/* Slider Animation */
@keyframes portfolioSlide {

    0%,
    20% {
        transform: translateX(0);
    }

    25%,
    45% {
        transform: translateX(-25%);
    }

    50%,
    70% {
        transform: translateX(-50%);
    }

    75%,
    95% {
        transform: translateX(-75%);
    }

    100% {
        transform: translateX(0);
    }
}

.portfolio-slider-container .slider-track {
    display: flex;
    width: 400%;
    /* 4 images */
    animation: portfolioSlide 16s infinite ease-in-out;
}

.portfolio-slider-container .slider-track img {
    width: 25%;
    height: 100%;
    object-fit: cover;
}

/* 16:9 Aspect Ratio for Slider */
.portfolio-slider-container {
    height: auto !important;
    /* Override inline height if any */
    aspect-ratio: 16 / 9;
}

/* =========================================
   LIGHTBOX & Z-INDEX FIXES
========================================= */

/* Force Photography Modal to be topmost (Max Z-Index) */
#photographyModal {
    z-index: 2147483647 !important;
}

/* Ensure its backdrop is just below it but above everything else */
.modal-backdrop.show:nth-of-type(2) {
    z-index: 2147483640 !important;
}

/* Lightsbox Navigation Buttons */
.lightbox-nav-btn {
    position: fixed;
    /* Fixed ensures it stays in place relative to viewport */
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    /* Solid White */
    border: 4px solid #000000;
    /* Black Border */
    border-radius: 50%;
    color: #000000;
    /* Black Arrow */
    font-size: 3rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2147483647 !important;
    opacity: 0.9;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    outline: none;
    pointer-events: auto !important;
}

.lightbox-nav-btn:hover {
    opacity: 1;
    background: #f8f9fa;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 255, 255, 1);
    border-color: #333;
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* 
   Enforce FULL SCREEN image sizing.
   User wants it "not limited". 
   We maintain aspect ratio but maximize used space.
*/
#photographyModal .modal-img {
    max-height: 95vh !important;
    max-width: 95vw !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    margin: 0 !important;
    padding: 0 !important;
}

#photographyModal .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 100vh !important;
    width: 100vw !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

#photographyModal .modal-img {
    max-height: 100vh !important;
    max-width: 100vw !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: none !important;
}

#photographyModal .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Caption Visibility */
#photographyModal .modal-quote {
    color: #fff !important;
    text-shadow: 2px 2px 4px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin-top: 15px !important;
    position: relative;
    z-index: 2147483647 !important;
}