/**
 * Category Grid Scrapbook Style
 * Newspaper Child Theme
 */

.td-category-grid-wrapper {
    font-family: 'monserrat';
  
}

.td-cat-grid-header {
    margin-bottom: 0px;
    text-align: left;
}

.td-cat-grid-search-label {
    font-size: 28px;
    color: #00A9BE; /* Light blue */
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 400;
    font-family: 'Mansalva';
}

.td-cat-grid-title {
    font-size: 50px;
    font-weight: 400;
    color: #262626;
    margin: 20px 0 6px 0;
    line-height: 1.2;
    font-family: 'WoodbarnRough-Regular';


}

.td-cat-grid-description {
    font-size: 20px;
    color: #262626;
    line-height: 1.6;
   font-weight: 500;
    margin: 0;   
     font-family: 'Montserrat';
}
.td-cat-grid-description p
{
    font-family: 'Montserrat';
   font-weight: 500;
}
/* Masonry Grid Layout */
.td-category-grid {
    column-count: 3;
    column-gap: 30px;
    column-fill: balance;
    background-color: transparent;
}
.td-category-grid
{
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}
.case-studies-section.section-end .td-category-grid {
    align-items: flex-end;
}
.td-cat-grid-col
{
    width: calc(33.33% - 30px);
}
.td-category-grid.aligned  {
   align-items: flex-end;
}


.td-category-grid.td-cat-grid-col-4 {
    column-count: 4;
}
.td-cat-grid-col.col-second {
    margin-top: 80px;
}
.td-cat-grid-col.col-third {
    margin-top: -30px;
}
/* Responsive */
@media (max-width: 1024px) {

}

@media (max-width: 768px) {
    .td-cat-grid-col{
        width: calc(100% - 30px);
    }
    .td-cat-grid-col.col-second {
        margin-top: 0px;
    }
    .td-cat-grid-col.col-third {
        margin-top: 0px;
    }
    
    .td-cat-grid-title {
        font-size: 36px;
    }
}

/* Category Grid Item - Masonry */
.td-cat-grid-item {
    position: relative;
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 30px;
    vertical-align: top;
}

.td-cat-grid-item-inner {
    /* background: #fff;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.td-cat-grid-item-inner:hover {
    /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); */
}

/* Image Wrapper with Scrapbook Effects - Natural Height */
.td-cat-grid-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 200px;
    background-color: transparent;
}


.td-cat-grid-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
}

/* .td-cat-grid-item-inner:hover .td-cat-grid-image {
    transform: scale(1.05);
} */


/* Content Area */
.td-cat-grid-content {
    padding: 25px;
    position: relative;
}

.td-cat-grid-subtitle {
    font-size: 22px;
    color: #00A9BE;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 400;
    font-family: 'Mansalva';
}

.td-cat-grid-item-title {
    font-size: 30px;
    font-weight: 400;
    color: #262626;
    margin: 10px 0 6px 0;
    line-height: 1.2;
    font-family: 'WoodbarnRough-Regular';
}

.td-cat-grid-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.td-cat-grid-item-title a:hover {
    color: #5a9fd4;
}

.td-cat-grid-item-description {
    font-size: 17px;
    color: #262626;
    opacity: 0.7;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-family: 'Montserrat';
}

.td-cat-grid-read-more {
  background-image: url('read-more.png');
}



/* Torn Paper Edge Effect */
.td-cat-grid-item-inner {
    position: relative;
}

.td-cat-grid-item-inner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 8px;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 10px,
            rgba(212, 197, 168, 0.3) 10px,
            rgba(212, 197, 168, 0.3) 12px
        );
    clip-path: polygon(
        0% 0%,
        2% 100%,
        5% 0%,
        8% 100%,
        12% 0%,
        15% 100%,
        18% 0%,
        22% 100%,
        25% 0%,
        28% 100%,
        32% 0%,
        35% 100%,
        38% 0%,
        42% 100%,
        45% 0%,
        48% 100%,
        52% 0%,
        55% 100%,
        58% 0%,
        62% 100%,
        65% 0%,
        68% 100%,
        72% 0%,
        75% 100%,
        78% 0%,
        82% 100%,
        85% 0%,
        88% 100%,
        92% 0%,
        95% 100%,
        98% 0%,
        100% 100%,
        100% 0%
    );
    z-index: 1;
}

/* Additional decorative elements - Random rotations for scrapbook effect */
.td-cat-grid-item:nth-child(3n+1) .td-cat-grid-image-wrapper::before {
    left: 20px;
    transform: translateX(-50%) rotate(2deg);
}

.td-cat-grid-item:nth-child(3n+2) .td-cat-grid-image-wrapper::before {
    right: 20px;
    left: auto;
    transform: translateX(50%) rotate(-2deg);
}

.td-cat-grid-item:nth-child(3n+1) .td-cat-grid-item-inner {
    transform: rotate(-0.5deg);
}

.td-cat-grid-item:nth-child(3n+2) .td-cat-grid-item-inner {
    transform: rotate(0.5deg);
}

.td-cat-grid-item:nth-child(3n+3) .td-cat-grid-item-inner {
    transform: rotate(-0.3deg);
}




.td-category-grid-wrapper > * {
    position: relative;
    z-index: 1;
}
.td-cat-grid-read-more {
background: transparent;
    border: 2px solid #262626;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0px;
    color: #262626 !important;
    cursor: pointer;
    transition: all 0.3s 
ease;
    border-radius: 0px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'WoodbarnRough-Regular';
}
.td-cat-grid-read-more:hover,.td-cat-grid-read-more:focus
{
    background-color: var(--td_theme_color, #4db2ec);
    border-color: var(--td_theme_color, #4db2ec);
    color: #fff !important;
    text-decoration: none !important;
}
@media screen and (max-width: 1024px) {
    .td-cat-grid-title {
        font-size: 36px;
    }
    .td-cat-grid-description {
        font-size: 18px;
    }
    .td-cat-grid-item-title {
        font-size: 24px;
    }
    .td-cat-grid-item-description {
        font-size: 14px;
    }
}