
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --transparent-yellow: #F5EFC6;
    --sceptre-red: #4D0E12;
    --cerulean-blue: #A5BCD6;
    --potting-soil: #4A2E27;
    --java-brown: #231815;
    --white: #FFFFFF;
    --background: #FAFAFA;
    --border: #E5E5E5;
    --muted: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--background);
    color: var(--java-brown);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    -webkit-tap-highlight-color: transparent;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

/* HEADER */

#mainHeader {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

#mainHeader.scrolled {
    box-shadow: 0 4px 18px rgba(35, 24, 21, 0.08);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    min-height: 85px;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--sceptre-red);
    line-height: 1.25;
}

.logo-text h1 span {
    color: var(--potting-soil);
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* NAVIGATION */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--java-brown);
    transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 3px;
    height: 2px;
    background: var(--sceptre-red);
    transition: right 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sceptre-red);
}

.nav-link:hover::after,
.nav-link.active::after {
    right: 0;
}

/* SIGN IN AND LOGIN BUTTONS */

.btn-signin,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 17px;
    border: 1px solid var(--sceptre-red);
    border-radius: 30px;
    background: transparent;
    color: var(--sceptre-red) !important;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-signin:hover,
.btn-login:hover {
    background: var(--sceptre-red);
    color: var(--white) !important;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 21px;
    border: 1px solid var(--sceptre-red);
    border-radius: 30px;
    background: var(--sceptre-red);
    color: var(--transparent-yellow) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--potting-soil);
    border-color: var(--potting-soil);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(77, 14, 18, 0.15);
}

/* MOBILE MENU */

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--sceptre-red);
    font-size: 1.3rem;
    cursor: pointer;
}

/* MAIN RESOURCE HUB */

.hub-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

.hub-header {
    margin-bottom: 28px;
}

.hub-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sceptre-red);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: gap 0.2s ease;
}

.hub-back-link:hover {
    gap: 12px;
}

.hub-title-area {
    margin-bottom: 25px;
}

.hub-title-area span {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--potting-soil);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hub-title-area h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--sceptre-red);
    margin-bottom: 12px;
}

.hub-title-area p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

/* SEARCH */

.hub-search-box {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.hub-search-box input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px 14px 48px;
    border: 1px solid var(--cerulean-blue);
    border-radius: 30px;
    outline: none;
    background: var(--white);
    color: var(--java-brown);
    font-size: 0.95rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-search-box input::placeholder {
    color: #888888;
}

.hub-search-box input:focus {
    border-color: var(--sceptre-red);
    box-shadow: 0 0 0 3px rgba(77, 14, 18, 0.08);
}

.hub-search-box i {
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--potting-soil);
    pointer-events: none;
}

/* FILTER TABS */

.hub-filter-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 9px 18px;
    border: 1px solid #E2DAC4;
    border-radius: 25px;
    background: var(--transparent-yellow);
    color: var(--java-brown);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--sceptre-red);
    color: var(--transparent-yellow);
    border-color: var(--sceptre-red);
}

/* RESOURCE GRID */

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

.resource-card {
    min-width: 0;
    min-height: 280px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid #E8E4E0;
    border-radius: 18px;
    box-shadow: 0 3px 12px rgba(35, 24, 21, 0.035);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    border-color: var(--cerulean-blue);
    box-shadow: 0 12px 28px rgba(35, 24, 21, 0.09);
}

.resource-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.25rem;
    margin-bottom: 18px;
}

.resource-icon.blue {
    background: #E3EDF7;
    color: #315F91;
}

.resource-icon.yellow {
    background: #FAF4D9;
    color: #856A12;
}

.resource-icon.brown {
    background: #EFEBE9;
    color: #5D4037;
}

.resource-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--transparent-yellow);
    color: var(--sceptre-red);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 12px;
}

.resource-content {
    width: 100%;
    flex: 1;
}

.resource-content h3 {
    color: var(--sceptre-red);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
    margin-bottom: 10px;
}

.resource-content p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    margin-bottom: 18px;
}

.explore-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: auto;
    padding: 5px 0;
    border: none;
    background: transparent;
    color: var(--sceptre-red);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    transition: gap 0.25s ease;
}

.explore-link:hover {
    gap: 13px;
    text-decoration: underline;
}

.explore-link i {
    font-size: 0.85rem;
}

/* HIDDEN RESOURCE CARDS */

.resource-card.hidden-card {
    display: none !important;
}

/* EMPTY SEARCH RESULTS */

.no-results {
    grid-column: 1 / -1;
    padding: 45px 20px;
    border: 1px dashed var(--cerulean-blue);
    border-radius: 16px;
    background: var(--white);
    text-align: center;
    color: var(--muted);
}

.no-results i {
    display: block;
    margin-bottom: 12px;
    color: var(--sceptre-red);
    font-size: 2rem;
}

/* MODAL */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    width: 100%;
    height: 100%;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(25, 15, 13, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 650px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 35px;
    border: 1px solid rgba(245, 239, 198, 0.7);
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.25s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--transparent-yellow);
    color: var(--sceptre-red);
    font-size: 1rem;
    transition: all 0.25s ease;
}

