/**
 * Resources Styles
 * Matches the navigators-html/resources.html design
 */

/* Hero Section */
.page-hero-green {
    width: 100%;
    height: 480px;
    background-color: #1A6B59;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 64px;
    line-height: 1.2;
    color: #FFFFFF;
    margin: 0;
}

/* Main Resources Section */
.resources-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 54px;
}

.resources-title {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    text-align: center;
    color: #1A202C;
    margin-bottom: 60px;
}

/* Search and Filter Controls */
.resources-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

.resource-searchbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    max-width: 500px;
}

.resource-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #1A202C;
}

.resource-search-input::placeholder {
    color: #717D96;
}

.resource-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 12px 24px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1A202C;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #F7FAFC;
    border-color: #1A6B59;
}

.filter-btn--active {
    background: #1A6B59;
    color: #FFFFFF;
    border-color: #1A6B59;
}

/* Resources Grid */
.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.resource-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.resource-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.resource-thumb {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #F7FAFC;
}

.resource-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 100%);
}

.resource-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.resource-meta {
    margin-bottom: 16px;
}

.resource-title {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.4;
    color: #1A202C;
    margin: 0 0 8px 0;
}

.resource-author {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #718096;
    margin: 4px 0;
}

.resource-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #1A6B59;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 0;
}

.resource-excerpt {
    flex: 1;
    margin-bottom: 16px;
}

.resource-excerpt p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #4A5568;
    margin: 0;
}

.resource-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-price-stock {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #1A6B59;
}

.resource-stock {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.resource-stock.in-stock {
    background: #C6F6D5;
    color: #22543D;
}

.resource-stock.out-of-stock {
    background: #FED7D7;
    color: #742A2A;
}

.resource-cta {
    width: 100%;
    padding: 14px 24px;
    background: #1A6B59;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resource-cta:hover {
    background: #155847;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 107, 89, 0.3);
}

.resource-cta-disabled {
    background: #CBD5E0;
    cursor: not-allowed;
}

.resource-cta-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Empty State */
.no-resources {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    color: #718096;
    padding: 60px 20px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar--open {
    right: 0;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 24px;
    color: #1A202C;
    margin: 0;
}

.cart-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #718096;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.empty-cart {
    text-align: center;
    color: #718096;
    font-family: 'Montserrat', sans-serif;
    padding: 40px 20px;
}

.cart-item {
    padding: 16px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    margin-bottom: 16px;
}

.cart-item-info h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1A202C;
    margin: 0 0 8px 0;
}

.cart-item-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #1A6B59;
    font-weight: 600;
    margin: 0;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background: #F7FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #1A6B59;
    color: #FFFFFF;
    border-color: #1A6B59;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 6px;
    font-family: 'Montserrat', sans-serif;
}

.remove-item {
    background: #FED7D7;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 24px;
    color: #C53030;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid #E2E8F0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1A202C;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: #1A6B59;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #155847;
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: #1A6B59;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(26, 107, 89, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 107, 89, 0.4);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E53E3E;
    color: #FFFFFF;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #FFFFFF;
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: #718096;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-content h2 {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 32px;
    color: #1A202C;
    margin: 0 0 24px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1A202C;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #1A6B59;
}

.order-summary {
    background: #F7FAFC;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
}

.order-summary h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1A202C;
    margin: 0 0 16px 0;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #4A5568;
    margin-bottom: 8px;
}

.checkout-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #E2E8F0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #1A6B59;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #155847;
}

.submit-btn:disabled {
    background: #CBD5E0;
    cursor: not-allowed;
}

/* Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: -300px;
    background: #48BB78;
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transition: right 0.3s ease;
}

.cart-notification.show {
    right: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 48px;
    }
    
    .resources-main {
        padding: 40px 20px;
    }
    
    .resources-title {
        font-size: 36px;
    }
    
    .resources-list {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .modal-content {
        padding: 24px;
    }
}
