/* ===========================
   BERITA CARD STYLES
   =========================== */

.berita-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.berita-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.berita-card:hover::before {
    transform: scaleX(1);
}

.berita-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.25);
}


/* ===========================
   IMAGE WRAPPER STYLES
   =========================== */

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f3f4f6;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

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

.card-img-wrapper:hover img {
    transform: scale(1.15) rotate(2deg);
}


/* ===========================
   OVERLAY STYLES - TRANSPARENT
   =========================== */

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
}

.overlay span {
    position: relative;
    padding: 12px 32px;
    border: 2px solid #ffffff;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: translateY(20px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-img-wrapper:hover .overlay {
    opacity: 1;
}

.card-img-wrapper:hover .overlay span {
    transform: translateY(0);
}

.overlay span:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}


/* ===========================
   CARD BODY STYLES
   =========================== */

.berita-card .card-body {
    flex-grow: 1;
    padding: 1.5rem;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    display: flex;
    flex-direction: column;
}

.berita-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    flex-grow: 1;
}

.berita-card:hover .card-title {
    color: #2563eb;
}

.berita-card .card-text {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.berita-card .card-text small {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.berita-card .card-text small::before {
    content: '📅';
    margin-right: 6px;
    font-size: 0.9rem;
}


/* ===========================
   LINK STYLES
   =========================== */

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover {
    color: inherit;
}


/* ===========================
   HEADING STYLES
   =========================== */

.text-center h3 {
    color: #1a202c;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.text-center h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 2px;
}


/* ===========================
   PAGINATION STYLES
   =========================== */

.pagination {
    gap: 0.5rem;
}

.pagination .page-item {
    margin: 0 0.25rem;
}

.pagination .page-link {
    border: 2px solid #e2e8f0;
    color: #2563eb;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pagination .page-item.disabled .page-link {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    color: #a0aec0;
}


/* ===========================
   RESPONSIVE STYLES
   =========================== */

@media (max-width: 768px) {
    .card-img-wrapper {
        height: 180px;
    }
    
    .berita-card:hover {
        transform: translateY(-8px);
    }
    
    .overlay span {
        font-size: 14px;
        padding: 10px 24px;
    }
    
    .berita-card .card-body {
        padding: 1.25rem;
    }
    
    .berita-card .card-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .card-img-wrapper {
        height: 200px;
    }
    
    .text-center h3 {
        font-size: 20px !important;
    }
}


/* ===========================
   LOADING ANIMATION
   =========================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.berita-card.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}


/* ===========================
   HOVER EFFECT ENHANCEMENTS
   =========================== */

.row {
    position: relative;
}

.col-md-3 {
    transition: z-index 0s 0.4s;
}

.col-md-3:hover {
    z-index: 10;
    transition: z-index 0s 0s;
}


/* ===========================
   SMOOTH SCROLLING
   =========================== */

html {
    scroll-behavior: smooth;
}