/**
 * CH Resource Center — Public Styles
 * ConstructionHands.com Branding
 * v1.0.0
 */

/* ================================================================ */
/*  Variables & Base                                                 */
/* ================================================================ */

:root {
    --chrc-orange: #F7941D;
    --chrc-orange-hover: #e5850f;
    --chrc-navy: #1B4F72;
    --chrc-navy-light: #2E75B6;
    --chrc-dark: #2c3e50;
    --chrc-gray: #666;
    --chrc-gray-light: #f5f7f9;
    --chrc-gray-border: #e0e5ea;
    --chrc-white: #ffffff;
    --chrc-green: #27ae60;
    --chrc-red: #e74c3c;
    --chrc-radius: 8px;
    --chrc-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --chrc-shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --chrc-transition: all 0.25s ease;
}

/* ================================================================ */
/*  Library Toolbar                                                  */
/* ================================================================ */

.chrc-library-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.chrc-library-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    align-items: center;
}

.chrc-library-search {
    flex: 0 0 300px;
}

.chrc-search-form {
    display: flex;
    border: 2px solid var(--chrc-gray-border);
    border-radius: var(--chrc-radius);
    overflow: hidden;
}

.chrc-search-input {
    flex: 1;
    border: none !important;
    padding: 10px 14px !important;
    font-size: 14px;
    outline: none;
    background: var(--chrc-white);
}

.chrc-search-btn {
    background: var(--chrc-navy);
    color: var(--chrc-white);
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--chrc-transition);
}

.chrc-search-btn:hover {
    background: var(--chrc-navy-light);
}

.chrc-library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.chrc-filter-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--chrc-gray-border);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    color: var(--chrc-gray);
    background: var(--chrc-white);
    transition: var(--chrc-transition);
    white-space: nowrap;
}

.chrc-filter-btn:hover {
    border-color: var(--chrc-orange);
    color: var(--chrc-orange);
    text-decoration: none;
}

.chrc-filter-btn.chrc-filter-active {
    background: var(--chrc-orange);
    color: var(--chrc-white);
    border-color: var(--chrc-orange);
}

/* ================================================================ */
/*  Resource Card Grid                                               */
/* ================================================================ */

.chrc-library-grid {
    display: grid;
    gap: 24px;
}

.chrc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.chrc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.chrc-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .chrc-cols-3, .chrc-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .chrc-cols-2, .chrc-cols-3, .chrc-cols-4 { grid-template-columns: 1fr; }
    .chrc-library-toolbar { flex-direction: column; }
    .chrc-library-search { flex: 1 1 100%; }
}

/* ================================================================ */
/*  Resource Card                                                    */
/* ================================================================ */

.chrc-resource-card {
    background: var(--chrc-white);
    border: 1px solid var(--chrc-gray-border);
    border-radius: var(--chrc-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--chrc-transition);
    box-shadow: var(--chrc-shadow);
}

.chrc-resource-card:hover {
    box-shadow: var(--chrc-shadow-hover);
    transform: translateY(-2px);
}

.chrc-resource-card.chrc-card-featured {
    border-color: var(--chrc-orange);
    border-width: 2px;
}

/* Badges */
.chrc-card-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.chrc-badge-featured {
    right: 12px;
    background: var(--chrc-orange);
    color: var(--chrc-white);
}

.chrc-badge-gated {
    left: 12px;
    background: var(--chrc-navy);
    color: var(--chrc-white);
}

/* Card Image */
.chrc-card-image {
    height: 180px;
    overflow: hidden;
    background: var(--chrc-gray-light);
}

.chrc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--chrc-transition);
}

.chrc-resource-card:hover .chrc-card-image img {
    transform: scale(1.05);
}

.chrc-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--chrc-navy) 0%, var(--chrc-navy-light) 100%);
    text-decoration: none;
}

.chrc-placeholder-icon {
    font-size: 48px;
    opacity: 0.7;
}

