/* ===================================
   EQUITY TRADING TECHNIQUES GUIDE
   Professional Stylesheet - ERROR FREE
   =================================== */

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #1a1a1a;
    background: linear-gradient(135deg, rgb(31, 150, 199) 0%, rgb(20, 100, 140) 100%);
    min-height: 100vh;
    padding-bottom: 50px;
}

/* === NAVIGATION BAR === */
.navbar {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
    padding: 25px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.print-btn {
    background: white;
    color: rgb(150, 31, 224);
    border: 3px solid white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.print-btn:hover {
    background: rgb(31, 150, 199);
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* === QUICK NAVIGATION === */
.quick-nav {
    background: #ffffff;
    margin: 30px auto;
    padding: 30px;
    max-width: 1300px;
    border-radius: 15px;
    border: 4px solid rgb(150, 31, 224);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.quick-nav h2 {
    color: rgb(150, 31, 224);
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.nav-buttons button {
    background: linear-gradient(135deg, rgb(31, 150, 199) 0%, rgb(21, 110, 149) 100%);
    color: white;
    border: 3px solid rgb(150, 31, 224);
    padding: 15px 28px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-buttons button:hover {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(150, 31, 224, 0.4);
}

/* === MAIN CONTAINER === */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* === TRADING SECTIONS === */
.trading-section {
    background: #ffffff;
    margin: 30px 0;
    padding: 40px;
    border-radius: 15px;
    border: 4px solid rgb(150, 31, 224);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    scroll-margin-top: 100px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease-out;
}

.main-heading {
    color: rgb(150, 31, 224);
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 4px solid rgb(31, 150, 199);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === CONTENT BLOCKS === */
.content-block {
    margin: 25px 0;
    padding: 25px;
    background: #ffffff;
    border-left: 5px solid rgb(31, 150, 199);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.content-block h2 {
    color: rgb(31, 150, 199);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.content-block h3 {
    color: rgb(150, 31, 224);
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0 12px 0;
}

.content-block p {
    font-size: 18px;
    font-weight: bold;
    color: #2c2c2c;
    line-height: 1.8;
    margin-bottom: 15px;
}

.content-block ul {
    list-style-position: inside;
    margin: 15px 0;
}

.content-block ul li {
    font-size: 17px;
    font-weight: bold;
    color: #333;
    line-height: 1.9;
    margin: 12px 0;
    padding-left: 15px;
}

.content-block ul li strong {
    color: rgb(150, 31, 224);
    font-weight: bold;
}

/* === TABLE STYLING === */
.table-container {
    margin: 30px 0;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.table-container h3 {
    color: rgb(31, 150, 199);
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

table thead {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
}

table thead th {
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

table thead th:last-child {
    border-right: none;
}

table tbody tr {
    border-bottom: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

table tbody tr:nth-child(even) {
    background-color: rgba(31, 150, 199, 0.08);
}

table tbody tr:hover {
    background-color: rgba(150, 31, 224, 0.12);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table tbody td {
    padding: 16px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #2c2c2c;
    border-right: 1px solid #e0e0e0;
}

table tbody td:last-child {
    border-right: none;
}

table tbody td strong {
    color: rgb(150, 31, 224);
}

/* === Q&A SECTION === */
.qa-section {
    margin: 35px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    border: 3px solid rgb(31, 150, 199);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.qa-section h3 {
    color: rgb(31, 150, 199);
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
}

.qa-item {
    margin: 20px 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 3px solid rgb(31, 150, 199);
    transition: all 0.3s ease;
}

.qa-item:hover {
    box-shadow: 0 6px 18px rgba(31, 150, 199, 0.25);
    transform: translateY(-2px);
}

.qa-question {
    width: 100%;
    background: linear-gradient(135deg, rgb(31, 150, 199) 0%, rgb(21, 110, 149) 100%);
    color: white;
    border: none;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    border-radius: 8px 8px 0 0;
}

.qa-question:hover {
    background: linear-gradient(135deg, rgb(21, 130, 179) 0%, rgb(15, 95, 135) 100%);
    padding-left: 35px;
}

.qa-question.active {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
}

.toggle-icon {
    font-size: 28px;
    font-weight: bold;
    transition: transform 0.3s ease;
    min-width: 35px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-question.active .toggle-icon {
    transform: rotate(45deg);
    background: rgba(255, 255, 255, 0.3);
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background: #ffffff;
    position: relative;
    z-index: 2;
}

.qa-answer.show {
    max-height: 1000px;
    padding: 30px;
    border-top: 3px solid rgb(31, 150, 199);
}

.qa-answer p {
    font-size: 18px;
    font-weight: bold;
    color: #2c2c2c;
    line-height: 2;
    margin: 0;
    text-align: justify;
}

.qa-answer p strong {
    color: rgb(150, 31, 224);
    font-size: 19px;
}

/* === FLOWCHART SECTION === */
.flowchart-container {
    margin: 30px 0;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    border: 4px solid rgb(150, 31, 224);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.flow-box {
    padding: 20px 30px;
    margin: 10px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    text-align: center;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-size: 16px;
}

.flow-box:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.flow-start {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
    font-size: 18px;
    min-width: 400px;
}

.flow-question {
    background: linear-gradient(135deg, rgb(31, 150, 199) 0%, rgb(21, 110, 149) 100%);
    font-size: 18px;
    min-width: 400px;
}

.flow-time1 {
    background: linear-gradient(135deg, #FF1744 0%, #C51162 100%);
}

.flow-time2 {
    background: linear-gradient(135deg, #FF9800 0%, #E65100 100%);
}

.flow-time3 {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.flow-time4 {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
}

.flow-style1 {
    background: linear-gradient(135deg, #E91E63 0%, #AD1457 100%);
}

.flow-style2 {
    background: linear-gradient(135deg, #FFC107 0%, #F57C00 100%);
}

.flow-style3 {
    background: linear-gradient(135deg, #8BC34A 0%, #558B2F 100%);
}

.flow-style4 {
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
}

.flow-capital {
    background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%);
    min-width: 450px;
    font-size: 15px;
}

.flow-education {
    background: linear-gradient(135deg, rgb(31, 150, 199) 0%, rgb(21, 110, 149) 100%);
    min-width: 450px;
}

.flow-end {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    font-size: 18px;
    min-width: 400px;
}

.flow-arrow {
    font-size: 32px;
    color: rgb(150, 31, 224);
    font-weight: bold;
    margin: 8px 0;
}

.flow-arrow-small {
    font-size: 24px;
    color: rgb(150, 31, 224);
    font-weight: bold;
    margin: 5px 0;
}

.flow-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.flow-path {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === MIND MAP SECTION === */
.mindmap-container {
    margin: 30px 0;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    border: 4px solid rgb(150, 31, 224);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.mindmap-container svg {
    width: 100%;
    height: auto;
    display: block;
    min-height: 700px;
}

.mindmap-container svg text {
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === FOOTER === */
.footer {
    background: linear-gradient(135deg, rgb(150, 31, 224) 0%, rgb(100, 21, 154) 100%);
    color: white;
    padding: 30px;
    margin-top: 50px;
    text-align: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

.footer-content p {
    margin: 10px 0;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.8;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .navbar h1 {
        font-size: 22px;
    }

    .quick-nav {
        padding: 20px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons button {
        width: 100%;
    }

    .trading-section {
        padding: 25px 20px;
    }

    .main-heading {
        font-size: 24px;
    }

    .content-block h2 {
        font-size: 20px;
    }

    .content-block h3 {
        font-size: 18px;
    }

    .content-block p,
    .content-block ul li {
        font-size: 16px;
    }

    table {
        font-size: 14px;
    }

    table thead th,
    table tbody td {
        padding: 12px 10px;
    }

    .flow-row {
        flex-direction: column;
        align-items: center;
    }

    .flow-box {
        min-width: 250px;
    }

    .flow-start,
    .flow-question,
    .flow-capital,
    .flow-education,
    .flow-end {
        min-width: 280px;
        font-size: 16px;
    }
}

/* === PRINT STYLES === */
@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    .quick-nav,
    .print-btn {
        display: none !important;
    }

    .trading-section {
        page-break-inside: avoid;
        border: 2px solid #333;
        margin: 20px 0;
        box-shadow: none;
    }

    .main-heading {
        color: #000;
        border-bottom: 3px solid #000;
    }

    .content-block {
        border-left: 3px solid #333;
        box-shadow: none;
    }

    .content-block h2,
    .content-block h3 {
        color: #000;
    }

    table {
        border: 2px solid #000;
    }

    table thead {
        background: #ddd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    table thead th {
        color: #000 !important;
        border: 1px solid #000;
    }

    table tbody td {
        border: 1px solid #000;
    }

    .qa-answer {
        max-height: none !important;
        padding: 15px !important;
        display: block !important;
    }

    .qa-section {
        border: 2px solid #333;
    }

    .qa-question {
        background: #ddd !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .toggle-icon {
        display: none !important;
    }

    .flowchart-container,
    .mindmap-container {
        border: 2px solid #333;
    }

    .flow-box {
        border: 1px solid #000;
        color: #000 !important;
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .footer {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-before: always;
    }
}

/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

/* === SELECTION STYLING === */
::selection {
    background: rgb(150, 31, 224);
    color: white;
}

::-moz-selection {
    background: rgb(150, 31, 224);
    color: white;
}

/* === ACCESSIBILITY === */
.qa-question:focus,
.nav-buttons button:focus,
.print-btn:focus {
    outline: 3px solid rgb(31, 150, 199);
    outline-offset: 2px;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === END OF STYLES === */