/* File: dcg-style.css */
/* Purpose: Styles for Dynamic Cards Grid plugin with support for dynamic card style settings */

/* ============================= */
/* Dynamic Cards Grid - Styles */
/* ============================= */

.dcg-wrapper {
    margin: 40px 0;
}

/* GRID */

.dcg-grid {
    display: grid;
    gap: 30px;
    align-items: stretch;
}

/* CARD */

.dcg-card {
    background: var(--dcg-card-bg, #ffffff);

    border-width: var(--dcg-card-border-width, 1px);
    border-style: var(--dcg-card-border-style, solid);
    border-color: var(--dcg-card-border-color, #666);

    border-radius: var(--dcg-card-border-radius, 20px);

    padding: var(--dcg-card-padding, 20px);

    display: flex;
    flex-direction: column;
    height: 100%;
}

.dcg-body {
    flex-grow: 1;
}

/* IMAGE */

.dcg-image {
    position: relative;
    height: var(--dcg-thumb-height);
    margin-bottom: 15px;
}

.dcg-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    max-height: 100%;
    max-width: 100%;

    width: auto !important;
    height: auto !important;
}

/* CONTENT (hidden initially + typography) */

.dcg-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 10px;
    flex-grow: 1;

    font-size: var(--dcg-content-size);
    font-weight: var(--dcg-content-weight);
    text-align: var(--dcg-content-align);
}

.dcg-card.active .dcg-content {
    max-height: 1000px;
	display: block;
}

/* BUTTON */

.dcg-toggle {
    margin-top: auto;
    align-self: center;
	display: inline-block;
}

/* HIDDEN CARDS */

.dcg-hidden {
    display: none;
}

/* LOAD MORE */

.dcg-load-more {
    margin-top: 40px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* EXCERPT */

.dcg-excerpt {
    font-size: var(--dcg-excerpt-size);
    font-weight: var(--dcg-excerpt-weight);
    text-align: var(--dcg-excerpt-align);
    margin-bottom: 10px;
}

/* TITLE */

.dcg-title {
    font-size: var(--dcg-title-size);
    font-weight: var(--dcg-title-weight);
    text-align: var(--dcg-title-align);
    margin: 5px 0 10px 0;
}
/*блок настройки выравнивания миниатюры*/

.dcg-image {
    display:flex;
    height:var(--dcg-thumb-height);
}

.dcg-thumb-align-left {
    justify-content:flex-start;
}

.dcg-thumb-align-center {
    justify-content:center;
}

.dcg-thumb-align-right {
    justify-content:flex-end;
}

.dcg-image img {
    max-height:100%;
    width:auto;
    height:auto;
    position:static;
    transform:none;
}