/* ============================================
   INDIAN PARTNERSHIP ACT, 1932 - EDUCATIONAL PAGE
   Digital E-Filing Coach | Amanuddin Education
   ============================================ */

/* ---- CSS RESET & BASE ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --light-green: rgb(200, 235, 200);
    --saffron: rgb(255, 220, 160);
    --light-pink: rgb(255, 210, 215);
    --light-blue: rgb(195, 220, 245);
    --dark-green: rgb(30, 90, 50);
    --dark-saffron: rgb(180, 100, 20);
    --dark-pink: rgb(160, 40, 60);
    --dark-blue: rgb(25, 60, 120);
    --border-green: rgb(80, 160, 90);
    --border-saffron: rgb(210, 150, 50);
    --border-pink: rgb(200, 100, 120);
    --border-blue: rgb(70, 130, 190);
    --white: #ffffff;
    --text-dark: rgb(30, 30, 40);
    --shadow: rgba(0, 0, 0, 0.12);
    --shadow-strong: rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-green) 25%, var(--saffron) 50%, var(--light-pink) 75%, var(--light-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ---- PRINT STYLES ---- */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
    }
    .sticky-nav, .print-btn, .back-to-top, #toc-sidebar, .nav-toggle-btn {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 10px !important;
    }
    .section-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin-bottom: 15px !important;
    }
    .flowchart-container, .mindmap-container, .roadmap-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    table {
        font-size: 10pt;
    }
    h1, h2, h3 {
        color: black !important;
    }
}

/* ---- STICKY NAVIGATION ---- */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--dark-green), var(--dark-blue), var(--dark-saffron));
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 12px var(--shadow-strong);
    flex-wrap: wrap;
    gap: 8px;
}

.sticky-nav .nav-brand {
    color: var(--white);
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sticky-nav .nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.sticky-nav .nav-links a,
.sticky-nav .nav-links button {
    color: var(--white);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.sticky-nav .nav-links a:hover,
.sticky-nav .nav-links button:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--white);
    transform: translateY(-1px);
}

.print-btn {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgb(255, 200, 50) !important;
    color: rgb(255, 220, 100) !important;
}

/* ---- HERO / HEADER ---- */
.hero {
    margin-top: 60px;
    text-align: center;
    padding: 50px 20px 40px;
    background: linear-gradient(135deg, var(--dark-green), var(--dark-blue));
    color: var(--white);
    border-bottom: 6px solid var(--border-saffron);
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.hero .subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    opacity: 0.92;
    margin-bottom: 8px;
}

.hero .branding {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.8;
    margin-top: 12px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.1);
    display: inline-block;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
}

/* ---- TABLE OF CONTENTS ---- */
.toc-section {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.toc-card {
    background: var(--white);
    border-radius: 14px;
    padding: 30px 35px;
    box-shadow: 0 4px 20px var(--shadow);
    border-left: 6px solid var(--border-green);
}

.toc-card h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--dark-green);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--border-green);
}

.toc-card .toc-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.toc-card .toc-unit {
    padding: 12px;
    border-radius: 10px;
}

.toc-card .toc-unit:nth-child(1) { background: var(--light-green); border: 2px solid var(--border-green); }
.toc-card .toc-unit:nth-child(2) { background: var(--saffron); border: 2px solid var(--border-saffron); }
.toc-card .toc-unit:nth-child(3) { background: var(--light-pink); border: 2px solid var(--border-pink); }

