/**
 * AGM Blog Cards - Divine Purple/Gold Aesthetic
 * Version: 1.0.0
 */

/* ============================================
   GLOBAL & BACKGROUND
   ============================================ */
.agm-card-grid,
.archive,
.blog,
.category,
.tag {
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Divine background image with overlay */
.agm-card-grid::before,
body.blog::before,
body.archive::before,
body.category::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://agminternational.org/wp-content/uploads/2026/02/Prophet-Kevin-1.jpg-scaled.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -2;
    pointer-events: none;
}

/* Purple divine overlay */
.agm-card-grid::after,
body.blog::after,
body.archive::after,
body.category::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(75, 40, 120, 0.92) 0%, 
        rgba(55, 30, 95, 0.95) 50%,
        rgba(95, 60, 140, 0.92) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   GRID LAYOUT
   ============================================ */
.agm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.agm-card-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.agm-card-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.agm-card-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   CARD STYLES
   ============================================ */
.agm-card {
    background: rgba(42, 26, 74, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 32px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    height: 100%;
    display: flex;
}

.agm-card-inner {
    padding: 25px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Divine glow effect */
.agm-card-glow {
    position: absolute;
    top: -30%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.agm-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #D4AF37;
    background: rgba(52, 32, 84, 0.85);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
}

.agm-card:hover .agm-card-glow {
    opacity: 1;
}

/* ============================================
   CARD IMAGE
   ============================================ */
.agm-card-image {
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.agm-card-image a {
    display: block;
    overflow: hidden;
}

.agm-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.agm-card:hover .agm-card-image img {
    transform: scale(1.05);
}

/* ============================================
   CARD CATEGORIES
   ============================================ */
.agm-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.agm-cat-link {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: #F4E4A6;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agm-cat-link:hover {
    background: #D4AF37;
    color: #0f0a1f;
    border-color: #D4AF37;
}

/* ============================================
   CARD TITLE
   ============================================ */
.agm-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.agm-card-title a {
    background: linear-gradient(135deg, #D4AF37, #F4E4A6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agm-card-title a:hover {
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* ============================================
   CARD META
   ============================================ */
.agm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(244, 228, 166, 0.7);
    font-size: 0.9rem;
}

.agm-meta-author,
.agm-meta-date {
    position: relative;
}

.agm-meta-author::before {
    content: '✧';
    margin-right: 5px;
    color: #D4AF37;
    font-size: 0.8rem;
}

.agm-meta-date::before {
    content: '•';
    margin-right: 8px;
    color: #D4AF37;
}

/* ============================================
   CARD EXCERPT
   ============================================ */
.agm-card-excerpt {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ============================================
   READ MORE BUTTON
   ============================================ */
.agm-read-more {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid #D4AF37;
    border-radius: 30px;
    color: #F4E4A6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.agm-read-more:hover {
    background: #D4AF37;
    color: #0f0a1f;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* ============================================
   FEATURED CARD (LARGER)
   ============================================ */
.agm-card.featured {
    grid-column: span 2;
}

.agm-card.featured .agm-card-image img {
    height: 300px;
}

.agm-card.featured .agm-card-title {
    font-size: 1.8rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.agm-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.agm-pagination a,
.agm-pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(42, 26, 74, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agm-pagination a:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    color: #F4E4A6;
}

.agm-pagination .current {
    background: #D4AF37;
    color: #0f0a1f;
    border-color: #D4AF37;
    font-weight: 600;
}

/* ============================================
   CATEGORY GRID
   ============================================ */
.agm-category-section {
    margin-bottom: 60px;
}

.agm-category-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #D4AF37;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
}

.agm-view-all {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 25px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid #D4AF37;
    border-radius: 30px;
    color: #F4E4A6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agm-view-all:hover {
    background: #D4AF37;
    color: #0f0a1f;
}

/* ============================================
   NO POSTS MESSAGE
   ============================================ */
.agm-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: rgba(42, 26, 74, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 48px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .agm-card-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .agm-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .agm-card.featured {
        grid-column: span 1;
    }
    
    .agm-card.featured .agm-card-image img {
        height: 200px;
    }
    
    .agm-card.featured .agm-card-title {
        font-size: 1.4rem;
    }
    
    .agm-category-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .agm-card-grid {
        grid-template-columns: 1fr !important;
    }
    
    .agm-card-title {
        font-size: 1.3rem;
    }
    
    .agm-pagination {
        flex-wrap: wrap;
    }
}

/* Font import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');