/* Card Body */
.chrc-card-body {
    padding: 16px;
    flex: 1;
}

.chrc-card-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--chrc-orange);
    margin-bottom: 6px;
}

.chrc-card-title {
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 6px;
    font-weight: 700;
}

.chrc-card-title a {
    color: var(--chrc-dark);
    text-decoration: none;
}

.chrc-card-title a:hover {
    color: var(--chrc-orange);
}

.chrc-card-subtitle {
    font-size: 13px;
    color: var(--chrc-gray);
    margin: 0 0 8px;
    font-style: italic;
}

.chrc-card-excerpt {
    font-size: 13px;
    color: var(--chrc-gray);
    line-height: 1.5;
    margin: 0 0 10px;
}

.chrc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.chrc-meta-item {
    font-size: 11px;
    color: #999;
}

.chrc-card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chrc-topic-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--chrc-gray-light);
    border-radius: 10px;
    font-size: 11px;
    color: var(--chrc-gray);
}

/* Card Footer */
.chrc-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--chrc-gray-border);
}

.chrc-card-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--chrc-orange);
    color: var(--chrc-white) !important;
    text-decoration: none !important;
    border-radius: var(--chrc-radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--chrc-transition);
}

.chrc-card-btn:hover {
    background: var(--chrc-orange-hover);
    transform: translateY(-1px);
}

/* ================================================================ */
/*  Gate Form                                                        */
/* ================================================================ */

.chrc-gate-form-wrapper.chrc-gate-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chrc-gate-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
}

.chrc-gate-form-container {
    background: var(--chrc-white);
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.chrc-gate-form-wrapper.chrc-gate-inline .chrc-gate-form-container {
    border: 2px solid var(--chrc-orange);
    box-shadow: var(--chrc-shadow);
    margin: 20px 0;
}

.chrc-gate-header {
    text-align: center;
    margin-bottom: 20px;
}

.chrc-gate-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.chrc-logo-icon {
    font-size: 28px;
}

.chrc-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--chrc-navy);
}

.chrc-logo-dot {
    color: var(--chrc-orange);
}

.chrc-gate-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--chrc-dark);
    margin: 0 0 6px;
}

.chrc-gate-subheading {
    font-size: 14px;
    color: var(--chrc-gray);
    margin: 0;
}

/* Form fields */
.chrc-field-row {
    margin-bottom: 12px;
}

.chrc-field-row-split {
    display: flex;
    gap: 10px;
}

.chrc-field-row-split .chrc-field {
    flex: 1;
}

.chrc-input {
    width: 100%;
    padding: 12px 14px !important;
    border: 1px solid var(--chrc-gray-border) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: var(--chrc-transition);
    box-sizing: border-box;
}

.chrc-input:focus {
    border-color: var(--chrc-orange) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15);
}

.chrc-consent-row {
    margin-top: 4px;
}

.chrc-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--chrc-gray);
    cursor: pointer;
}

.chrc-consent-label input[type="checkbox"] {
    margin-top: 2px;
}

.chrc-gate-submit-btn {
    width: 100%;
    padding: 14px !important;
    background: var(--chrc-orange) !important;
    color: var(--chrc-white) !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: var(--chrc-transition);
}

.chrc-gate-submit-btn:hover {
    background: var(--chrc-orange-hover) !important;
    transform: translateY(-1px);
}

.chrc-gate-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chrc-gate-error {
    background: #fef2f2;
    color: var(--chrc-red);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
}

.chrc-gate-success {
    text-align: center;
    padding: 20px 0;
}

.chrc-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.chrc-success-message {
    font-size: 16px;
    color: var(--chrc-dark);
    font-weight: 600;
}

.chrc-gate-privacy {
    text-align: center;
    margin-top: 12px;
}

.chrc-gate-privacy a {
    font-size: 12px;
    color: var(--chrc-gray);
}

/* ================================================================ */
/*  Download Button                                                  */
/* ================================================================ */

