/**
 * WPDRF System Frontend Styles
 * Theme: Peace & Unity
 * Color Palette: #1a5276 (Primary Blue), #1a1a2e (Dark), #2ecc71 (Green), #f39c12 (Gold)
 * All classes prefixed with wpdrf- for uniqueness
 */

/* ===== MAIN WRAPPER ===== */
.wpdrf-system-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== GRID LAYOUT ===== */
.wpdrf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* ===== MEMBER CARD ===== */
.wpdrf-card {
    perspective: 1000px;
    height: 420px;
    cursor: pointer;
}

.wpdrf-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.wpdrf-card:hover .wpdrf-card-inner {
    transform: rotateY(180deg);
}

.wpdrf-card-front,
.wpdrf-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===== FRONT SIDE ===== */
.wpdrf-card-front {
    background: #ffffff;
    border: 2px solid #1a5276;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
}

.wpdrf-card-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #1a5276;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.wpdrf-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpdrf-card-info {
    text-align: center;
    width: 100%;
}

.wpdrf-name {
    color: #1a1a2e;
    font-size: 20px;
    font-weight: 700;
    margin: 8px 0 4px;
}

.wpdrf-designation {
    color: #4a6a7a;
    font-size: 14px;
    margin: 0 0 4px;
}

.wpdrf-country {
    color: #6a8a9a;
    font-size: 13px;
    margin: 0 0 10px;
}

.wpdrf-country i {
    color: #1a5276;
    margin-right: 5px;
}

.wpdrf-badge {
    display: inline-block;
    padding: 4px 18px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== BACK SIDE ===== */
.wpdrf-card-back {
    background: #1a1a2e;
    transform: rotateY(180deg);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px solid #1a5276;
}

.wpdrf-back-content {
    text-align: center;
}

.wpdrf-back-content h4 {
    font-size: 22px;
    margin: 0 0 15px;
    color: #ffffff;
}

.wpdrf-back-content p {
    color: #aabbcc;
    font-size: 14px;
    margin: 8px 0;
}

.wpdrf-back-content .wpdrf-icon-envelope {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 8px;
}

.wpdrf-view-btn {
    background: #1a5276;
    color: #ffffff;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.wpdrf-view-btn:hover {
    background: #2ecc71;
    transform: scale(1.05);
}

/* ===== PAGINATION ===== */
.wpdrf-pagination {
    text-align: center;
    margin-top: 30px;
}

.wpdrf-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.wpdrf-pagination ul li {
    margin: 0;
}

.wpdrf-pagination ul li a,
.wpdrf-pagination ul li span {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f4f8;
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #dce4ec;
}

.wpdrf-pagination ul li a:hover {
    background: #1a5276;
    color: #ffffff;
    border-color: #1a5276;
}

.wpdrf-pagination ul li .current {
    background: #1a5276;
    color: #ffffff;
    border-color: #1a5276;
}

/* ===== NO MEMBERS ===== */
.wpdrf-no-members {
    text-align: center;
    padding: 60px 20px;
    color: #4a6a7a;
    font-size: 18px;
    border: 2px dashed #1a5276;
    border-radius: 12px;
    background: #f8fafc;
}

/* ===== REGISTRATION FORM ===== */
.wpdrf-registration-container {
    max-width: 1200px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #1a5276;
}

.wpdrf-reg-closed {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border-radius: 12px;
    color: #4a6a7a;
    font-size: 18px;
    border: 2px solid #dce4ec;
}

.wpdrf-reg-header {
    text-align: center;
    margin-bottom: 35px;
}

.wpdrf-reg-header h2 {
    color: #1a1a2e;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.wpdrf-reg-header p {
    color: #4a6a7a;
    font-size: 16px;
    margin: 0;
}

/* ===== CATEGORY SELECTOR ===== */
.wpdrf-category-selector {
    margin-bottom: 30px;
}

.wpdrf-category-selector h3 {
    color: #1a1a2e;
    font-size: 18px;
    margin-bottom: 15px;
}

.wpdrf-category-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.wpdrf-cat-option {
    background: #f0f4f8;
    border: 2px solid #dce4ec;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpdrf-cat-option:hover {
    border-color: #1a5276;
    transform: translateY(-3px);
}

.wpdrf-cat-option.active {
    border-color: #1a5276;
    background: #e8f0f8;
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.wpdrf-cat-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.wpdrf-cat-option h4 {
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    margin: 5px 0;
}

.wpdrf-cat-option p {
    color: #4a6a7a;
    font-size: 12px;
    margin: 0;
}

/* ===== FORM FIELDS ===== */
.wpdrf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wpdrf-form-group {
    margin-bottom: 20px;
}

.wpdrf-form-group label {
    display: block;
    color: #1a1a2e;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.wpdrf-form-group input,
.wpdrf-form-group textarea,
.wpdrf-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dce4ec;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a1a2e;
}

.wpdrf-form-group input:focus,
.wpdrf-form-group textarea:focus,
.wpdrf-form-group select:focus {
    border-color: #1a5276;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.wpdrf-form-group input[type="file"] {
    padding: 10px;
    background: #f8fafc;
}

.wpdrf-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.wpdrf-submit-btn {
    width: 100%;
    padding: 14px;
    background: #1a5276;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.wpdrf-submit-btn:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.wpdrf-submit-btn:active {
    transform: translateY(0);
}

#wpdrf-reg-message {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    display: none;
}

#wpdrf-reg-message.success {
    display: block;
    background: #e8f8f0;
    color: #1a7a3a;
    border: 1px solid #a5d6b7;
}

#wpdrf-reg-message.error {
    display: block;
    background: #fde8e8;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

