/**
 * Solutions Page Specific Styles
 * Video player and responsive navigation
 */

/* ========================================
   HERO SECTION
======================================== */
.products-hero {
    background: linear-gradient(135deg, #0A47A3 0%, #1E90FF 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 2rem;
}

.products-hero h1,
.products-hero p {
    color: #ffffff !important;
}

/* ========================================
   CATEGORY TABS
======================================== */
.category-tabs-container {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.category-tabs-container h5 {
    color: #1e293b;
    font-weight: 700;
}

.category-tabs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.category-tabs::-webkit-scrollbar {
    height: 6px;
}

.category-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #0A47A3;
    border-radius: 10px;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #1e293b;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-tab:hover {
    background: #e9ecef;
    color: #0A47A3;
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, #0A47A3, #1E90FF);
    color: #ffffff;
    border-color: #0A47A3;
    box-shadow: 0 4px 12px rgba(10, 71, 163, 0.3);
}

/* Default: Hide dropdown on all screens */
.category-tabs-container .dropdown {
    display: none;
}

/* Mobile: Show dropdown, hide tabs */
@media (max-width: 767px) {
    .category-tabs {
        display: none !important;
    }

    .category-tabs-container .dropdown {
        display: block !important;
    }

    .category-tabs-container h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Desktop: Hide dropdown, show tabs */
@media (min-width: 768px) {
    .category-tabs-container .dropdown {
        display: none !important;
    }

    .category-tabs {
        display: flex !important;
    }
}

/* ========================================
   VIDEO CARDS
======================================== */
.solution-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(10, 71, 163, 0.2);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.solution-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-video-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(10, 71, 163, 0.9);
    border: 4px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-video-btn:hover {
    background: #0A47A3;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(10, 71, 163, 0.4);
}

.play-video-btn i {
    margin-left: 4px;
    /* Center the play icon */
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    z-index: 2;
}

/* ========================================
   VIDEO LOCK OVERLAY (Non-Logged-In Users)
======================================== */
.video-locked {
    position: relative;
}

.video-locked img {
    filter: blur(8px);
    opacity: 0.6;
}

.video-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 71, 163, 0.85);
    color: #ffffff;
    z-index: 3;
    text-align: center;
    padding: 1rem;
}

.video-lock-overlay i {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-lock-overlay p {
    font-size: 1.125rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-locked .play-video-btn {
    display: none;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-category {
    color: #1E90FF;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Push button container to bottom */
.product-info>.d-flex.justify-content-between {
    margin-top: auto;
}

/* ========================================
   VIDEO MODAL
======================================== */
.modal {
    z-index: 9999 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
    background-color: rgba(0, 0, 0, 0.85);
}

.modal-dialog {
    z-index: 10000 !important;
}

.modal-content {
    background: #1e293b;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: linear-gradient(135deg, #0A47A3, #1E90FF);
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 0;
    background: #000;
}

#videoContainer {
    background: #000;
    min-height: 400px;
}

#videoFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* ========================================
   SHARE TOAST
======================================== */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   RESPONSIVE GRID - SINGLE COLUMN LAYOUT
======================================== */
.solutions-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Mobile: Single column with smaller max-width */
@media (max-width: 575px) {
    .solutions-grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .play-video-btn {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
        border: 3px solid #ffffff;
    }
}

/* Tablet: Single column with medium max-width */
@media (min-width: 576px) and (max-width: 991px) {
    .solutions-grid-container {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        max-width: 700px;
    }
}

/* Desktop: Single column with optimal max-width */
@media (min-width: 992px) {
    .solutions-grid-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 800px;
    }
}

/* Large Desktop: Single column maintained */
@media (min-width: 1400px) {
    .solutions-grid-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        max-width: 900px;
    }
}

/* ========================================
   TEXT COLORS
======================================== */
.text-muted {
    color: #64748b !important;
}

h5,
h6 {
    color: #1e293b;
}

/* ========================================
   BUTTONS
======================================== */
.btn-outline-primary {
    border-color: #0A47A3;
    color: #0A47A3;
}

.btn-outline-primary:hover {
    background: #0A47A3;
    color: #ffffff;
}

.btn-primary {
    background: linear-gradient(135deg, #0A47A3, #1E90FF);
    border: none;
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 71, 163, 0.3);
}

/* ========================================
   MOBILE OPTIMIZATIONS
======================================== */
@media (max-width: 767px) {
    .products-hero {
        padding: 2.5rem 0 2rem;
    }

    .products-hero h1 {
        font-size: 1.75rem;
    }

    .products-hero p {
        font-size: 1rem;
    }

    .category-tabs-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .solution-card {
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }

    .product-category {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .video-duration {
        bottom: 6px;
        right: 6px;
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }

    .btn-sm {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }

    .d-flex.gap-2 {
        gap: 0.375rem !important;
    }

    .modal-xl {
        max-width: 95%;
        margin: 0.5rem auto;
    }

    /* Reduce container padding on mobile */
    .container.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* ========================================
   LOADING STATE
======================================== */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 2rem;
    z-index: 1;
}

/* ========================================
   ACCESSIBILITY
======================================== */
.solution-card:focus,
.play-video-btn:focus,
.category-tab:focus {
    outline: 2px solid #0A47A3;
    outline-offset: 2px;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.play-video-btn {
    animation: pulse 2s infinite;
}

.solution-card:hover .play-video-btn {
    animation: none;
}