
/* --- Animations --- */
[data-animation] {
    opacity: 0;
    animation-fill-mode: both;
}

.pb-animated {
    opacity: 1;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } to { opacity: 1; transform: none; } }
@keyframes bounceIn {
  from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); }
  0% { opacity: 0; transform: scale3d(.3, .3, .3); }
  20% { transform: scale3d(1.1, 1.1, 1.1); }
  40% { transform: scale3d(.9, .9, .9); }
  60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
  80% { transform: scale3d(.97, .97, .97); }
  to { opacity: 1; transform: scale3d(1, 1, 1); }
}

.animate-fadeIn { animation-name: fadeIn; }
.animate-fadeInUp { animation-name: fadeInUp; }
.animate-fadeInDown { animation-name: fadeInDown; }
.animate-fadeInLeft { animation-name: fadeInLeft; }
.animate-fadeInRight { animation-name: fadeInRight; }
.animate-zoomIn { animation-name: zoomIn; }
.animate-bounceIn { animation-name: bounceIn; }

/* --- Responsive Visibility --- */
/* In Edit Mode (if body has preview-mode class, apply these rules) */
body.preview-mode .hide-desktop { display: none !important; }
@media (max-width: 1024px) { body.preview-mode .hide-tablet { display: none !important; } }
@media (max-width: 768px) { body.preview-mode .hide-mobile { display: none !important; } }

/* In Live Site (Standard Breakpoints) */
@media (min-width: 1025px) {
    .hide-desktop:not(.pb-element-edit) { display: none !important; }
}
@media (max-width: 1024px) and (min-width: 768px) {
    .hide-tablet:not(.pb-element-edit) { display: none !important; }
}
@media (max-width: 767px) {
    .hide-mobile:not(.pb-element-edit) { display: none !important; }
}

/* In Edit Mode - Visual Indication */
.hide-desktop, .hide-tablet, .hide-mobile {
    position: relative;
}
.hide-desktop::after, .hide-tablet::after, .hide-mobile::after {
    content: '👁';
    position: absolute;
    top: 2px;
    right: 25px;
    font-size: 10px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 10;
}

/* --- Shape Divider --- */
.pb-shape-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
    pointer-events: none;
}
.pb-shape-divider-top { top: 0; }
.pb-shape-divider-bottom { bottom: 0; }

.pb-shape-divider svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
    transform: rotateY(0deg);
}

.pb-shape-flip-x svg { transform: scaleX(-1); }
.pb-shape-flip-y svg { transform: scaleY(-1); }
.pb-shape-invert svg { transform: scale(-1, -1); }

/* --- Membership Members --- */
.pb-membership-members {
    width: 100%;
    overflow-x: auto;
}

.pb-members-search {
    margin-bottom: 20px;
}

.pb-members-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pb-members-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pb-members-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pb-members-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 800px;
}

.pb-members-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.pb-members-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.pb-members-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.pb-members-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.pb-members-table tbody tr:hover {
    background: #f3f4f6;
}

.pb-members-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #6b7280;
}

.pb-members-table td:first-child {
    color: #111827;
    font-weight: 500;
}

.pb-members-table a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.pb-members-table a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive styles for members table */
@media (max-width: 1024px) {
    .pb-members-table {
        font-size: 13px;
    }
    
    .pb-members-table th,
    .pb-members-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .pb-members-search-input {
        max-width: 100%;
    }
    
    .pb-members-table {
        font-size: 14px;
        display: block;
        width: 100%;
    }
    
    .pb-members-table thead {
        display: none;
    }
    
    .pb-members-table tbody {
        display: block;
        width: 100%;
    }
    
    .pb-members-table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
    }
    
    .pb-members-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid #f3f4f6;
        text-align: right;
    }
    
    .pb-members-table td:last-child {
        border-bottom: none;
    }
    
    .pb-members-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: #374151;
        margin-right: 1rem;
    }
}

/* --- Membership Events --- */
.pb-membership-events {
    width: 100%;
}

/* Event Card Styles */
.pb-membership-events a {
    text-decoration: none;
    color: inherit;
}

.pb-event-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pb-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.pb-event-card .pb-event-image {
    overflow: hidden;
}

.pb-event-card .pb-event-image img {
    transition: transform 0.3s ease;
}

.pb-event-card:hover .pb-event-image img {
    transform: scale(1.05);
}

.pb-event-card h3 {
    transition: color 0.3s ease;
}

.pb-event-card:hover h3 {
    color: #6366f1 !important;
}

/* Calendar Event Links */
.pb-events-calendar a {
    transition: opacity 0.2s ease;
}

.pb-events-calendar a:hover {
    opacity: 0.8 !important;
}

/* Calendar View Responsive */
@media (max-width: 768px) {
    .pb-events-calendar {
        font-size: 14px;
    }
    
    .pb-events-calendar > div:first-child {
        padding: 15px !important;
    }
    
    .pb-events-calendar > div:first-child h3 {
        font-size: 20px !important;
    }
    
    .pb-events-calendar > div > div {
        min-height: 80px !important;
        padding: 8px !important;
    }
}

/* Grid View Responsive */
@media (max-width: 768px) {
    .pb-events-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .pb-events-grid[style*="repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .pb-events-grid[style*="repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}