:root {
    --dim-red: #f3072c;
    --dim-red-hover: #d10626;
    --dim-bg-gray: #f9fafb;
    --dim-border: #e5e7eb;
    --dim-text-main: #111827;
    --dim-text-muted: #6b7280;
    --dim-font-body: 'Poppins', -apple-system, sans-serif;
}

body {
    margin: 0;
    font-family: var(--dim-font-body);
    color: var(--dim-text-main);
}

.dim-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.dim-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dim-col-right {
    order: -1;
    width: 100%;
}

.dim-col-left {
    width: 100%;
}

.dim-sticky-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 1024px) {
    .dim-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 2.5rem;
        align-items: start;
    }

    .dim-container {
        padding: 1rem 0;
    }

    .dim-col-left {
        grid-column: span 5;
        order: 1;
    }

    .dim-col-right {
        grid-column: span 7;
        order: 2;
    }

    .dim-sticky-wrapper {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        padding-right: 4px;
        scrollbar-width: thin;
    }
}

@media (min-width: 1280px) {
    .dim-container {
        padding: 2rem 0;
    }

    .dim-grid {
        gap: 4rem;
    }

    .dim-sticky-wrapper {
        top: 3rem;
    }
}

.dim-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--dim-text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    line-height: 1.4;
}

.dim-breadcrumb a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
    white-space: nowrap;
}

.dim-breadcrumb a:hover {
    color: var(--dim-red);
}

.dim-breadcrumb-current {
    font-weight: 500;
    color: var(--dim-text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

@media (min-width: 768px) {
    .dim-breadcrumb {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .dim-breadcrumb-current {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .dim-breadcrumb {
        order: -1;
    }
}

.dim-section-label {
    color: var(--dim-red);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.dim-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: black;
}

@media (min-width: 768px) {
    .dim-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
}

.dim-desc {
    color: var(--dim-text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-align: justify;
}

@media (min-width: 768px) {
    .dim-desc {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }
}

.dim-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dim-tag {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background-color: var(--dim-bg-gray);
    border: 1px solid var(--dim-border);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #4b5563;
    cursor: default;
}

@media (min-width: 768px) {
    .dim-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

.dim-accordion-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .dim-accordion-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
}

.dim-accordion-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--dim-border);
}

.dim-acc-item {
    border: 1px solid var(--dim-border);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: white;
}

.dim-acc-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dim-text-main);
    font-family: inherit;
    text-align: left;
}

@media (min-width: 768px) {
    .dim-acc-header {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

.dim-acc-header:hover {
    background-color: var(--dim-bg-gray);
}

.dim-acc-icon {
    transition: transform 0.3s;
    color: var(--dim-text-muted);
    flex-shrink: 0;
}

.dim-acc-item.open .dim-acc-icon {
    transform: rotate(180deg);
}

.dim-acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--dim-bg-gray);
}

.dim-acc-body {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--dim-text-muted);
    line-height: 1.6;
}

.dim-acc-body ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.dim-cta {
    margin-top: 0.75rem;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .dim-cta {
        margin-top: 1rem;
        padding: 1.5rem;
    }
}

.dim-cta-glow {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 6rem;
    height: 6rem;
    background-color: var(--dim-red);
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.2;
}

@media (min-width: 768px) {
    .dim-cta-glow {
        width: 8rem;
        height: 8rem;
        filter: blur(64px);
    }
}

.dim-cta-content {
    position: relative;
    z-index: 10;
}

.dim-cta h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: white;
}

@media (min-width: 768px) {
    .dim-cta h3 {
        font-size: 1.25rem;
    }
}

.dim-cta p {
    color: #d1d5db;
    font-size: 0.85rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .dim-cta p {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
}

.dim-btn {
    display: block;
    background-color: var(--dim-red);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .dim-btn {
        display: inline-block;
        width: auto;
        padding: 0.75rem 1.5rem;
    }
}

.dim-btn:hover {
    background-color: var(--dim-red-hover);
    color: white;
    transform: translateY(-1px);
}

.dim-gallery-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: #e5e7eb;
}

.dim-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.dim-main-img.fading {
    opacity: 0.4;
    filter: blur(2px);
}

.dim-controls-top {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
}

