/**
 * Content Tabs Widget Styles
 */

.content-tabs-widget {
    width: 100%;
    margin: 0 auto;
    padding: 80px 0;
}

/* Tab Navigation */
.content-tabs-header {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

.content-tabs-nav {
    display: flex;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 20px;
    border: none;
    overflow-x: auto;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
    }

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 120px;
    position: relative;
    text-transform: capitalize;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 27px */
    height: 50px;
}

.tab-btn .tab-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    color: #fff !important;
    transform: translateY(-1px);
    background: #0093CA !important;

}

.tab-btn:hover .tab-icon {
}

.tab-btn.active {
    background: #0093CA;
    color: white;
    transform: translateY(-2px);
}

.tab-btn.active .tab-icon {
    filter: brightness(1.2);
}

/* Search and Filter Components */
.content-search-filters {
    display: none;
    animation: slideDown 0.3s ease-out;
}

.content-search-filters.active {
    display: block;
}

.search-filter-container {
    background: #ffffff;
}

/* Search Form */
.search-form-group {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.search-input-wrapper.focused {
    transform: scale(1.005);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input-wrapper.focused .search-icon {
    color: #0093CA;
}

.resource-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.resource-search-input:focus {
    border-color: #0093CA;
    box-shadow: 0 0 0 3px rgba(0, 147, 202, 0.1);
    background: #fafbfc;
}

.resource-search-input::placeholder {
    color: #94a3b8;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Filters Row */
.filters-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filters-row label{
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; /* 142.857% */
}
.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus {
    border-color: #0093CA;
    box-shadow: 0 0 0 3px rgba(0, 147, 202, 0.1);
}

.filter-date {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6.75 3v2.25M13.25 3v2.25M3 9.75h14M4.5 6a1.5 1.5 0 011.5-1.5h8a1.5 1.5 0 011.5 1.5v8a1.5 1.5 0 01-1.5 1.5h-8a1.5 1.5 0 01-1.5-1.5v-8z'/%3e%3c/svg%3e");
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-clear-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* Results Summary */
.search-results-summary {
    display: none;
    padding: 12px 16px;
    background: rgba(0, 147, 202, 0.05);
    border: 1px solid rgba(0, 147, 202, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #0c5460;
}

.search-results-summary .results-count {
    font-weight: 600;
}

.search-results-summary .active-filters {
    color: #64748b;
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: #0093CA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.no-content-message {
    text-align: center;
    padding: 60px 20px;
    background: #fafbfc;
    border-radius: 8px;
    margin: 20px 0;
}

.no-content-message .no-content {
    font-size: 18px;
    color: #475569;
    margin-bottom: 8px;
}

.no-content-message .search-hint,
.no-content-message .filter-hint {
    font-size: 14px;
    color: #64748b;
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tab Content */
.content-tabs-content {
    background-color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1fr, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

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

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

.card-content {
    padding: 20px;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #0093CA;
}

.card-excerpt {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
    color: #999;
}

.post-date,
.post-category,
.resource-type {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.resource-type {
    background: #d1ecf1;
    color: #0c5460;
}

.post-category {
    background: #e2e3e5;
    color: #495057;
}

.read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0093CA;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #007bb5;
    color: white;
}

/* No Content Message */
.no-content {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Loading State */
.content-tabs-widget.loading .tab-content {
    position: relative;
}

.content-tabs-widget.loading .tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.content-tabs-widget.loading .tab-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e9ecef;
    border-top-color: #0093CA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-tabs-header {
        padding: 16px;
    }

    .content-tabs-nav {
        flex-direction: row;
        gap: 4px;
        padding: 4px;
        margin-bottom: 30px;
    }

    .tab-btn {
        flex-direction: column;
        gap: 4px;
        padding: 10px 8px;
        font-size: 13px;
        min-width: auto;
    }

    .tab-btn .tab-icon {
        width: 16px;
        height: 16px;
    }


    .filters-row {
        flex-direction: column;
        gap: 12px;
        align-items: flex-end;
    }

    .filter-group {
        min-width: auto;
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: center;
    }

    .filter-clear-btn {
        width: 100%;
        justify-content: center;
    }

    .content-tabs-content {
        padding: 20px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-content {
        padding: 15px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .resource-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px 12px 44px;
    }

    .search-icon {
        left: 14px;
    }
}

@media (max-width: 480px) {
    .content-tabs-header {
        padding: 12px;
        margin-bottom: 16px;
    }

    .content-tabs-nav {
        padding: 3px;
        margin-bottom: 12px;
    }

    .tab-btn {
        padding: 8px 6px;
        font-size: 12px;
    }

    .tab-btn .tab-icon {
        width: 14px;
        height: 14px;
    }

    .content-tabs-content {
        padding: 15px;
    }

    .content-grid {
        gap: 12px;
    }

    .card-image {
        height: 160px;
    }

    .loading-spinner {
        padding: 40px 20px;
    }

    .no-content-message {
        padding: 40px 16px;
    }

    .search-results-summary {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.search-header{
    display: flex;
    width: 100%;
    justify-content: space-between;
}


/* Resource Cards */
.resource-card {
    background-color: #f5f5f5;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;

}
.resource-card-image {
    height: 100%;
    padding: 24px 0 24px 25px;
    max-width: 300px;
    max-height: 200px;
}
.resource-card-image img{
    margin: 0;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.resource-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #0093CA;
}

.resource-card-content {
    padding: 24px 24px 24px 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}
.resource-card-content:after{
    position: absolute;
    width: 8px;
    height: calc(100% - 30px);
    margin: auto 0;
    border-right: 99px;
    background: #F9F9F9;
    left: 15px;
    top: 0;
    bottom: 0;
    content: "";
}
/* Resource Date */
.resource-date {
    margin: 0 0 15px 0;
    color: #919191;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px; /* 142.857% */
    letter-spacing: 0.28px;
}

/* Resource Title */
.resource-title {
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
    color:  #020E12;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 130%; /* 26px */
}

.resource-title:hover {
    color: #0093CA;
}

/* Resource Description */
.resource-description {
    margin: 0 0 20px 0;
    letter-spacing: 0;
    flex-grow: 1;
    color: #020E12;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 21px */

}

/* Resource Actions */
.resource-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.resource-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.learn-more-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 19.6px */
    text-decoration: none;
    letter-spacing: 0;
    transition: all 0.3s ease;
}

.learn-more-button:hover {
    transform: translateX(2px);
}

.learn-more-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.learn-more-button:hover svg {
    transform: translateX(2px);
}

.resource-type-icon {
    position: absolute;
    right: 25px;
    top: 25px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .resources-grid-wrapper {
        padding: 0 16px;
    }

    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

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

    .resources-section-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .resources-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .resource-card-content {
        padding: 18px;
    }

    .resources-section-title {
        font-size: 24px;
    }

    .resource-title {
        font-size: 16px;
    }

    .resource-description {
        font-size: 13px;
    }
}
@media (max-width: 767px){
    .resources-grid {
        grid-template-columns: repeat(1, 1fr) !important;

    }

}
@media (max-width: 480px) {
    .resources-grid-wrapper {
        padding: 0 12px;
    }

    .resource-card-content {
        padding: 16px;
    }

    .resources-section-title {
        font-size: 22px;
    }

    .resource-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Animation Enhancements */
.resource-card {
    animation: fadeInUp 0.6s ease-out;
}

.resource-card:nth-child(1) { animation-delay: 0.1s; }
.resource-card:nth-child(2) { animation-delay: 0.2s; }
.resource-card:nth-child(3) { animation-delay: 0.3s; }
.resource-card:nth-child(4) { animation-delay: 0.4s; }
.resource-card:nth-child(5) { animation-delay: 0.5s; }
.resource-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Focus States for Accessibility */
.explore-all-button:focus,
.learn-more-button:focus {
    outline: 2px solid #0093CA;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .resource-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .explore-all-button,
    .learn-more-button {
        color: #000;
    }

    .explore-all-button svg,
    .learn-more-button svg {
        display: none;
    }
}

@media(max-width: 767px){
    .content-tabs-nav{
        flex-direction: column;
    }
    .search-header{
        flex-direction: column;
    }
    .resource-card-content {
        padding: 16px 16px 16px 50px;
    }

}

/* jQuery UI Datepicker Custom Styling */
.ui-datepicker {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    width: 280px !important;
}

.ui-datepicker-header {
    background: #0093CA;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ui-datepicker-title {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.ui-datepicker-title select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 0 4px;
    font-size: 13px;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: block;
    border: solid white;
    border-width: 0 2px 2px 0;
    padding: 3px;
}

.ui-datepicker-prev span {
    transform: rotate(135deg);
    margin-left: 3px;
}

.ui-datepicker-next span {
    transform: rotate(-45deg);
    margin-right: 3px;
}

.ui-datepicker-calendar {
    width: 100%;
}

.ui-datepicker-calendar th {
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 4px;
    text-align: center;
}

.ui-datepicker-calendar td {
    padding: 2px;
}

.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
    display: block;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.ui-datepicker-calendar td a:hover {
    background: #f1f5f9;
    color: #0093CA;
}

.ui-datepicker-calendar td .ui-state-active {
    background: #0093CA;
    color: white;
    font-weight: 600;
}

.ui-datepicker-calendar td .ui-state-highlight {
    background: #dbeafe;
    color: #0093CA;
}

.ui-datepicker-calendar td .ui-state-disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.ui-datepicker-calendar td .ui-state-disabled:hover {
    background: transparent;
}

.ui-datepicker-buttonpane {
    border-top: 1px solid #e2e8f0;
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ui-datepicker-buttonpane button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 16px;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.ui-datepicker-buttonpane button:hover {
    background: #0093CA;
    color: white;
    border-color: #0093CA;
}

.ui-datepicker-hint {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin: 12px -16px -16px;
    padding: 12px 16px !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #64748b !important;
    border-radius: 0 0 12px 12px;
}

/* Datepicker input cursor */
.filter-date {
    cursor: pointer;
}

.filter-date:focus {
    cursor: text;
}

/* Loading state for date filter */
.filter-date.loading {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M10 3v2m0 10v2m7-7h-2M5 10H3m11.07-4.07l-1.41 1.41M7.34 14.66l-1.41 1.41m9.9 0l-1.41-1.41M7.34 5.34L5.93 3.93'/%3e%3c/svg%3e");
    opacity: 0.6;
}
@media(max-width: 767px){
    .resource-card{
        flex-direction: column;
        max-width: 100%;
        max-height: 100%;
    }
    .resource-card-image{
        max-width: 100%;
        max-height: 100%;
        width: 100%;
    }
    .resource-card-image img {
        margin: 0;
        height: 100%;
        border-radius: 10px;
        object-fit: cover;
        width: 100%;
    }
}

.pagination-nav {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.pagination-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
}

.pagination-item {
  display: inline-block;
}

.pagination-link,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #333;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pagination-link:hover {
  background: #f5f5f5;
  border-color: #cfcfcf;
}

.pagination-current {
  background: #1F95D3;
  color: #fff;
  border-color: #1F95D3;
  cursor: default;
}

.pagination-next svg {
  margin-left: 2px;
}

.pagination-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(42,127,255,0.25);
}

/* Optional: disabled state */
.pagination-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}
