/* Column Wrapper */
.column-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: flex-start !important;
}

/* Template Styles - Using from parent theme (plant3) */
/* Plant3 handles: .template-card, .template-overlap, .template-simple, .template-list, .template-caption */

/* New Custom Template Styles for Rutsarit Theme */

/* Magazine Template - 2 column layout with featured image on left */
.template-magazine .column {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
}

.template-magazine .custom-card {
    display: flex;
    flex-direction: row;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.template-magazine .custom-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.template-magazine .custom-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}

.template-magazine .card-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media screen and (max-width: 991px) {
    .template-magazine .column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media screen and (max-width: 767px) {
    .template-magazine .custom-card {
        flex-direction: column;
    }
    
    .template-magazine .custom-card img {
        width: 100%;
        height: 200px;
    }
}

/* Grid Minimal Template - Clean grid with subtle shadows */
.template-grid-minimal .custom-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.template-grid-minimal .custom-card:hover {
    border-color: #00154b;
    box-shadow: 0 4px 15px rgba(0,21,75,0.1);
}

.template-grid-minimal .custom-card img {
    border-radius: 0;
}

.template-grid-minimal .card-body {
    padding: 20px;
}

/* Elevated Template - Cards with strong shadow */
.template-elevated .custom-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    background: #fff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.template-elevated .custom-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.template-elevated .custom-card img {
    border-radius: 0;
}

.template-elevated .card-body {
    padding: 24px;
}

/* Compact Template - Dense layout for many items */
.template-compact .column {
    flex: 0 0 calc(20% - 16px) !important;
    max-width: calc(20% - 16px) !important;
}

