/*
Plugin CSS: Ananda Govinda Temple Donation & Events - FINAL & COMPLETE REIMAGINED UI
====================================================================================
This CSS block replaces all previous styles, incorporating all aesthetic and structural fixes.
- Fixed: Single image size, alignment, and inline attribute overrides.
- Fixed: Mobile button text clipping.
- Improved: Overall design, spacing, colors, and consistency.
====================================================================================
*/

:root {
    /* Final Rich Saffron Palette */
    --agd-primary: #D96F00; /* Deep Saffron */
    --agd-primary-light: #FF9933; /* Accent/Hover */
    --agd-secondary: #2E8B57; /* Accent Green for price/icons */
    --agd-bg-light: #FEF7E6; /* Creamy Background */
    --agd-text: #3D3D3D;
    --agd-border: #E0E0E0;
    --agd-shadow: rgba(0, 0, 0, 0.15);
    --agd-radius: 12px;
    --agd-font-heading: 'Playfair Display', serif;
    --agd-font-body: 'Roboto', 'Open Sans', sans-serif;
}

/* --- Base & Typography --- */
.agd-donation-list, .agd-event-list, .agd-donation-card, .agd-single-event-card {
    font-family: var(--agd-font-body);
    color: var(--agd-text);
    line-height: 1.6;
}

.agd-section-title, .agd-service-title, .agd-event-title {
    font-family: var(--agd-font-heading);
    color: var(--agd-primary);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 2.2em;
    line-height: 1.2;
}
.agd-service-title, .agd-event-title {
    font-size: 2em;
}

/* --- General Utilities --- */
.agd-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; 
    margin: 40px auto; 
    justify-content: center;
    max-width: 1300px; 
    padding: 0 15px;
}
.agd-notice {
    padding: 20px;
    border: 1px solid var(--agd-primary-light);
    background-color: var(--agd-bg-light);
    color: var(--agd-text);
    border-radius: var(--agd-radius);
    text-align: center;
    font-weight: 500;
}
.agd-error-message {
    color: #CC0000;
    font-weight: 500;
    padding: 10px;
    border: 1px solid #FFCCCC;
    background-color: #FFF0F0;
    border-radius: 4px;
    text-align: center;
}

/* ---------------------------------------------------------------------- */
/* --- 1. Grouped List Items [agd_all_donations] & [agd_events] --- */
/* ---------------------------------------------------------------------- */

/* Card Styles for List Pages (Equal Height) */
.agd-donation-item, .agd-event-card {
    width: 30%; 
    min-width: 300px; 
    flex: 1 1 300px; 
    border: 1px solid var(--agd-border);
    background-color: #ffffff;
    border-radius: var(--agd-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; 
    flex-direction: column;
    justify-content: space-between; 
}
.agd-donation-item:hover, .agd-event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(217, 111, 0, 0.1); 
    border-color: var(--agd-primary);
}

.agd-donation-item a:first-child, .agd-event-card a:first-child { 
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    padding: 20px 20px 10px 20px; 
}
.agd-item-content-wrapper { 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center; 
    width: 100%;
}
.agd-item-image {
    width: calc(100% + 40px);
    height: 220px;
    overflow: hidden;
    margin: -20px -20px 20px -20px; 
    border-radius: var(--agd-radius) var(--agd-radius) 0 0;
    flex-shrink: 0; 
}
.agd-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}
.agd-donation-item:hover .agd-item-image img, .agd-event-card:hover .agd-item-image img {
    transform: scale(1.05);
}
.agd-item-title {
    font-size: 1.6em;
    margin: 0 0 10px 0;
    color: var(--agd-primary);
    font-family: var(--agd-font-heading);
    flex-shrink: 0;
    line-height: 1.2;
    text-align: center;
}
.agd-item-price {
    font-weight: 700;
    color: var(--agd-secondary);
    margin: 5px 0 15px 0;
    font-size: 1.1em;
    flex-shrink: 0;
    text-align: center;
}
.agd-item-excerpt {
    flex-grow: 1; 
    margin-bottom: 0; 
    display: flex;
    align-items: flex-start; 
    text-align: left;
    width: 100%;
    padding-top: 10px; 
}
.agd-item-excerpt p {
    color: #666;
    font-size: 0.95em;
    width: 100%; 
    margin-bottom: 0;
    line-height: 1.5;
}
.agd-event-meta {
    margin: 5px 0 10px 0; 
    line-height: 1.4; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px; 
    padding: 10px 0; 
    border-top: 1px dashed var(--agd-border);
    border-bottom: 1px dashed var(--agd-border);
    width: 100%;
    align-self: stretch; 
}
.agd-event-meta .dashicons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 8px;
    color: var(--agd-primary-light); 
}


