/* Related Tools Section */
.ib-related-tools-section {
    padding: 80px 20px;
    background: #f8f9fa;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.wp-block-sig-related-tools {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Full width support */
.ib-related-tools-section.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.ib-related-tools-section.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ib-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Full width container adjustments */
.ib-related-tools-section.alignfull .ib-container {
    max-width: 1200px;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .ib-related-tools-section.alignfull .ib-container {
        padding: 0 20px;
    }
}

.ib-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.ib-section-title {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
}

.ib-section-subtitle {
    font-size: 20px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.ib-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.ib-tool-card {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    color: inherit;
    display: block;
    position: relative;
}

.ib-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.ib-tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.ib-tool-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s infinite;
}

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

.ib-tool-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.ib-tool-tagline {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    margin-top: 0;
}

.ib-tool-body {
    padding: 30px;
}

.ib-tool-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    margin-top: 0;
}

.ib-tool-features {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 0;
    margin-top: 0;
}

.ib-tool-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    font-size: 14px;
}

.ib-tool-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.ib-tool-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ib-tool-cta:hover {
    text-decoration: none;
    color: #667eea;
}

.ib-tool-cta-arrow {
    width: 24px;
    height: 24px;
    background: #f0f4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ib-tool-cta:hover .ib-tool-cta-arrow {
    background: #667eea;
    color: #fff;
    transform: translateX(5px);
}

.ib-badge-new {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #FF5722;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.ib-badge-popular {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ib-related-tools-section {
        padding: 60px 20px;
    }
    
    .ib-section-title {
        font-size: 32px;
    }
    
    .ib-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .ib-tool-header {
        padding: 25px;
    }
    
    .ib-tool-body {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .ib-tools-grid {
        gap: 20px;
    }
    
    .ib-tool-name {
        font-size: 20px;
    }
    
    .ib-section-title {
        font-size: 28px;
    }
    
    .ib-section-subtitle {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .ib-related-tools-section {
        padding: 20px 0;
        background: #fff !important;
    }
    
    .ib-tool-card {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .ib-tool-header {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
    
    .ib-tool-cta-arrow,
    .ib-badge-new,
    .ib-badge-popular {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ib-tool-card {
        border: 2px solid #000;
    }
    
    .ib-tool-header {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ib-tool-card,
    .ib-tool-cta-arrow {
        transition: none;
    }
    
    .ib-tool-header::after {
        animation: none;
    }
}

/* Focus Styles */
.ib-tool-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.ib-tool-card:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}