/**
 * Products Home Page Styles
 * 
 * Styles for the main products/home dashboard page
 * Template: template-products-home-2025.php
 * 
 * Version: 1.0.0
 */

/* ============================================
   Grid Layout - Folders Container
   ============================================ */

#folders,
#folders.folders,
#folders.tab-pane,
#folders.folders.tab-pane {
    padding: 25px 0;
    max-width: 1400px;
    margin: 0 auto;
    display: block !important;
    grid-template-columns: none !important;
    grid-gap: 0 !important;
}

#folders .product-wrapper {
    width: auto !important;
    float: none !important;
    display: block !important;
    grid-column: auto !important;
}

/* ============================================
   Product Row Layout
   ============================================ */

#folders .product-row {
    display: flex !important;
    flex-wrap: wrap;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 1000px;
    clear: both;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
}

#folders .product-col-full {
    width: 620px !important;
    max-width: 620px !important;
    padding: 0;
    flex: 0 0 620px !important;
    float: none !important;
    display: flex;
}

#folders .product-col-half {
    width: calc(50% - 10px) !important;
    max-width: 300px !important;
    min-width: 300px;
    padding: 0;
    flex: 0 0 auto !important;
    float: none !important;
    display: flex;
}

#folders .product-col-quarter {
    width: calc(25% - 15px) !important;
    max-width: 220px !important;
    min-width: 220px;
    padding: 0;
    flex: 0 0 auto !important;
    float: none !important;
    display: flex;
}

#folders .product-col-third {
    width: calc(33.333% - 14px) !important;
    max-width: 300px !important;
    min-width: 280px;
    padding: 0;
    flex: 0 0 auto !important;
    float: none !important;
    display: flex;
}

/* Override old column classes */
#folders .col-xl-3,
#folders .col-xl-4,
#folders .col-xl-6,
#folders .col-sm-3,
#folders .col-sm-4,
#folders .col-sm-6 {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
}

/* ============================================
   Modern Product Card - Base Styles
   ============================================ */

#folders .modern-product-card {
    width: 100% !important;
    display: flex !important;
    flex-direction: column;
    position: relative;
    float: none !important;
}

#folders .modern-product-card .card-link {
    display: flex !important;
    flex: 1;
    text-decoration: none;
}

#folders .modern-product-card .card-container {
    flex: 1;
}

/* ============================================
   Card Container Styles
   ============================================ */

.modern-product-card .card-container {
    background: linear-gradient(135deg, #1a2740 0%, #243a5c 100%);
    border: 1px solid rgba(201, 162, 39, 0.18);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
}

/* Per-product hero backgrounds */
#card-total-access-only .card-container {
    background-image: linear-gradient(135deg, rgba(26,39,64,0.88) 0%, rgba(36,58,92,0.82) 100%), url('https://members.schiffsovereign.com/wp-content/uploads/2026/05/ta_header.png');
}
#card-confidential .card-container {
    background-image: linear-gradient(135deg, rgba(26,39,64,0.88) 0%, rgba(36,58,92,0.82) 100%), url('https://schiffsov.b-cdn.net/wp-content/uploads/2018/07/passport-index-background-image-1-1.jpg');
}
#card-strategic-assets .card-container {
    background-image: linear-gradient(135deg, rgba(26,39,64,0.88) 0%, rgba(36,58,92,0.82) 100%), url('https://members.schiffsovereign.com/wp-content/uploads/2026/05/file_000000003ea071f5b5391af32237dee1.png');
}
#card-blueprint .card-container {
    background-image: linear-gradient(135deg, rgba(26,39,64,0.88) 0%, rgba(36,58,92,0.82) 100%), url('https://members.schiffsovereign.com/wp-content/uploads/2026/05/image_1778534177698_vpbpf1.png');
}

.modern-product-card.has-learn-more .card-container {
    padding: 20px 15px 15px;
    min-height: 240px;
}

.modern-product-card.no-learn-more .card-container {
    padding: 18px 15px 18px;
    min-height: 180px;
}

/* Card hover effects */
.modern-product-card .card-link:hover .card-container {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(201, 162, 39, 0.25) inset;
    border-color: rgba(201, 162, 39, 0.35);
}

.modern-product-card.locked .card-link:hover .card-container {
    transform: none;
}

/* ============================================
   Lock Wrapper & Overlay
   ============================================ */

.modern-product-card .lock-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modern-product-card .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    border-radius: 8px;
}

