/* Resources Page Alignment and Polish CSS */

/* Hero Background */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/resources-hero-bg.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: -1;
}

/* Fix service card alignments */
.services-grid .service-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.services-grid .service-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.services-grid .service-card .service-link {
    align-self: flex-start;
    margin-top: auto;
}

/* Ensure all service links are properly styled */
.service-link {
    background: var(--primary-light);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateX(4px);
}

/* Fix metrics grid alignment */
.metrics-grid {
    background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.metrics-grid .metric {
    text-align: center;
    padding: 1.5rem;
}

.metrics-grid .metric-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.metrics-grid .metric-label {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Fix feature highlight boxes */
.feature-highlight {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 102, 204, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.feature-highlight h4 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
}

.feature-highlight .benefit-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-highlight .benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.feature-highlight .benefit-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Fix section spacing */
.service-detail {
    padding: 5rem 0;
    position: relative;
}

/* Add decorative elements */
.service-detail:nth-child(odd)::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.service-detail:nth-child(even)::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.service-detail-grid {
    align-items: start;
    gap: 3rem;
}

/* Polish case studies cards */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card .course-topics {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.course-card .course-format {
    margin-top: auto;
}

/* Improve button consistency */
.btn-contact {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--primary-blue);
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.4);
}

/* Fix list styling in feature sections */
.service-detail-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-detail-content li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.service-detail-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Improve table styling */
.feature-highlight table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1rem 0;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.feature-highlight table th {
    background: var(--primary-blue);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.feature-highlight table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.feature-highlight table tr:last-child td {
    border-bottom: none;
}

.feature-highlight table tr:hover {
    background: var(--bg-light);
}

/* Fix heading alignment */
.service-detail h2,
.service-detail h3 {
    margin-bottom: 1.5rem;
}

.service-detail .lead {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-highlight {
        padding: 1.5rem;
    }
    
    .service-detail {
        padding: 3rem 0;
    }
    
    /* Stack side-by-side sections on mobile */
    .service-detail-grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Ensure images don't get too large on mobile */
    .why-visual img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Ensure consistent spacing */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    border-radius: 2px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Polish the emerging trends section */
.emerging-trends-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid var(--primary-blue);
}

.emerging-trends-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.emerging-trends-container li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.emerging-trends-container li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.emerging-trends-container li:last-child {
    margin-bottom: 0;
}

/* Fix the What You'll Get sections */
.feature-highlight .benefit-item strong {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-highlight .benefit-item p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}