/* ============================================
   CSTX Semester IV Syllabus Stylesheet
   Colors: Light Green (#90EE90, #98FB98, #8FBC8F) 
           Light Red (#FFB6C1, #FFA07A, #FF6B6B)
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #FFEBEE 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #90EE90 0%, #FFB6C1 100%);
    padding: 40px 30px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.header::before {
    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 15s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.header-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.header-details p {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 1em;
}

.header-details strong {
    font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    background: linear-gradient(to right, #E8F5E9, #FFEBEE);
    padding: 15px;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 3px solid #90EE90;
}

.tab-btn {
    padding: 12px 30px;
    border: none;
    background: #fff;
    color: #555;
    font-size: 1em;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #90EE90 0%, #FFB6C1 100%);
    color: #fff;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2em;
    color: #2E7D32;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, #90EE90, #FFB6C1);
    border-radius: 2px;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.overview-card {
    background: linear-gradient(135deg, #F1F8E9 0%, #FFF0F5 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #90EE90;
}

.overview-card h3 {
    color: #D32F2F;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.big-number {
    font-size: 3em;
    font-weight: bold;
    background: linear-gradient(135deg, #66BB6A, #EF5350);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.small-text {
    color: #666;
    font-size: 0.95em;
}

/* Unit Cards */
.unit-card {
    background: #fff;
    border: 2px solid #E0E0E0;
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.unit-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #90EE90;
}

.unit-header {
    background: linear-gradient(135deg, #C8E6C9 0%, #FFCDD2 100%);
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.unit-header:hover {
    background: linear-gradient(135deg, #A5D6A7 0%, #EF9A9A 100%);
}

.unit-header h3 {
    color: #1B5E20;
    font-size: 1.4em;
    flex: 1;
}

.unit-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.unit-meta span {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.hours {
    background: #90EE90;
    color: #1B5E20;
}

.marks {
    background: #FFB6C1;
    color: #B71C1C;
}

.arrow {
    background: #fff;
    color: #333;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.unit-header.active .arrow {
    transform: rotate(180deg);
}

.unit-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: #FAFAFA;
}

.unit-content.active {
    max-height: 5000px;
    padding: 25px;
}

/* Topic Groups */
.topic-group {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid #90EE90;
}

.topic-group:last-child {
    margin-bottom: 0;
}

.topic-group h4 {
    color: #D32F2F;
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFE0E0;
}

/* Bullet Lists */
.bullet-list {
    list-style: none;
    padding-left: 0;
}

.bullet-list > li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.bullet-list > li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #90EE90;
    font-size: 1.5em;
    line-height: 1;
}

.bullet-list > li strong {
    color: #2E7D32;
    display: block;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.bullet-list ul {
    list-style: none;
    margin-top: 10px;
    padding-left: 0;
}

.bullet-list ul li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.bullet-list ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #FFB6C1;
    font-size: 1.2em;
}

.bullet-list ul li em {
    color: #D32F2F;
    font-weight: 600;
    font-style: normal;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #90EE90 0%, #FFB6C1 100%);
    color: #fff;
    text-align: center;
    padding: 25px;
    margin-top: 30px;
}

.footer p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header-details {
        flex-direction: column;
        gap: 10px;
    }

    .nav-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .content-section {
        padding: 20px;
    }

    .section-title {
        font-size: 1.5em;
    }

    .unit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .unit-header h3 {
        font-size: 1.2em;
    }

    .unit-meta {
        flex-wrap: wrap;
        width: 100%;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .big-number {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    .unit-header h3 {
        font-size: 1.1em;
    }

    .topic-group h4 {
        font-size: 1.1em;
    }

    .bullet-list > li {
        padding-left: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .nav-tabs,
    .arrow {
        display: none;
    }

    .unit-content {
        max-height: none !important;
        padding: 20px !important;
    }

    .content-section {
        display: block !important;
        page-break-after: always;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F1F8E9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #90EE90, #FFB6C1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #66BB6A, #EF5350);
}