/* ----------------------------------------------------------------- */
/* --- 2. Single Form/Card [agd_donation_form] / [agd_event_single] --- */
/* ----------------------------------------------------------------- */
.agd-single-form {
    max-width: 800px; 
    margin: 40px auto; 
    padding: 50px;
    background-color: #ffffff;
    border-radius: var(--agd-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-top: 8px solid var(--agd-primary); 
    box-sizing: border-box;
    text-align: center; 
}

/* 
 * AGGRESSIVE FIX: Ensure single card image is full width and overrides all inline styles.
 */
.agd-service-image, .agd-event-image-full {
    text-align: center;
    margin: 0 auto 30px auto;
    width: 100% !important; /* Force full width */
    height: 400px;
    overflow: hidden;
    border-radius: var(--agd-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block; 
}
.agd-service-image img, .agd-event-image-full img {
    /* AGGRESSIVE INLINE OVERRIDE */
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; 
    border-radius: var(--agd-radius);
    display: block !important;
}

/* FIX: Spacing for content after image/meta */
.agd-service-description.agd-event-content, .agd-event-content {
    margin-top: 25px; 
    margin-bottom: 35px;
    text-align: left; 
    font-size: 1.05em;
}
.agd-event-meta-wrapper {
    display: flex; 
    flex-wrap: wrap;
    gap: 30px; 
    margin: 30px 0;
    justify-content: space-around;
    padding: 20px 10px;
    background-color: var(--agd-bg-light); 
    border-radius: 8px;
}
.agd-event-meta-full {
    display: flex; 
    align-items: center;
    margin: 0;
    font-size: 1.1em;
    color: var(--agd-text);
    font-weight: 500;
}

/* Form Styling */
.agd-form {
    text-align: left; 
}
.agd-form .agd-section-title {
    color: var(--agd-text);
    font-size: 1.5em;
    margin: 30px 0 20px 0;
    border-bottom: 1px dashed var(--agd-border);
    padding-bottom: 10px;
    text-align: left;
    font-family: var(--agd-font-body);
}
.agd-form-group {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid var(--agd-border);
    border-radius: 8px;
    background-color: #f7f7f7;
    transition: all 0.2s ease;
}
.agd-form input[type="text"], 
.agd-form input[type="email"], 
.agd-form input[type="tel"], 
.agd-form input[type="number"] {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--agd-border);
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1.05em;
}
.agd-form .agd-input-fixed {
    background-color: #e9e9e9;
    font-weight: bold;
    color: var(--agd-primary);
}


/* ------------------------------------------------- */
/* --- 3. Live Pooja Stream [agd_live_pooja] --- */
/* ------------------------------------------------- */
.agd-live-stream-container {
    max-width: 900px;
    margin: 40px auto;
}
.agd-live-stream-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto 20px auto;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0 !important; 
    overflow: hidden;
    border-radius: var(--agd-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}
.agd-live-stream-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--agd-radius);
}
.agd-live-indicator {
    color: #CC0000;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agd-live-indicator::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #CC0000;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(204, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0); }
}

.agd-offline-message {
    border: 2px solid var(--agd-primary-light);
    border-radius: var(--agd-radius);
    background-color: var(--agd-bg-light);
    color: var(--agd-text);
    padding: 40px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.agd-offline-message .dashicons {
    color: var(--agd-primary);
}


/* ------------------------------------------------- */
/* --- 4. Button Styling (Important Overrides) --- */
/* ------------------------------------------------- */
.agd-donate-button, .agd-button {
    background-color: var(--agd-primary) !important;
    color: white !important;
    border: none !important;
    padding: 16px 30px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s !important;
    width: 100% !important; 
    margin-top: 25px !important;
    box-shadow: 0 4px 10px rgba(217, 111, 0, 0.3) !important;
    line-height: 1.5 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: normal !important; /* Allow button text to wrap */
}

.agd-donation-item .agd-donate-button, .agd-event-card .agd-donate-button {
    margin-top: 15px !important; 
    flex-shrink: 0;
    padding: 10px 25px !important;
    font-size: 0.9em !important;
    width: auto !important; 
    align-self: center;
}

.agd-donate-button:hover, .agd-button:hover {
    background-color: var(--agd-primary-light) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(217, 111, 0, 0.4) !important;
    color: white !important;
}


/* ------------------------------------------------- */
/* --- 5. Responsive Adjustments --- */
/* ------------------------------------------------- */
@media (max-width: 1200px) {
    .agd-donation-item, .agd-event-card {
        width: 45%; 
        flex: 1 1 45%;
        min-width: 320px;
    }
}
@media (max-width: 768px) {
    .agd-donation-item, .agd-event-card {
        width: 100%;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .agd-single-form {
        padding: 30px;
        margin: 20px auto;
    }
    .agd-event-meta-wrapper {
        flex-direction: column;
        align-items: flex-start; 
        gap: 15px;
    }
    .agd-event-meta-full {
        justify-content: flex-start;
    }
    .agd-service-image, .agd-event-image-full {
        height: 250px;
    }

    /* AGGRESSIVE FIX: Mobile Button Text Clipping */
    .agd-donate-button, .agd-button {
        font-size: 0.9em !important; 
        padding: 14px 15px !important;
        line-height: 1.3 !important;
    }
}