/* ===== PGDM TAB-SPECIFIC FIXES - PHASE 3 ===== */
/* File: /css/sections/programs/pgdm-tab-fixes.css */
/* Purpose: Fix tab-specific layout issues from Phase 2 polish */
/* Applied AFTER pgdm-polish.css */

/* ===== 1. FIX PROGRAM OVERVIEW NESTED CARDS ===== */

/* Target only the program overview highlight cards */
.program-highlights-cards .highlights-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
}

/* Remove double card styling from Phase 2 */
.program-highlights-cards .highlight-card {
    height: auto !important;
}

.program-highlights-cards .highlight-card-inner {
    background: white !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    border-left: 4px solid var(--pgdm-primary) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    position: relative !important;
    overflow: visible !important; /* Changed from hidden */
    border: none !important; /* Remove border from Phase 2 */
}

/* Remove the ::before accent line from Phase 2 */
.program-highlights-cards .highlight-card-inner::before {
    display: none !important;
}

.program-highlights-cards .highlight-card-inner:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.program-highlights-cards .highlight-title {
    color: var(--pgdm-primary) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.75rem !important;
}

.program-highlights-cards .highlight-description {
    color: var(--pgdm-dark) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* ===== 2. FIX INTERNSHIP PROCESS TIMELINE ===== */

/* Target only internship process timeline */
.process-timeline-section .process-timeline {
    position: relative !important;
    padding-left: 40px !important; /* Increased for visibility */
    margin: 2rem 0 !important;
    max-width: 800px !important; /* Limit width */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Make the vertical line more visible */
.process-timeline-section .process-timeline::before {
    content: '' !important;
    position: absolute !important;
    left: 20px !important; /* Adjusted for better alignment */
    top: 0 !important;
    bottom: 0 !important;
    width: 3px !important;
    background: linear-gradient(to bottom, var(--pgdm-primary), var(--pgdm-accent)) !important;
    border-radius: 3px !important;
    z-index: 1 !important;
}

/* Fix process step cards */
.process-timeline-section .process-step {
    position: relative !important;
    margin-bottom: 1.5rem !important;
    background: white !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    padding-left: 2rem !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05) !important;
    border: 1px solid var(--pgdm-border) !important;
    max-width: 100% !important; /* Prevent excessive width */
}

/* Fix step number circles */
.process-timeline-section .step-number {
    position: absolute !important;
    left: -35px !important; /* Adjusted position */
    top: 1.25rem !important;
    width: 36px !important;
    height: 36px !important;
    background: var(--pgdm-primary) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    z-index: 2 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2) !important;
}

/* Fix process step content */
.process-timeline-section .step-content h4 {
    color: var(--pgdm-primary) !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.1rem !important;
}

.process-timeline-section .step-content p {
    color: var(--pgdm-dark) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* ===== 3. FIX MEDIA/GALLERY SECTIONS ===== */

/* Fix yellow container issue */
.tab-media-section {
    background: white !important; /* Override yellow background */
    border-radius: 12px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    border: 1px solid var(--pgdm-border) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    position: relative !important;
    overflow: visible !important; /* Changed from hidden */
}

/* Fix video container empty space */
.tab-media-section .video-container {
    margin-top: 2rem !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.tab-media-section .video-wrapper {
    position: relative !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    height: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    background: #000 !important; /* Black background for empty space */
}

.tab-media-section .video-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Fix media grid layout */
.tab-media-section .media-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.tab-media-section .media-item {
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease !important;
    height: 200px !important; /* Fixed height */
}

.tab-media-section .media-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.tab-media-section .media-item:hover {
    transform: translateY(-3px) !important;
}

/* ===== 4. FIX TAB INTRO SECTIONS ===== */

/* Fix tab intro sections (remove excessive styling) */
.tab-intro-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    border-left: 6px solid var(--pgdm-primary) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important;
    position: relative !important;
    overflow: visible !important;
}

/* Remove the gradient line from Phase 2 */
.tab-intro-section::before {
    display: none !important;
}

/* Fix highlight points */
.highlight-points {
    list-style: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
}

.highlight-points li {
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    display: flex !important;
    align-items: flex-start !important;
    color: var(--pgdm-dark) !important;
    font-size: 1rem !important;
}

.highlight-points li:last-child {
    border-bottom: none !important;
}

.highlight-points li i {
    color: var(--pgdm-accent) !important;
    margin-right: 1rem !important;
    margin-top: 0.25rem !important;
    flex-shrink: 0 !important;
    font-size: 1.1rem !important;
}

/* ===== 5. FIX COURSE & ACTIVITIES SECTIONS ===== */

.course-activities-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    gap: 2rem !important;
    margin: 2rem 0 !important;
}

.course-section, .activities-section {
    background: white !important;
    border-radius: 10px !important;
    padding: 1.5rem !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-top: 4px solid var(--pgdm-primary) !important;
    border: 1px solid var(--pgdm-border) !important;
}

.course-section h3, .activities-section h3 {
    color: var(--pgdm-primary) !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid var(--pgdm-accent) !important;
    font-size: 1.3rem !important;
}

/* ===== 6. FIX STUDENT TABLE SECTION ===== */

.student-list-section {
    margin: 2rem 0 !important;
    padding: 1.5rem !important;
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid var(--pgdm-border) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

.student-table-container {
    overflow-x: auto !important;
    border-radius: 8px !important;
    margin-top: 1rem !important;
    border: 1px solid var(--pgdm-border) !important;
}

.student-table {
    width: 100% !important;
    border-collapse: collapse !important;
    min-width: 600px !important;
    font-size: 0.9rem !important;
}

.student-table thead {
    background: linear-gradient(135deg, var(--pgdm-primary) 0%, var(--pgdm-secondary) 100%) !important;
}

.student-table th {
    color: white !important;
    padding: 1rem !important;
    text-align: left !important;
    font-weight: 600 !important;
}

.student-table td {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid var(--pgdm-border) !important;
    vertical-align: middle !important;
}

/* ===== 7. MOBILE FIXES FOR TAB CONTENT ===== */

@media (max-width: 768px) {
    /* Fix program overview cards on mobile */
    .program-highlights-cards .highlights-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .program-highlights-cards .highlight-card-inner {
        padding: 1.25rem !important;
    }
    
    /* Fix process timeline on mobile */
    .process-timeline-section .process-timeline {
        padding-left: 30px !important;
    }
    
    .process-timeline-section .step-number {
        left: -25px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }
    
    .process-timeline-section .process-step {
        padding: 1rem !important;
        padding-left: 1.5rem !important;
    }
    
    /* Fix media sections on mobile */
    .tab-media-section {
        padding: 1.5rem !important;
    }
    
    .tab-media-section .media-grid {
        grid-template-columns: 1fr !important;
    }
    
    .tab-media-section .media-item {
        height: 180px !important;
    }
    
    /* Fix course activities on mobile */
    .course-activities-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .course-section, .activities-section {
        padding: 1.25rem !important;
    }
    
    /* Fix student table on mobile */
    .student-list-section {
        padding: 1.25rem !important;
    }
    
    .student-table {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    /* Further mobile optimizations */
    .tab-intro-section {
        padding: 1.5rem !important;
    }
    
    .highlight-points li {
        font-size: 0.95rem !important;
    }
    
    .process-timeline-section .process-timeline {
        padding-left: 25px !important;
    }
    
    .process-timeline-section .step-number {
        left: -22px !important;
        width: 28px !important;
        height: 28px !important;
    }
}

/* ===== END OF TAB-SPECIFIC FIXES ===== */