/**
 * Customer Stories Styling
 * Styles for customer case studies and success stories
 */

/* ============================================================================
   CUSTOMER STORIES HERO SECTION
   ============================================================================ */

.customer-stories-hero {
    background: linear-gradient(135deg, #1F3A8A 0%, #162D6B 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.customer-stories-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.customer-stories-hero .badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    color: #38BDF8;
    backdrop-filter: blur(10px);
}

.customer-stories-hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.customer-stories-hero .lead {
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* ============================================================================
   FILTER SECTION
   ============================================================================ */

.filters-section {
    background: #F9FAFB;
    padding: 40px 0;
    border-bottom: 1px solid #E5E7EB;
}

.filters-container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
}

.filter-select:hover {
    border-color: #2563EB;
}

.filter-select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-reset-btn {
    padding: 10px 20px;
    background: #2563EB;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-reset-btn:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ============================================================================
   FEATURED STORIES SECTION
   ============================================================================ */

.featured-stories-section {
    padding: 80px 0;
    background: white;
}

.featured-stories-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1F2937;
    text-align: center;
    margin-bottom: 48px;
}

.featured-story-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    margin-bottom: 24px;
}

.featured-story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.featured-story-image-link {
    display: block;
    overflow: hidden;
    height: 280px;
    background: #F9FAFB;
}

.featured-story-image-link:hover .featured-story-image {
    transform: scale(1.05);
}

.featured-story-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-story-content {
    padding: 24px 32px;
}

.featured-story-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.industry-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Industry Colors */
.industry-badge.industry-telecommunications,
.industry-badge[data-industry="Telecommunications"] {
    background: #FEF3C7;
    color: #D97706;
}

.industry-badge.industry-finance,
.industry-badge[data-industry="Finance"] {
    background: #D1FAE5;
    color: #059669;
}

.industry-badge.industry-manufacturing,
.industry-badge[data-industry="Manufacturing"] {
    background: #DBEAFE;
    color: #2563EB;
}

.industry-badge.industry-public-service,
.industry-badge[data-industry="Public Service"] {
    background: #E0E7FF;
    color: #4F46E5;
}

.industry-badge.industry-global-enterprise,
.industry-badge[data-industry="Global Enterprise"] {
    background: #FCE7F3;
    color: #DB2777;
}

.industry-badge.industry-default {
    background: #F3F4F6;
    color: #6B7280;
}

.featured-story-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-story-content h3 a {
    color: #1F2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-story-content h3 a:hover {
    color: #2563EB;
}

.featured-story-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 16px;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.story-tag {
    padding: 4px 12px;
    background: #F3F4F6;
    color: #374151;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.story-tag.solution-tag {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Clickable tags and badges */
.clickable-tag,
.clickable-industry {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-tag:hover {
    background: #1E40AF;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.clickable-platform {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-platform:hover {
    background: #4B5563;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.clickable-industry:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Story card link styles */
.story-card-image-link {
    display: block;
    overflow: hidden;
    height: 200px;
    background: #F9FAFB;
}

.story-card-image-link:hover .story-card-image {
    transform: scale(1.05);
}

.story-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.story-card-content h3 a {
    color: #1F2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.story-card-content h3 a:hover {
    color: #2563EB;
}

.read-story-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2563EB;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.read-story-btn:hover {
    background: #1D4ED8;
    transform: translateX(4px);
}

/* ============================================================================
   STORIES GRID SECTION
   ============================================================================ */

.stories-grid-section {
    padding: 80px 0;
    background: #F9FAFB;
}

.stories-grid-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    text-align: center;
    margin-bottom: 48px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.story-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.story-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

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

.story-card-content .industry-badge {
    align-self: flex-start;
}

.story-card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.story-card-summary {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 16px;
}

.story-card-content .story-tags {
    margin-top: auto;
    margin-bottom: 0;
}

/* ============================================================================
   RELATED STORIES SECTION
   ============================================================================ */

.related-stories-section {
    padding: 60px 0;
    background: #F9FAFB;
}

.related-stories-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    text-align: center;
    margin-bottom: 40px;
}

.related-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-story-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.related-story-image-wrapper {
    overflow: hidden;
}

.related-story-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-story-card:hover .related-story-image {
    transform: scale(1.05);
}

.related-story-image-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #2563EB, #60A5FA);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-story-image-placeholder i {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.8);
}

.related-story-content {
    padding: 20px;
    flex: 1;
}

.related-story-content .industry-badge {
    margin-bottom: 10px;
}

.related-story-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-story-content p {
    font-size: 13px;
    line-height: 1.5;
    color: #6B7280;
    margin: 0;
}

@media (max-width: 992px) {
    .related-stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-stories-grid {
        grid-template-columns: 1fr;
    }
    
    .related-stories-section {
        padding: 40px 0;
    }
    
    .related-stories-section h3 {
        font-size: 20px;
        margin-bottom: 24px;
    }
}

/* ============================================================================
   LOADING & EMPTY STATES
   ============================================================================ */

.loading-state {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    border: 4px solid #E5E7EB;
    border-top: 4px solid #2563EB;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #D1D5DB;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #6B7280;
}

/* ============================================================================
   STORY DETAIL PAGE
   ============================================================================ */

.story-detail-hero {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: #FFFFFF;
    padding: 120px 0 60px;
}

.story-detail-header {
    max-width: 900px;
    margin: 0 auto;
}

.story-back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60A5FA;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    width: fit-content;
}

