/**
 * RBZ Recent Uploads - Frontend Styles
 */

/* ========== COMMON STYLES ========== */
.rbz-recent-uploads {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 24px 0;
}

.rbz-no-uploads {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 15px;
}

/* Upload badges */
.rbz-upload-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rbz-badge-tender {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.rbz-badge-mps {
    background: rgba(230, 173, 27, 0.15);
    color: #b8860b;
}

.rbz-badge-event {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.rbz-badge-document {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* ========== LIST VIEW ========== */
.rbz-recent-uploads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rbz-upload-item {
    display: flex;
    gap: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #e6ad1b;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(7, 20, 72, 0.04);
}

.rbz-upload-item:hover {
    transform: translateX(4px);
    border-left-color: #d4a017;
    box-shadow: 0 8px 24px rgba(7, 20, 72, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #fffdf9 100%);
}

.rbz-upload-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    border-radius: 12px;
    color: white;
}

.rbz-upload-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.rbz-upload-content {
    flex: 1;
    min-width: 0;
}

.rbz-upload-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rbz-upload-date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.rbz-upload-title {
    font-size: 16px;
    font-weight: 600;
    color: #071448;
    margin: 0 0 8px;
    line-height: 1.4;
}

.rbz-upload-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rbz-upload-title a:hover {
    color: #e6ad1b;
}

.rbz-upload-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.6;
}

.rbz-upload-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #e6ad1b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rbz-upload-link:hover {
    color: #d4a017;
    gap: 8px;
}

.rbz-upload-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
}

.rbz-upload-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== CAROUSEL VIEW ========== */
.rbz-recent-uploads-carousel {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.rbz-carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(7, 20, 72, 0.06);
}

.rbz-carousel-track {
    position: relative;
    height: 450px;
}

.rbz-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.rbz-carousel-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.rbz-upload-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: white;
}

.rbz-upload-image {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f3f4f6;
}

.rbz-upload-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rbz-upload-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rbz-upload-card .rbz-upload-header {
    margin-bottom: 14px;
}

.rbz-upload-card .rbz-upload-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #071448;
}

.rbz-upload-card .rbz-upload-description {
    font-size: 15px;
    line-height: 1.7;
    color: #6b7280;
    margin-bottom: 20px;
    flex: 1;
}

.rbz-upload-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.rbz-upload-button:hover {
    background: linear-gradient(135deg, #d4a017, #c78124);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 173, 27, 0.3);
    color: white;
}

/* Carousel Controls */
.rbz-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 16px;
}

.rbz-carousel-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #071448;
}

.rbz-carousel-btn:hover {
    background: #e6ad1b;
    border-color: #e6ad1b;
    color: white;
    transform: scale(1.1);
}

.rbz-carousel-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.rbz-carousel-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rbz-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rbz-carousel-indicator.active {
    width: 24px;
    border-radius: 4px;
    background: #e6ad1b;
}

.rbz-carousel-indicator:hover {
    background: #9ca3af;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .rbz-upload-item {
        flex-direction: column;
    }
    
    .rbz-upload-thumbnail {
        width: 100%;
        height: 160px;
        order: -1;
    }
    
    .rbz-recent-uploads-carousel {
        max-width: 100%;
    }
    
    .rbz-carousel-track {
        height: 500px;
    }
    
    .rbz-upload-card {
        padding: 20px;
    }
    
    .rbz-carousel-controls {
        gap: 12px;
    }
    
    .rbz-carousel-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .rbz-upload-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .rbz-carousel-track {
        height: 550px;
    }
}

/* ========== HOMEPAGE VIEW (TWO COLUMN LAYOUT) ========== */
.rbz-homepage-section {
    padding: 60px 0;
}

.rbz-homepage-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.rbz-homepage-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.rbz-homepage-col {
    flex: 1;
}

.rbz-homepage-col-8 {
    flex: 0 0 calc(66.666% - 20px);
    max-width: calc(66.666% - 20px);
}

.rbz-homepage-col-4 {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
}

.rbz-section-header {
    margin-bottom: 32px;
}

.rbz-section-title {
    font-size: 39px;
    font-weight: 700;
    color: #071448;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Recent Documents Grid - 3 columns, 2 rows for 6 cards */
.rbz-documents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-height: none;
}

/* Compact document card - modern minimal style */
.rbz-document-card {
    position: relative;
    overflow: hidden;
    background: #ffffff !important;
    border-radius: 14px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 5px 10px 0 rgba(41, 61, 102, .2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 214px;
}

.rbz-document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px 0 rgba(41, 61, 102, .3) !important;
    border-color: #e6ad1b;
}

/* Card content wrapper */
.rbz-document-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.rbz-document-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rbz-document-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #071448, #0a1d5c);
    border-radius: 10px;
}

.rbz-document-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.rbz-document-date {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rbz-document-title {
    font-size: 14px;
    font-weight: 600;
    color: #071448;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.rbz-document-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rbz-document-title a:hover {
    color: #e6ad1b;
}

.rbz-document-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    align-self: stretch;
    text-align: center;
    box-shadow: 0 2px 8px rgba(230, 173, 27, 0.2);
}