.modern-product-card .lock-icon-wrapper {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

/* ============================================
   Card Image
   ============================================ */

.modern-product-card .card-image {
    text-align: center;
    flex-shrink: 0;
}

.modern-product-card.has-learn-more .card-image {
    margin-bottom: 12px;
}

.modern-product-card.no-learn-more .card-image {
    margin-bottom: 10px;
    min-height: 124px;
}

.modern-product-card .card-image .product-thumb {
    height: auto;
    border-radius: 6px;
}

.modern-product-card.has-learn-more .card-image .product-thumb {
    max-width: 90%;
}

.modern-product-card.no-learn-more .card-image .product-thumb {
    max-width: 100%;
}

.modern-product-card.no-learn-more .card-image .product-thumb--price-value-international,
.modern-product-card.no-learn-more .card-image .product-thumb--confidential {
    width: 250px !important;
}

/* ============================================
   Card Description
   ============================================ */

.modern-product-card .card-description {
    text-align: center;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0 12px;
    margin-bottom: 0;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.modern-product-card.has-learn-more .card-description {
    font-size: 15px;
}

.modern-product-card.no-learn-more .card-description {
    font-size: 14px;
}

.modern-product-card.unlocked .card-link:hover .card-description {
    color: #ffffff;
}

/* ============================================
   Learn More Button
   ============================================ */

.modern-product-card .learn-more-wrapper {
    text-align: center;
    margin-top: 12px;
    padding: 0 12px;
    position: relative;
    z-index: 10;
}

.modern-product-card .learn-more-btn {
    background: rgba(201, 162, 39, 0.14);
    border: 1px solid rgba(201, 162, 39, 0.25);
    color: #d6b34a;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modern-product-card .learn-more-btn:hover {
    background: rgba(201, 162, 39, 0.22) !important;
    border-color: rgba(201, 162, 39, 0.4) !important;
    color: #ecc55a !important;
}

.modern-product-card .learn-more-btn:active {
    transform: scale(0.98);
}

/* ============================================
   Expandable Description
   ============================================ */

.modern-product-card .expandable-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    position: relative;
    z-index: 10;
}

.modern-product-card .expandable-description-inner {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 162, 39, 0.15);
    border-radius: 8px;
    margin: 10px 12px 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    text-align: left;
}

/* ============================================
   Home Contact Section
   ============================================ */

.home-contact-section {
    max-width: 600px;
    margin: 0 auto 60px;
    padding: 0 20px;
    clear: both;
    display: block;
    grid-column: 1 / -1;
}

.home-contact-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.home-contact-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(201, 162, 39, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a227;
}

.home-contact-content {
    flex: 1;
    text-align: left;
}

.home-contact-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 6px 0;
    text-align: left;
}

.home-contact-content p {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 12px 0;
}

.home-contact-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #c9a227 0%, #b8922a 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.home-contact-button:hover {
    background: linear-gradient(135deg, #d4ad2e 0%, #c9a227 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
    color: #fff;
    text-decoration: none;
}

/* Dark mode - set backgrounds to white so inversion produces dark colors */
body.darkmode--activated .home-contact-card {
    background: #fff;
}

/* Membership product cards */
body.darkmode--activated .modern-product-card .card-container,
body.darkmode--activated .modern-product-card .card-logo {
    background: #fff !important;
}

/* Expandable description area */
body.darkmode--activated .modern-product-card .expandable-description-inner {
    background: #fff !important;
}

/* Lock overlay and icon */
body.darkmode--activated .modern-product-card .card-overlay,
body.darkmode--activated .modern-product-card .lock-icon-wrapper {
    background: #fff !important;
}

/* Learn more button */
body.darkmode--activated .modern-product-card .learn-more-btn {
    background: #fff !important;
}

/* ============================================
   Responsive - Tablet
   ============================================ */

@media (max-width: 991px) {
    #folders .product-col-half {
        max-width: 380px !important;
    }
    
    #folders .product-row {
        max-width: 860px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */

@media (max-width: 768px) {
    .modern-product-card.has-learn-more .card-container {
        min-height: 200px;
        padding: 18px 12px 15px;
    }
    
    .modern-product-card.no-learn-more .card-container {
        min-height: 160px;
        padding: 15px 12px;
    }
    
    .modern-product-card .card-description {
        font-size: 14px;
        line-height: 1.55;
    }
}

@media (max-width: 767px) {
    #folders .product-col-half,
    #folders .product-col-full {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        min-width: 0;
    }
    
    #folders {
        padding: 15px 10px;
    }
    
    #folders .product-row {
        margin: 0 auto 20px auto;
        gap: 15px;
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .home-contact-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
}
