/* Success Stories Page Styles */

/* Breadcrumb */
.breadcrumb-nav {
    background: #f8f9fc;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin-bottom: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item {
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #0a3c72;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #083056;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #2c3e50;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    margin: 0 0.5rem;
}

/* Hero Section */
.success-hero {
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.success-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23007bff" opacity="0.03"/><circle cx="75" cy="75" r="1" fill="%23007bff" opacity="0.03"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.success-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0a3c72;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px !important;
}

/* Statistics Section */
.stats-section {
    padding: 80px 0;
    background: white;
}

.stats-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    background: white;
    border: 2px solid #f8f9fc;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(10, 60, 114, 0.15);
    border-color: #0a3c72;
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0a3c72, #083056);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #0a3c72;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Stories Section */
.featured-stories {
    padding: 80px 0;
    background: #f8f9fc;
}

.featured-stories h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 0;
}

.story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.story-card.featured {
    border: 3px solid #ffc107;
    position: relative;
}

.story-image {
    height: 200px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.1);
}

.story-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-badge {
    display: inline-block;
    background: #ffc107;
    color: #212529;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.story-card h3, .story-card h4 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.story-card h3 {
    font-size: 1.4rem;
}

.story-card h4 {
    font-size: 1.25rem;
}

.story-subtitle {
    color: #0a3c72;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.story-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.story-details.compact {
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.story-details span, .homeowner-info, .location-info {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.story-details i {
    color: #0a3c72;
    width: 14px;
}

.success-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.success-metrics.compact {
    gap: 0.75rem;
}

.metric {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0a3c72;
    line-height: 1.2;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.25rem;
}

.metric.savings .metric-value {
    color: #28a745;
}

.story-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.story-quote {
    background: #f8f9fc;
    border-left: 4px solid #0a3c72;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #2c3e50;
    position: relative;
}

.story-quote i {
    color: #0a3c72;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.btn-read-more {
    background: none;
    border: 2px solid #0a3c72;
    color: #0a3c72;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-top: auto;
}

.btn-read-more:hover {
    background: #0a3c72;
    color: white;
    transform: translateX(5px);
}

/* All Stories Section */
.all-stories {
    padding: 80px 0;
    background: white;
}

.all-stories h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
}

/* Call to Action Section */
.success-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a3c72 0%, #083056 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.success-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="ctaPattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="white" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23ctaPattern)"/></svg>');
}

.cta-content {
    position: relative;
    z-index: 1;
}

.success-cta h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    margin-top: 2rem;
}

.btn-outline-light:hover {
    background: white;
    color: #0a3c72;
}

/* Story Modal Styles */
.story-modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

.story-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.story-meta {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.story-meta span {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-metrics-modal {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.success-metrics-modal .metric {
    background: #f8f9fc;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.success-metrics-modal .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0a3c72;
}

.success-metrics-modal .savings .value {
    color: #28a745;
}

.success-metrics-modal .label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.story-full-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c3e50;
    margin: 2rem 0;
}

.story-quote-modal {
    background: #f8f9fc;
    border-left: 4px solid #0a3c72;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0 15px 15px 0;
    position: relative;
}

.story-quote-modal i {
    color: #0a3c72;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.story-quote-modal p {
    font-size: 1.1rem;
    font-style: italic;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.story-quote-modal footer {
    font-weight: 600;
    color: #0a3c72;
    font-style: normal;
}

.modal-cta {
    margin-top: 2rem;
}

/* Badge Styles */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.text-dark {
    color: #212529 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .success-hero {
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .success-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        margin: 0 0 1rem 0 !important;
    }
    
    .stats-section, .featured-stories, .all-stories {
        padding: 60px 0;
    }
    
    .stats-section h2, .featured-stories h2, .all-stories h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .story-details.compact {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .success-metrics {
        justify-content: center;
    }
    
    .story-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .success-metrics-modal {
        flex-direction: column;
    }
    
    .success-cta h2 {
        font-size: 2.25rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        display: block;
        margin: 0 0 1rem 0 !important;
    }
}

@media (max-width: 576px) {
    .success-hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-card {
        padding: 2rem 1rem;
    }
    
    .story-content {
        padding: 1.5rem;
    }
    
    .success-cta {
        padding: 60px 0;
    }
    
    .success-cta h2 {
        font-size: 1.75rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #0a3c72;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}