.toc-card .toc-unit h3 {
    font-weight: 900;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.toc-card .toc-unit ul {
    list-style: none;
    padding: 0;
}

.toc-card .toc-unit li {
    margin-bottom: 4px;
}

.toc-card .toc-unit li a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.toc-card .toc-unit:nth-child(1) li a:hover { background: var(--border-green); color: var(--white); }
.toc-card .toc-unit:nth-child(2) li a:hover { background: var(--border-saffron); color: var(--white); }
.toc-card .toc-unit:nth-child(3) li a:hover { background: var(--border-pink); color: var(--white); }

/* ---- MAIN CONTENT ---- */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ---- SECTION CARDS ---- */
.section-card {
    background: var(--white);
    border-radius: 14px;
    padding: 30px 35px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.2s ease;
}

.section-card.green-theme { border-left: 6px solid var(--border-green); }
.section-card.saffron-theme { border-left: 6px solid var(--border-saffron); }
.section-card.pink-theme { border-left: 6px solid var(--border-pink); }
.section-card.blue-theme { border-left: 6px solid var(--border-blue); }

.section-card h2 {
    font-size: 1.55rem;
    font-weight: 900;
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.section-card.green-theme h2 { color: var(--dark-green); border-bottom: 3px solid var(--border-green); }
.section-card.saffron-theme h2 { color: var(--dark-saffron); border-bottom: 3px solid var(--border-saffron); }
.section-card.pink-theme h2 { color: var(--dark-pink); border-bottom: 3px solid var(--border-pink); }
.section-card.blue-theme h2 { color: var(--dark-blue); border-bottom: 3px solid var(--border-blue); }

.section-card h3 {
    font-size: 1.2rem;
    font-weight: 900;
    margin: 18px 0 10px;
}

.section-card.green-theme h3 { color: var(--dark-green); }
.section-card.saffron-theme h3 { color: var(--dark-saffron); }
.section-card.pink-theme h3 { color: var(--dark-pink); }
.section-card.blue-theme h3 { color: var(--dark-blue); }

.section-card h4 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 14px 0 8px;
    color: var(--text-dark);
}

.section-card p, .section-card li {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 8px;
}

.section-card ul, .section-card ol {
    padding-left: 25px;
    margin-bottom: 12px;
}

.section-card ul li {
    list-style: disc;
    margin-bottom: 5px;
}

.section-card ol li {
    margin-bottom: 5px;
}

/* ---- HIGHLIGHT BOXES ---- */
.highlight-box {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 700;
}

.highlight-green { background: var(--light-green); border: 2px solid var(--border-green); }
.highlight-saffron { background: var(--saffron); border: 2px solid var(--border-saffron); }
.highlight-pink { background: var(--light-pink); border: 2px solid var(--border-pink); }
.highlight-blue { background: var(--light-blue); border: 2px solid var(--border-blue); }

/* ---- EXAMPLE BOX ---- */
.example-box {
    background: rgb(255, 250, 230);
    border: 2px solid rgb(200, 170, 50);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 12px 0;
    font-weight: 700;
    font-size: 0.92rem;
}

.example-box strong {
    color: var(--dark-saffron);
}

/* ---- TABLES ---- */
.table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 10px;
    border: 2px solid var(--border-blue);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-weight: 700;
    font-size: 0.9rem;
}

thead th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 900;
    font-size: 0.92rem;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.green-table thead th { background: var(--dark-green); }
.saffron-table thead th { background: var(--dark-saffron); }
.pink-table thead th { background: var(--dark-pink); }
.blue-table thead th { background: var(--dark-blue); }

tbody td {
    padding: 10px 14px;
    border: 1px solid rgb(200, 200, 210);
    vertical-align: top;
}

tbody tr:nth-child(odd) { background: rgb(245, 248, 255); }
tbody tr:nth-child(even) { background: var(--white); }

tbody tr:hover { background: rgb(230, 240, 255); }

/* ---- FLOWCHART ---- */
.flowchart-container {
    margin: 20px 0;
    padding: 25px;
    border-radius: 14px;
    overflow-x: auto;
}

.flowchart-container.fc-green { background: var(--light-green); border: 3px solid var(--border-green); }
.flowchart-container.fc-saffron { background: var(--saffron); border: 3px solid var(--border-saffron); }
.flowchart-container.fc-pink { background: var(--light-pink); border: 3px solid var(--border-pink); }
.flowchart-container.fc-blue { background: var(--light-blue); border: 3px solid var(--border-blue); }

.flowchart-title {
    text-align: center;
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 18px;
}

.fc-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.fc-node {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.88rem;
    text-align: center;
    min-width: 140px;
    max-width: 220px;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
}

.fc-node.primary { background: var(--dark-green); color: var(--white); border: 2px solid var(--border-green); }
.fc-node.secondary { background: var(--dark-blue); color: var(--white); border: 2px solid var(--border-blue); }
.fc-node.tertiary { background: var(--dark-saffron); color: var(--white); border: 2px solid var(--border-saffron); }
.fc-node.accent { background: var(--dark-pink); color: var(--white); border: 2px solid var(--border-pink); }
.fc-node.light-node { background: var(--white); color: var(--text-dark); border: 2px solid var(--border-blue); }

.fc-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px 0;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark-green);
    line-height: 1;
}

.fc-arrow.horizontal {
    writing-mode: horizontal-tb;
    margin: 0 4px;
    font-size: 1.3rem;
}

/* ---- MIND MAP ---- */
.mindmap-container {
    margin: 20px 0;
    padding: 25px;
    border-radius: 14px;
    overflow-x: auto;
}

.mindmap-container.mm-green { background: var(--light-green); border: 3px solid var(--border-green); }
.mindmap-container.mm-saffron { background: var(--saffron); border: 3px solid var(--border-saffron); }
.mindmap-container.mm-blue { background: var(--light-blue); border: 3px solid var(--border-blue); }

.mm-title {
    text-align: center;
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 18px;
}

.mm-center {
    text-align: center;
    margin-bottom: 15px;
}

.mm-center-node {
    display: inline-block;
    background: var(--dark-green);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 3px 12px var(--shadow-strong);
    border: 3px solid var(--border-green);
}

