/* =================================
   Shared Component Styles
   ================================= */

/* Used on Neo-Broker & Direktbanken Comparison Pages */

.info-section,
.pros-cons-section,
.faq-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-section {
    background: var(--secondary-color);
}

.info-grid,
.pros-cons-grid,
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start; /* Masonry-style: align items to start */
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.pros-cons-section {
    background: var(--white);
}

/* Enhanced Pros-Cons Styling */
.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: start; /* Masonry-style layout */
}

.pros-card,
.cons-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    height: fit-content; /* Only take up needed space */
}

.pros-card {
    border-color: #a7f3d0;
}

.cons-card {
    border-color: #fca5a5;
}

.pros-card h3,
.pros-card h4 {
    font-size: 1.25rem;
    color: #454545;
    text-align: center;
}

.cons-card h3,
.cons-card h4 {
    font-size: 1.25rem;
    color: #454545;
    text-align: center;
}

.pros-card ul,
.cons-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-card li,
.cons-card li {
    padding: 0.5rem 0 0.5rem 2.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.pros-card li::before {
    content: "✓";
    color: #16a34a;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cons-card li::before {
    content: "❌";
    color: #dc2626;
    position: absolute;
    left: 0;
}

/* Enhanced styling for broker-components.php style */
.pros-advantages,
.cons-disadvantages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.advantage-item,
.disadvantage-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.advantage-item {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: #047857;
}

.advantage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
    background: rgba(5, 150, 105, 0.15);
}

.advantage-item::before {
    content: "✓";
    background: #059669;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.disadvantage-item {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.disadvantage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    background: rgba(220, 38, 38, 0.15);
}

.disadvantage-item::before {
    content: "✗";
    background: #dc2626;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* =================================
   FAQ Section Styles
   ================================= */

.faq-section {
    background: var(--secondary-color);
}

.faq-list,
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.faq-item h3 {
    font-size: 1.1rem;
    cursor: pointer;
    margin: 0;
    padding: 1rem;
    background: var(--white);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-weight: 600;
}

.faq-item h3:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.faq-item h3::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.4s linear;
    color: var(--primary-color);
    flex-shrink: 0;
}

.faq-item.active h3::after {
    content: "−";
    transform: rotate(0deg);
}

.faq-item h3:hover::after {
    color: var(--primary-dark);
}

.faq-item.active h3:hover::after {
    color: var(--primary-dark);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s linear;
    padding: 0;
}

.faq-item.active .faq-content {
    /* Will be set dynamically by JavaScript */
    padding: 0;
}

.faq-content p {
    margin: 1.5rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* Used on Main Comparison Page */

.full-comparison-table {
    padding: 4rem 0;
    text-align: center;
}

.full-comparison-table .lead-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.full-comparison-table .subtle-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Responsive Design for Pros-Cons */
@media (max-width: 768px) {
    .pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pros-card,
    .cons-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pros-card,
    .cons-card {
        padding: 1rem;
    }

    .advantage-item,
    .disadvantage-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}
