/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --costing-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --taxation-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --project-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --text-dark: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(to bottom, #f0f4f8, #d9e8f5);
    overflow-x: hidden;
}

/* ========================================
   WAVE ANIMATION
   ======================================== */
.wave-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 0;
    background: var(--primary-gradient);
}

.waves {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 15vh;
    min-height: 100px;
    max-height: 150px;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: relative;
    z-index: 1;
    padding: 80px 20px 60px;
    text-align: center;
    color: var(--white);
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-out;
}

.sub-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1.2s ease-out;
}

.semester-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: fadeInDown 1.4s ease-out;
}

.info-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    animation: fadeInUp 1.6s ease-out;
}

.info-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px 40px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.info-value {
    font-size: 2rem;
    font-weight: 700;
}

/* ========================================
   CONTAINER & MAIN CONTENT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    position: relative;
    z-index: 1;
    padding: 40px 0 80px;
}

/* ========================================
   SECTION CARDS
   ======================================== */
.section-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out;
    transition: var(--transition);
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid transparent;
}

.costing-section .section-header {
    border-image: var(--costing-gradient) 1;
}

.taxation-section .section-header {
    border-image: var(--taxation-gradient) 1;
}

.project-section .section-header {
    border-image: var(--project-gradient) 1;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.costing-section .section-title {
    background: var(--costing-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.taxation-section .section-title {
    background: var(--taxation-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-section .section-title {
    background: var(--project-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-badge {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.project-badge {
    background: var(--project-gradient);
}

/* ========================================
   UNIT CARDS
   ======================================== */
.unit-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.unit-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e0;
}

.unit-card:nth-child(1) {
    animation-delay: 0.1s;
}

.unit-card:nth-child(2) {
    animation-delay: 0.2s;
}

.unit-card:nth-child(3) {
    animation-delay: 0.3s;
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
}

.unit-number {
    background: var(--primary-gradient);
    color: var(--white);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.costing-section .unit-number {
    background: var(--costing-gradient);
}

.taxation-section .unit-number {
    background: var(--taxation-gradient);
}

.unit-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    min-width: 200px;
}

.unit-stats {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.icon {
    font-size: 1.1rem;
}

/* ========================================
   UNIT CONTENT
   ======================================== */
.unit-content {
    padding: 20px 0;
}

.subsection {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: var(--transition);
}

.subsection:hover {
    background: rgba(247, 250, 252, 1);
    box-shadow: var(--shadow-sm);
}

.subsection-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.topic-list {
    list-style: none;
    padding: 0;
}

.topic-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.topic-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.topic-number {
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.topic-text {
    flex: 1;
    color: var(--text-dark);
    line-height: 1.7;
}

.topic-text strong {
    color: #2d3748;
    font-weight: 600;
}

.nested-list {
    list-style: disc;
    margin-left: 25px;
    margin-top: 10px;
}

.nested-list li {
    margin-bottom: 8px;
    color: var(--text-light);
    line-height: 1.6;
}

.note {
    font-style: italic;
    color: #718096;
    font-size: 0.95rem;
}

/* ========================================
   PROJECT SECTION
   ======================================== */
.project-intro {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(67, 233, 123, 0.1);
    border-radius: 10px;
    border-left: 4px solid #43e97b;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #d1fae5;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--project-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: #6ee7b7;
}

.project-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--project-gradient);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.project-card p {
    color: var(--text-dark);
    line-height: 1.7;
}

.project-card strong {
    color: #047857;
    font-weight: 600;
}

/* ========================================
   GUIDELINES
   ======================================== */
.guidelines {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
    border: 2px solid #fcd34d;
    box-shadow: var(--shadow-md);
}

.guidelines-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guidelines-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.guideline-section {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.guideline-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 12px;
}

.guideline-section ul {
    list-style: none;
    padding: 0;
}

.guideline-section li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-dark);
    line-height: 1.6;
}

.guideline-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #43e97b;
    font-weight: 700;
}

.guideline-section strong {
    color: #92400e;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--primary-gradient);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer p {
    margin: 5px 0;
    font-size: 1rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }

    .sub-title {
        font-size: 1.5rem;
    }

    .semester-title {
        font-size: 1.2rem;
    }

    .info-cards {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .section-card {
        padding: 25px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .unit-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .unit-stats {
        margin-left: 0;
        width: 100%;
        flex-wrap: wrap;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .guidelines-content {
        grid-template-columns: 1fr;
    }

    .topic-item {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }

    .sub-title {
        font-size: 1.3rem;
    }

    .info-card {
        padding: 15px 30px;
    }

    .unit-number {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    .unit-title {
        font-size: 1.3rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .wave-container {
        display: none;
    }

    .section-card {
        page-break-inside: avoid;
    }

    .unit-card {
        page-break-inside: avoid;
    }
}