.mm-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.mm-branch {
    background: var(--white);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 10px var(--shadow);
    border-top: 4px solid;
}

.mm-branch:nth-child(1) { border-color: var(--border-green); }
.mm-branch:nth-child(2) { border-color: var(--border-saffron); }
.mm-branch:nth-child(3) { border-color: var(--border-pink); }
.mm-branch:nth-child(4) { border-color: var(--border-blue); }
.mm-branch:nth-child(5) { border-color: var(--dark-green); }
.mm-branch:nth-child(6) { border-color: var(--dark-saffron); }

.mm-branch h4 {
    font-weight: 900;
    font-size: 0.95rem;
    margin-bottom: 8px;
    text-align: center;
}

.mm-branch ul {
    list-style: none;
    padding: 0;
}

.mm-branch ul li {
    font-weight: 700;
    font-size: 0.82rem;
    padding: 3px 8px;
    margin-bottom: 3px;
    border-radius: 4px;
    background: rgb(245, 248, 255);
}

/* ---- ROADMAP ---- */
.roadmap-container {
    margin: 20px 0;
    padding: 25px;
    border-radius: 14px;
}

.roadmap-container.rm-blue { background: var(--light-blue); border: 3px solid var(--border-blue); }

.rm-title {
    text-align: center;
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: var(--dark-blue);
}

.rm-timeline {
    position: relative;
    padding-left: 40px;
}

.rm-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--dark-green), var(--dark-blue), var(--dark-saffron), var(--dark-pink));
    border-radius: 2px;
}

.rm-step {
    position: relative;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
    border-left: 4px solid;
}

.rm-step::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 18px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--dark-blue);
}

.rm-step:nth-child(1) { border-color: var(--border-green); }
.rm-step:nth-child(1)::before { background: var(--dark-green); }
.rm-step:nth-child(2) { border-color: var(--border-saffron); }
.rm-step:nth-child(2)::before { background: var(--dark-saffron); }
.rm-step:nth-child(3) { border-color: var(--border-pink); }
.rm-step:nth-child(3)::before { background: var(--dark-pink); }
.rm-step:nth-child(4) { border-color: var(--border-blue); }
.rm-step:nth-child(4)::before { background: var(--dark-blue); }
.rm-step:nth-child(5) { border-color: var(--border-green); }
.rm-step:nth-child(5)::before { background: var(--dark-green); }
.rm-step:nth-child(6) { border-color: var(--border-saffron); }
.rm-step:nth-child(6)::before { background: var(--dark-saffron); }
.rm-step:nth-child(7) { border-color: var(--border-pink); }
.rm-step:nth-child(7)::before { background: var(--dark-pink); }
.rm-step:nth-child(8) { border-color: var(--border-blue); }
.rm-step:nth-child(8)::before { background: var(--dark-blue); }

.rm-step h4 {
    font-weight: 900;
    font-size: 1rem;
    margin-bottom: 5px;
}

.rm-step p {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.6;
}

.rm-step .section-ref {
    display: inline-block;
    background: var(--light-blue);
    color: var(--dark-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 5px;
}

/* ---- DISCLAIMER ---- */
.disclaimer {
    max-width: 1100px;
    margin: 10px auto 30px;
    padding: 0 20px;
}

.disclaimer-card {
    background: rgb(255, 245, 230);
    border: 2px solid rgb(200, 150, 50);
    border-radius: 10px;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    color: rgb(120, 70, 0);
}

/* ---- FOOTER ---- */
.footer {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(90deg, var(--dark-green), var(--dark-blue));
    color: var(--white);
    font-weight: 700;
    font-size: 0.88rem;
    border-top: 4px solid var(--border-saffron);
}

/* ---- BACK TO TOP ---- */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dark-green);
    color: var(--white);
    border: 3px solid var(--border-green);
    font-size: 1.4rem;
    font-weight: 900;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 3px 12px var(--shadow-strong);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--border-green);
    transform: translateY(-3px);
}

.back-to-top.visible {
    display: flex;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.6rem; }
    .section-card { padding: 20px 18px; }
    .sticky-nav { padding: 8px 12px; }
    .sticky-nav .nav-brand { font-size: 0.9rem; }
    .sticky-nav .nav-links a,
    .sticky-nav .nav-links button { padding: 4px 10px; font-size: 0.75rem; }
    .toc-card .toc-columns { grid-template-columns: 1fr; }
    .fc-row { gap: 10px; }
    .fc-node { min-width: 110px; max-width: 160px; font-size: 0.78rem; padding: 8px 12px; }
    .mm-branches { grid-template-columns: 1fr 1fr; }
    .rm-timeline { padding-left: 30px; }
    table { font-size: 0.8rem; }
    thead th, tbody td { padding: 7px 8px; }
}

@media (max-width: 480px) {
    .mm-branches { grid-template-columns: 1fr; }
    .fc-node { min-width: 90px; }
}