/* ========================================
   RESOURCES PAGE - CLEAN PREMIUM SAAS STYLE
   ======================================== */

/* CSS Variables */
:root {
    --primary-orange: #ff7a00;
    --orange-light: #FFF4ED;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-900: #171717;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Mapped Variables for Shared Footer */
    --text-main: var(--gray-900);
    --text-secondary: var(--gray-600);
    --primary: var(--primary-orange);
    --border: var(--gray-200);
    --secondary: var(--orange-light);
    --background: var(--white);
    --background-alt: var(--gray-50);
    --font-heading: 'Inter', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   STICKY CATEGORY NAVIGATION
   ======================================== */
.category-nav {
    position: sticky;
    top: 68px; /* Below the main navbar */
    z-index: 90;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-nav-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-nav-btn {
    flex-shrink: 0;
    padding: 0.625rem 1.5rem;
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.category-nav-btn:hover {
    background-color: var(--primary-orange);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.category-nav-btn:active {
    transform: translateY(0);
}

/* ========================================
   AD PLACEHOLDERS
   ======================================== */
.ad-placeholder {
    background-color: transparent;
    border: none;
    padding: 0;
    text-align: center;
    margin: 1rem 0;
}

/* ========================================
   CATEGORY SECTIONS
   ======================================== */
.category-section {
    padding: 2rem 0;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* ========================================
   RESOURCES GRID
   ======================================== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
}

.resource-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.resource-icon {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.resource-description {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.resource-button {
    background-color: var(--primary-orange);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.resource-button:hover {
    background-color: #e66d00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.resource-button:active {
    transform: translateY(0);
}

/* ========================================
   SEE MORE / LESS FUNCTIONALITY
   ======================================== */
.see-more-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.see-more-btn {
    background-color: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.see-more-btn:hover {
    background-color: var(--primary-orange);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.see-more-btn:active {
    transform: translateY(0);
}

.see-more-btn.active {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.see-more-btn.active:hover {
    background-color: var(--gray-200);
    color: var(--gray-900);
}

.hidden-resources {
    display: contents;
}


/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .category-title {
        font-size: 1.75rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .container {
        padding: 0 1.25rem;
    }

    .nav-container {
        padding: 0 1.25rem;
    }

    .category-nav-container {
        padding: 0 1.25rem;
        gap: 0.5rem;
    }

    .category-nav-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .category-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .resource-card {
        padding: 1.5rem;
    }

    .ad-placeholder {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .category-section {
        padding: 1.5rem 0;
    }
}

/* Extra large screens */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }

    .nav-container {
        max-width: 1400px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--orange-light);
    color: var(--primary-orange);
}

::-moz-selection {
    background-color: var(--orange-light);
    color: var(--primary-orange);
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-container {
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-600);
    pointer-events: none;
}

#resourceSearch {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    color: var(--gray-900);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    font-family: inherit;
}

#resourceSearch:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.1);
}

#resourceSearch::placeholder {
    color: var(--gray-600);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-orange);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #e66d00;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(255, 122, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(0);
}

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

.resource-card {
    /* Existing styles remain, adding animation prep */
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Staggered animation delays for grid items */
.resources-grid .resource-card:nth-child(1) { animation-delay: 0.1s; }
.resources-grid .resource-card:nth-child(2) { animation-delay: 0.2s; }
.resources-grid .resource-card:nth-child(3) { animation-delay: 0.3s; }
.resources-grid .resource-card:nth-child(4) { animation-delay: 0.4s; }
.resources-grid .resource-card:nth-child(5) { animation-delay: 0.5s; }
.resources-grid .resource-card:nth-child(6) { animation-delay: 0.6s; }

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 0;
    color: var(--gray-600);
    font-size: 1.1rem;
    grid-column: 1 / -1;
    display: none;
}

/* ========================================
   SHARE BUTTON & HIGHLIGHT
   ======================================== */
.share-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--gray-300);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.share-btn:hover {
    background-color: var(--gray-100);
    color: var(--primary-orange);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

@keyframes pulse-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.4);
        border-color: var(--primary-orange);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 122, 0, 0);
        border-color: var(--primary-orange);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 122, 0, 0);
        border-color: var(--gray-200);
    }
}

.highlight-resource {
    animation: pulse-highlight 2s cubic-bezier(0.4, 0, 0.6, 1) 3; /* Pulse 3 times */
    border-color: var(--primary-orange);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--gray-900);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   SHARED FOOTER STYLES (Copied from main style.css)
   ======================================== */

footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    margin-top: 0; /* Reset margin from resources style */
    background-color: var(--white);
    text-align: left; /* Reset from resources text-center */
}

/* Re-apply text-center for small screens if needed, but shared component uses mostly left align */

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
    text-align: left;
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none; /* Ensure no bullets */
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-main);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--primary); }

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.socials {
    display: flex;
    gap: 15px;
    font-size: 1.25rem;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* Base link reset if needed */
.footer a {
    text-decoration: none;
}

