/* DigitPublisher - Block Styles */

/* Introduction Block */
.dpwp-introduction {
    margin-bottom: 2em;
    font-size: 1.1em;
    line-height: 1.7;
    color: #2c3e50;
}

.dpwp-intro-text::first-letter {
    font-size: 3.5em;
    line-height: 0.9;
    float: left;
    margin: 0.1em 0.1em 0 0;
    font-weight: bold;
    color: #3498db;
}

/* Headings */
.dpwp-heading {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 700;
}

/* Paragraphs */
.dpwp-paragraph {
    margin-bottom: 1em;
    padding-bottom: 0;
    line-height: 1.6;
}

/* Image Blocks */
.dpwp-image-block {
    margin: 1.5em 0;
}

.dpwp-image-small-left {
    float: left;
    max-width: 40%;
    margin: 0 1.5em 1em 0;
}

.dpwp-image-small-right {
    float: right;
    max-width: 40%;
    margin: 0 0 1em 1.5em;
}

.dpwp-image-center {
    text-align: center;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.dpwp-image-full-width {
    width: 100%;
    max-width: 100%;
    margin: 2em 0;
}

.dpwp-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dpwp-image:hover {
    transform: scale(1.02);
}

.dpwp-caption {
    margin-top: 0.4em;
    margin-bottom: 0;
    font-size: 0.8em;
    font-style: italic;
    color: #95a5a6;
    text-align: right;
    line-height: 1.3;
}

.dpwp-caption i {
    font-style: normal;
    margin-right: 0.2em;
    opacity: 0.7;
}

/* Lists */
.dpwp-list {
    margin: 1em 0;
    padding-left: 1.5em;
}

.dpwp-list li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

/* Info Icons in Lists */
.dpwp-list .bi-info-circle,
.dpwp-list .bi-info-circle-fill,
.dpwp-list .bi-info-square,
.dpwp-list .bi-info-square-fill,
.dpwp-list .bi-info-lg {
    color: #3498db;
}

/* Checklists */
.dpwp-checklist {
    list-style: none;
    padding: 0;
    margin: 1.5em 0;
}

.dpwp-checklist-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.2em;
    background: #f8f9fa;
    border-radius: 4px;
}

.dpwp-check-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 0.75em;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.dpwp-check-text {
    flex: 1;
}

/* Note Blocks */
.dpwp-note {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid;
    border-radius: 4px;
}

.dpwp-note-info {
    background-color: #e8f4f8;
    border-color: #3498db;
}

.dpwp-note-warning {
    background-color: #fff4e6;
    border-color: #f39c12;
}

.dpwp-note-success {
    background-color: #e8f8f5;
    border-color: #2ecc71;
}

.dpwp-note-tip {
    background-color: #f4e8f8;
    border-color: #9b59b6;
}

