/**
 * Topic Section Widget Styles
 * Modern, innovative design with glassmorphism and animations
 */

/* Container */
.topic-section-wrapper {
    width: 100%;
    padding: 60px 20px;
}

/* Default Container Gradient - Applied only when no custom background is set */
.topic-section-wrapper.topic-default-container-bg {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.topic-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

/* Content Column */


.topic-header {
    padding: 20px 0;
}

.topic-heading {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

/* Default Heading Color - Only when not customized */
.topic-heading.topic-default-heading-color {
    color: #2c3e50;
}

.topic-subheading {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 30px;
}

/* Default Subheading Color - Only when not customized */
.topic-subheading.topic-default-subheading-color {
    color: #5a6c7d;
}

.topic-cta-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: #FFD700;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-cta-button:hover {
    background-color: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Features Grid */
.topic-features-col {
    width: 100%;
}

.topic-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Feature Cards - Modern Glassmorphic Design */
.topic-feature-card {
    /* Base styles */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 30px 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    cursor: pointer;
    color: #ffffff;
}

/* Default Card Gradient - Applied only when no custom background is set */
.topic-feature-card.topic-default-card-bg {
    background: linear-gradient(135deg, rgba(93, 173, 226, 0.95) 0%, rgba(52, 152, 219, 0.95) 100%);
}

/* Gradient Overlay Effect */
.topic-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.topic-feature-card:hover::before {
    opacity: 1;
}

/* Hover Effects */
.topic-feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 45px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Icon Styling */
.feature-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.topic-feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon i {
    font-size: 32px;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Typography */
.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.topic-feature-card:hover .feature-title {
    color: #fffef0;
}

.feature-description {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

.topic-feature-card:hover .feature-description {
    color: rgba(255, 255, 255, 1);
}

/* Animation on Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topic-feature-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.topic-feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.topic-feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.topic-feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.topic-feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.topic-feature-card:nth-child(5) {
    animation-delay: 0.5s;
}

.topic-feature-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Responsive Design */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .topic-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .topic-content-col {
        position: relative;
        top: 0;
        text-align: center;
    }

    .topic-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topic-heading {
        font-size: 36px;
    }

    .topic-subheading {
        font-size: 20px;
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .topic-section-wrapper {
        padding: 40px 15px;
    }

    .topic-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .topic-heading {
        font-size: 28px;
    }

    .topic-subheading {
        font-size: 18px;
    }

    .topic-feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 40px;
    }

    .feature-icon i,
    .feature-icon svg {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }

    .feature-title {
        font-size: 18px;
    }

    .feature-description {
        font-size: 14px;
    }
}

/* Extra Small Mobile (max 480px) */
@media (max-width: 480px) {
    .topic-cta-button {
        width: 100%;
        text-align: center;
        padding: 12px 25px;
    }

    .topic-heading {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .topic-section-wrapper {
        background: white;
    }

    .topic-feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .topic-feature-card,
    .feature-icon,
    .topic-cta-button {
        transition: none;
        animation: none;
    }

    .topic-feature-card:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .topic-section-wrapper {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .topic-heading {
        color: #e8ecf1;
    }

    .topic-subheading {
        color: #b8c1cc;
    }
}