/* LAYOUT */
.resource-main {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.resource-sidebar {
    width: 25%;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.resource-results {
    width: 75%;
}

/* FILTERS */
.filter-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.filter-list li {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: 0.2s;
}

.filter-list li:hover {
    background: #f5f5f5;
}

.filter-list li.active {
    background: #3a7d7c;
    color: #fff;
}

/* GRID */
#resource-output {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* CARD */
.resource-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #eee;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-image img {
    width: 100%;
    height: 180px !important;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 18px;
    margin: 10px 0;
}

.card-content p {
    font-size: 14px;
    color: #666;
}

.badge {
    display: inline-block;
    font-size: 12px;
    background: #3a7d7c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}

.card-footer {
    margin-top: 10px;
    font-size: 14px;
    color: #3a7d7c;
}

/* LOADING */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
}

/* Container Spacing */
.featured-resources {
    margin: 40px 0;
}

/* The Card - Removed fixed widths */
.featured-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #111;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.25s ease;
    height: 100%; /* Ensures all cards in a row are same height */
    margin-bottom: 10px; /* Space for shadow */
}

.featured-card:hover {
    transform: translateY(-5px);
}

/* Image Handling */
.featured-image {
    width: 100%;
    line-height: 0; /* Removes tiny gap under image */
}

.featured-image img {
    width: 100%;
    height: 200px !important;
    object-fit: cover;
    display: block;
}

/* Content Area */
.featured-content {
    padding: 20px;
    flex-grow: 1; /* Pushes the "View Resource" link to the bottom */
    display: flex;
    flex-direction: column;
    height:130px;
}

.featured-content h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: #002d5b; /* Darker blue for better hierarchy */
}

.featured-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    margin-top: auto; /* Aligns to bottom */
}

/* Pagination Dots */
.swiper-pagination-bullet-active {
    background: #0073aa !important;
}

.no-sidebar .resource-sidebar{
    display: none;
}
.no-sidebar .resource-results{
    width: 100%;
}

.browse-topics {
    padding: 30px 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: 20px;
}

.topics-grid a.topic-card {
    display: block;
    padding: 20px;
    background: #224284;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
}

.topic-card h3 {
    margin-bottom: 8px;
    color: #fff;
}

.topic-card p {
    color: #fff;
}

.topic-count {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* PAGE WRAPPER */
.resource-submit-wrapper{
    max-width: 900px;
    margin: 60px auto;
    padding: 20px;
    font-family: system-ui;
}

/* HERO */
.submit-hero{
    text-align: center;
    margin-bottom: 40px;
}

.submit-hero h1{
    font-size: 34px;
    margin-bottom: 10px;
}

.submit-hero p{
    color: #666;
}

/* CARD */
.submit-card{
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* GRID */
.form-grid{
    display: flex;
    gap: 30px;
}

.form-left{
    flex: 2;
}

.form-right{
    flex: 1;
}

/* INPUTS */
.form-group{
    margin-bottom: 18px;
}

label{
    display:block;
    font-weight: 600;
    margin-bottom: 6px;
}

input, textarea{
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}

textarea{
    min-height: 120px;
    resize: vertical;
}

/* IMAGE UPLOAD */
.image-upload-box{
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    cursor: pointer;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-box input{
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder{
    color: #888;
}

#previewImage{
    display:none;
    width:100%;
    border-radius:10px;
}

/* BUTTON */
.submit-btn{
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #3a7d7c;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.submit-btn:hover{
    background: #0f5bd1;
}

/* GUIDELINES */
.submit-guidelines{
    margin-top: 30px;
    padding: 20px;
    background: #f7f9fc;
    border-radius: 12px;
}

.submit-guidelines h3{
    margin-bottom: 10px;
}

.swiper-wrapper{
    padding: 50px 10px;
    padding-top: 0px;
}
.form-group select{
    padding: 5px;
}



.resource-single-container {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.resource-navigation a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    display: inline-block;
}

.resource-header h1 {
    font-size: 36px;
    color: #002d5b;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* Grid Setup */
.resource-grid-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Main Content */
.resource-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.resource-description h3 {
    color: #002d5b;
    margin-bottom: 15px;
}

.lead {
    font-size: 18px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

/* Sidebar Card */
.resource-sidebars {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.resource-info-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.info-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.info-item .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 5px;
}

.info-item .value {
    font-weight: 600;
    color: #111;
    font-size: 16px;
}

.badge {
    background: #eef4f9;
    color: #0073aa;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Buttons */
.resource-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary {
    background: #3a7d7c;
    color: #fff;
}

.btn-primary:hover {
    background: #3a7d7c;
}

.btn-secondary {
    border: 2px solid #3a7d7c;
    color: #3a7d7c;
}

/* Related Resources Section */
.section-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 60px 0;
}

.related-resources h2 {
    font-size: 28px;
    color: #002d5b;
    margin-bottom: 30px;
    text-align: center;
}

.related-resources .resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Ensure the cards look consistent with your main styles */
.related-resources .resource-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-resources .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-resources .read-more {
    margin-top: auto;
    padding-top: 15px;
}
/* CTA */
    .submit-resource {
        background: #224284;
        color: #fff;
        text-align: center;
        padding: 60px 20px;
        margin: 10px 0px;
        margin-top: 30px;
    }
    .submit-resource h2{ 
        color: #fff;
    }
    .submit-resource .btn-primary {
        display: inline-block;
        margin-top: 15px;
        padding: 12px 24px;
        background: #3a7d7c;
        color: #fff;
        border-radius: 6px;
        font-weight: 600;
    }
/* Mobile Responsive */
@media (max-width: 768px) {
    .related-resources .resource-grid {
        grid-template-columns: 1fr;
    }
}
/* Mobile */
@media (max-width: 900px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE */
@media(max-width: 768px){
    .resource-main {
        flex-direction: column;
    }

    .resource-sidebar,
    .resource-results {
        width: 100%;
    }

    #resource-output {
        grid-template-columns: 1fr;
    }

    .browse-topics{
        padding: 0px;
    }

    .form-grid{
        flex-direction: column-reverse;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .resource-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .resource-sidebar {
        position: static;
        order: -1; /* Put the info card above content on mobile if desired */
    }
}