.rbz-document-link:hover {
    background: linear-gradient(135deg, #071448, #0a1d5c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 20, 72, 0.3);
    color: white;
}

.rbz-document-link::after {
    content: '↓';
    font-size: 13px;
    font-weight: 700;
}

/* Event Calendar Carousel - Clean Design */
.rbz-calendar-carousel {
    position: relative;
    background: #ffffff !important;
    border-radius: 14px;
    border: 1px solid #e8eaf0;
    overflow: hidden;
    box-shadow: 0 5px 10px 0 rgba(41, 61, 102, .2) !important;
}

.rbz-calendar-track {
    position: relative;
    height: 400px;
    background: white;
    overflow: hidden;
}

.rbz-calendar-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.rbz-calendar-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.rbz-calendar-card {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rbz-calendar-image {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rbz-calendar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rbz-calendar-card:hover .rbz-calendar-image img {
    transform: scale(1.05);
}

.rbz-calendar-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modern date badge with RBZ colors */
.rbz-calendar-date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(230, 173, 27, 0.2);
    flex-shrink: 0;
}

.rbz-cal-day {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.rbz-cal-month {
    font-size: 9px;
    font-weight: 600;
    color: #071448;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

.rbz-cal-year {
    font-size: 8px;
    font-weight: 500;
    color: rgba(7, 20, 72, 0.75);
    margin-top: 0px;
}

.rbz-calendar-title {
    font-size: 13px;
    font-weight: 700;
    color: #071448;
    margin: 0;
    line-height: 1.3;
}

.rbz-calendar-title-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
}

.rbz-calendar-title-row .rbz-calendar-title {
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.rbz-calendar-title-row .rbz-calendar-date-badge {
    margin-bottom: 0;
    flex-shrink: 0;
}

.rbz-calendar-description {
    display: none;
    margin: 0;
    flex: 1;
}

/* Modern dot navigation with RBZ colors */
.rbz-calendar-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #fafbfc;
    border-top: 1px solid #e8eaf0;
}

.rbz-calendar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rbz-calendar-dot.active {
    width: 24px;
    border-radius: 4px;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    box-shadow: 0 2px 6px rgba(230, 173, 27, 0.3);
}

.rbz-calendar-dot:hover:not(.active) {
    background: #9ca3af;
    transform: scale(1.2);
}

/* View All link with RBZ colors */
.rbz-calendar-link-wrapper {
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid #e8eaf0;
}

.rbz-view-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #e6ad1b, #d4a017);
    text-decoration: none !important;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(230, 173, 27, 0.2);
}

.rbz-view-all-link::after {
    content: '→';
    font-size: 14px;
    font-weight: 700;
}

.rbz-view-all-link:hover {
    background: linear-gradient(135deg, #071448, #0a1d5c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 20, 72, 0.3);
    color: white;
}

.rbz-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 15px;
    background: white;
    border-radius: 14px;
}

/* Homepage Responsive */
@media (max-width: 991px) {
    .rbz-homepage-row {
        flex-direction: column;
    }
    
    .rbz-homepage-col-8,
    .rbz-homepage-col-4 {
        flex: 1;
        max-width: 100%;
    }
    
    .rbz-homepage-col-4 {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .rbz-documents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .rbz-section-title {
        font-size: 28px;
    }
    
    .rbz-calendar-track {
        height: 380px;
    }
    
    .rbz-document-card {
        padding: 10px;
    }
    
    .rbz-document-title {
        font-size: 10px;
    }
    
    .rbz-document-link {
        font-size: 9px;
        padding: 5px 10px;
    }
    
    .rbz-calendar-title {
        font-size: 12px;
    }
    
    .rbz-calendar-description {
        font-size: 10px;
    }
    
    .rbz-cal-day {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .rbz-homepage-container {
        padding: 0 12px;
    }
    
    .rbz-homepage-section {
        margin: 20px 0;
    }
    
    .rbz-homepage-row {
        gap: 20px;
    }
    
    .rbz-section-title {
        font-size: 24px;
    }
    
    .rbz-section-header {
        margin-bottom: 12px;
    }
    
    .rbz-documents-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: none;
    }
    
    .rbz-document-card {
        padding: 10px;
    }
    
    .rbz-document-title {
        font-size: 11px;
        -webkit-line-clamp: 3;
    }
    
    .rbz-document-icon .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .rbz-document-link {
        font-size: 9px;
        padding: 5px 10px;
    }
    
    .rbz-calendar-card {
        padding: 16px;
    }
    
    .rbz-calendar-track {
        height: 360px;
    }
    
    .rbz-calendar-image {
        height: 180px;
        margin-bottom: 12px;
    }
    
    .rbz-calendar-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rbz-calendar-title-row .rbz-calendar-date-badge {
        align-self: flex-start;
    }
    
    .rbz-cal-day {
        font-size: 20px;
    }
    
    .rbz-cal-month {
        font-size: 9px;
    }
    
    .rbz-cal-year {
        font-size: 8px;
    }
}