@media (min-width: 768px) {
    .dim-controls-top {
        top: 1rem;
        right: 1rem;
    }
}

.dim-icon-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dim-internal-link {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #e1251b;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(225, 37, 27, 0.05);
    border-radius: 0 0.375rem 0.375rem 0;
}

.dim-internal-link p {
    color: var(--dim-text-main);
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
}

.dim-internal-link ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin: 0;
    font-size: 0.875rem;
    color: #e1251b;
}

.dim-internal-link li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.dim-internal-link a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.dim-internal-link a:hover {
    text-decoration: underline;
    color: #991b1b;
}

@media (min-width: 768px) {
    .dim-icon-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.dim-icon-btn:hover {
    background: white;
    transform: scale(1.1);
}

.dim-nav-pill {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 20;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: max-content;
}

@media (min-width: 768px) {
    .dim-nav-pill {
        bottom: 1rem;
        padding: 0.25rem 0.5rem;
        gap: 0.5rem;
    }
}

.dim-nav-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    color: #1f2937;
    border-radius: 50%;
    transition: 0.2s;
}

@media (min-width: 768px) {
    .dim-nav-arrow {
        padding: 0.5rem;
    }
}

.dim-nav-arrow:hover {
    color: var(--dim-red);
    background-color: rgba(0, 0, 0, 0.05);
}

.dim-counter {
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .dim-counter {
        font-size: 0.75rem;
        min-width: 3rem;
    }
}

.dim-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0.25rem;
    scrollbar-width: none;
}

@media (min-width: 768px) {
    .dim-thumbs {
        gap: 0.75rem;
        padding: 1rem 0.25rem;
    }
}

.dim-thumbs::-webkit-scrollbar {
    display: none;
}

.dim-thumb {
    width: 4.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .dim-thumb {
        width: 6rem;
        height: 4.5rem;
        opacity: 0.6;
    }
}

.dim-thumb.active {
    border-color: var(--dim-red);
    opacity: 1;
}

.dim-thumb:hover {
    opacity: 1;
}

.dim-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dim-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dim-lightbox.show {
    display: flex;
}

.dim-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.dim-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* --- NEW MATERIAL DROPDOWN STYLES (The "Proper" Design) --- */
.dim-mat-box {
    border: 1px solid var(--dim-border);
    border-radius: 12px;
    background: white;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Main Trigger Button */
.dim-mat-main-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dim-text-main);
    transition: background-color 0.2s;
}

.dim-mat-main-trigger:hover {
    background-color: var(--dim-bg-gray);
}

/* Badge Counter */
.dim-mat-badge {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--dim-text-muted);
    margin-left: 0.75rem;
    background: var(--dim-bg-gray);
    padding: 2px 8px;
    border-radius: 99px;
    border: 1px solid var(--dim-border);
}

/* Main Content Wrapper */
.dim-mat-main-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: var(--dim-bg-gray);
    border-top: 1px solid transparent;
}

.dim-mat-box.active .dim-mat-main-content {
    border-top-color: var(--dim-border);
}

.dim-mat-inner-padding {
    padding: 1rem;
}

/* Individual Material Item */
.dim-mat-item {
    background: white;
    border: 1px solid var(--dim-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.dim-mat-item:last-child {
    margin-bottom: 0;
}

/* Item Header */
.dim-mat-item-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dim-text-main);
    text-align: left;
    transition: color 0.2s;
}

.dim-mat-item-header:hover {
    color: var(--dim-accent-blue);
}

/* Item Body */
.dim-mat-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fff;
    border-top: 1px solid transparent;
}

.dim-mat-item.open .dim-mat-item-body {
    border-top-color: var(--dim-border);
}

.dim-mat-text {
    padding: 0.5rem 1rem 1rem 1rem;
    font-size: 0.875rem;
    color: var(--dim-text-muted);
    line-height: 1.6;
}

.dim-mat-text ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.dim-mat-text li {
    margin-bottom: 0.25rem;
}

.dim-mat-text p {
    margin: 0;
}

/* Icons & Rotation */
.dim-mat-icon-main,
.dim-mat-icon-item {
    display: flex;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.dim-mat-box.active .dim-mat-icon-main,
.dim-mat-item.open .dim-mat-icon-item {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--dim-accent-blue);
}
