/* Main CSS for Wireframe System */

/* Custom Properties */
:root {
    --primary-color: #D90429;
    --primary-dark: #b8032a;
    --secondary-color: #2B2D42;
    --accent-color: #8D99AE;
    --light-color: #EDF2F4;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Typography */
.font-prompt {
    font-family: 'Prompt', sans-serif;
}

/* Layout */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Header Styles */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo img {
    height: 3rem;
    width: 3rem;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

.mobile-nav.active {
    display: block;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 2.5rem;
}

.search-box i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #1e1f2e;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Grid Layouts */
.grid-responsive {
    display: grid;
    gap: 1.5rem;
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* Slide Banner */
.slide-banner {
    width: 100%;
    height: 640px;
    position: relative;
    overflow: hidden;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    transform: none !important;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 3rem 2rem 2rem;
    z-index: 10;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.3);
}

.banner-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 4, 41, 0.4);
}

.banner-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 20;
}

.banner-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.banner-dot.active {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.banner-prev {
    left: 1rem;
}

.banner-next {
    right: 1rem;
}

.banner-prev:hover,
.banner-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive Banner */
@media (max-width: 1023px) {
    .slide-banner {
        height: 400px;
    }

    .banner-title {
        font-size: 2rem;
    }

    .banner-description {
        font-size: 1.125rem;
    }

    .banner-content {
        padding: 2rem 1.5rem 1.5rem;
    }

    .banner-prev,
    .banner-next {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .slide-banner {
        height: 300px;
    }

    .banner-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .banner-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .banner-content {
        padding: 1.5rem 1rem 1rem;
    }

    .banner-cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .banner-dots {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .banner-dot {
        width: 0.75rem;
        height: 0.75rem;
    }

    .banner-prev,
    .banner-next {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .banner-prev {
        left: 0.5rem;
    }

    .banner-next {
        right: 0.5rem;
    }
}

/* Go to Top Button */
.go-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.3);
}

.go-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.go-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 4, 41, 0.4);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

/* Cookie Consent */
.cookie-consent {
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.cookie-consent.hidden {
    display: none;
}

/* Cookie Settings Toggle */
.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.toggle-label {
    position: relative;
    display: block;
    width: 3rem;
    height: 1.5rem;
    background-color: #d1d5db;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-dot {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cookie-toggle:checked+.toggle-label {
    background-color: var(--primary-color);
}

.cookie-toggle:checked+.toggle-label .toggle-dot {
    transform: translateX(1.5rem);
}

.cookie-category {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #f9fafb;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Statistics */
.stats-counter {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Hover Effects (thaihealth.or.th style) */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-lift:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .slide-banner {
        height: 400px;
    }

    .banner-content {
        padding: 1rem;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }

    .slide-banner {
        height: 300px;
    }

    .card-content {
        padding: 1rem;
    }

    .go-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Content Sections */
.content-sections section {
    position: relative;
}

/* Horizontal Scroll for Mobile/Tablet */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.news-scroll .flex>*,
.danger-scroll .flex>*,
.examples-scroll .flex>* {
    flex: 0 0 280px;
}

@media (min-width: 768px) and (max-width: 1023px) {

    .news-scroll .flex>*,
    .danger-scroll .flex>*,
    .examples-scroll .flex>* {
        flex: 0 0 320px;
    }
}

/* Smooth scrolling for horizontal containers */
.news-scroll .flex,
.danger-scroll .flex,
.examples-scroll .flex {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Content section spacing */
.content-sections section {
    scroll-margin-top: 80px;
    /* Account for sticky header */
}

/* Loading placeholder for images */
.content-card img,
.banner-slide img {
    background: #f3f4f6;
    min-height: 200px;
    transition: opacity 0.3s ease;
}

.banner-slide img {
    min-height: 640px;
}

/* Image loading states */
.content-card img:not([src]),
.content-card img[src=""],
.banner-slide img:not([src]),
.banner-slide img[src=""] {
    background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
        linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
        linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Image error handling */
.content-card img[alt]:after,
.banner-slide img[alt]:after {
    content: attr(alt);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(217, 4, 41, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    max-width: 80%;
    word-wrap: break-word;
    z-index: 10;
}

/* Responsive image adjustments */
@media (max-width: 767px) {
    .banner-slide img {
        min-height: 300px;
    }
}

/* Counter Animation */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.participant-counter {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.counter-item {
    position: relative;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.counter-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.counter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: white;
    border-radius: 2px;
    opacity: 0.7;
}

/* Campaign Section Buttons */
.action-buttons a {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-buttons a:hover::before {
    left: 100%;
}

.action-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for campaign section */
@media (max-width: 767px) {
    .participant-counter {
        margin-bottom: 2rem;
    }

    .counter-item {
        margin-bottom: 1rem;
    }

    .counter-number {
        font-size: 2.5rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Content Cards */
/* ===== ENHANCED CONTENT CARDS ===== */

.content-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(217, 4, 41, 0.1),
        0 0 20px rgba(217, 4, 41, 0.05);
    border-color: rgba(217, 4, 41, 0.2);
}

/* Content Card Image Container */
.content-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8f9fa;
}

.content-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.15) contrast(1.05) saturate(1.1);
}

/* Content Card Body */
.content-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.content-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.content-card-summary {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Content Card Meta Information */
.content-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    transition: color 0.3s ease;
}

.content-card:hover .content-card-meta {
    color: var(--primary-color);
}

.content-card-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.content-card-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card-views,
.content-card-downloads {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #059669;
    font-weight: 500;
}

/* Content Card Shimmer Effect */
.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.content-card:hover::before {
    left: 100%;
    opacity: 1;
}

/* Image Overlay Effect */
.content-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover .content-card-image::after {
    opacity: 1;
}

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.border-primary {
    border-color: var(--primary-color);
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

/* Ne
ws Page Specific Styles */
.news-content {
    min-height: 60vh;
}

.search-filter-bar {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-controls select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.news-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.news-card-summary {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card-stats {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #059669;
    font-weight: 500;
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-controls button {
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.pagination-controls button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Loading and Empty States */
#loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

#no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

/* Responsive News Grid */
@media (max-width: 1023px) {
    .news-card-content {
        padding: 1.25rem;
    }

    .news-card-title {
        font-size: 1rem;
    }

    .search-filter-bar {
        padding: 1rem;
    }

    .search-filter-bar .flex {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .news-card-image {
        height: 180px;
    }

    .news-card-content {
        padding: 1rem;
    }

    .news-card-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .news-card-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Search Input Focus States */
#news-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

#news-search:focus+i {
    color: var(--primary-color);
}

/* Filter Reset Button */
#reset-filters:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* News Grid Animation */
.news-grid {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.news-grid.loading {
    opacity: 0.6;
}

/* Hover Effects for News Cards */
.news-card {
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(217, 4, 41, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.news-card:hover::before {
    opacity: 1;
}

/* Smooth transitions for dynamic content */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced hover effects similar to thaihealth.or.th */
.news-card {
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    border-color: rgba(217, 4, 41, 0.2);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(217, 4, 41, 0.05);
}

.news-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-card-image::after {
    opacity: 1;
}

/* Accessibility improvements */
.news-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.news-card:focus:not(:focus-visible) {
    outline: none;
}

/* Print styles */
@media print {

    .search-filter-bar,
    .pagination-container,
    .go-to-top,
    .cookie-consent {
        display: none !important;
    }

    .news-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .news-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* News 
Card Styles (same as related news cards) */
.news-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.news-card-summary {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #059669;
    font-weight: 500;
}

/* Responsive adjustments for news cards */
@media (max-width: 1023px) {
    .news-card-content {
        padding: 1.25rem;
    }

    .news-card-title {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .news-card-image {
        height: 180px;
    }

    .news-card-content {
        padding: 1rem;
    }

    .news-card-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .news-card-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Utility
 Classes for show/hide elements */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.invisible {
    visibility: hidden !important;
}

.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

/* Content Cards - Removed duplicate styles (see Enhanced Content Cards section above) */

.content-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

.content-card-date,
.content-card-stats {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Grid Layouts */
.media-grid,
.news-grid,
.danger-grid,
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1024px) {

    .media-grid,
    .news-grid,
    .danger-grid,
    .examples-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Horizontal Scroll for Mobile */
.news-scroll .flex,
.danger-scroll .flex,
.examples-scroll .flex {
    gap: 1rem;
}

.news-scroll .content-card,
.danger-scroll .content-card,
.examples-scroll .content-card {
    min-width: 280px;
    flex-shrink: 0;
}

/* Hide scrollbar */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Counter Animation */
.counter-number {
    font-variant-numeric: tabular-nums;
}

/* Go to Top Button */
.go-to-top {
    transition: all 0.3s ease;
}

.go-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Loading States */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-card-body {
        padding: 1rem;
    }

    .content-card-title {
        font-size: 1rem;
    }

    .content-card img {
        height: 160px;
    }
}

/* ====
= SORTING AND FILTERING STYLES ===== */

/* Filter Controls */
.search-filter-bar {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.search-filter-bar:hover {
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    appearance: none;
    transition: all 0.3s ease;
}

.filter-controls select:focus,
.filter-controls input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

.filter-controls input {
    background-image: none;
}

/* Reset Button */
#reset-filters {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

#reset-filters:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

#reset-filters:active {
    transform: translateY(0);
}

/* Content Grid Animations */
.content-grid {
    transition: opacity 0.3s ease;
}

.content-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Cards Enhanced - Removed duplicate styles (see Enhanced Content Cards section above) */

/* Loading States */
.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

#loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

#loading-state.show {
    display: flex;
}

/* No Results State */
#no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

#no-results.show {
    display: flex;
}

#no-results i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

#no-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

#no-results p {
    color: #9ca3af;
    max-width: 24rem;
}

/* Pagination Enhanced */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: #f9fafb;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(217, 4, 41, 0.3);
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 1rem;
    white-space: nowrap;
}

/* Search Input Enhanced */
.search-box input {
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
    background: #fefefe;
}

.search-box input:focus+i {
    color: var(--primary-color);
}

.search-box i {
    transition: color 0.3s ease;
}

/* Sort Controls Enhanced */
.sort-filter select {
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-filter select:hover {
    border-color: var(--primary-color);
}

/* Category Filter Enhanced */
.category-filter select {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter select:hover {
    border-color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-controls>div {
        width: 100%;
    }

    .filter-controls select,
    .filter-controls input {
        width: 100%;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-info {
        order: -1;
        margin: 0;
    }
}

@media (max-width: 767px) {
    .search-filter-bar {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .content-card-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .content-card-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .content-card-meta {
        font-size: 0.7rem;
    }

    .category-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .pagination-btn {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }
}

/* Smooth Transitions for Dynamic Content */
.content-transition {
    transition: all 0.3s ease;
}

.content-fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.content-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Hover Effects for Content Cards */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(217, 4, 41, 0.05);
    border-color: rgba(217, 4, 41, 0.2);
}

.hover-lift:hover .content-card-image img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.hover-lift:hover .content-card-image::after {
    opacity: 1;
}

.content-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Focus States for Accessibility */
.content-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.content-card:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {

    .search-filter-bar,
    .pagination-controls,
    #loading-state,
    #no-results {
        display: none !important;
    }

    .content-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }

    .content-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/*
 ===== ENHANCED VISUAL EFFECTS AND ANIMATIONS ===== */

/* Smooth Transitions for All Interactive Elements */
* {
    transition-property: transform, opacity, box-shadow, background-color, border-color;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Enhanced Card Hover Effects (thaihealth.or.th style) */
.content-card,
.news-card,
.media-card {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.content-card::before,
.news-card::before,
.media-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(217, 4, 41, 0.03) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.content-card:hover::before,
.news-card:hover::before,
.media-card:hover::before {
    opacity: 1;
}

.content-card:hover,
.news-card:hover,
.media-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(217, 4, 41, 0.2);
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(217, 4, 41, 0.1),
        0 0 20px rgba(217, 4, 41, 0.05);
}

/* Image Hover Effects */
.content-card img,
.news-card img,
.media-card img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover img,
.news-card:hover img,
.media-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.15) contrast(1.05) saturate(1.1);
}

/* Content Animation on Hover */
.content-card-content,
.news-card-content {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.content-card:hover .content-card-content,
.news-card:hover .news-card-content {
    transform: translateY(-2px);
}

/* Meta Information Highlight */
.content-card-meta,
.news-card-meta {
    transition: color 0.3s ease;
}

.content-card:hover .content-card-meta,
.news-card:hover .news-card-meta {
    color: var(--primary-color);
}

/* Button Hover Animations */
.btn,
.button,
.cta-button,
.banner-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
.button:hover,
.cta-button:hover,
.banner-cta:hover {
    transform: translateY(-2px) scale(1.05);
}

.btn-primary:hover,
.bg-primary:hover {
    box-shadow: 0 8px 25px rgba(217, 4, 41, 0.4), 0 0 20px rgba(217, 4, 41, 0.2);
}

/* Ripple Effect */
.btn::after,
.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after,
.button:active::after {
    width: 300px;
    height: 300px;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.animate-on-scroll:nth-child(1) {
    transition-delay: 0ms;
}

.animate-on-scroll:nth-child(2) {
    transition-delay: 100ms;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 200ms;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 300ms;
}

.animate-on-scroll:nth-child(5) {
    transition-delay: 400ms;
}

.animate-on-scroll:nth-child(6) {
    transition-delay: 500ms;
}

/* Loading States */
.loading-state {
    position: relative;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Bounce Animation */
.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }

    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }

    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.5s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
.zoom-in {
    animation: zoomIn 0.5s ease-out forwards;
}

.zoom-out {
    animation: zoomOut 0.3s ease-in forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Slide Animations */
.slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-down {
    animation: slideInDown 0.5s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Counter Animation */
.counter-animate {
    font-variant-numeric: tabular-nums;
}

/* Progress Bar Animation */
.progress-bar {
    position: relative;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 9999px;
    transition: width 1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Header Scroll Effect */
.header.scrolled {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Page Transition Overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Animations */
.modal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop {
    backdrop-filter: blur(5px);
    transition: backdrop-filter 0.3s ease;
}

/* Form Field Animations */
input:focus,
textarea:focus,
select:focus {
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Notification Animations */
.notification {
    animation: slideInRight 0.3s ease-out;
}

.notification.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Micro-interactions */
.interactive:hover {
    transform: scale(1.05);
}

.interactive:active {
    transform: scale(0.95);
}

/* Focus Animations */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2);
    animation: focusPulse 0.3s ease-out;
}

@keyframes focusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 4, 41, 0.4);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2);
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {

    .content-card:hover,
    .news-card:hover,
    .media-card:hover {
        border: 2px solid var(--primary-color);
    }
}

/* Clean Red Theme Animations */
.red-theme .shimmer::before {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
}

.red-theme .skeleton {
    background: linear-gradient(90deg, #fef2f2 25%, #fee2e2 50%, #fef2f2 75%);
}

/* Red Theme Skeleton Loading */
.red-theme .skeleton-image,
.red-theme .skeleton-title,
.red-theme .skeleton-text {
    background: linear-gradient(90deg, #fef2f2 25%, #fee2e2 50%, #fef2f2 75%);
    background-size: 200% 100%;
    animation: red-skeleton-loading 1.5s infinite;
}

@keyframes red-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== CONTENT CARD RESPONSIVE DESIGN ===== */

/* Tablet Styles */
@media (max-width: 1023px) {

    .content-card-content,
    .content-card-body {
        padding: 1.25rem;
    }

    .content-card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .content-card-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .content-card-image {
        height: 180px;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {

    .content-card-content,
    .content-card-body {
        padding: 1rem;
    }

    .content-card-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        margin-bottom: 0.5rem;
    }

    .content-card-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.75rem;
    }

    .content-card-image {
        height: 160px;
    }

    .content-card-meta {
        font-size: 0.7rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .content-card-stats {
        gap: 0.75rem;
    }

    .category-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .content-card:hover {
        transform: translateY(-3px) scale(1.01);
    }
}

/* Grid Layout Improvements */
.grid-responsive {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Loading State for Content Cards */
.content-card.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.content-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Enhanced Focus States */
.content-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow:
        0 0 0 4px rgba(217, 4, 41, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.content-card:focus:not(:focus-visible) {
    outline: none;
}

/* Clean Red Theme Category Badges */
.category-tag.bg-red-300 {
    background: linear-gradient(135deg, #fca5a5, #f87171);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
}

.category-tag.bg-red-400 {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
}

.category-tag.bg-red-500 {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
}

.category-tag.bg-red-600 {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: none;
}

.category-tag.bg-rose-400 {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
}

.category-tag.bg-rose-500 {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
}

.category-tag.bg-pink-500 {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Category Badge Hover Effects */
.category-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    transition: all 0.2s ease;
}

/* Animation Improvements */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card.animate-in {
    animation: cardSlideIn 0.6s ease-out forwards;
}

/* Staggered Animation for Multiple Cards */
.content-card:nth-child(1) {
    animation-delay: 0ms;
}

.content-card:nth-child(2) {
    animation-delay: 100ms;
}

.content-card:nth-child(3) {
    animation-delay: 200ms;
}

.content-card:nth-child(4) {
    animation-delay: 300ms;
}

.content-card:nth-child(5) {
    animation-delay: 400ms;
}

.content-card:nth-child(6) {
    animation-delay: 500ms;
}

/* Clean Red Theme Variations */
.content-card.red-theme {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.content-card.red-theme:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow:
        0 20px 40px -8px rgba(239, 68, 68, 0.15),
        0 0 0 1px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.08);
}

.content-card.red-theme .content-card-title {
    color: #7f1d1d;
}

.content-card.red-theme .content-card-summary {
    color: #991b1b;
}

.content-card.red-theme .content-card-meta {
    color: #dc2626;
    border-top-color: rgba(239, 68, 68, 0.1);
}

.content-card.red-theme .category-tag {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Print Styles */
@media print {
    .content-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }

    .content-card:hover {
        transform: none;
        box-shadow: none;
    }

    .content-card::before {
        display: none;
    }
}

/* ===== C
ONTENT CARD IMPROVEMENTS ===== */

/* Smooth Grid Layout */
.media-grid,
.news-grid,
.danger-grid,
.examples-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Ensure equal height cards */
.media-grid .content-card,
.news-grid .content-card,
.danger-grid .content-card,
.examples-grid .content-card {
    height: 100%;
    min-height: 400px;
}

/* Loading skeleton for content cards */
.content-card-skeleton {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: 400px;
    animation: pulse 1.5s ease-in-out infinite;
}

.content-card-skeleton .skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.content-card-skeleton .skeleton-content {
    padding: 1.5rem;
}

.content-card-skeleton .skeleton-title {
    height: 1.5rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.content-card-skeleton .skeleton-text {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.content-card-skeleton .skeleton-text:last-child {
    width: 60%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Enhanced hover effects for different card types */
.media-grid .content-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        0 0 20px rgba(16, 185, 129, 0.05);
}

.danger-grid .content-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.05);
}

.examples-grid .content-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow:
        0 20px 40px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        0 0 20px rgba(139, 92, 246, 0.05);
}

/* Improved typography */
.content-card-title {
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.content-card-summary {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
}

/* Better spacing for meta information */
.content-card-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Icon improvements */
.content-card-meta i {
    width: 14px;
    text-align: center;
    opacity: 0.7;
}

/* Accessibility improvements */
.content-card[aria-pressed="true"] {
    transform: scale(0.98);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .content-card {
        border: 2px solid #000;
    }

    .content-card:hover {
        border-color: var(--primary-color);
        border-width: 3px;
    }

    .category-tag {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .content-card,
    .content-card img,
    .content-card::before {
        transition: none;
        animation: none;
    }

    .content-card:hover {
        transform: none;
    }
}

/* Better error states */
.content-card.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.content-card.error .content-card-title {
    color: #dc2626;
}

/* Loading state improvements */
.content-card.loading {
    position: relative;
    overflow: hidden;
}

.content-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading-shimmer 1.5s infinite;
    z-index: 10;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* =
==== CLEAN RED THEME SYSTEM ===== */

/* Primary Red Theme */
.content-card.theme-primary {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border: 1px solid rgba(217, 4, 41, 0.1);
}

.content-card.theme-primary:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    border-color: rgba(217, 4, 41, 0.3);
    box-shadow:
        0 20px 40px -8px rgba(217, 4, 41, 0.15),
        0 0 0 1px rgba(217, 4, 41, 0.1),
        0 0 20px rgba(217, 4, 41, 0.08);
}

/* Light Red Theme */
.content-card.theme-light {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border: 1px solid rgba(252, 165, 165, 0.3);
}

.content-card.theme-light:hover {
    background: linear-gradient(135deg, #fff1f1 0%, #fff5f5 100%);
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow:
        0 15px 30px -5px rgba(248, 113, 113, 0.1),
        0 0 0 1px rgba(248, 113, 113, 0.1),
        0 0 15px rgba(248, 113, 113, 0.05);
}

/* Rose Red Theme */
.content-card.theme-rose {
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
    border: 1px solid rgba(251, 113, 133, 0.2);
}

.content-card.theme-rose:hover {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: rgba(251, 113, 133, 0.4);
    box-shadow:
        0 18px 35px -7px rgba(251, 113, 133, 0.12),
        0 0 0 1px rgba(251, 113, 133, 0.1),
        0 0 18px rgba(251, 113, 133, 0.06);
}

/* Clean White with Red Accents */
.content-card.theme-clean {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-card.theme-clean:hover {
    background: #fefefe;
    border-color: rgba(217, 4, 41, 0.2);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(217, 4, 41, 0.05),
        0 0 10px rgba(217, 4, 41, 0.03);
}

.content-card.theme-clean .content-card-title {
    color: #1f2937;
}

.content-card.theme-clean:hover .content-card-title {
    color: #dc2626;
}

.content-card.theme-clean .category-tag {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
}

/* Red Theme Typography */
.theme-primary .content-card-title,
.theme-light .content-card-title,
.theme-rose .content-card-title {
    color: #7f1d1d;
    font-weight: 600;
}

.theme-primary .content-card-summary,
.theme-light .content-card-summary,
.theme-rose .content-card-summary {
    color: #991b1b;
}

.theme-primary .content-card-meta,
.theme-light .content-card-meta,
.theme-rose .content-card-meta {
    color: #dc2626;
}

/* Red Theme Category Tags */
.theme-primary .category-tag {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.theme-light .category-tag {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.3);
}

.theme-rose .category-tag {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    box-shadow: 0 2px 8px rgba(251, 113, 133, 0.3);
}

/* Red Theme Shimmer Effects */
.theme-primary::before,
.theme-light::before,
.theme-rose::before,
.theme-clean::before {
    background: linear-gradient(90deg, transparent, rgba(217, 4, 41, 0.1), transparent);
}

/* Red Theme Image Overlays */
.theme-primary .content-card-image::after {
    background: linear-gradient(180deg, transparent 0%, rgba(220, 38, 38, 0.1) 100%);
}

.theme-light .content-card-image::after {
    background: linear-gradient(180deg, transparent 0%, rgba(248, 113, 113, 0.08) 100%);
}

.theme-rose .content-card-image::after {
    background: linear-gradient(180deg, transparent 0%, rgba(251, 113, 133, 0.08) 100%);
}

.theme-clean .content-card-image::after {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
}

/* Red Theme Responsive Adjustments */
@media (max-width: 767px) {

    .theme-primary,
    .theme-light,
    .theme-rose,
    .theme-clean {
        background: #ffffff;
        border: 1px solid #f3f4f6;
    }

    .theme-primary:hover,
    .theme-light:hover,
    .theme-rose:hover,
    .theme-clean:hover {
        transform: translateY(-2px) scale(1.01);
        border-color: rgba(217, 4, 41, 0.2);
    }
}

/* Red Theme Focus States */
.theme-primary:focus,
.theme-light:focus,
.theme-rose:focus,
.theme-clean:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Red Theme Loading States */
.theme-primary.loading::before,
.theme-light.loading::before,
.theme-rose.loading::before,
.theme-clean.loading::before {
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
}

/* Red Theme Error States */
.theme-primary.error,
.theme-light.error,
.theme-rose.error,
.theme-clean.error {
    border-color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
}

.theme-primary.error .content-card-title,
.theme-light.error .content-card-title,
.theme-rose.error .content-card-title,
.theme-clean.error .content-card-title {
    color: #dc2626;
}

/* ===== FINAL RED THEME POLISH ===== */

/* Clean Red Theme Global Improvements */
.content-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Enhanced Red Theme Shadows */
.theme-primary:hover {
    box-shadow:
        0 25px 50px -12px rgba(220, 38, 38, 0.15),
        0 0 0 1px rgba(220, 38, 38, 0.1),
        0 0 25px rgba(220, 38, 38, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-light:hover {
    box-shadow:
        0 20px 40px -8px rgba(248, 113, 113, 0.12),
        0 0 0 1px rgba(248, 113, 113, 0.08),
        0 0 20px rgba(248, 113, 113, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-rose:hover {
    box-shadow:
        0 22px 45px -10px rgba(251, 113, 133, 0.13),
        0 0 0 1px rgba(251, 113, 133, 0.09),
        0 0 22px rgba(251, 113, 133, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-clean:hover {
    box-shadow:
        0 15px 35px -5px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(217, 4, 41, 0.05),
        0 0 15px rgba(217, 4, 41, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Red Theme Text Enhancements */
.theme-primary .content-card-title,
.theme-light .content-card-title,
.theme-rose .content-card-title {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.theme-clean .content-card-title {
    color: #1f2937;
    font-weight: 600;
}

.theme-clean:hover .content-card-title {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Red Theme Meta Information */
.theme-primary .content-card-views,
.theme-light .content-card-views,
.theme-rose .content-card-views {
    color: #dc2626;
    font-weight: 600;
}

.theme-primary .content-card-downloads,
.theme-light .content-card-downloads,
.theme-rose .content-card-downloads {
    color: #b91c1c;
    font-weight: 600;
}

/* Red Theme Image Enhancements */
.theme-primary .content-card-image,
.theme-light .content-card-image,
.theme-rose .content-card-image,
.theme-clean .content-card-image {
    position: relative;
    overflow: hidden;
}

.theme-primary .content-card-image::before,
.theme-light .content-card-image::before,
.theme-rose .content-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(220, 38, 38, 0.03) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.theme-primary:hover .content-card-image::before,
.theme-light:hover .content-card-image::before,
.theme-rose:hover .content-card-image::before {
    opacity: 1;
}

/* Red Theme Border Enhancements */
.theme-primary,
.theme-light,
.theme-rose {
    border-image: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(248, 113, 113, 0.05)) 1;
}

.theme-clean {
    border: 1px solid #f1f5f9;
}

.theme-clean:hover {
    border-image: linear-gradient(135deg, rgba(217, 4, 41, 0.2), rgba(217, 4, 41, 0.1)) 1;
}

/* Red Theme Animation Refinements */
.theme-primary,
.theme-light,
.theme-rose,
.theme-clean {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-primary:hover,
.theme-light:hover,
.theme-rose:hover {
    transform: translateY(-8px) scale(1.02) rotateX(2deg);
    transform-style: preserve-3d;
}

.theme-clean:hover {
    transform: translateY(-6px) scale(1.01);
}

/* Red Theme Accessibility Improvements */
.theme-primary:focus-visible,
.theme-light:focus-visible,
.theme-rose:focus-visible,
.theme-clean:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.5);
    outline-offset: 3px;
    box-shadow:
        0 0 0 6px rgba(220, 38, 38, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Red Theme Print Optimizations */
@media print {

    .theme-primary,
    .theme-light,
    .theme-rose,
    .theme-clean {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .theme-primary .content-card-title,
    .theme-light .content-card-title,
    .theme-rose .content-card-title,
    .theme-clean .content-card-title {
        color: #1f2937 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}