/* IPL Team News Styles - Flexbox 3 Column Design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ipl-news-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
}

/* Header Section */
.ipl-header-section {
    margin-bottom: 30px;
}

.ipl-main-title {
    font-size: 42px;
    font-weight: 700;
    color: #051339 !important;
    margin: 0 0 20px 0;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

/*.ipl-main-title:after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    bottom: -10px;*/
/*    left: 0;*/
/*    width: 80px;*/
/*    height: 4px;*/
/*    background: #051339;*/
/*    border-radius: 2px;*/
/*}*/

/* Dropdown Filter */
.ipl-filter-dropdown-wrapper {
    margin-bottom: 40px;
    position: relative;
    width: 350px;
}

.ipl-filter-dropdown {
    position: relative;
    width: 100%;
}

.ipl-dropdown-selected {
    background: #ffffff;
    border: 2px solid #e0e7ef;
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #051339;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(30, 60, 114, 0.05);
}

.ipl-dropdown-selected:hover {
    border-color: #051339;
    box-shadow: 0 6px 12px rgba(30, 60, 114, 0.1);
}

.ipl-dropdown-arrow {
    font-size: 12px;
    color: #051339;
    transition: transform 0.3s ease;
}

.ipl-filter-dropdown.active .ipl-dropdown-arrow {
    transform: rotate(180deg);
}

.ipl-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e0e7ef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 20px rgba(30, 60, 114, 0.1);
}

.ipl-filter-dropdown.active .ipl-dropdown-menu {
    display: block;
}

.ipl-dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #2c3e50;
    border-left: 3px solid transparent;
}

.ipl-dropdown-item:hover {
    background: #f0f4fa;
    color: #051339;
    border-left-color: #051339;
}

.ipl-dropdown-item.active {
    background: #051339;
    color: white;
    font-weight: 500;
    border-left-color: #ffffff;
}

.ipl-dropdown-item.active:hover {
    background: #15315f;
}

/* Latest Title */
.ipl-latest-title {
    margin-bottom: 30px;
}

.ipl-latest-title h2 {
    font-size: 28px;
    font-weight: 600;
    color: #051339 !important;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.ipl-latest-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #051339;
    border-radius: 2px;
}

/* News Feed */
.ipl-news-feed {
    min-height: 400px;
    position: relative;
}

/* Flexbox Container - 3 Columns */
.ipl-cards-flex {
    display: flex;
    flex-wrap: wrap;
    margin: -15px; /* Negative margin to offset card margins */
}

/* Individual Card - Flexbox Item */
.ipl-card {
    flex: 0 0 calc(33.333% - 30px); /* 3 columns with gap */
    margin: 15px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.ipl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30, 60, 114, 0.15);
    border-color: #051339;
}

.ipl-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ipl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.5s ease;
}

.ipl-card:hover .ipl-card-image img {
    transform: scale(1.05);
}

.ipl-card-team-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    padding: 5px 12px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.ipl-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ipl-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b !important;
}

.ipl-card-title a {
    color: #1e293b !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ipl-card-title a:hover {
    color: #051339 !important;
}

.ipl-card-excerpt {
    color: #5a6a7a;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex: 1;
}

.ipl-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
}

.ipl-card-date {
    color: #000000;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/*.ipl-card-date:before {*/
/*    content: '📅';*/
/*    font-size: 11px;*/
/*    opacity: 0.7;*/
/*}*/

.ipl-card-share {
    background: #f0f4fa;
    border: none;
    color: #051339;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.ipl-card-share:hover {
    background: #051339;
    color: white;
}

.ipl-card-share svg {
    width: 14px;
    height: 14px;
}

/* Load More Button */
.ipl-load-more-wrapper {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}

.ipl-load-more-btn {
    background: #051339;
    border: none;
    border-radius: 40px;
    /*padding: 15px 50px;*/
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 8px 15px rgba(30, 60, 114, 0.2);
    border: 2px solid transparent;
}

.ipl-load-more-btn:hover:not(:disabled) {
    background: #15315f;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(30, 60, 114, 0.3);
    color: #ffffff !important;
}

.ipl-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #95a5a6;
}

/* Loader */
.ipl-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #eef2f6;
    border-top: 5px solid #051339;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 4px 10px rgba(30, 60, 114, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.ipl-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px dashed #e0e7ef;
    width: 100%;
}

/* Share Dialog */
.ipl-share-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ipl-share-dialog-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(30, 60, 114, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ipl-share-dialog-content h3 {
    margin: 0 0 20px 0;
    color: #051339;
    font-size: 22px;
    font-weight: 600;
}

.ipl-share-link {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ipl-share-link input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e7ef;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.ipl-share-link input:focus {
    outline: none;
    border-color: #051339;
}

.ipl-share-link button {
    background: #051339;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ipl-share-link button:hover {
    background: #15315f;
}

.ipl-share-close {
    background: #f0f4fa;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    color: #051339;
    transition: all 0.2s ease;
    border: 1px solid #e0e7ef;
}

.ipl-share-close:hover {
    background: #e0e7ef;
}

/* Scrollbar Styling */
.ipl-dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.ipl-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ipl-dropdown-menu::-webkit-scrollbar-thumb {
    background: #b0c4de;
    border-radius: 4px;
}

.ipl-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #051339;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .ipl-card {
        flex: 0 0 calc(50% - 30px); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .ipl-news-container {
        padding: 20px 15px;
    }
    
    .ipl-main-title {
        font-size: 32px;
    }
    
    .ipl-filter-dropdown-wrapper {
        width: 100%;
    }
    
    .ipl-card {
        flex: 0 0 calc(100% - 30px); /* 1 column on mobile */
    }
    
    .ipl-card-image {
        height: 180px;
    }
    
    .ipl-card-title {
        font-size: 16px;
    }
    
    .ipl-load-more-btn {
        padding: 12px 35px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }
    
    .ipl-share-dialog-content {
        padding: 20px;
        width: 95%;
    }
    .ipl-main-title .bg-dark h1{
    color: #00000;
}
    
}




@media (max-width: 480px) {
    .ipl-main-title {
        font-size: 28px;
    }
    
    .ipl-latest-title h2 {
        font-size: 24px;
    }
    
    .ipl-card-image {
        height: 160px;
    }
    
    .ipl-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ipl-card-share {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .ipl-card-share,
    .ipl-load-more-wrapper,
    .ipl-filter-dropdown-wrapper {
        display: none;
    }
}