/* Frontend Announcements Styles */
.aam-announcements-wrapper {
    margin: 30px 0;
}

.aam-announcements-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.aam-announcement-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
}

.aam-announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.aam-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.aam-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.aam-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #6b7280;
    font-size: 16px;
}

.aam-card-content {
    padding: 20px;
}

.aam-card-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.aam-card-excerpt {
    color: #4b5563;
    margin: 0 0 15px 0;
    line-height: 1.7;
    font-size: 15px;
}

.aam-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
    flex-wrap: wrap;
    gap: 5px;
}

.aam-card-category {
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #4b5563;
}

.aam-card-date {
    font-size: 13px;
}

.aam-card-location {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.aam-card-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.aam-card-view {
    display: inline-block;
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    text-align: center;
}

.aam-card-view:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Frontend Modal */
.aam-frontend-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 20px;
}

.aam-frontend-modal-content {
    background-color: #fff;
    margin: 20px auto;
    padding: 0;
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    animation: aamModalSlideIn 0.3s ease;
}

@keyframes aamModalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.aam-frontend-modal-close {
    position: sticky;
    float: right;
    right: 15px;
    top: 10px;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: #666;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    margin: 5px;
}

.aam-frontend-modal-close:hover {
    color: #000;
    background: #fff;
    transform: rotate(90deg);
}

#aam-frontend-modal-body {
    padding: 0;
    clear: both;
}

.aam-modal-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.aam-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aam-modal-image-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: #6b7280;
    font-size: 18px;
    border-radius: 16px 16px 0 0;
}

.aam-modal-body-content {
    padding: 30px;
}

.aam-modal-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.aam-modal-content-text {
    color: #4b5563;
    line-height: 1.8;
    font-size: 16px;
}

.aam-modal-content-text p {
    margin-bottom: 15px;
}

/* Contact Section in Modal */
.aam-modal-contact {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.aam-modal-contact h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #111827;
}

.aam-contact-details p {
    margin: 8px 0;
    font-size: 15px;
    color: #4b5563;
}

.aam-contact-details p strong {
    color: #111827;
    min-width: 80px;
    display: inline-block;
}

.aam-contact-details a {
    color: #2563eb;
    text-decoration: none;
}

.aam-contact-details a:hover {
    text-decoration: underline;
}

.aam-modal-contact-link {
    display: inline-block;
    padding: 10px 24px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.aam-modal-contact-link:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: #fff;
}

.aam-modal-button {
    display: inline-block;
    padding: 12px 32px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 10px;
    cursor: pointer;
}

.aam-modal-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: #fff;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .aam-announcements-grid {
        grid-template-columns: 1fr;
    }
    
    .aam-card-title {
        font-size: 18px;
    }
    
    .aam-frontend-modal-content {
        margin: 10px auto;
        width: 100%;
        border-radius: 12px;
        max-height: calc(100vh - 20px);
    }
    
    .aam-modal-image,
    .aam-modal-image-placeholder {
        height: 200px;
    }
    
    .aam-modal-title {
        font-size: 22px;
    }
    
    .aam-modal-body-content {
        padding: 20px;
    }
    
    .aam-modal-contact {
        padding: 15px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .aam-announcements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}