*{
    box-sizing: border-box; 
}
/* Basic Styling & Resets */
body {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: -apple-system, BlinkMacSystemFont, Trebuchet MS, Roboto, Ubuntu, sans-serif;
    font-feature-settings: "tnum" on, "lnum" on;
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

}
div[class*="space-"] {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
div[class*="space-"] > :first-child {
    display: none;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Navigation */
header {
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo {
    max-width: 170px;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}
nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
}
.search-bar {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}

/* Ticker Page Specifics */
.ticker-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0 0;
    flex-direction: column;
}

.ticker-header h1 {
    margin: 0;
    font-size: 32px;
    color: #1a1a1a;
}

/* Main Content Layout */
.main-content {
    display: flex;
    column-gap: 30px;
}

.main-content-left{
    align-items: center;
    min-width: 795px;
}
.main-content-right{
    align-items: center;
    min-width: 335px;
}

/* .main-content-left,
.main-content-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
} */

.section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 100%;
}
.section h1, .section h2 {
    margin: 10px 0;
}
.ad-space {
    text-align: center;
    background-color: #e8e8e8;
    border: 1px dashed #999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    color: #888;
    border-top: 1px solid #e0e0e0;
}

.foot-links {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.footer a{
    text-decoration: none;
    color: #888;
}

.hidden{
    display: none;
}

.search-box{
    position: relative;
    width: 100%;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#match-list {
    position: absolute;
    background: #fff;
    width: 420px;
    top: 38px;
    right: 0;
    border-radius: 5px;
}
.search-wrap{
    border: 2px solid #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 8px 0 0 8px;
}

.search-card{
    font-size: 14px;
}

.search-card td{
    border-bottom: 1px solid #cdcdcd;
    padding: 3px;
}
.search-card tr{
    cursor: pointer;
}
.search-card tr:hover{
    background: #f0f0f0;
}

.card-img{
    width: 18px;
    height: 25px;
    width: 7%
}

.card-ticker{
    font-size: 13px;
    font-weight: 600;
}

.card-company{
    font-size: 12px;
}
#mini-symbol-overview{
    display: none;
}
#news-timeline{
    display: none;
}
.ad-wide{
    width: 100%; max-width: 728px;
    height: 100%; max-height: 90px; min-height: 90px;
}
/* Media Queries for Responsiveness */

/* Basic CSS for the contact popup */
.modal {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}


.modal-clicker{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.popup-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 450px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 7px;
    font-size: 40px;
    line-height: 30px;
    cursor: pointer;
}
/* Form styling */
label { display: block; margin-top: 10px; font-weight: bold; }
input[type="text"], input[type="email"], textarea { width: 100%; padding: 8px; margin-top: 5px; box-sizing: border-box; border: 1px solid #ccc; }
.message-box { padding: 10px; margin-top: 15px; text-align: center; }

    .about-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
    }




/* --- General and Label Styling --- */

/* Container styling */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Style for individual labels */
.custom-checkbox-label {
    display: block;
    position: relative;
    padding: 8px 0 0 30px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    margin: 0 0 20px;
}

/* Hide the actual checkbox input */
.custom-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* --- Custom Checkmark Styling --- */

/* 1. Custom Checkbox Box (The Square) */
.checkmark {
    position: absolute;
    top: 3px;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

/* Hover effect on the box */
.custom-checkbox-label:hover input:not(:checked) ~ .checkmark {
    background-color: #ddd;
}

/* Change the box color when the input IS checked */
input:checked + .checkmark {}

/* 2. Custom Checkmark (The V-Shape) - created using ::after */
.checkmark:after {
    content: "";
    position: absolute;
    display: none; /* Hide the checkmark by default */
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #999;
    border-width: 0 3px 3px 0;
    /* Transform to create the checkmark shape */
    transform: rotate(45deg);
}

/* Show the checkmark when the input IS checked */
input:checked + .checkmark:after {
    display: block;
}   
        
        





@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    header {
        flex-direction: column;
        gap: 8px;
    }
    .search-box {
        max-width: 100%;
    }
    .search-bar{
        max-width: 200px;
    }
    #match-list {
        right: unset;
        width: 100%;
    }
    .main-content {
        flex-direction: column;
    }
    .main-content-left{
        min-width: unset;
    }
    .main-content-left,
    .main-content-right {
        display: contents;
    }

    /* desired order home: A, B, E, F, G, C, D, H */
    .space-A { order: 1; }
    .space-B { order: 2; }
    .space-E { order: 3; }
    .space-F { order: 4; }
    .space-G { order: 5; }
    .space-C { order: 8; }
    .space-D { order: 7; }
    .space-H { order: 6; }
    .space-I { order: 9; }

    .st-space-A { order: 1; }
    .st-space-B { order: 2; }
    .st-space-D { order: 3; }
    .st-space-E { order: 4; }
    .st-space-C { order: 5; }
    .st-space-F { order: 6; }

    .cr-space-A { order: 1; }
    .cr-space-B { order: 2; }
    .cr-space-E { order: 3; }
    .cr-space-C { order: 6; }
    .cr-space-D { order: 5; }
    .cr-space-F { order: 4; }
    .cr-space-G { order: 7; }

    .qu-space-A { order: 1; }
    .qu-space-B { order: 3; }
    .qu-space-E { order: 5; }
    .qu-space-C { order: 4; }
    .qu-space-D { order: 2; }


    .ad-wide{
        width: 100%; max-width: 340px;
        height: 100%; max-height: 50px; min-height: 50px;
    }
    .mob{display: none;}

}