/**
 * Resources Page Styles
 */

/* ========================================
   RESOURCES HERO
   ======================================== */

.doa-resources-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.doa-resources-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    width: 100% !important;
    max-width: 100% !important;
}

.doa-resources-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 15px;
    color: #fff;
}

.doa-resources-hero .hero-subtitle {
    font-size: 20px;
    margin: 0 0 30px;
    opacity: 0.95;
}

/* Resources Search Form */
.resources-search {
    max-width: 50%;
    margin: 0 auto;
    position: relative;
}

.resources-search-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.resources-search-form input[type="search"] {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s;
}

.resources-search-form input[type="search"]:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.resources-search-form input[type="search"]::placeholder {
    color: #999;
}

.resources-search-form button[type="submit"] {
    height: 52px;
    padding: 0 30px;
    background: #3a9d82;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.resources-search-form button[type="submit"]:hover {
    background: #2f7f6e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 157, 130, 0.4);
}

/* Autocomplete Dropdown */
.resources-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: 8px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.resources-search-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.resources-search-dropdown li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.resources-search-dropdown li:last-child {
    border-bottom: none;
}

.resources-search-dropdown li:hover,
.resources-search-dropdown li.selected {
    background: #f8f8f8;
}

.suggestion-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.suggestion-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Highlight matching text */
.resources-search-dropdown li:hover .suggestion-title {
    color: #3a9d82;
}

/* Scrollbar styling for dropdown */
.resources-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.resources-search-dropdown::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0 10px 10px 0;
}

.resources-search-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.resources-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Popular Search Terms */
.popular-search-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    justify-content: center;
}

.popular-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 5px;
}

.search-tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.search-tag:active {
    transform: translateY(0);
}

/* Active tag state */
.search-tag.active {
    background: #3a9d82;
    border-color: #3a9d82;
    color: #fff;
}

/* ========================================
   RESOURCES SECTION
   ======================================== */

.doa-resources-section {
    background: #fff;
    padding: 80px 0;
    width: 100% !important;
    max-width: 100% !important;
}

/* Filter Buttons */
.resources-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #3a9d82;
    color: #3a9d82;
}

.filter-btn.active {
    background: #3a9d82;
    color: #fff;
    border-color: #3a9d82;
}

/* Resources Count */
.resources-count {
    text-align: center;
    margin-bottom: 30px;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.resources-count p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.resources-count strong {
    color: #3a9d82;
}

.clear-search {
    display: inline-block;
    margin-left: 15px;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.clear-search:hover {
    background: #3a9d82;
    color: #fff;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
    min-height: 200px; /* Prevent layout collapse when empty */
}

/* No Results Message */
.no-resources-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
    display: none;
}

/* Resource Card */
.resource-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Green Header with Icon */
.resource-card-header {
    background: linear-gradient(135deg, #3a9d82 0%, #2f7f6e 100%);
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-icon svg {
    width: 42px;
    height: 42px;
    fill: #fff;
}

.resource-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.resource-card:hover .resource-thumbnail img {
    transform: scale(1.05);
}

.resource-content {
    padding: 20px 25px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category Badge */
.resource-categories {
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5f1;
    color: #3a9d82;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* Resource Title */
.resource-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
}

.resource-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.resource-title a:hover {
    color: #3a9d82;
}

/* Resource Excerpt */
.resource-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

/* Resource Meta */
.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.read-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #999;
}

.read-time .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.read-more {
    color: #3a9d82;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: #2f7f6e;
}

/* No Resources */
.no-resources {
    text-align: center;
    padding: 60px 20px;
}

.no-resources p {
    font-size: 18px;
    color: #666;
}

/* Pagination */
.resources-pagination {
    display: none; /* Hide pagination since we show all posts */
    text-align: center;
    margin-top: 50px;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.resources-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.resources-pagination .page-numbers:hover,
.resources-pagination .page-numbers.current {
    background: #3a9d82;
    color: #fff;
    border-color: #3a9d82;
}

/* ========================================
   RESOURCES CTA
   ======================================== */

.doa-resources-cta {
    background: linear-gradient(135deg, #3a9d82 0%, #2f7f6e 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    width: 100% !important;
    max-width: 100% !important;
}

.doa-resources-cta .cta-content h2 {
    color: #fff;
    font-size: 36px;
    margin: 0 0 15px;
}

.doa-resources-cta .cta-content p {
    font-size: 18px;
    margin: 0 0 30px;
    opacity: 0.95;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .resources-grid,
    .resources-filter,
    .resources-count,
    .resources-pagination {
        max-width: 85%;
    }

    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .doa-resources-hero {
        padding: 60px 20px;
    }

    .doa-resources-hero h1 {
        font-size: 36px;
    }

    .doa-resources-hero .hero-subtitle {
        font-size: 16px;
    }

    /* Stack search form on mobile */
    .resources-search-form {
        flex-direction: column;
    }

    .resources-search-form button[type="submit"] {
        width: 100%;
    }

    /* Adjust dropdown on mobile */
    .resources-search-dropdown {
        max-height: 300px;
    }

    .resources-search-dropdown li {
        padding: 10px 15px;
    }

    .suggestion-title {
        font-size: 14px;
    }

    .suggestion-excerpt {
        font-size: 12px;
    }

    .doa-resources-section {
        padding: 60px 0;
    }

    .resources-grid,
    .resources-filter,
    .resources-count,
    .resources-pagination {
        max-width: 95%;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .resources-filter {
        justify-content: flex-start;
    }

    .doa-resources-cta {
        padding: 60px 20px;
    }

    .doa-resources-cta .cta-content h2 {
        font-size: 28px;
    }
}
