/* Immigration and Foreigners Act, 2025 - Stylesheet */

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgb(240, 242, 245) 0%, rgb(225, 230, 235) 100%);
    color: rgb(33, 37, 41);
    line-height: 1.6;
    font-weight: 500;
}

/* ==================== HEADER ==================== */
header {
    background: linear-gradient(135deg, rgb(41, 98, 255) 0%, rgb(0, 51, 160) 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 5px solid rgb(255, 193, 7);
}

.header-content h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
    color: rgb(255, 235, 59);
}

.disclaimer {
    font-size: 0.95em;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* ==================== LEFT NAVIGATION PANEL ==================== */
.left-navigation-panel {
    position: fixed;
    left: 0;
    top: 180px;
    width: 280px;
    height: calc(100vh - 200px);
    background: linear-gradient(135deg, rgb(52, 58, 64) 0%, rgb(33, 37, 41) 100%);
    padding: 20px 15px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-right: 4px solid rgb(255, 193, 7);
    overflow-y: auto;
    overflow-x: hidden;
}

.left-navigation-panel::-webkit-scrollbar {
    width: 8px;
}

.left-navigation-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.left-navigation-panel::-webkit-scrollbar-thumb {
    background: rgb(255, 193, 7);
    border-radius: 4px;
}

.left-navigation-panel h3 {
    color: rgb(255, 235, 59);
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 1.2em;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 2px solid rgb(255, 193, 7);
    padding-bottom: 10px;
}

.left-navigation-panel .nav-section {
    margin-bottom: 25px;
}

.left-navigation-panel .nav-section h4 {
    color: rgb(255, 193, 7);
    font-weight: 800;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.left-navigation-panel button {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 12px 12px;
    background: linear-gradient(135deg, rgb(0, 123, 255) 0%, rgb(0, 86, 179) 100%);
    color: white;
    border: 2px solid rgb(0, 86, 179);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    text-align: left;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.left-navigation-panel button:hover {
    background: linear-gradient(135deg, rgb(0, 86, 179) 0%, rgb(0, 51, 160) 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.left-navigation-panel .nav-subtitle {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 2px;
}

/* ==================== RIGHT NAVIGATION PANEL ==================== */
.right-navigation-panel {
    position: fixed;
    right: 0;
    top: 180px;
    width: 280px;
    height: calc(100vh - 200px);
    background: linear-gradient(135deg, rgb(33, 37, 41) 0%, rgb(52, 58, 64) 100%);
    padding: 20px 15px;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-left: 4px solid rgb(255, 193, 7);
    overflow-y: auto;
    overflow-x: hidden;
}

.right-navigation-panel::-webkit-scrollbar {
    width: 8px;
}

.right-navigation-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.right-navigation-panel::-webkit-scrollbar-thumb {
    background: rgb(255, 193, 7);
    border-radius: 4px;
}

.right-navigation-panel h3 {
    color: rgb(255, 235, 59);
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 1.2em;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 2px solid rgb(255, 193, 7);
    padding-bottom: 10px;
}

.right-navigation-panel .nav-section {
    margin-bottom: 25px;
}

.right-navigation-panel .nav-section h4 {
    color: rgb(255, 193, 7);
    font-weight: 800;
    font-size: 0.95em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.right-navigation-panel button {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 12px 12px;
    background: linear-gradient(135deg, rgb(40, 167, 69) 0%, rgb(25, 135, 84) 100%);
    color: white;
    border: 2px solid rgb(25, 135, 84);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9em;
    text-align: center;
    transition: all 0.3s ease;
}

.right-navigation-panel button:hover {
    background: linear-gradient(135deg, rgb(25, 135, 84) 0%, rgb(20, 108, 67) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.right-navigation-panel .action-btn {
    background: linear-gradient(135deg, rgb(0, 123, 255) 0%, rgb(0, 86, 179) 100%);
    border-color: rgb(0, 86, 179);
}

.right-navigation-panel .action-btn:hover {
    background: linear-gradient(135deg, rgb(0, 86, 179) 0%, rgb(0, 51, 160) 100%);
}

.right-navigation-panel .print-btn {
    background: linear-gradient(135deg, rgb(220, 53, 69) 0%, rgb(200, 35, 51) 100%);
    border-color: rgb(200, 35, 51);
}

.right-navigation-panel .print-btn:hover {
    background: linear-gradient(135deg, rgb(200, 35, 51) 0%, rgb(180, 25, 41) 100%);
}

.right-navigation-panel .quick-jump {
    font-size: 0.85em;
    padding: 10px 10px;
    background: linear-gradient(135deg, rgb(111, 66, 193) 0%, rgb(94, 53, 177) 100%);
    border-color: rgb(94, 53, 177);
}

.right-navigation-panel .quick-jump:hover {
    background: linear-gradient(135deg, rgb(94, 53, 177) 0%, rgb(81, 43, 162) 100%);
}

.right-navigation-panel .font-controls {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.right-navigation-panel .font-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.95em;
    background: linear-gradient(135deg, rgb(255, 193, 7) 0%, rgb(255, 160, 0) 100%);
    color: rgb(33, 37, 41);
    border-color: rgb(255, 160, 0);
    font-weight: 800;
}

.right-navigation-panel .font-btn:hover {
    background: linear-gradient(135deg, rgb(255, 160, 0) 0%, rgb(255, 140, 0) 100%);
    color: white;
}

.right-navigation-panel .info-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 193, 7, 0.5);
}

.right-navigation-panel .info-card p {
    color: white;
    font-size: 0.85em;
    margin: 6px 0;
    font-weight: 700;
}

.right-navigation-panel .info-card strong {
    color: rgb(255, 235, 59);
    font-weight: 800;
}

/* ==================== MAIN CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 30px auto;
    margin-left: 320px;
    margin-right: 320px;
    padding: 20px;
}

/* ==================== SECTIONS ==================== */
.content-section {
    background: white;
    margin: 30px 0;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 6px solid rgb(0, 123, 255);
}

.content-section h2 {
    color: rgb(0, 51, 160);
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgb(255, 193, 7);
}

/* ==================== SECTION CARDS ==================== */
.section-card {
    background: linear-gradient(135deg, rgb(248, 249, 250) 0%, rgb(233, 236, 239) 100%);
    padding: 25px;
    margin: 25px 0;
    border-radius: 10px;
    border: 2px solid rgb(206, 212, 218);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.section-card h3 {
    color: rgb(220, 53, 69);
    font-weight: 800;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding: 10px;
    background: linear-gradient(135deg, rgb(255, 236, 239) 0%, rgb(248, 215, 218) 100%);
    border-left: 5px solid rgb(220, 53, 69);
    border-radius: 5px;
}

.section-card h4 {
    color: rgb(111, 66, 193);
    font-weight: 800;
    font-size: 1.2em;
    margin: 20px 0 15px 0;
    padding: 8px 12px;
    background: rgb(243, 237, 247);
    border-left: 4px solid rgb(111, 66, 193);
}

.section-content {
    padding: 15px;
}

/* ==================== INFO BOXES ==================== */
.info-box {
    background: linear-gradient(135deg, rgb(209, 236, 241) 0%, rgb(186, 225, 233) 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid rgb(23, 162, 184);
    margin: 15px 0;
}

.info-box h3 {
    color: rgb(0, 86, 179);
    font-weight: 800;
    margin-bottom: 15px;
}

.info-box ul, .info-box ol {
    margin-left: 25px;
    font-weight: 600;
}

.info-box li {
    margin: 10px 0;
    font-weight: 600;
}

/* ==================== EXAMPLE BOXES ==================== */
.example-box {
    background: linear-gradient(135deg, rgb(255, 243, 205) 0%, rgb(255, 236, 179) 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid rgb(255, 193, 7);
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.example-box p {
    margin: 10px 0;
    font-weight: 600;
}

.example-box strong {
    color: rgb(133, 100, 4);
    font-weight: 800;
}

/* ==================== CASE LAW BOXES ==================== */
.caselaw-box {
    background: linear-gradient(135deg, rgb(248, 215, 218) 0%, rgb(241, 192, 197) 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid rgb(220, 53, 69);
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.caselaw-box p {
    margin: 10px 0;
    font-weight: 700;
}

.caselaw-box strong {
    color: rgb(114, 28, 36);
    font-weight: 800;
}

.case-card {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border: 2px solid rgb(206, 212, 218);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.case-card h4 {
    color: rgb(220, 53, 69);
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.case-card p {
    margin: 8px 0;
    font-weight: 600;
}

/* ==================== TABLES ==================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

table thead {
    background: linear-gradient(135deg, rgb(0, 123, 255) 0%, rgb(0, 86, 179) 100%);
    color: white;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 800;
    font-size: 1.05em;
    border: 2px solid rgb(0, 86, 179);
}

table td {
    padding: 12px 15px;
    border: 1px solid rgb(222, 226, 230);
    font-weight: 600;
}

table tbody tr:nth-child(even) {
    background: rgb(248, 249, 250);
}

table tbody tr:hover {
    background: rgb(209, 236, 241);
    transition: background 0.3s ease;
}

table strong {
    color: rgb(0, 51, 160);
    font-weight: 800;
}

.highlight-row {
    background: rgb(255, 243, 205) !important;
    font-weight: 700;
}

/* ==================== SPECIFIC TABLE STYLES ==================== */
.definition-table th:first-child,
.requirement-table th:first-child,
.controls-table th:first-child {
    width: 20%;
}

.punishment-table,
.severe-punishment-table,
.general-punishment-table {
    font-size: 1.05em;
}

.punishment-table td,
.severe-punishment-table td,
.general-punishment-table td {
    font-weight: 700;
}

/* ==================== LEGAL TEXT ==================== */
.legal-text {
    background: rgb(248, 249, 250);
    padding: 15px;
    border-left: 4px solid rgb(0, 123, 255);
    margin: 15px 0;
    font-style: italic;
    font-weight: 600;
    color: rgb(73, 80, 87);
}

/* ==================== LISTS ==================== */
ul, ol {
    margin: 15px 0;
    margin-left: 30px;
}

li {
    margin: 10px 0;
    font-weight: 600;
}

li strong {
    color: rgb(0, 51, 160);
    font-weight: 800;
}

/* ==================== MIND MAP ==================== */
.mindmap-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow-x: auto;
}

.mindmap-container svg {
    display: block;
    margin: 0 auto;
}

/* ==================== FLOWCHART ==================== */
.flowchart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow-x: auto;
}

.flowchart-container svg {
    display: block;
    margin: 0 auto;
}

/* ==================== TAKEAWAY GRID ==================== */
.takeaway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.takeaway-card {
    background: linear-gradient(135deg, rgb(40, 167, 69) 0%, rgb(25, 135, 84) 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
}

.takeaway-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.takeaway-card h3 {
    font-weight: 800;
    font-size: 1.3em;
    margin-bottom: 10px;
    color: rgb(255, 235, 59);
}

.takeaway-card p {
    font-weight: 700;
    font-size: 1.05em;
}

/* ==================== FOOTER ==================== */
footer {
    background: linear-gradient(135deg, rgb(52, 58, 64) 0%, rgb(33, 37, 41) 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 5px solid rgb(255, 193, 7);
}

footer p {
    margin: 8px 0;
    font-weight: 700;
}

footer strong {
    color: rgb(255, 235, 59);
    font-weight: 800;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    /* Hide navigation panels for print */
    .left-navigation-panel,
    .right-navigation-panel {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 10px;
    }
    
    .content-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin: 15px 0;
        padding: 15px;
    }
    
    .section-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    /* Print tables properly */
    table {
        page-break-inside: avoid;
        font-size: 0.9em;
    }
    
    /* Print flowcharts */
    .flowchart-container,
    .mindmap-container {
        page-break-inside: avoid;
    }
    
    /* Optimize colors for print */
    header {
        background: rgb(0, 51, 160) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .navigation-panel button,
    .takeaway-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Remove unnecessary shadows for print */
    * {
        box-shadow: none !important;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media screen and (max-width: 1400px) {
    .left-navigation-panel,
    .right-navigation-panel {
        width: 250px;
    }
    
    .container {
        margin-left: 280px;
        margin-right: 280px;
    }
}

@media screen and (max-width: 1200px) {
    /* Hide right panel on medium screens */
    .right-navigation-panel {
        display: none;
    }
    
    .container {
        margin-left: 280px;
        margin-right: 20px;
    }
}

@media screen and (max-width: 768px) {
    /* Hide both panels on mobile, show toggle buttons instead */
    .left-navigation-panel,
    .right-navigation-panel {
        left: -100%;
        transition: left 0.3s ease;
    }
    
    .left-navigation-panel.mobile-open {
        left: 0;
    }
    
    .right-navigation-panel {
        right: -100%;
        left: auto;
        transition: right 0.3s ease;
    }
    
    .right-navigation-panel.mobile-open {
        right: 0;
    }
    
    .container {
        margin-left: 10px;
        margin-right: 10px;
        padding: 10px;
    }
    
    .header-content h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .content-section h2 {
        font-size: 1.5em;
    }
    
    .section-card h3 {
        font-size: 1.2em;
    }
    
    table {
        font-size: 0.85em;
    }
    
    table th,
    table td {
        padding: 8px;
    }
    
    .takeaway-grid {
        grid-template-columns: 1fr;
    }
    
    .mindmap-container svg,
    .flowchart-container svg {
        width: 100%;
        height: auto;
    }
}

/* ==================== ACCESSIBILITY ==================== */
a:focus,
button:focus {
    outline: 3px solid rgb(255, 193, 7);
    outline-offset: 2px;
}

/* ==================== SMOOTH SCROLLING ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 800;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* ==================== MOBILE TOGGLE BUTTONS ==================== */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 190px;
    background: rgb(255, 193, 7);
    color: rgb(33, 37, 41);
    border: none;
    padding: 15px 12px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    background: rgb(255, 160, 0);
    transform: scale(1.1);
}

.mobile-nav-toggle.left {
    left: 10px;
    border-radius: 0 8px 8px 0;
}

.mobile-nav-toggle.right {
    right: 10px;
    border-radius: 8px 0 0 8px;
}

@media screen and (max-width: 1200px) {
    .mobile-nav-toggle.right {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
}