/* ========================================
   PRODUCTS PAGE STYLES
   Professional, Modern, Corporate Design
   ======================================== */

/* ========================================
   SECTION 0: PRODUCTS LISTING PAGE (products.php)
   Simple grid cards for the main products listing
   ======================================== */

.products-page {
    padding: var(--spacing-xxl) 0;
}

.products-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.products-intro h2 {
    font-size: 1.75rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

.products-intro p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-navy), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.product-card-image img {
    max-width: 200px;
    max-height: 100%;
    object-fit: contain;
}

.product-card-content {
    padding: var(--spacing-xl);
}

.product-card-content h3 {
    font-size: 1.375rem;
    color: var(--primary-navy);
    margin-bottom: 0.75rem;
}

.product-card-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.product-card-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   SECTION 1: CTA SECTION
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    color: white;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1000px;
    text-align: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    letter-spacing: -0.01em;
    color: white !important;
}

.cta-section p {
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: white !important;
}

.cta-section .btn {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-transform: none;
    box-shadow: 0 8px 25px rgba(0, 147, 222, 0.3);
    margin: 0 auto;
}

.cta-section .btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 147, 222, 0.4);
}

/* ========================================
   SECTION 2: RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .cta-section {
        margin: 0 0.5rem;
        padding: 3rem 2rem;
    }
}

@media (max-width: 768px) {
    .product-content {
        padding: 2rem;
    }

    .cta-section {
        margin: 0 auto;
        max-width: calc(100% - 2rem);
        padding: 2.5rem 1.5rem;
        border-radius: var(--radius-lg);
    }

    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .product-content {
        padding: 1.5rem;
    }

    .product-content h3 {
        font-size: 1.25rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ========================================
   SECTION 3: ACCESSIBILITY ENHANCEMENTS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image img,
    .product-content .btn,
    .cta-section::before {
        transition: none;
        animation: none;
    }

    .product-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid var(--text-primary);
    }

    .cta-section {
        background: var(--dark-color);
    }
}

/* Print styles */
@media print {
    .product-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 2rem;
    }

    .cta-section {
        background: none;
        color: black;
        border: 2px solid #ccc;
    }

    .btn {
        border: 2px solid #000 !important;
        background: white !important;
        color: black !important;
    }
}

/* Focus management for keyboard navigation */
.product-content .btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ========================================
   SECTION 4: PRODUCT SUBPAGE TEMPLATE STYLES
   Used by product-page.php partial (gooddata, industrial-defender)
   ======================================== */

.product-page { padding: 0; }

.product-hero {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.92) 0%, rgba(45, 106, 159, 0.88) 100%),
                url("https://images.pexels.com/photos/29022333/pexels-photo-29022333.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2");
    background-size: cover;
    background-position: center;
    padding: calc(80px + var(--spacing-xxl)) 0 var(--spacing-xxl);
    text-align: center;
    color: var(--white);
}

.product-hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.product-hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.95);
}

.product-hero .btn { margin: 0.5rem; }

.product-section { padding: var(--spacing-xxl) 0; }
.product-section:nth-child(even) { background: var(--light-color); }
.product-section-title { font-size: 1.75rem; color: var(--primary-navy); margin-bottom: 0.5rem; text-align: center; }
.product-section-subtitle { font-size: 1rem; color: var(--text-secondary); text-align: center; max-width: 700px; margin: 0 auto 2.5rem; }

.capability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--spacing-lg); }

.capability-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.capability-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.capability-card h3 { font-size: 1.25rem; color: var(--primary-navy); margin-bottom: 0.5rem; }
.capability-card p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.capability-card img {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--spacing-lg); }

.why-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.why-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.why-card h3 { font-size: 1.125rem; color: var(--primary-navy); margin-bottom: 0.5rem; }
.why-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.capability-card.scroll-reveal,
.why-card.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.capability-card.scroll-reveal.is-revealed,
.why-card.scroll-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.product-logo { max-width: 280px; margin: 0 auto 2rem; display: block; }

@media (max-width: 768px) {
    .product-hero {
        padding: calc(65px + var(--spacing-lg)) 0 var(--spacing-lg) 0;
    }
    .product-hero h1 { font-size: 1.75rem; }
    .product-hero p { font-size: 1rem; }
    .product-section-title { font-size: 1.5rem; }
    .capability-grid, .why-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .product-hero {
        padding: calc(60px + var(--spacing-md)) 0 var(--spacing-md) 0;
    }
    .product-hero h1 { font-size: 1.5rem; }
    .product-hero p { font-size: 0.9375rem; }
    .product-section-title { font-size: 1.25rem; }
    .product-card { border-radius: var(--radius-md); }
}