/* ===== STATS ===== */
.wpdrf-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.wpdrf-stat-item {
    background: #ffffff;
    border: 2px solid #1a5276;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.wpdrf-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(26, 82, 118, 0.1);
}

.wpdrf-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #1a5276;
}

.wpdrf-stat-item span:last-child {
    color: #1a1a2e;
    font-weight: 600;
    font-size: 14px;
}

/* ===== FILTERABLE GRID STYLES ===== */
.wpdrf-filterable-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.wpdrf-filterable-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.wpdrf-section-tagline {
    display: inline-block;
    color: #1a5276;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.wpdrf-section-tagline i {
    margin-right: 8px;
}

.wpdrf-section-title {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.wpdrf-section-title span {
    color: #1a5276;
    position: relative;
}

.wpdrf-section-title span:after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 4px;
    background: #2ecc71;
    border-radius: 2px;
}

.wpdrf-filter-control ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.wpdrf-filter-control ul li {
    padding: 8px 24px;
    background: #f0f4f8;
    color: #1a1a2e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.wpdrf-filter-control ul li:hover {
    border-color: #1a5276;
}

.wpdrf-filter-control ul li.wpdrf-filter-active {
    background: #1a5276;
    color: #ffffff;
    border-color: #1a5276;
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
}

.wpdrf-filter-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.wpdrf-filter-item {
    transition: all 0.4s ease;
}

.wpdrf-filter-item.wpdrf-filter-show {
    animation: wpdrfFadeIn 0.6s ease;
}

@keyframes wpdrfFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== MEMBER ITEM ===== */
.wpdrf-member-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid #e8edf2;
}

.wpdrf-member-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(26, 82, 118, 0.15);
    border-color: #1a5276;
}

.wpdrf-member-img {
    position: relative;
    overflow: hidden;
    height: 260px;
    background: #f0f4f8;
}

.wpdrf-filter-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wpdrf-member-item:hover .wpdrf-filter-img {
    transform: scale(1.05);
}

/* ===== CATEGORY BADGE ON IMAGE ===== */
.wpdrf-category-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 6px 16px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.wpdrf-category-badge i {
    margin-right: 6px;
}

/* ===== OVERLAY ===== */
.wpdrf-member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 82, 118, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.wpdrf-member-item:hover .wpdrf-member-overlay {
    opacity: 1;
}

.wpdrf-member-overlay a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff;
    color: #1a5276;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.wpdrf-member-item:hover .wpdrf-member-overlay a {
    transform: translateY(0);
    opacity: 1;
}

.wpdrf-member-overlay a:hover {
    background: #1a1a2e;
    color: #ffffff;
}

.wpdrf-member-overlay a:nth-child(2) {
    transition-delay: 0.1s;
}

/* ===== MEMBER CONTENT ===== */
.wpdrf-member-content {
    padding: 20px 25px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpdrf-member-info {
    flex: 1;
}

.wpdrf-member-subtitle {
    color: #1a5276;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px;
}

.wpdrf-member-subtitle span {
    color: #1a1a2e;
}

.wpdrf-member-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    transition: color 0.3s ease;
}

.wpdrf-member-title:hover {
    color: #1a5276;
}

.wpdrf-member-designation {
    color: #4a6a7a;
    font-size: 13px;
    margin: 0;
}

.wpdrf-member-designation i {
    margin-right: 5px;
    color: #1a5276;
}

.wpdrf-member-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #f0f4f8;
    color: #1a1a2e;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wpdrf-member-btn:hover {
    background: #1a5276;
    color: #ffffff;
    transform: rotate(-45deg);
}

/* ===== FILTER PAGINATION ===== */
.wpdrf-filter-pagination {
    text-align: center;
    margin-top: 40px;
}

.wpdrf-filter-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.wpdrf-filter-pagination ul li {
    margin: 0;
}

.wpdrf-filter-pagination ul li a,
.wpdrf-filter-pagination ul li span {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f4f8;
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #dce4ec;
}

.wpdrf-filter-pagination ul li a:hover {
    background: #1a5276;
    color: #ffffff;
    border-color: #1a5276;
}

.wpdrf-filter-pagination ul li .current {
    background: #1a5276;
    color: #ffffff;
    border-color: #1a5276;
}

/* ===== LIGHTBOX ===== */
.wpdrf-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.wpdrf-lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.wpdrf-lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid #1a5276;
    box-shadow: 0 0 60px rgba(26, 82, 118, 0.2);
}

.wpdrf-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpdrf-lightbox-close:hover {
    color: #2ecc71;
    transform: rotate(90deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .wpdrf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wpdrf-filter-box {
        grid-template-columns: repeat(2, 1fr);
    }
    .wpdrf-category-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .wpdrf-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .wpdrf-filter-box {
        grid-template-columns: 1fr;
    }
    .wpdrf-filterable-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .wpdrf-form-row {
        grid-template-columns: 1fr;
    }
    .wpdrf-registration-container {
        padding: 20px;
        margin: 20px;
    }
    .wpdrf-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .wpdrf-card {
        height: 380px;
    }
    .wpdrf-card-image {
        width: 110px;
        height: 110px;
    }
    .wpdrf-section-title {
        font-size: 28px;
    }
    .wpdrf-filter-control ul li {
        padding: 6px 16px;
        font-size: 12px;
    }
    .wpdrf-member-img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .wpdrf-stats {
        grid-template-columns: 1fr;
    }
    .wpdrf-card {
        height: 350px;
    }
    .wpdrf-member-img {
        height: 200px;
    }
    .wpdrf-member-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .wpdrf-member-btn {
        width: 100%;
        border-radius: 25px;
        padding: 8px 20px;
    }
    .wpdrf-lightbox-content {
        max-width: 95%;
    }
    .wpdrf-lightbox-close {
        top: -35px;
        font-size: 28px;
    }
}