.template-compact .custom-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.template-compact .custom-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.template-compact .custom-card img {
    border-radius: 0;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.template-compact .card-body {
    padding: 12px;
}

.template-compact .card-body h5 {
    font-size: 14px;
    margin-bottom: 6px;
}

.template-compact .card-body p {
    font-size: 12px;
    margin-bottom: 4px;
}

@media screen and (max-width: 1199px) {
    .template-compact .column {
        flex: 0 0 calc(25% - 15px) !important;
        max-width: calc(25% - 15px) !important;
    }
}

@media screen and (max-width: 991px) {
    .template-compact .column {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media screen and (max-width: 767px) {
    .template-compact .column {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

/* Bordered Template - Clean borders, no shadow */
.template-bordered .custom-card {
    border: 2px solid #00154b;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
    transition: all 0.3s ease;
}

.template-bordered .custom-card:hover {
    border-color: #ffb300;
    transform: translateY(-3px);
}

.template-bordered .custom-card img {
    border-radius: 0;
}

.template-bordered .card-body {
    padding: 20px;
}

/* Custom Template Styles for REST API Grid Block */
.rest-api-grid-block.template-card .custom-card {
    border-width: 1px;
    border-radius: 20px;
    height: 100%;
    box-shadow: 0 0 10px #ccc;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rest-api-grid-block.template-card .custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.rest-api-grid-block.template-overlap .custom-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.rest-api-grid-block.template-overlap .custom-card .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff !important;
    padding: 20px;
}

.rest-api-grid-block.template-overlap .custom-card .card-body h5,
.rest-api-grid-block.template-overlap .custom-card .card-body p,
.rest-api-grid-block.template-overlap .custom-card .card-body a {
    color: #fff !important;
}

.rest-api-grid-block.template-simple .custom-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.rest-api-grid-block.template-simple .custom-card img {
    border-radius: 8px;
}

.rest-api-grid-block.template-list .column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.rest-api-grid-block.template-list .custom-card {
    display: flex;
    flex-direction: row;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rest-api-grid-block.template-list .custom-card img {
    width: 250px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 0 0 10px;
}

.rest-api-grid-block.template-list .card-body {
    flex: 1;
    padding: 20px;
}

@media screen and (max-width: 767px) {
    .rest-api-grid-block.template-list .custom-card {
        flex-direction: column;
    }
    
    .rest-api-grid-block.template-list .custom-card img {
        width: 100%;
        height: 200px;
        border-radius: 10px 10px 0 0;
    }
}

.rest-api-grid-block.template-caption .custom-card {
    border-radius: 8px;
    overflow: visible;
    box-shadow: none;
}

.rest-api-grid-block.template-caption .custom-card img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.rest-api-grid-block.template-caption .card-body {
    padding: 15px 5px;
    background: transparent;
}

/* SDG Wheel Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Category Badge Styles */
.category-badge {
    position: absolute;
    z-index: 10;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}

.category-badge a {
    color: inherit !important;
    text-decoration: none !important;
}

.category-floating {
    top: 10px;
    left: 10px;
    background: rgba(0, 21, 75, 0.9);
    color: #fff !important;
}

.category-inline {
    top: 0;
    left: 0;
    right: 0;
    background: #ffb300;
    color: #000 !important;
    border-radius: 0;
    text-align: center;
}

.category-badge-style {
    top: 10px;
    right: 10px;
    background: #fff;
    color: #00154b !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Custom Card Positioning for Category */
.custom-card {
    position: relative;
}

/* Desktop Column Settings */
.desktop-col-1 .column { flex: 0 0 100% !important; max-width: 100% !important; }
.desktop-col-2 .column { flex: 0 0 calc(50% - 10px) !important; max-width: calc(50% - 10px) !important; }
.desktop-col-3 .column { flex: 0 0 calc(33.333% - 14px) !important; max-width: calc(33.333% - 14px) !important; }
.desktop-col-4 .column { flex: 0 0 calc(25% - 15px) !important; max-width: calc(25% - 15px) !important; }
.desktop-col-5 .column { flex: 0 0 calc(20% - 16px) !important; max-width: calc(20% - 16px) !important; }

/* Thumbnail Ratio Settings */
.ratio-default img { aspect-ratio: auto; }
.ratio-16-9 img { aspect-ratio: 16/9; object-fit: cover; }
.ratio-4-3 img { aspect-ratio: 4/3; object-fit: cover; }
.ratio-1-1 img { aspect-ratio: 1/1; object-fit: cover; }
.ratio-3-2 img { aspect-ratio: 3/2; object-fit: cover; }

/* No Rounded Corners */
.no-rounded .custom-card,
.no-rounded .custom-card img {
    border-radius: 0 !important;
}

/* Default Column - More than 2 Items (Fallback without responsive classes) */
.column {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    padding: 0;
}

/* Two Column Layout (Fallback) */
.column2 {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
    padding: 0;
}

/* Center Align when 2 Items */
.column-wrapper.column2-parent {
    justify-content: center;
}

/* Tablet Responsive (768px-1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .tablet-col-1 .column,
    .tablet-col-1 .column2 { 
        flex: 0 0 100% !important; 
        max-width: 100% !important; 
    }
    .tablet-col-2 .column,
    .tablet-col-2 .column2 { 
        flex: 0 0 calc(50% - 10px) !important; 
        max-width: calc(50% - 10px) !important; 
    }
    .tablet-col-3 .column,
    .tablet-col-3 .column2 { 
        flex: 0 0 calc(33.333% - 14px) !important; 
        max-width: calc(33.333% - 14px) !important; 
    }
}

/* Mobile Responsive (max 767px) */
@media screen and (max-width: 767px) {
    .mobile-col-1 .column,
    .mobile-col-1 .column2 { 
        flex: 0 0 100% !important; 
        max-width: 100% !important; 
    }
    .mobile-col-2 .column,
    .mobile-col-2 .column2 { 
        flex: 0 0 calc(50% - 10px) !important; 
        max-width: calc(50% - 10px) !important; 
    }
    .mobile-col-3 .column,
    .mobile-col-3 .column2 { 
        flex: 0 0 calc(33.333% - 14px) !important; 
        max-width: calc(33.333% - 14px) !important; 
    }
}

/* Card Styles */
.custom-card {
    border-width: 1px;
    border-radius: 20px;
    height: 100%;
    box-shadow: 0 0 10px #ccc;
    overflow: hidden;
}

.custom-card img {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.custom-card .card-body {
    padding: 1rem;
}

.column a {
    color: #00154c;
}

/* Old Responsive Design - Commented out to avoid conflicts with new responsive system
@media screen and (max-width: 767px) {
    .column {
        flex: 0 0 100% !important;
    }

    .column2 {
        flex: 0 0 100% !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .column {
        flex: 0 0 calc(50% - 20px) !important;
    }
}
*/

/* Old Column Wrapper Code - Commented out
.column-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.column {
    flex: 0 0 calc(25% - 20px) !important;
    padding: 10px !important;
}

.column2 {
    flex: 0 0 calc(50% - 20px) !important;
    padding: 10px !important;
}

.column-wrapper.column2-parent {
    justify-content: center;
}

.custom-card {
    border-width: 1px;
    border-radius: 20px;
    height: 100%;
    box-shadow: 0 0 10px #ccc;
    overflow: hidden;
}

.custom-card img {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.custom-card .card-body {
    padding: 1rem;
}

.column a {
    color: #00154c;
}

@media screen and (max-width: 767px) {
    .column {
        flex: 0 0 100% !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .column {
        flex: 0 0 calc(50% - 20px) !important;
    }
}
*/