/* ============================================
   SPONSOR CUSTOMIZER STYLES (Admin Side)
   ============================================ */

/* Image selector button */
.fa-sponsor-add-image {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.fa-sponsor-add-image:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Sponsor data textarea */
#customize-control-fa_sponsors_data textarea {
    min-height: 150px;
    font-family: monospace;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Formatting hint */
#customize-control-fa_sponsors_data .description {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    display: block;
}

/* ============================================
   SPONSOR SECTION STYLES (Frontend)
   ============================================ */

/* Sponsor Grid Container */
.brand-main-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 0 -15px;
    padding: 0;
    list-style: none;
}

/* Individual Sponsor Item */
.brand-item {
/*     flex: 0 0 calc(25% - 30px);
    max-width: calc(25% - 30px); */
    padding: 15px;
    text-align: center;
    margin: 0;
    box-sizing: border-box;
    position: relative;
}

/* Remove duplicate .brand-item styles */
.brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.brand-item:hover::before {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Sponsor Image Container */
.brand-item a,
.brand-item div {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px; /* Increased for better visibility */
    padding: 20px; /* Increased padding */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.brand-item:hover a,
.brand-item:hover div {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Sponsor Image Styling */
.brand-item img {
    max-width: 100%;
    max-height: 80px; /* Increased from 70px */
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.8;
}

.brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Sponsor Link */
.brand-item a {
    display: flex;
    text-decoration: none;
    color: inherit;
    outline: none;
}

/* Remove duplicate animation - WOW.js handles this */
/* .brand-item.wow.fadeInLeft {
    animation-name: fadeInLeft;
} */

/* Different columns option */
.sponsor-columns-2 .brand-item {
    flex: 0 0 calc(50% - 30px);
    max-width: calc(50% - 30px);
}

.sponsor-columns-3 .brand-item {
    flex: 0 0 calc(33.333% - 30px);
    max-width: calc(33.333% - 30px);
}

.sponsor-columns-4 .brand-item {
    flex: 0 0 calc(25% - 30px);
    max-width: calc(25% - 30px);
}

.sponsor-columns-5 .brand-item {
    flex: 0 0 calc(20% - 30px);
    max-width: calc(20% - 30px);
}

.sponsor-columns-6 .brand-item {
    flex: 0 0 calc(16.666% - 30px);
    max-width: calc(16.666% - 30px);
}

/* For different image sizes - remove or fix */
.brand-item.small img {
    max-height: 50px;
}

.brand-item.medium img {
    max-height: 80px;
}

.brand-item.large img {
    max-height: 100px;
}

/* Sponsor Grid Alignment */
.brand-main-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch; /* Changed from center for equal height */
    margin: 40px auto;
    max-width: 1400px; /* Increased from 1200px */
}

/* Optional: Sponsor Title Styling */
.fa-heading-area {
    margin-bottom: 50px;
    text-align: center;
}

.fa-heading-area .heading-subtitle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.fa-heading-area .heading-subtitle img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.fa-heading-area .heading-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    color: #333;
    line-height: 1.2;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .brand-item {
        flex: 0 0 calc(33.333% - 30px);
        max-width: calc(33.333% - 30px);
    }
    
    .sponsor-columns-4 .brand-item,
    .sponsor-columns-5 .brand-item,
    .sponsor-columns-6 .brand-item {
        flex: 0 0 calc(33.333% - 30px);
        max-width: calc(33.333% - 30px);
    }
}

@media (max-width: 992px) {
    .brand-item {
        flex: 0 0 calc(50% - 30px);
        max-width: calc(50% - 30px);
    }
    
    .sponsor-columns-3 .brand-item,
    .sponsor-columns-4 .brand-item,
    .sponsor-columns-5 .brand-item,
    .sponsor-columns-6 .brand-item {
        flex: 0 0 calc(50% - 30px);
        max-width: calc(50% - 30px);
    }
    
    .brand-item a,
    .brand-item div {
        height: 110px;
        padding: 15px;
    }
    
    .brand-item img {
        max-height: 70px;
    }
}

@media (max-width: 768px) {
    .brand-main-wrapper {
        gap: 20px;
        margin: 0 -10px;
    }
    
    .brand-item {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
        padding: 10px;
    }
    
    .sponsor-columns-2 .brand-item,
    .sponsor-columns-3 .brand-item,
    .sponsor-columns-4 .brand-item,
    .sponsor-columns-5 .brand-item,
    .sponsor-columns-6 .brand-item {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
    
    .brand-item a,
    .brand-item div {
        height: 100px;
        padding: 12px;
    }
    
    .brand-item img {
        max-height: 65px;
    }
    
    .fa-heading-area .heading-title {
        font-size: 30px;
    }
    
    .fa-heading-area .heading-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .brand-item {
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
    
    .sponsor-columns-2 .brand-item,
    .sponsor-columns-3 .brand-item,
    .sponsor-columns-4 .brand-item,
    .sponsor-columns-5 .brand-item,
    .sponsor-columns-6 .brand-item {
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
    
    .brand-main-wrapper {
        gap: 15px;
    }
    
    .brand-item a,
    .brand-item div {
        height: 90px;
        padding: 10px;
    }
    
    .brand-item img {
        max-height: 60px;
    }
    
    .fa-heading-area .heading-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .fa-heading-area .heading-title {
        font-size: 24px;
    }
    
    .brand-item a,
    .brand-item div {
        height: 80px;
    }
    
    .brand-item img {
        max-height: 50px;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .brand-item,
    .brand-item img,
    .brand-item::before,
    .brand-item a,
    .brand-item div {
        transition: none !important;
        animation: none !important;
    }
    
    .brand-item:hover img {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .brand-item img {
        filter: contrast(1.2) grayscale(100%);
    }
    
    .brand-item:hover img {
        filter: contrast(1.2) grayscale(0%);
    }
    
    .brand-item a,
    .brand-item div {
        border: 1px solid #000;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .brand-item a,
    .brand-item div {
        background: #2d2d2d;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .fa-heading-area .heading-title {
        color: #000;
    }
    
    .fa-heading-area .heading-subtitle {
        color: #ccc;
    }
}


/* Creative Popup Styling */
.documentary-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.documentary-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.documentary-popup-container.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Popup Header */
.popup-header {
    background: linear-gradient(90deg, #0f3460 0%, #1a1a2e 100%);
    padding: 25px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.popup-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00b4d8, transparent);
}

.popup-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.popup-title i {
    color: #00b4d8;
    font-size: 32px;
}

/* Close Button */
.popup-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: rotate(90deg);
}

/* Popup Content */
.popup-content {
    padding: 0;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Creative Table Styling */
.creative-table-wrapper {
    padding: 30px;
}

.creative-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.creative-table thead {
    background: linear-gradient(90deg, #0f3460 0%, #1a5f7a 100%);
}

.creative-table th {
    color: white;
    font-weight: 600;
    padding: 20px 15px;
    text-align: left;
    border-bottom: 2px solid #00b4d8;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.creative-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.creative-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.creative-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.06);
}

.creative-table tbody tr:hover {
    background: rgba(0, 180, 216, 0.15);
    transform: translateX(5px);
    box-shadow: -5px 0 0 #00b4d8;
}

.creative-table td {
    color: #e2e8f0;
    padding: 18px 15px;
    border: none;
    font-size: 14px;
    vertical-align: middle;
}

/* Serial Number Styling */
.serial-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 180, 216, 0.3);
}

/* Documentary Name */
.documentary-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.film-icon {
    color: #00b4d8;
    font-size: 20px;
    flex-shrink: 0;
}

.doc-title {
    color: white;
    font-weight: 600;
    line-height: 1.4;
    font-size: 15px;
}

/* Country Flag */
.country-flag-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* Awards Badge */
.awards-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffd166, #ff9e00);
    color: #1a1a2e;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.awards-badge.empty {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* PDF Icon */
.pdf-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ff6b6b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-icon-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Search and Filter */
.popup-toolbar {
    padding: 20px 30px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #00b4d8;
}

.filter-select {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #00b4d8;
}

/* Stats Bar */
.popup-stats {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value i {
    color: #00b4d8;
    font-size: 20px;
}

/* Footer */
.popup-footer {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-popup {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-close-popup:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    transform: translateY(-2px);
}

.btn-export {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
    border: none;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .documentary-popup-container {
        width: 98%;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .popup-toolbar {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .popup-content {
        max-height: calc(95vh - 180px);
    }
    
    .creative-table-wrapper {
        padding: 15px;
        overflow-x: auto;
    }
    
    .creative-table {
        min-width: 800px;
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
}