/* Column Wrapper */
.column-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: center !important;
}

/* Load More - Hidden Items */
.ruts-loadmore-hidden {
    display: none !important;
}

/* Load More - Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Card Image - Consistent 16:9 Aspect Ratio */
.custom-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

/* 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;
}

/* ============================================
   NEW MODERN TEMPLATES - 2026
   ============================================ */

/* Glassmorphism Template - Frosted glass effect */
.template-glass {
    background: linear-gradient(135deg, #00154b 0%, #1e3a5f 50%, #2d5a87 100%);
    padding: 30px;
    border-radius: 20px;
}

.template-glass .custom-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.template-glass .custom-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.template-glass .custom-card img {
    border-radius: 12px;
    margin: 12px;
    width: calc(100% - 24px);
}

.template-glass .card-body {
    padding: 16px 20px 20px;
}

.template-glass .card-body h5,
.template-glass .card-body a {
    color: #fff !important;
}

.template-glass .card-body p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Glass Light Template - Glassmorphism with light/white background */
.template-glass-light {
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f8ff 50%, #ffffff 100%);
    padding: 30px;
    border-radius: 20px;
}

.template-glass-light .custom-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 21, 75, 0.1);
}

.template-glass-light .custom-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 21, 75, 0.15);
}

.template-glass-light .custom-card img {
    border-radius: 12px;
    margin: 12px;
    width: calc(100% - 24px);
}

.template-glass-light .card-body {
    padding: 16px 20px 20px;
}

.template-glass-light .card-body h5,
.template-glass-light .card-body a {
    color: #00154b !important;
}

.template-glass-light .card-body p {
    color: #333 !important;
}

/* Gradient Overlay Template - Text over gradient on image */
.template-gradient .custom-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.template-gradient .custom-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.template-gradient .custom-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-gradient .custom-card:hover img {
    transform: scale(1.1);
}

.template-gradient .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 21, 75, 0.95) 0%, rgba(0, 21, 75, 0.7) 50%, transparent 100%);
    padding: 60px 20px 20px;
}

.template-gradient .card-body h5,
.template-gradient .card-body a {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.template-gradient .card-body p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Animated Template - Enhanced micro-animations */
.template-animated .custom-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.template-animated .custom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: border-color 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.template-animated .custom-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 115, 170, 0.2);
}

.template-animated .custom-card:hover::before {
    border-color: #0073aa;
    box-shadow: 0 0 20px rgba(0, 115, 170, 0.3);
}

.template-animated .custom-card img {
    transition: transform 0.5s ease;
    border-radius: 0;
}

.template-animated .custom-card:hover img {
    transform: scale(1.08);
}

.template-animated .card-body {
    padding: 20px;
    position: relative;
}

.template-animated .card-body h5 {
    transition: color 0.3s ease;
}

.template-animated .custom-card:hover .card-body h5 {
    color: #0073aa;
}

/* Animated pulse effect for SDG badges */
.template-animated .card-body span[style*="background-color"] {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Shimmer loading effect (optional class) */
.template-animated .shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* 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;
    }
}
*/