.story-back-link:hover {
    gap: 12px;
    color: #93C5FD;
}

.story-back-link i {
    font-size: 14px;
}

.story-industry-badge {
    display: block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.story-detail-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 32px;
    line-height: 1.2;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.story-detail-meta {
    display: none;
}

.story-detail-summary {
    font-size: 18px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 24px;
    text-align: center;
}

.story-tags-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.story-tags-header .tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-size: 13px;
    border-radius: 20px;
}

.story-detail-body {
    padding: 80px 0;
    background: white;
}

.story-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.customer-quote-section {
    background: #F9FAFB;
    border-left: 4px solid #60A5FA;
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
    position: relative;
}

.customer-quote-section::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 80px;
    color: #E5E7EB;
    font-family: Georgia, serif;
    line-height: 1;
}

.customer-quote-section blockquote {
    margin: 0;
    padding: 0;
    font-size: 20px;
    line-height: 1.6;
    color: #374151;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.quote-author {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.quote-author-name {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.quote-author-position {
    font-size: 14px;
    color: #6B7280;
}

.story-content {
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.story-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin: 32px 0 16px;
    line-height: 1.3;
}

.story-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin: 24px 0 12px;
    line-height: 1.3;
}

.story-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin: 20px 0 10px;
}

.story-content p {
    margin-bottom: 16px;
}

.story-content ul,
.story-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.story-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Nested lists */
.story-content li ul,
.story-content li ol {
    margin: 6px 0;
}

.story-content a {
    color: #2563EB;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.story-content a:hover {
    color: #1D4ED8;
}

.story-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.story-content blockquote {
    border-left: 4px solid #2563EB;
    margin: 20px 0;
    font-style: italic;
    color: #6B7280;
    background: #F9FAFB;
    padding: 16px 20px;
    border-radius: 6px;
}

.story-content pre {
    background: #1F2937;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    overflow-x: auto;
    white-space: pre;
}

.story-content pre code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #E5E7EB;
    background: transparent;
    padding: 0;
    white-space: pre;
    display: block;
}

/* Inline code */
.story-content code,
.story-content code.inline-code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    background: #FEF3C7;
    color: #92400E;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Code inside links */
.story-content a code {
    color: #2563EB;
    background: #DBEAFE;
}

/* Callout blocks */
.story-content .callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #F9FAFB;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #E5E7EB;
}

.story-content .callout-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.story-content .callout p {
    margin: 0;
}

/* Toggle/Details blocks */
.story-content details {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    border: 1px solid #E5E7EB;
}

.story-content details summary {
    cursor: pointer;
    font-weight: 600;
    color: #1F2937;
    padding: 4px 0;
}

.story-content details[open] summary {
    margin-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
}

/* Todo items */
.story-content .todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.story-content .todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563EB;
}

/* Tables */
.story-content table,
.story-content .notion-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.story-content table td,
.story-content table th {
    border: 1px solid #E5E7EB;
    padding: 10px 12px;
    text-align: left;
}

.story-content table tr:nth-child(odd) {
    background: #F9FAFB;
}

/* Figure/Images */
.story-content figure.blog-image {
    margin: 20px 0;
}

.story-content figure.blog-image img {
    margin: 0;
    display: block;
}

.story-content figure.blog-image figcaption {
    font-size: 13px;
    color: #6B7280;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Video embeds */
.story-content .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 8px;
}

.story-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Bookmark links */
.story-content .bookmark-link {
    display: block;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
    color: #2563EB;
    text-decoration: none;
    transition: all 0.3s ease;
}

.story-content .bookmark-link:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-story-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-story-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .customer-stories-hero {
        padding: 120px 0 60px;
    }
    
    .customer-stories-hero h1 {
        font-size: 40px;
    }
    
    .customer-stories-hero .lead {
        font-size: 18px;
    }
    
    .filters-container {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .story-detail-hero h1 {
        font-size: 36px;
    }
    
    .story-detail-summary {
        font-size: 18px;
    }
}
