/* DIG Quotes Collections - Frontend Styles - Grid Layout */

/* Quote Grid Container */
.dig-quotes-grid-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Quote Grid - 4 Columns */
.dig-quotes-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 100%;
}

/* Individual Quote Cards */
.dig-quote-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    min-height: 280px;
}

.dig-quote-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Quote Card Topic */
.dig-quote-card-topic {
    font-size: 16px;
    font-weight: 600;
    color: #5a4a3a;
    margin: 0 0 12px 0;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.3;
}

/* Quote Card Excerpt */
.dig-quote-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    flex: 1;
    margin-bottom: 12px;
}

/* Quote Card Source */
.dig-quote-card-source {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Read More Button */
.dig-quote-read-more {
    background: #1E9B97;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dig-quote-read-more:hover {
    background: #177b78;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 155, 151, 0.3);
}

/* Modal Overlay */
.dig-quote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.dig-quote-modal.active {
    display: block;
}

.dig-quote-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

/* Modal Content */
.dig-quote-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
    z-index: 1000000;
}

/* Modal Close Button */
.dig-quote-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 36px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.3s ease;
}

.dig-quote-modal-close:hover {
    color: #333;
}

/* Modal Body */
.dig-quote-modal-body {
    padding: 50px 60px;
}

.dig-quote-modal-topic {
    font-size: 22px;
    font-weight: 600;
    color: #5a4a3a;
    margin-bottom: 20px;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
}

.dig-quote-modal-text {
    font-size: 18px;
    line-height: 1.8;
    color: #1a1a1a;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 25px;
    white-space: pre-line;
}

.dig-quote-modal-meta {
    padding-top: 20px;
    border-top: 2px solid #8b6f47;
}

.dig-quote-modal-source {
    font-size: 15px;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 10px;
}

.dig-quote-modal-referenced {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.dig-quote-modal-context {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    white-space: pre-line;
}

/* Modal Navigation Arrows */
.dig-quote-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #1E9B97;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dig-quote-modal-nav:hover {
    background: #177b78;
}

.dig-quote-modal-prev {
    left: 20px;
}

.dig-quote-modal-next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dig-quotes-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px !important;
    }
}

@media (max-width: 900px) {
    .dig-quotes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .dig-quote-card {
        padding: 20px;
        min-height: 260px;
    }
}

@media (max-width: 600px) {
    .dig-quotes-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .dig-quote-card {
        min-height: 240px;
    }
    
    .dig-quote-modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .dig-quote-modal-body {
        padding: 40px 25px;
    }
    
    .dig-quote-modal-topic {
        font-size: 18px;
    }
    
    .dig-quote-modal-text {
        font-size: 16px;
    }
    
    .dig-quote-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .dig-quote-modal-prev {
        left: 10px;
    }
    
    .dig-quote-modal-next {
        right: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dig-quote-modal.active .dig-quote-modal-content {
    animation: fadeIn 0.3s ease-out;
}