.dpwp-note-title {
    font-weight: 700;
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

.dpwp-note-info .dpwp-note-title {
    color: #2980b9;
}

.dpwp-note-warning .dpwp-note-title {
    color: #e67e22;
}

.dpwp-note-success .dpwp-note-title {
    color: #27ae60;
}

.dpwp-note-tip .dpwp-note-title {
    color: #8e44ad;
}

.dpwp-note-content {
    line-height: 1.6;
}

/* Separator */
.dpwp-separator {
    margin: 2em 0;
    border: none;
    border-top: 2px solid #ecf0f1;
}

/* Lightbox Support */
[data-lightbox] {
    cursor: zoom-in;
}

/* Bootstrap Icons Integration */
.dpwp-icon-size-1 {
    font-size: 1em;
}

.dpwp-icon-size-2 {
    font-size: 1.5em;
}

.dpwp-icon-size-3 {
    font-size: 2em;
}

.dpwp-icon-size-4 {
    font-size: 2.5em;
}

.dpwp-icon-left {
    margin-right: 0.5em;
}

.dpwp-icon-right {
    margin-left: 0.5em;
}

.dpwp-icon-inline {
    vertical-align: middle;
}

/* Image Styles */
.dpwp-image-featured {
    width: 100%;
    margin: 1.5em 0 2em 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ILLUSTRATION + TEXT BLOCK
   Professional layout for contextual illustrations
   ============================================ */

.dpwp-illustration-text {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    margin: 2.5em 0;
    clear: both;
}

/* Image on LEFT */
.dpwp-illustration-text.dpwp-image-left {
    flex-direction: row;
}

/* Image on RIGHT */
.dpwp-illustration-text.dpwp-image-right {
    flex-direction: row-reverse;
}

.dpwp-illustration-wrapper {
    flex: 0 0 40%;
    max-width: 40%;
    margin: 0;
    line-height: 1.4rem;
    position: relative;
}

.dpwp-text-wrapper {
    flex: 1;
    min-width: 0;
}

/* Illustration Figure */
.dpwp-illustration-figure {
    margin: 0;
    position: relative;
}

.dpwp-illustration-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect on lightbox-enabled images */
.dpwp-illustration-figure a.glightbox:hover .dpwp-illustration-image {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Caption styling */
.dpwp-illustration-caption {
    font-size: 0.8em;
    color: #95a5a6;
    font-style: italic;
    text-align: right;
    margin-top: 0.4em;
    line-height: 1.3;
}

.dpwp-illustration-caption i {
    font-style: normal;
    margin-right: 0.2em;
    opacity: 0.7;
}

.dpwp-text-wrapper p:first-child {
    margin-top: 0;
}

.dpwp-text-wrapper p:last-child {
    margin-bottom: 0;
}

/* ============================================
   GALLERY STYLES
   ============================================ */

.dpwp-gallery {
    margin: 40px 0;
    clear: both;
    position: relative;
}

/* GRID LAYOUT */
.dpwp-gallery-grid figure.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.dpwp-gallery-grid figure.wp-block-image {
    width: calc(33.333% - 11px);
    /* 3 columns with gap */
    margin: 0;
    flex-grow: 0;
}

/* SLIDESHOW LAYOUT (Swiper) */
.dpwp-swiper-container {
    width: 100%;
    height: 500px;
    /* Fixed height for consistency */
    font-weight: 700;
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

.dpwp-note-info .dpwp-note-title {
    color: #2980b9;
}

.dpwp-note-warning .dpwp-note-title {
    color: #e67e22;
}

.dpwp-note-success .dpwp-note-title {
    color: #27ae60;
}

.dpwp-note-tip .dpwp-note-title {
    color: #8e44ad;
}

.dpwp-note-content {
    line-height: 1.6;
}

/* Separator */
.dpwp-separator {
    margin: 2em 0;
    border: none;
    border-top: 2px solid #ecf0f1;
}

/* Conclusion Block */
.dpwp-conclusion {
    margin-top: 1.5em;
    padding: 1.5em;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.dpwp-conclusion-text {
    font-size: 1.05em;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   GALLERY STYLES
   ============================================ */

.dpwp-gallery {
    margin: 40px 0;
    clear: both;
    position: relative;
}

/* GRID LAYOUT */
.dpwp-gallery-grid figure.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.dpwp-gallery-grid figure.wp-block-image {
    width: calc(33.333% - 11px);
    /* 3 columns with gap */
    margin: 0;
    flex-grow: 0;
}

/* SLIDESHOW LAYOUT (Swiper) */
.dpwp-swiper-container {
    width: 100%;
    height: 500px;
    /* Fixed height for consistency */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dpwp-swiper-container .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    overflow: hidden;
}

/* Increased specificity to override theme styles */
html body .dpwp-swiper-container .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease;
    margin: 0;
}

.dpwp-swiper-container .swiper-slide:hover img {
    transform: scale(1.05);
}

/* Custom Navigation Arrows */
.dpwp-swiper-container .swiper-button-next,
.dpwp-swiper-container .swiper-button-prev {
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dpwp-swiper-container .swiper-button-next:after,
.dpwp-swiper-container .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.dpwp-swiper-container .swiper-button-next:hover,
.dpwp-swiper-container .swiper-button-prev:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Pagination */
.dpwp-swiper-container .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dpwp-swiper-container .swiper-pagination-bullet-active {
    opacity: 1;
    background: #3498db;
    transform: scale(1.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {

    .dpwp-image-small-left,
    .dpwp-image-small-right {
        float: none;
        max-width: 100%;
        margin: 1em 0;
        display: block;
    }

    .dpwp-image-center {
        max-width: 100%;
    }

    .dpwp-intro-text::first-letter {
        font-size: 2.5em;
    }

    /* Stack illustration + text on mobile */
    .dpwp-illustration-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5em;
    }

    .dpwp-illustration-text.dpwp-image-right {
        flex-direction: column-reverse !important;
    }

    .dpwp-illustration-wrapper,
    .dpwp-text-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
    }

    /* Mobile adjustments for Gallery */
    .dpwp-gallery-grid figure.wp-block-image {
        width: calc(50% - 8px);
    }

    .dpwp-swiper-container {
        height: 350px;
        /* Smaller height on mobile */
    }

    .dpwp-swiper-container .swiper-button-next,
    .dpwp-swiper-container .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

    .dpwp-swiper-container .swiper-button-next:after,
    .dpwp-swiper-container .swiper-button-prev:after {
        font-size: 14px;
    }
}

/* Mobile adjustments for Gallery */
@media (max-width: 600px) {
    .dpwp-gallery-grid figure.wp-block-image {
        width: calc(50% - 8px);
    }
}

/* Masonry Layout */
.dpwp-masonry {
    column-gap: 15px;
}

.dpwp-masonry .dpwp-grid-item {
    break-inside: avoid;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .dpwp-masonry {
        column-count: 2 !important;
    }
}

@media (max-width: 480px) {
    .dpwp-masonry {
        column-count: 1 !important;
    }
}