/* ============================================
   DEFERRED CSS – Non-critical styles
   Loaded asynchronously
   ============================================ */

/* ============================================================ */
/* HOW TO USE - LEFT ALIGNED                                    */
/* ============================================================ */
.how-to-use {
    text-align: left;
    margin: 0.5rem 0 1rem;
}
.how-to-use h3 {
    font-size: 1.15rem;
    color: var(--gold-deep, #9e6d42);
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-align: left;
}
.how-to-use .step-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
    max-width: 700px;
    margin: 0;
}
.how-to-use .step-list li {
    background: rgba(185, 137, 86, 0.06);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--deep-ink, #2c241a);
    border: 1px solid rgba(185, 137, 86, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.how-to-use .step-list li:hover {
    background: rgba(185, 137, 86, 0.12);
    border-color: rgba(185, 137, 86, 0.2);
}
.how-to-use .step-list li .icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.how-to-use .step-list li strong {
    color: var(--gold-soft, #b98956);
}

/* ============================================================ */
/* FAQ SECTION                                                  */
/* ============================================================ */
.faq-section {
    background: var(--faq-bg, rgba(255,255,255,0.92));
    border-radius: 2rem;
    padding: 2rem;
    margin-top: 2rem;
    border: var(--border-glow, 1px solid rgba(185,137,86,0.2));
}
.faq-question {
    font-weight: 700;
    padding: 1rem 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(185, 137, 86, 0.2);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    padding: 0 0.5rem;
}
.faq-answer.active-answer {
    max-height: 300px;
    padding-bottom: 1rem;
}

/* ============================================================ */
/* INTERNAL LINKS                                               */
/* ============================================================ */
.internal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.internal-links a {
    color: var(--gold-soft, #b98956);
    text-decoration: none;
    font-weight: 500;
}
.internal-links a:hover {
    text-decoration: underline;
}

/* ============================================================ */
/* FOOTER                                                       */
/* ============================================================ */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    border-top: var(--border-glow, 1px solid rgba(185,137,86,0.2));
    margin-top: 2rem;
}
footer a {
    color: var(--gold-soft, #b98956);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* ============================================================ */
/* LEGAL LINKS                                                  */
/* ============================================================ */
.legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.legal a {
    color: var(--gold-soft, #b98956);
    text-decoration: none;
}
.legal a:hover {
    text-decoration: underline;
}

/* ============================================================ */
/* TOAST NOTIFICATION                                           */
/* ============================================================ */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--deep-ink, #2c241a);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 60px;
    z-index: 999;
    animation: fadeAway 2s forwards;
}
@keyframes fadeAway {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* ============================================================ */
/* IMAGE GENERATOR – FIXED BUTTONS (for daily-verse.php)       */
/* ============================================================ */
.image-generator {
    background: var(--card-glass, rgba(255,255,255,0.92));
    border-radius: 2rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: var(--border-glow, 1px solid rgba(185,137,86,0.2));
    text-align: center;
}
.image-preview {
    max-width: 100%;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.image-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.img-btn {
    background: var(--gold-soft, #b98956);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    min-height: 48px;
    transition: all 0.2s ease;
    flex: 1 0 auto;
}

.img-btn.whatsapp { background: #25D366; }
.img-btn.facebook { background: #1877F2; }
.img-btn.x-twitter { background: #0f1419; }
.img-btn.download { background: var(--gold-soft, #b98956); }

.img-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================ */
/* SPINNER                                                      */
/* ============================================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(185, 137, 86, 0.2);
    border-top: 3px solid var(--gold-soft, #b98956);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 1rem auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================ */
/* FEATURE GRID (for about page)                               */
/* ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.feature-item {
    background: rgba(185, 137, 86, 0.06);
    border-radius: 1rem;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(185, 137, 86, 0.06);
}
.feature-item:hover {
    transform: translateY(-3px);
}
.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

/* ============================================================ */
/* CONTACT FORM                                                 */
/* ============================================================ */
input,
textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(185, 137, 86, 0.15);
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 1rem;
    color: var(--deep-ink, #2c241a);
    transition: all 0.2s ease;
}
body.dark input,
body.dark textarea {
    background: rgba(30, 28, 26, 0.5);
}
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold-soft, #b98956);
    box-shadow: 0 0 0 3px rgba(185, 137, 86, 0.15);
}
.success-message {
    background: #4CAF50;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    display: none;
}
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none;
}
.alert {
    background: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    display: none;
}

/* ============================================================ */
/* RESPONSIVE FIXES                                            */
/* ============================================================ */
@media (max-width: 768px) {
    .how-to-use .step-list li {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    .faq-section {
        padding: 1.2rem;
    }
    .faq-question {
        font-size: 0.9rem;
    }
    .img-btn {
        min-width: 100%;
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 480px) {
    .how-to-use .step-list li {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .how-to-use .step-list {
        gap: 0.4rem;
    }
}

/* ============================================================ */
/* VERSE REFERENCE LINKS                                       */
/* ============================================================ */
.verse-ref a {
    color: var(--gold-soft, #b98956);
    text-decoration: underline;
    font-weight: 600;
    transition: 0.2s;
}
.verse-ref a:hover {
    color: var(--gold-deep, #9e6d42);
}
.verse-ref a.external-link::after {
    content: " 🔗";
    font-size: 0.7rem;
}
.verse-ref a.internal-link {
    color: var(--gold-deep, #9e6d42);
    font-weight: 700;
}

/* ============================================================ */
/* READ ALSO SECTION                                            */
/* ============================================================ */
.read-also-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(185, 137, 86, 0.1);
}
.read-also-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-deep, #9e6d42);
    margin-bottom: 1rem;
}
.read-also-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.read-also-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    padding: 0.8rem;
    border: 1px solid rgba(185, 137, 86, 0.08);
    text-decoration: none;
    color: var(--deep-ink, #2c241a);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}
.read-also-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(185, 137, 86, 0.2);
}
.read-also-card .ra-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f5f0ea;
}
.read-also-card .ra-thumb-placeholder {
    width: 100%;
    height: 120px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f5f0ea, #e8e0d8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #b98956;
}
.read-also-card .ra-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}
.read-also-card .ra-ref {
    font-size: 0.75rem;
    color: #b98956;
    margin-top: 0.2rem;
}

/* ============================================================ */
/* RELATED CARDS (already used, updated)                       */
/* ============================================================ */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.related-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    padding: 0.8rem;
    border: 1px solid rgba(185, 137, 86, 0.08);
    transition: 0.3s ease;
    text-decoration: none;
    color: var(--deep-ink, #2c241a);
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(185, 137, 86, 0.2);
}
.related-card .thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f5f0ea;
}
.related-card .thumb-placeholder {
    width: 100%;
    height: 120px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f5f0ea, #e8e0d8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #b98956;
}
.related-card .r-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}
.related-card .r-ref {
    font-size: 0.75rem;
    color: #b98956;
    margin-top: 0.2rem;
}

/* ============================================================ */
/* READ ALSO SECTION - Responsive                               */
/* ============================================================ */
@media (max-width: 768px) {
    .read-also-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .read-also-card .ra-thumb,
    .related-card .thumb {
        height: 80px;
    }
    .read-also-card .ra-thumb-placeholder,
    .related-card .thumb-placeholder {
        height: 80px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .read-also-grid {
        grid-template-columns: 1fr 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}