/* assets/style.css */

/* Content images */
.lgpv-content-wrapper .lgpv-image {
    cursor: zoom-in;
    display: inline-block;
    position: relative;
    transition: opacity 0.3s ease;
}

.lgpv-content-wrapper .lgpv-image:hover {
    opacity: 0.9;
}

.lgpv-content-wrapper .lgpv-image img {
    max-width: 100%;
    height: auto;
}

/* Inline Gallery Container */
.lgpv-inline-gallery-container {
    width: 100%;
    max-width: 800px;
    height: 500px;
    position: relative;
    margin: 20px auto;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive height */
@media (max-width: 768px) {
    .lgpv-inline-gallery-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .lgpv-inline-gallery-container {
        height: 300px;
    }
}

/* LightGallery Custom Styles */
.lg-backdrop {
    background-color: rgba(0, 0, 0, 0.9);
}

.lgpv-inline-lightbox .lg-toolbar {
    background-color: rgba(0, 0, 0, 0.7);
}

.lg-sub-html {
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
}

/* Caption animations */
.lightGallery-captions h4 {
    transform: translate3d(60px, 0, 0px);
    margin-bottom: 10px;
}

.lightGallery-captions p {
    transform: translate3d(-60px, 0, 0px);
    font-size:12px !important;
     word-wrap: break-word;        /* Breaks long words */
      overflow-wrap: break-word;    /* Modern property */
      word-break: break-word;       /* Aggressive breaking */
      white-space: normal;
    margin: 0;
}

.lightGallery-captions h4,
.lightGallery-captions p {
    opacity: 0;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in;
}

.lg-current .lightGallery-captions h4,
.lg-current .lightGallery-captions p {
    transform: translate3d(0, 0, 0px);
    opacity: 1;
    transition-delay: 500ms;
}

.lg-slide-progress .lightGallery-captions h4 {
    transform: translate3d(-60px, 0, 0px);
}

.lg-slide-progress .lightGallery-captions p {
    transform: translate3d(60px, 0, 0px);
}

.lg-slide-progress .lightGallery-captions h4,
.lg-slide-progress .lightGallery-captions p {
    opacity: 0;
}

.lg-current.lg-slide-progress .lightGallery-captions h4,
.lg-current.lg-slide-progress .lightGallery-captions p {
    transition-delay: 0ms;
}

/* Override LightGallery default styles for better integration */
.lg-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Ensure inline gallery takes full container space */
.lgpv-inline-gallery-container .lg-container {
    width: 100% !important;
    height: 100% !important;
}

.lgpv-inline-gallery-container .lg-inner {
    width: 100% !important;
    height: 100% !important;
}
}

/* Inline Gallery */
.lgpv-inline-gallery-container {
    position: relative;
    max-width: 100%;
    margin: 20px 0;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lgpv-inline-gallery-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.lgpv-inline-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.lgpv-inline-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.lgpv-inline-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    z-index: 10;
}

.lgpv-inline-prev,
.lgpv-inline-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.lgpv-inline-prev:hover,
.lgpv-inline-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lgpv-inline-prev:disabled,
.lgpv-inline-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lgpv-inline-prev:disabled:hover,
.lgpv-inline-next:disabled:hover {
    transform: scale(1);
}

.lgpv-inline-info {
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Alternative layout for portrait images */
@media (max-aspect-ratio: 1/1) {
    .lgpv-inline-gallery-wrapper {
        padding-top: 75%; /* Taller for portrait orientation */
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lgpv-inline-gallery-wrapper {
        padding-top: 75%; /* More square on mobile */
    }
    
    .lgpv-inline-controls {
        padding: 10px 15px;
    }
    
    .lgpv-inline-prev,
    .lgpv-inline-next {
        width: 35px;
        height: 35px;
    }
    
    .lgpv-inline-info {
        font-size: 12px;
    }
}

/* LightGallery Custom Styles */
.lg-backdrop {
    background-color: rgba(0, 0, 0, 0.9);
}

.lgpv-inline-lightbox .lg-toolbar {
    background-color: rgba(0, 0, 0, 0.7);
}

.lg-sub-html {
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
}

/* Override LightGallery default styles for better integration */
.lg-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Focus styles for accessibility */
.lgpv-inline-prev:focus,
.lgpv-inline-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading animation */
.lgpv-inline-gallery-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lgpv-spin 1s linear infinite;
    z-index: 1;
    display: none;
}

.lgpv-inline-gallery-wrapper.loading::before {
    display: block;
}

@keyframes lgpv-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}