/* Resources Banner Custom Styling */

.resources-hero {
    position: relative;
    /* width: 100%; */ /* Will let it naturally span, but matching 1441 reference if needed. Responsive handles it usually */
    min-width: 320px;
    height: 279px;
    padding: 66px 80px;
    gap: 10px;
    background-image: url('Assests/Resources/resourceHeading.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    /* Assuming dark overlay to make text pop */
    background-color: #1a1a2e;
}

.resources-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.resources-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1281px;
    height: 64px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0; /* Resetting container margin to adhere to exact layout if needed, but flex takes care */
    /* Container usually centers it based on max-width, keeping it aligned with other pages */
}

.resources-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Adjusting gap for visual consistency */
}

/* Base style for the Resources heading as seen in the image - typically white */
.resources-title {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 40px; /* Guessing larger than Blog based on visual */
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.blog-subtitle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px; 
}

.blog-vertical-line {
    width: 4px;
    height: 28px;
    background-color: #FF5000; /* Tenjin orange */
}

.blog-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: 0;
    color: #FF5000; /* Accented Orange */
    margin: 0;
}

@media (max-width: 768px) {
    .resources-hero {
        padding: 40px 20px;
        height: auto;
    }
    
    .resources-title {
        font-size: 32px;
    }
    
    .blog-subtitle {
        font-size: 24px;
    }
}

/* Secondary Navigation Styles */
.resources-secondary-nav {
    background-color: rgba(245, 245, 245, 1); 
}

.nav-tabs-container {
    height: 68px;
    padding: 13px 60px;
    display: flex;
    align-items: center;
    gap: 50px; /* Instead of 16px to match image better, but user specs said gap 16px */
    justify-content: center;
}

