/* Enhanced Community Events Page Animations */

/* Hero Section Animations */
.hero-section {
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 59, 79, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #002946 !important;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUpBounce 1.2s ease-out forwards;
    text-shadow: 0 2px 15px rgba(0, 41, 70, 0.15), 0 0 30px rgba(40, 167, 69, 0.1);
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #002946, #28a745, #002946);
    border-radius: 2px;
    animation: expandUnderline 1s ease-out 0.8s forwards;
}

@keyframes fadeInUpBounce {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes expandUnderline {
    from {
        transform: translateX(-50%) scaleX(0);
    }
    to {
        transform: translateX(-50%) scaleX(1);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #002946 !important;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSubtitle 1s ease-out 0.5s forwards;
    font-weight: 500;
}

@keyframes fadeInUpSubtitle {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-title {
    /* Animation is handled by .hero-title */
}

.animated-subtitle {
    /* Animation is handled by .hero-subtitle */
}

.community-event-card,
.blog-post-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-event-card.animated,
.blog-post-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.community-event-card {
    position: relative;
    overflow: hidden;
}

.community-event-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.1), transparent);
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

.community-event-card:hover::after {
    left: 100%;
}

.community-event-img img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-event-card:hover .community-event-img img {
    transform: scale(1.15) rotate(2deg);
}

.blog-post-card {
    position: relative;
}

.blog-post-img img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-card:hover .blog-post-img img {
    transform: scale(1.1);
}

.read-more-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .read-more-link {
    transform: translateX(8px);
}

.event-category-badge,
.blog-category-badge {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.page-header__inner {
    animation: fadeInDown 0.8s ease-out;
}

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

/* Modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.community-event-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 59, 79, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 59, 79, 0.08);
    position: relative;
}

.community-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #003b4f, #28a745, #003b4f);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.community-event-card:hover::before {
    transform: scaleX(1);
    animation: gradient-slide 2s ease infinite;
}

@keyframes gradient-slide {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.community-event-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 59, 79, 0.2);
    border-color: #28a745;
}

.community-event-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.community-event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-event-card:hover .community-event-img img {
    transform: scale(1.15);
}

.community-event-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 59, 79, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.community-event-card:hover .community-event-img::after {
    opacity: 1;
}

.community-event-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 3;
    transition: all 0.3s ease;
}

.community-event-card:hover .event-category-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-primary {
    background-color: #0d6efd;
}

.badge-secondary {
    background-color: #6c757d;
}

.community-event-content {
    padding: 24px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.community-event-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #003b4f;
    margin-bottom: 16px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.community-event-card:hover .community-event-title {
    color: #28a745;
}

.community-event-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #555;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.detail-item:hover {
    color: #003b4f;
    transform: translateX(4px);
}

.detail-item i {
    font-size: 1.1rem;
    width: 24px;
    transition: transform 0.3s ease;
}

.detail-item:hover i {
    transform: scale(1.2);
}

.contact-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px;
    border-radius: 10px;
    border-left: 3px solid #28a745;
    transition: all 0.3s ease;
}

.community-event-card:hover .contact-preview {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left-color: #1e7e34;
}

.click-for-details {
    color: #28a745;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.click-for-details i {
    transition: transform 0.3s ease;
}

.community-event-card:hover .click-for-details {
    background: rgba(40, 167, 69, 0.2);
    color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.community-event-card:hover .click-for-details i {
    transform: translateX(6px);
}

.contact-preview small {
    color: #555;
    line-height: 1.6;
}

.contact-preview small i {
    width: 16px;
}

/* Blog Post Cards */
.blog-post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 59, 79, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 59, 79, 0.08);
    position: relative;
}

.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #003b4f, #28a745, #003b4f);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.blog-post-card:hover::before {
    transform: scaleX(1);
    animation: gradient-slide 2s ease infinite;
}

.blog-post-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 59, 79, 0.2);
    border-color: #28a745;
}

.blog-post-img {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-card:hover .blog-post-img img {
    transform: scale(1.12);
}

.blog-post-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 59, 79, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-post-card:hover .blog-post-img::after {
    opacity: 1;
}

.blog-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 3;
    transition: all 0.3s ease;
}

.blog-post-card:hover .blog-category-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.blog-post-content {
    padding: 24px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.blog-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003b4f;
    margin-bottom: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-post-card:hover .blog-post-title {
    color: #28a745;
}

.blog-post-summary {
    line-height: 1.7;
    margin-bottom: 15px;
}

.read-more-link {
    color: #28a745;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more-link i {
    transition: transform 0.3s ease;
}

.blog-post-card:hover .read-more-link {
    color: #1e7e34;
    transform: translateX(8px);
}

.blog-post-card:hover .read-more-link i {
    transform: translateX(4px);
}

/* Modal Styles */
.modal-header.bg-success,
.modal-header.bg-warning,
.modal-header.bg-danger,
.modal-header.bg-info,
.modal-header.bg-primary,
.modal-header.bg-secondary {
    border: none;
}

.event-details-modal .detail-box {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.event-description {
    line-height: 1.8;
    color: #444;
}

.contact-info {
    border-left: 4px solid #28a745;
}

.contact-info a {
    color: #0d6efd;
    text-decoration: none;
}

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

.modal-content {
    border: none;
    border-radius: 12px;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* Empty State Styles */
.empty-state-community {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.empty-state-community::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.05) 0%, transparent 70%);
    animation: pulse-background 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-background {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.empty-state-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.empty-state-icon-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #dc3545 0%, #0d6efd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.empty-state-icon-circle i {
    font-size: 3rem;
    color: white;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid rgba(220, 53, 69, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
    z-index: 1;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.empty-state-title {
    font-size: 2rem;
    font-weight: 700;
    color: #003b4f;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.empty-state-message {
    font-size: 1.125rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.empty-state-submessage {
    font-size: 1rem;
    color: #868e96;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.empty-state-actions .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.empty-state-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Section Headings */
.section-heading {
    color: #003b4f;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #003b4f, #28a745);
    border-radius: 2px;
    animation: expand-line 1s ease-out 0.5s both;
}

@keyframes expand-line {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

.section-heading i {
    color: #28a745;
    animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        text-shadow: 0 2px 10px rgba(0, 41, 70, 0.15);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
    
    .community-event-card,
    .blog-post-card {
        margin-bottom: 1.5rem;
    }
    
    .community-event-img,
    .blog-post-img {
        height: 200px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
}

