/**
 * Delegation Visits - Frontend Styles
 */

/* Delegations List */
.dv-delegations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.dv-no-delegations {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Delegation Card */
.dv-delegation-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dv-delegation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.dv-card-image {
    height: 180px;
    overflow: hidden;
}

.dv-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.dv-card-title {
    margin: 0 0 10px;
    font-size: 1.25em;
    line-height: 1.3;
}

.dv-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.dv-card-title a:hover {
    color: #0073aa;
}

.dv-card-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.dv-flag {
    font-size: 1.5em;
    line-height: 1;
}

.dv-country-name {
    font-weight: 500;
    color: #333;
}

.dv-card-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.dv-card-date,
.dv-card-timing {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.dv-card-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #999;
}

/* Participants Avatars */
.dv-card-participants {
    margin-bottom: 15px;
}

.dv-participants-avatars {
    display: flex;
    align-items: center;
}

.dv-participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -10px;
    background: #e9e9e9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-participant-avatar:first-child {
    margin-left: 0;
}

.dv-participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-participant-avatar .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #999;
}

.dv-participant-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -10px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-card-link {
    display: inline-block;
    color: #0073aa;
    font-weight: 500;
    text-decoration: none;
}

.dv-card-link:hover {
    text-decoration: underline;
}

/* Full Delegation View */
.dv-delegation-full {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.dv-delegation-header {
    margin-bottom: 40px;
}

.dv-header-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}

.dv-header-image img {
    width: 100%;
    height: auto;
}

.dv-header-info .dv-title {
    margin: 0 0 15px;
    font-size: 2em;
    color: #1a1a1a;
}

.dv-header-info .dv-country {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dv-header-info .dv-flag {
    font-size: 2em;
}

.dv-header-info .dv-country-name {
    font-size: 1.2em;
}

/* Info Grid */
.dv-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.dv-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dv-info-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #0073aa;
}

.dv-info-content {
    display: flex;
    flex-direction: column;
}

.dv-info-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dv-info-value {
    font-weight: 500;
    color: #333;
}

/* Section Titles */
.dv-section-title {
    font-size: 1.5em;
    margin: 0 0 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    color: #1a1a1a;
}

/* Agenda Timeline */
.dv-delegation-agenda {
    margin-bottom: 50px;
}

.dv-agenda-timeline {
    position: relative;
    padding-left: 50px;
}

.dv-agenda-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #0073aa, #00a0d2);
}

.dv-agenda-day {
    position: relative;
    padding-bottom: 30px;
}

.dv-agenda-day:last-child {
    padding-bottom: 0;
}