.modal-close:hover {
    background: var(--sceptre-red);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-header-tag {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 7px;
    background: var(--transparent-yellow);
    color: var(--sceptre-red);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.modal-title {
    padding-right: 35px;
    color: var(--sceptre-red);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
}

.modal-body {
    color: #555555;
}

.modal-body h3 {
    color: var(--sceptre-red);
    font-size: 1.08rem;
    margin: 22px 0 10px;
}

.modal-body p,
.modal-body ul,
.modal-body ol {
    color: #555555;
    font-size: 0.95rem;
    line-height: 1.85;
}

.modal-body p {
    margin-bottom: 14px;
}

.modal-body ul,
.modal-body ol {
    padding-left: 24px;
    margin: 10px 0 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #F1F1F1;
    color: var(--sceptre-red);
    font-family: monospace;
    overflow-wrap: anywhere;
}

.modal-body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 16px;
    border-radius: 10px;
    background: #F4F2EF;
    color: var(--java-brown);
    margin: 15px 0;
}

.modal-body pre code {
    padding: 0;
    background: transparent;
}

/* FOOTER */

footer {
    width: 100%;
    margin-top: 70px;
    padding: 50px 24px 20px;
    background: var(--sceptre-red);
    color: var(--white);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 35px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 35px;
}

.footer-brand,
.footer-column {
    min-width: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.footer-logo img {
    width: auto;
    height: 42px;
    object-fit: contain;
}

.footer-logo strong {
    display: block;
    color: var(--transparent-yellow);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.4;
}

.footer-logo span {
    display: block;
    color: #E0D6D3;
    font-size: 0.75rem;
}

.footer-brand p {
    max-width: 330px;
    color: #E0D6D3;
    font-size: 0.88rem;
    line-height: 1.8;
}

.footer-column h4 {
    color: var(--transparent-yellow);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 17px;
}

.footer-column a {
    display: block;
    width: fit-content;
    max-width: 100%;
    color: #E0D6D3;
    text-decoration: none;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--transparent-yellow);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.25s ease;
}

.social-links a:hover {
    background: var(--transparent-yellow);
    color: var(--sceptre-red);
    text-decoration: none;
}

.support-email {
    display: inline-block;
    max-width: 100%;
    color: var(--transparent-yellow);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: #D3C4C1;
    font-size: 0.8rem;
}

.footer-bottom a {
    color: var(--transparent-yellow);
    text-decoration: none;
}

/* TABLET */

@media (max-width: 1024px) {
    .nav-container {
        gap: 16px;
        padding: 14px 20px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 0.84rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .logo-text h1 {
        font-size: 1.05rem;
    }

    .logo-text p {
        font-size: 0.68rem;
    }

    .btn-signin,
    .btn-login {
        padding: 8px 12px;
    }

    .btn-primary {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 28px;
    }
}

/* MOBILE */

@media (max-width: 768px) {
    #mainHeader {
        position: sticky;
    }

    .nav-container {
        min-height: 75px;
        padding: 12px 18px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .logo-area {
        gap: 9px;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.68rem;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
        flex-shrink: 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 5px;
        order: 3;
        width: 100%;
        padding: 15px 0 5px;
        border-top: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 14px;
        border-radius: 8px;
        font-size: 0.92rem;
        white-space: normal;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: #F8F1E9;
        color: var(--sceptre-red);
    }

    .nav-link::after {
        display: none;
    }

    .btn-signin,
    .btn-login,
    .btn-primary {
        justify-content: center;
        text-align: center;
    }

    .hub-container {
        margin: 28px auto 45px;
        padding: 0 18px;
    }

    .hub-title-area h1 {
        font-size: 2rem;
    }

    .hub-title-area p {
        font-size: 0.92rem;
    }

    .hub-filter-tabs {
        gap: 8px;
        margin-bottom: 24px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .resource-card {
        min-height: 260px;
        padding: 19px;
        border-radius: 15px;
    }

    .resource-content h3 {
        font-size: 1rem;
    }

    .resource-content p {
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 28px 22px;
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 22px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    footer {
        margin-top: 50px;
        padding: 40px 20px 20px;
    }
}

/* SMALL MOBILE */

@media (max-width: 480px) {
    .nav-container {
        padding: 11px 14px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
    }

    .logo-text h1 {
        font-size: 0.92rem;
    }

    .logo-text p {
        font-size: 0.62rem;
    }

    .menu-toggle {
        width: 39px;
        height: 39px;
        font-size: 1.15rem;
    }

    .hub-container {
        padding: 0 14px;
        margin-top: 24px;
    }

    .hub-back-link {
        font-size: 0.86rem;
    }

    .hub-title-area span {
        font-size: 0.72rem;
        letter-spacing: 1px;
    }

    .hub-title-area h1 {
        font-size: 1.7rem;
    }

    .hub-title-area p {
        font-size: 0.88rem;
        line-height: 1.7;
    }

    .hub-search-box input {
        min-height: 48px;
        padding: 12px 15px 12px 42px;
        font-size: 0.88rem;
    }

    .hub-search-box i {
        left: 15px;
    }

    .hub-filter-tabs {
        gap: 7px;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .resource-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .resource-card {
        min-height: 0;
        padding: 22px;
    }

    .resource-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 14px;
    }

    .resource-content h3 {
        font-size: 1.08rem;
    }

    .resource-content p {
        font-size: 0.88rem;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-content {
        max-height: 90vh;
        padding: 26px 18px;
        border-radius: 15px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }

    .modal-title {
        padding-right: 30px;
        font-size: 1.3rem;
    }

    .modal-body p,
    .modal-body ul,
    .modal-body ol {
        font-size: 0.88rem;
    }

    .footer-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 25px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-column h4 {
        margin-bottom: 12px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