.tab-link {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.1;
    color: #475569;
    text-decoration: none;
    position: relative;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.tab-link.active {
    color: #FF5000;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: 0; /* Bottom of the tab link */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FF5000;
}

/* Blog Cards Section */
.resources-cards-section {
    padding: 32px 0;
    background-color: rgba(245, 245, 245, 1);
}

.cards-grid-container {
    max-width: 1350px; /* Overriding default container to fit 4 cards (1269px needed) */
    margin: 0 auto;
    padding: 0 1.5rem;
    display: none; /* Hide by default */
    gap: 23px;
    flex-wrap: wrap;
    justify-content: center;
}

.cards-grid-container.active {
    display: flex; /* Show when active */
}

.resource-card {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 404px;
    border-radius: 12px;
    border: 1.75px solid rgba(220, 220, 220, 1);
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-img-wrapper {
    width: 100%;
    height: 168.89px;
    box-shadow: 0px 4px 40px 0px rgba(194, 194, 194, 0.25);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content-box {
    padding: 15px 12px 12px; /* User provided 8px 12px but layout suggests space */
    height: 235px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px 1px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.1;
    color: #1e293b;
    margin: 0;
}

.card-desc {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
    color: #475569;
    margin: 0;
    flex-grow: 1; /* Pushes date and button to bottom */
}

.card-date {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.2;
    color: #64748b;
    margin: 0 0 5px 0;
}

.card-btn {
    width: 100%; /* max width could be 256px if centered */
    margin: 0 auto;
    background-color: #FF5000;
    color: rgba(0, 0, 0, 1);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    padding: 10px 0;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.card-btn:hover {
    background-color: #ea580c;
}

@media (max-width: 1280px) {
    .nav-tabs-container {
        padding: 13px 20px;
        gap: 20px;
        overflow-x: auto;
        justify-content: flex-start;
    }
}

/* ===== Resource Read More Modal ===== */

.resource-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.resource-modal-overlay.active {
    display: flex;
    align-items: center;
}

.resource-modal-content {
    position: relative;
    display: flex;
    gap: 54px;
    min-width: 320px;
    max-width: 868px;
    width: 100%;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
    margin: 0 16px;
    align-items: stretch;
}

.resource-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(194, 194, 194, 0.25);
    border-radius: 50%;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: rgba(43, 43, 43, 1);
    line-height: 1;
    z-index: 10;
    padding: 2px 6px;
}

.resource-modal-close:hover {
    color: #FF5000;
}

/* Left image */
.resource-modal-left {
    min-width: 320px;
    max-width: 389px;
    width: 389px;
    min-height: 327px;
    max-height: 398px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.resource-modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right form side */
.resource-modal-right {
    flex: 1;
    min-width: 320px;
    max-width: 389px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.resource-modal-logo {
    width: 87px;
    height: 38px;
    object-fit: contain;
}

.resource-modal-heading {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
    color: rgba(34, 34, 34, 1);
    max-width: 357px;
}

.resource-modal-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 300px;
    max-width: 377px;
    width: 100%;
    padding: 0 32px;
    align-items: center;
}

.resource-modal-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.resource-modal-input {
    width: 100%;
    max-width: 313px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    padding: 13px 15px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: #374151;
    outline: none;
    transition: border-color 0.2s;
    background-color: #F9F9F9;
}

.resource-modal-input:focus {
    border-color: #FF5000;
}

.resource-modal-submit {
    width: 100%;
    max-width: 313px;
    min-width: 300px;
    height: 48px;
    border-radius: 4px;
    border: none;
    padding: 11px 35px;
    background: linear-gradient(180deg, #F2A16F 0%, #FF5000 100%);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.resource-modal-submit:hover {
    opacity: 0.9;
}

.resource-modal-privacy {
    min-width: 300px;
    max-width: 377px;
    width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.privacy-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 1.1;
    color: #374151;
}

.privacy-desc {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 10px;
    line-height: 1.4;
    color: #6b7280;
}

@media (max-width: 750px) {
    /* Modal overlay — center vertically on small screens */
    .resource-modal-overlay {
        align-items: center;
        padding: 12px;
    }

    /* Modal box — stacked column */
    .resource-modal-content {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
    }

    /* Left image — full width, fixed height */
    .resource-modal-left {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        min-height: 180px;
        max-height: 330px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    /* Right form — full width */
    .resource-modal-right {
        min-width: unset;
        max-width: 100%;
        width: 100%;
        padding: 4px 4px;
        gap: 10px;
    }

    .resource-modal-logo {
        width: 70px;
        height: auto;
    }

    .resource-modal-heading {
        font-size: 15px;
        max-width: 100%;
    }

    .resource-modal-form-wrapper {
        padding: 0 8px;
        max-width: 100%;
        min-width: unset;
        gap: 14px;
    }

    .resource-modal-inputs {
        gap: 10px;
    }

    .resource-modal-input {
        max-width: 100%;
        min-width: unset;
        height: 44px;
    }

    .resource-modal-submit {
        max-width: 100%;
        min-width: unset;
        height: 44px;
        padding: 10px 20px;
    }

    .resource-modal-privacy {
        max-width: 100%;
        min-width: unset;
        padding: 6px;
    }

    /* Close button — adjust position */
    .resource-modal-close {
        top: 0px;
        right: 5px;
        font-size: 20px;
        padding: 2px 4px;
    }
}


/* ===================================
   Responsive: Tablet (max 1024px)
=================================== */
@media (max-width: 1024px) {
    /* Hero */
    .resources-hero {
        padding: 50px 40px;
        height: auto;
        min-height: 200px;
    }

    .resources-title {
        font-size: 32px;
    }

    .blog-subtitle {
        font-size: 26px;
    }

    /* Secondary nav */
    .nav-tabs-container {
        padding: 12px 20px;
        gap: 24px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-tabs-container::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        font-size: 17px;
        white-space: nowrap;
    }

    /* Cards — 2 columns on tablet */
    .cards-grid-container {
        gap: 16px;
        padding: 0 24px;
    }

    .resource-card {
        width: calc(50% - 8px);
        min-width: unset;
        max-width: unset;
        height: auto;
    }

    .card-img-wrapper {
        height: 140px;
    }

    .card-content-box {
        height: auto;
    }

    /* Modal */
    .resource-modal-content {
        gap: 28px;
        padding: 14px;
    }

    .resource-modal-left {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }

    .resource-modal-right {
        min-width: unset;
    }
}

/* ===================================
   Responsive: Mobile (max 768px)
=================================== */
@media (max-width: 768px) {
    /* Hero */
    .resources-hero {
        padding: 40px 20px;
        height: auto;
        min-height: 160px;
    }

    .resources-title {
        font-size: 26px;
    }

    .blog-subtitle {
        font-size: 20px;
    }

    .blog-vertical-line {
        height: 20px;
    }

    /* Secondary nav */
    .resources-secondary-nav {
        background-color: #f8fafc;
        z-index: 999;
    }

    .nav-tabs-container {
        padding: 10px 16px;
        gap: 5px;
        height: auto;
        min-height: 40px;
    }

    .tab-link {
        font-size: 15px;
        padding: 0 4px;
    }

    /* Cards — 1 column on mobile */
    .resources-cards-section {
        padding: 20px 0;
    }

    .cards-grid-container {
        padding: 0 16px;
        gap: 16px;
        flex-direction: column;
        align-items: center;
    }

    .resource-card {
        width: 100%;
        /* max-width: 360px; */
        min-width: unset;
        height: auto;
    }

    .card-img-wrapper {
        height: 220px;
    }

    .card-content-box {
        height: auto;
        gap: 8px;
    }

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

    .card-btn {
        max-width: 100%;
    }

    /* Modal — stacked on mobile */
    .resource-modal-overlay {
        align-items: flex-end;
    }

    .resource-modal-content {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        max-height: 92vh;
        overflow-y: auto;
    }

    .resource-modal-left {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        min-height: 160px;
    }

    .resource-modal-right {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }

    .resource-modal-form-wrapper {
        padding: 0 8px;
    }

    .resource-modal-input,
    .resource-modal-submit {
        max-width: 100%;
        min-width: unset;
    }
}

/* ===================================
   Responsive: Small Mobile (max 480px)
=================================== */
@media (max-width: 480px) {
    .resources-title {
        font-size: 22px;
    }

    .blog-subtitle {
        font-size: 17px;
    }

    .tab-link {
        font-size: 13px;
    }

    .resource-modal-heading {
        font-size: 15px;
    }
}