.dv-day-marker {
    position: absolute;
    left: -50px;
    width: 40px;
    height: 40px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-day-number {
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
}

.dv-day-content {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.dv-day-date {
    font-size: 0.9em;
    color: #0073aa;
    font-weight: 500;
    margin-bottom: 5px;
}

.dv-day-title {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: #1a1a1a;
}

.dv-day-description {
    color: #555;
    line-height: 1.6;
}

.dv-day-description p:last-child {
    margin-bottom: 0;
}

/* Audience Grid */
.dv-delegation-audience {
    margin-bottom: 40px;
}

.dv-audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.dv-person-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.dv-person-card:hover {
    transform: translateY(-3px);
}

.dv-person-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    background: #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-person-photo .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    color: #999;
}

.dv-person-name {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: #1a1a1a;
}

.dv-person-title {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .dv-delegations-list {
        grid-template-columns: 1fr;
    }

    .dv-header-info .dv-title {
        font-size: 1.5em;
    }

    .dv-info-grid {
        flex-direction: column;
        gap: 15px;
    }

    .dv-agenda-timeline {
        padding-left: 40px;
    }

    .dv-agenda-timeline::before {
        left: 15px;
    }

    .dv-day-marker {
        left: -40px;
        width: 30px;
        height: 30px;
    }

    .dv-day-number {
        font-size: 0.9em;
    }

    .dv-audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dv-audience-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   TEMPLATE STYLES
   ================================================ */

/* Archive Template */
.dv-archive-wrapper {
    background: #f5f7fa;
    min-height: 100vh;
    padding: 40px 20px;
}

.dv-archive-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dv-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.dv-archive-title {
    font-size: 2.5em;
    color: #1a1a1a;
    margin: 0 0 15px;
}

.dv-archive-description {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

/* Archive Grid */
.dv-delegations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Archive Card */
.dv-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.dv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.dv-card-past {
    opacity: 0.85;
}

.dv-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.dv-badge-upcoming {
    background: #10b981;
    color: #fff;
}

.dv-badge-past {
    background: #94a3b8;
    color: #fff;
}

.dv-card-thumbnail {
    height: 200px;
    overflow: hidden;
}

.dv-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dv-card:hover .dv-card-thumbnail img {
    transform: scale(1.05);
}

.dv-card-body {
    padding: 25px;
}

.dv-card-body .dv-card-country {
    margin-bottom: 10px;
}

.dv-card-body .dv-card-country .dv-flag {
    font-size: 1.3em;
}

.dv-card-body .dv-card-title {
    font-size: 1.4em;
    margin: 0 0 15px;
    line-height: 1.3;
}

.dv-card-body .dv-card-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.dv-card-body .dv-card-title a:hover {
    color: #0073aa;
}

.dv-card-details {
    margin-bottom: 20px;
}

.dv-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.dv-detail-item svg {
    flex-shrink: 0;
    color: #94a3b8;
}

/* Card Participants */
.dv-card-participants {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.dv-avatar-stack {
    display: flex;
}

.dv-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    background: #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-avatar:first-child {
    margin-left: 0;
}

.dv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-avatar svg {
    color: #94a3b8;
}

.dv-avatar-more {
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.dv-participants-label {
    font-size: 0.85em;
    color: #64748b;
}

.dv-card-body .dv-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.dv-card-body .dv-card-link:hover {
    gap: 10px;
}

/* No Results */
.dv-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
}

.dv-no-results svg {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.dv-no-results h2 {
    margin: 0 0 10px;
    color: #1e293b;
}

.dv-no-results p {
    margin: 0;
    color: #64748b;
}

/* Pagination */
.dv-pagination,
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dv-pagination .page-numbers,
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
}

.dv-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.dv-pagination .page-numbers.current,
.pagination .page-numbers.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* ================================================
   SINGLE TEMPLATE STYLES
   ================================================ */

.dv-single-wrapper {
    background: #f5f7fa;
    min-height: 100vh;
    padding: 40px 20px;
}

.dv-single-container {
    max-width: 900px;
    margin: 0 auto;
}

.dv-back-link {
    margin-bottom: 30px;
}

.dv-back-link a {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

.dv-back-link a:hover {
    color: #0073aa;
}

/* Single Header */
.dv-single-header {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.dv-featured-image {
    height: 350px;
    overflow: hidden;
}

.dv-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-header-content {
    padding: 35px;
}

.dv-single-title {
    font-size: 2.2em;
    color: #1e293b;
    margin: 0 0 20px;
    line-height: 1.2;
}

.dv-single-country {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.dv-flag-large {
    font-size: 2.5em;
    line-height: 1;
}

.dv-single-country .dv-country-name {
    font-size: 1.3em;
    font-weight: 500;
    color: #334155;
}

.dv-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.dv-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dv-meta-icon {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0073aa;
}

.dv-meta-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dv-meta-label {
    font-size: 0.8em;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.dv-meta-value {
    font-size: 1.05em;
    color: #334155;
    font-weight: 500;
}

/* Sections */
.dv-section {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.dv-section .dv-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5em;
    color: #1e293b;
    margin: 0 0 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.dv-section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.dv-participant-count {
    font-size: 0.6em;
    color: #94a3b8;
    font-weight: 400;
}

/* Timeline */
.dv-agenda-section .dv-agenda-timeline {
    padding-left: 60px;
}

.dv-timeline-item {
    position: relative;
    padding-bottom: 35px;
}

.dv-timeline-item:last-child {
    padding-bottom: 0;
}

.dv-timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50px;
    bottom: -35px;
    width: 2px;
    background: linear-gradient(to bottom, #0073aa, #e2e8f0);
}

.dv-timeline-item:last-child::before {
    display: none;
}

.dv-timeline-marker {
    position: absolute;
    left: -60px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.dv-day-num {
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
}

.dv-timeline-content {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #0073aa;
}

.dv-timeline-date {
    font-size: 0.9em;
    color: #0073aa;
    font-weight: 600;
    margin-bottom: 8px;
}

.dv-timeline-title {
    font-size: 1.25em;
    color: #1e293b;
    margin: 0 0 12px;
}

.dv-timeline-description {
    color: #64748b;
    line-height: 1.7;
}

.dv-timeline-description p:last-child {
    margin-bottom: 0;
}

/* Participants Grid */
.dv-participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.dv-participant-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dv-participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dv-participant-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    background: #e2e8f0;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dv-participant-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.dv-participant-name {
    font-size: 1.05em;
    color: #1e293b;
    margin: 0 0 5px;
    font-weight: 600;
}

.dv-participant-title {
    font-size: 0.85em;
    color: #64748b;
    margin: 0;
}

/* Template Responsive */
@media (max-width: 768px) {
    .dv-archive-title {
        font-size: 2em;
    }

    .dv-delegations-grid {
        grid-template-columns: 1fr;
    }

    .dv-single-title {
        font-size: 1.6em;
    }

    .dv-single-meta {
        flex-direction: column;
        gap: 20px;
    }

    .dv-featured-image {
        height: 250px;
    }

    .dv-section {
        padding: 25px;
    }

    .dv-agenda-section .dv-agenda-timeline {
        padding-left: 50px;
    }

    .dv-timeline-marker {
        left: -50px;
        width: 36px;
        height: 36px;
    }

    .dv-timeline-item::before {
        left: -32px;
    }

    .dv-participants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dv-header-content,
    .dv-section {
        padding: 20px;
    }

    .dv-participants-grid {
        grid-template-columns: 1fr;
    }

    .dv-card-thumbnail {
        height: 160px;
    }
}