.chrc-download-btn-wrapper {
    margin: 20px 0;
    text-align: center;
}

.chrc-download-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--chrc-orange);
    color: var(--chrc-white) !important;
    text-decoration: none !important;
    border-radius: var(--chrc-radius);
    font-weight: 700;
    font-size: 16px;
    transition: var(--chrc-transition);
    box-shadow: 0 3px 10px rgba(247, 148, 29, 0.3);
}

.chrc-download-btn:hover {
    background: var(--chrc-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(247, 148, 29, 0.4);
}

/* ================================================================ */
/*  Lead Magnet / CTA Block                                          */
/* ================================================================ */

.chrc-lead-magnet {
    display: flex;
    gap: 24px;
    background: linear-gradient(135deg, #f8f4ef 0%, #fff5e6 100%);
    border: 2px solid var(--chrc-orange);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    align-items: center;
}

.chrc-lm-image {
    flex: 0 0 160px;
}

.chrc-lm-image img {
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--chrc-shadow);
}

.chrc-lm-content {
    flex: 1;
}

.chrc-lm-badge {
    display: inline-block;
    background: var(--chrc-orange);
    color: var(--chrc-white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.chrc-lm-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--chrc-dark);
    margin: 0 0 8px;
}

.chrc-lm-text {
    font-size: 14px;
    color: var(--chrc-gray);
    margin: 0 0 16px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .chrc-lead-magnet {
        flex-direction: column;
    }
    .chrc-lm-image {
        flex: 0 0 auto;
    }
}

/* ================================================================ */
/*  Newsletter Archive                                               */
/* ================================================================ */

.chrc-newsletter-archive {
    max-width: 800px;
    margin: 0 auto;
}

.chrc-newsletter-header {
    margin-bottom: 24px;
}

.chrc-newsletter-header h3 {
    font-size: 24px;
    color: var(--chrc-dark);
}

.chrc-newsletter-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--chrc-gray-border);
    transition: var(--chrc-transition);
}

.chrc-newsletter-item:hover {
    background: var(--chrc-gray-light);
}

.chrc-newsletter-date {
    flex: 0 0 60px;
    text-align: center;
    background: var(--chrc-navy);
    color: var(--chrc-white);
    border-radius: 6px;
    padding: 8px;
}

.chrc-nl-month {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chrc-nl-day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.chrc-nl-year {
    display: block;
    font-size: 10px;
    opacity: 0.7;
}

.chrc-newsletter-content {
    flex: 1;
}

.chrc-newsletter-content h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.chrc-newsletter-content h4 a {
    color: var(--chrc-dark);
    text-decoration: none;
}

.chrc-newsletter-content h4 a:hover {
    color: var(--chrc-orange);
}

.chrc-newsletter-content p {
    font-size: 13px;
    color: var(--chrc-gray);
    margin: 0;
}

.chrc-btn-secondary {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--chrc-orange);
    color: var(--chrc-orange) !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--chrc-transition);
    white-space: nowrap;
}

.chrc-btn-secondary:hover {
    background: var(--chrc-orange);
    color: var(--chrc-white) !important;
}

/* ================================================================ */
/*  Featured Resources                                               */
/* ================================================================ */

.chrc-featured-heading {
    font-size: 22px;
    color: var(--chrc-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--chrc-orange);
}

/* ================================================================ */
/*  Pagination                                                       */
/* ================================================================ */

.chrc-pagination {
    margin-top: 30px;
    text-align: center;
}

.chrc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid var(--chrc-gray-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--chrc-gray);
    transition: var(--chrc-transition);
}

.chrc-pagination .page-numbers.current,
.chrc-pagination .page-numbers:hover {
    background: var(--chrc-orange);
    color: var(--chrc-white);
    border-color: var(--chrc-orange);
}

/* ================================================================ */
/*  No Results                                                       */
/* ================================================================ */

.chrc-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--chrc-gray);
    font-size: 16px;
}
