/* Course Comparison Section Styles */
.course-comparison-section {
    margin-top: 80px;
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.course-comparison-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(28, 30, 83, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* Comparison Header */
.comparison-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.comparison-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.comparison-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Table Container */
.comparison-table-container {
    background: var(--light);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(28, 30, 83, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(228, 232, 241, 0.8);
}

/* Table Styling */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Poppins', sans-serif;
}

.comparison-table thead {
    background: linear-gradient(135deg, #1c1e53 0%, #2405f2 100%);
    color: var(--light);
}

.comparison-table th {
    padding: 25px 20px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    vertical-align: middle;
}

.comparison-table th:last-child {
    border-right: none;
}

/* Feature Column */
.feature-column {
    background: rgba(0, 0, 0, 0.1) !important;
    min-width: 200px;
    text-align: left !important;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Course Headers */
.course-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.course-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.course-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.course-badge-small {
    background: var(--accent);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Body */
.comparison-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(28, 30, 83, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 30, 83, 0.1);
}

.comparison-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.comparison-table tbody tr:nth-child(even):hover {
    background: rgba(28, 30, 83, 0.02);
}

/* Table Cells */
.comparison-table td {
    padding: 20px;
    border-right: 1px solid #e2e8f0;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.comparison-table td:last-child {
    border-right: none;
}

/* Feature Names */
.feature-name {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    text-align: left;
    min-width: 180px;
    position: relative;
}

.feature-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--gradient);
    border-radius: 2px;
}

/* Course Values */
.course-value {
    text-align: left;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Feature Lists */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.feature-list li {
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 600;
}

/* Success/Danger Text */
.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

/* Action Row */
.action-row {
    background: rgba(28, 30, 83, 0.05) !important;
}

.action-row:hover {
    background: rgba(28, 30, 83, 0.08) !important;
}

.course-action {
    text-align: center;
    padding: 25px 20px !important;
}

/* Comparison CTA Buttons */
.comparison-cta {
    display: inline-block;
    background: var(--gradient);
    color: var(--light);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #f4b942 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.comparison-cta:hover::before {
    left: 0;
}

.comparison-cta:hover {
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(28, 30, 83, 0.3);
}

/* Course Column Highlights */
.course-1 {
    background: rgba(252, 217, 128, 0.1) !important;
}

.course-2 {
    background: rgba(16, 185, 129, 0.1) !important;
}

.course-3 {
    background: rgba(99, 102, 241, 0.1) !important;
}

.course-4 {
    background: rgba(236, 72, 153, 0.1) !important;
}

/* Additional Styling for Primary Icon */
.text-primary {
    color: #2405f2 !important;
}

/* Enhanced Table Styling */
.comparison-table {
    box-shadow: 0 8px 32px rgba(28, 30, 83, 0.12);
    border: 1px solid rgba(228, 232, 241, 0.8);
}

.comparison-table thead tr {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comparison-table tbody tr {
    border-bottom: 2px solid #f1f5f9;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

/* Comparison Summary */
.comparison-summary {
    background: linear-gradient(135deg, rgba(252, 217, 128, 0.1) 0%, rgba(252, 217, 128, 0.05) 100%);
    border: 2px solid rgba(252, 217, 128, 0.3);
    border-radius: 16px;
    margin-top: 40px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.comparison-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.summary-content {
    position: relative;
    z-index: 2;
}

.summary-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: 12px 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    position: relative;
    padding-left: 30px;
}

.summary-list li::before {
    content: '•';
    position: absolute;
    left: 10px;
    color: var(--secondary);
    font-weight: 900;
    font-size: 1.2rem;
}

.summary-list li strong {
    color: var(--primary);
    font-weight: 600;
}

/* Hero Buttons Container */
.hero-buttons-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hero-buttons-container .cta-button {
    flex: 0 0 auto;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .comparison-table-container {
        overflow-x: auto;
    }
    
    .comparison-table {
        min-width: 700px;
    }
    
    .course-header h3 {
        font-size: 0.9rem;
    }
    
    .course-thumb {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .course-comparison-section {
        margin-top: 40px;
        padding: 40px 10px;
    }
    
    .comparison-title {
        font-size: 2rem;
    }
    
    .comparison-subtitle {
        font-size: 1rem;
    }
    
    .comparison-table {
        min-width: 600px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 15px 10px;
    }
    
    .course-header h3 {
        font-size: 0.8rem;
    }
    
    .course-thumb {
        width: 40px;
        height: 40px;
    }
    
    .feature-list li {
        font-size: 0.8rem;
    }
    
    .comparison-cta {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .comparison-table {
        min-width: 500px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }
    
    .course-header {
        padding: 5px;
        gap: 8px;
    }
    
    .course-header h3 {
        font-size: 0.75rem;
    }
    
    .course-thumb {
        width: 35px;
        height: 35px;
    }
    
    .comparison-cta {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    /* Mobile button styling */
    .hero-buttons-container {
        justify-content: center;
        gap: 12px;
    }
    
    .hero-buttons-container .cta-button {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
}

/* Animation for table rows */
.comparison-table tbody tr {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.comparison-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.comparison-table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.comparison-table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.comparison-table tbody tr:nth-child(4) { animation-delay: 0.4s; }
.comparison-table tbody tr:nth-child(5) { animation-delay: 0.5s; }
.comparison-table tbody tr:nth-child(6) { animation-delay: 0.6s; }
.comparison-table tbody tr:nth-child(7) { animation-delay: 0.7s; }
.comparison-table tbody tr:nth-child(8) { animation-delay: 0.8s; }
.comparison-table tbody tr:nth-child(9) { animation-delay: 0.9s; }
.comparison-table tbody tr:nth-child(10) { animation-delay: 1.0s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator for mobile */
@media (max-width: 1200px) {
    .comparison-table-container::after {
        content: '← Scroll to see more →';
        position: absolute;
        bottom: 10px;
        right: 20px;
        background: rgba(28, 30, 83, 0.8);
        color: white;
        padding: 5px 10px;
        border-radius: 15px;
        font-size: 0.75rem;
        font-weight: 500;
        z-index: 10;
        animation: pulse 2s infinite;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Interactive Elements */
.row-active {
    background: rgba(28, 30, 83, 0.05) !important;
    border-left: 4px solid var(--secondary) !important;
}

.column-highlight {
    background: rgba(252, 217, 128, 0.15) !important;
    transform: scale(1.02);
}

.course-selected {
    animation: courseSelection 3s ease-in-out;
}

@keyframes courseSelection {
    0%, 100% { background: inherit; }
    50% { background: rgba(16, 185, 129, 0.2) !important; }
}

@keyframes highlightSection {
    0%, 100% { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
    50% { background: linear-gradient(135deg, rgba(252, 217, 128, 0.1) 0%, rgba(252, 217, 128, 0.05) 100%); }
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* Additional Animation Classes */
.animate-in {
    animation: sectionFadeIn 1s ease-out;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}