/* Dynamic Sections Grid */
.dynamic-sections-wrapper {
    width: 100%;
    margin: 0 auto;
}

.dynamic-sections-grid {
    display: grid;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.dynamic-sections-grid.columns-1 {
    grid-template-columns: 1fr;
}

.dynamic-sections-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.dynamic-sections-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.dynamic-sections-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Card Styles */
.dynamic-section-card {
    background: #ffffff;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dynamic-section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    transition: left 0.3s ease;
    z-index: 0;
}

.dynamic-section-card:hover::before {
    left: 0;
}

.dynamic-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.dynamic-section-card>* {
    position: relative;
    z-index: 1;
}

/* Image Styles */
.section-image {
    margin-bottom: 20px;
    display: block;
    overflow: hidden;
    margin-left: -30px;
    margin-right: -30px;
    margin-top: -30px;
}

.section-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.dynamic-section-card:hover .section-image img {
    transform: scale(1.1);
}

/* Typography */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.section-description {
    font-size: 16px;
    color: #333333;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Button Styles */
.section-button {
    display: inline-block;
    padding: 12px 30px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.section-button:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.section-button:active {
    transform: translateY(0);
}

/* Modal Styles */
.dynamic-section-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.dynamic-section-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dynamic-section-modal-content {
    background: #ffffff;
    max-width: 80%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.modal-close svg {
    display: none;
}

/* Modal Header */
.modal-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.modal-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

/* Modal Body */
.modal-body {
    padding: 40px;
    color: #333333;
    line-height: 1.8;
}

/* Popup Image Slider */
.popup-image-slider-wrapper {
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.popup-image-slider {
    width: 100%;
}

.popup-image-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.popup-image-slider .swiper-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.popup-image-slider .swiper-pagination {
    bottom: 10px;
}

.popup-image-slider .swiper-pagination-bullet {
    background: #000000;
    opacity: 0.5;
}

.popup-image-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

.popup-image-slider .swiper-button-prev,
.popup-image-slider .swiper-button-next {
    color: #000000;
    background: rgba(255, 255, 255, 0.95);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.popup-image-slider .swiper-button-prev:after,
.popup-image-slider .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

.popup-image-slider .swiper-button-prev:hover,
.popup-image-slider .swiper-button-next:hover {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Popup Table Content */
.popup-table-content {
    margin-top: 30px;
}

.popup-table-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.popup-table-content table th,
.popup-table-content table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.popup-table-content table th {
    background: #000000;
    color: #ffffff;
    font-weight: 700;
}

.popup-table-content table tr:nth-child(even) {
    background: #f5f5f5;
}

.popup-table-content table tr:hover {
    background: #e8e8e8;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6 {
    color: #000000;
    margin-top: 20px;
    margin-bottom: 15px;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul,
.modal-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body a {
    color: #000000;
    text-decoration: underline;
}

.modal-body a:hover {
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dynamic-sections-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dynamic-sections-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .dynamic-sections-grid.columns-2,
    .dynamic-sections-grid.columns-3,
    .dynamic-sections-grid.columns-4 {
        grid-template-columns: 1fr;
    }

    .dynamic-section-card {
        padding: 20px;
    }

    .section-image {
        margin-left: -20px;
        margin-right: -20px;
        margin-top: -20px;
    }

    .section-title {
        font-size: 20px;
    }

    .section-description {
        font-size: 14px;
    }

    .dynamic-section-modal-content {
        max-width: 95%;
    }

    .modal-header,
    .modal-body {
        padding: 30px 20px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .popup-image-slider .swiper-slide img {
        max-height: 300px;
    }

    .modal-close {
        width: 45px;
        height: 45px;
        top: 10px;
        right: 10px;
    }

    .modal-close svg {
        width: 24px;
        height: 24px;
    }
}

/* Scrollbar Styling for Modal */
.dynamic-section-modal-content::-webkit-scrollbar {
    width: 8px;
}

.dynamic-section-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dynamic-section-modal-content::-webkit-scrollbar-thumb {
    background: #000000;
}

.dynamic-section-modal-content::-webkit-scrollbar-thumb:hover {
    background: #333333;
}