/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background-color: #333;
    color: white;
}

.logo-left, .logo-right {
    width: 175px;
    padding: 10px;
}

.logo-left img, .logo-right img {
    width: 100%;
    display: block;
}

.header-content {
    text-align: center;
    flex: 1;
    padding: 20px 0;
}

.header-content h1 {
    margin: 10px 0;
    font-size: 36px;
    color: #ffcc00;
    text-shadow: 2px 2px 4px #000;
}

.header-content h2 {
    margin: 5px 0 20px;
    font-size: 18px;
    color: #ffcc00;
    text-shadow: 1px 1px 2px #000;
}

/* Navigation Styles */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow-x: auto;
}

nav ul.main-nav li {
    display: inline-block;
    margin: 0 8px;
}

nav ul.main-nav li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

nav ul.main-nav li a:hover {
    background-color: #ffcc00;
    color: #333;
}

nav ul.social-nav {
    margin-top: 10px;
}

nav ul.social-nav li {
    margin: 5px 10px;
}

nav ul.social-nav li a img {
    width: 48px;
    vertical-align: middle;
}

/* Banner Styles */
.banner {
    text-align: center;
    background-color: #ffcc00;
    padding: 10px;
    border: 1px solid #ff9900;
    margin: 0;
}

.banner a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.banner h2 {
    margin: 0;
}

.banner p {
    margin: 5px 0 0;
    font-size: 14px;
}

/* Social Icons Styles */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
}

.social-icons a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Main Styles */
main {
    padding: 20px;
}

/* Email Capture Styles */
#email-capture {
    text-align: center;
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#email-capture h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

#email-capture form {
    display: inline-block;
    text-align: left;
    max-width: 400px;
    width: 100%;
}

#email-capture form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
    color: #555;
}

#email-capture form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#email-capture form p {
    font-size: 14px;
    color: #777;
    margin-top: -10px;
    margin-bottom: 20px;
}

#email-capture form button {
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#email-capture form button:hover {
    background-color: #555;
}

/* Social Follow Styles */
#social-follow {
    text-align: center;
    background-color: #333;
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#social-follow h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffcc00;
    text-shadow: 2px 2px 4px #000;
}

#social-follow .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#social-follow .social-icons a {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#social-follow .social-icons a img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#social-follow .social-icons a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

#social-follow .social-icons a:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* About Section Styles */
#about {
    background-color: #f0f0f0;
    padding: 60px 20px;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#about .about-container {
    max-width: 800px;
    margin: 0 auto;
}

#about h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#about p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

#about .button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#about .button-container button {
    background-color: #333;
    color: #ffcc00;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#about .button-container button:hover {
    background-color: #555;
}

#about .button-container button:active {
    background-color: #777;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
}

/* Calculator Section Styles */
.calculator-sections {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin: 40px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
}

.calculator-item {
    flex: 1;
    margin: 0 10px;
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.calculator-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}

.calculator-item h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.calculator-item p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.calculator-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* How-to Calculator Section Styles */
#how-to-calculator {
    width: 80%;
    max-width: 1200px;
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#how-to-calculator h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#how-to-calculator ol {
    list-style: decimal inside;
    padding-left: 20px;
    color: #555;
}

#how-to-calculator li {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
}

#how-to-calculator li strong {
    color: #333;
}

#how-to-calculator .disclaimer {
    margin-top: 20px;
    font-size: 14px;
    color: #777;
    line-height: 1.4;
    font-style: italic;
}

/* FAQ Section Styles */
#trading-faq {
    width: 80%;
    max-width: 1200px;
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#trading-faq h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-item {
    margin-bottom: 15px;
}

.faq-question {
    width: 100%;
    background-color: #333;
    color: white;
    cursor: pointer;
    padding: 10px;
    text-align: left;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #555;
}

.faq-question.active {
    background-color: #555;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
    padding: 0 15px;
    border-radius: 0 0 5px 5px;
}

.faq-answer p {
    margin: 10px 0;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

/* What is FIRE Section Styles */
#what-is-fire {
    width: 80%;
    max-width: 1200px;
    background-color: #f9f9f9;
    padding: 40px 20px;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#what-is-fire .container {
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

#what-is-fire h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#what-is-fire h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

#what-is-fire p {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

#what-is-fire ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #555;
}

#what-is-fire li {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.6;
}

#what-is-fire li strong {
    color: #333;
}

/* Future Calculator Section Styles */
#futureCalculatorSection {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

#futureCalculatorSection .current-data {
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: left;
    font-size: 1.2em;
    margin: 0 auto;
}

.future-calculator {
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.future-calculator h2 {
    text-align: center;
}

.future-calculator form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.future-calculator .radio-group {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.future-calculator input[type="radio"] {
    margin-right: 5px;
}

.future-calculator input[type="number"] {
    width: 25%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.future-calculator button {
    width: 20%;
    padding: 12px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.future-calculator button:hover {
    background-color: #555;
}

#futureDividendsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#futureDividendsTable th,
#futureDividendsTable td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

#futureDividendsTable th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.future-calculator label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* General container fixes */
    .container,
    .calculator-container,
    .blog-container,
    main,
    section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Text and content fixes */
    h1, h2, h3, h4, h5, h6,
    p, li, span, div,
    input, button, select, textarea {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Table fixes */
    table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Form fixes */
    form {
        width: 100% !important;
        max-width: 100% !important;
    }

    input, select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Image fixes */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Calculator specific fixes */
    .calculator-sections,
    .calculator-item,
    #how-to-calculator,
    #what-is-fire,
    #trading-faq,
    #futureCalculatorSection,
    .future-calculator {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        box-sizing: border-box !important;
    }

    /* Blog specific fixes */
    .blog-post,
    .blog-post-full,
    .post-content,
    .post-header,
    .post-meta {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        box-sizing: border-box !important;
    }

    /* Remove fixed widths */
    [style*="width"] {
        max-width: 100% !important;
    }

    /* Fix any absolute positioning */
    [style*="position: absolute"] {
        position: relative !important;
    }

    header {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        padding: 10px 0;
    }

    nav ul.main-nav li {
        margin: 0 5px;
    }

    nav ul.main-nav li a {
        padding: 8px 12px;
        font-size: 15px;
        background-color: #444;
        border: 1px solid #555;
    }

    .calculator-sections {
        flex-direction: column;
        align-items: center;
    }

    .calculator-item {
        width: 100%;
        margin-bottom: 20px;
    }

    #email-capture form, #about .about-container {
        width: 100%;
    }

    #how-to-calculator,
    #what-is-fire,
    #trading-faq {
        width: 100%;
        max-width: 100%;
        padding: 20px 15px;
        margin: 20px 0;
        border-radius: 0;
        box-sizing: border-box;
    }

    #how-to-calculator h2,
    #what-is-fire h2,
    #trading-faq h2 {
        font-size: 24px;
        padding: 0 10px;
    }

    #how-to-calculator p,
    #what-is-fire p,
    #trading-faq p,
    #how-to-calculator li,
    #what-is-fire li {
        font-size: 16px;
        padding: 0 10px;
        word-wrap: break-word;
    }

    #how-to-calculator ol,
    #what-is-fire ul {
        padding-left: 30px;
        margin: 0 10px;
    }

    .faq-question {
        padding: 15px;
        font-size: 16px;
    }

    .faq-answer {
        padding: 0 15px;
    }

    #futureCalculatorSection {
        width: 100%;
    }

    .future-calculator button {
        width: 100%;
    }

    .future-calculator input[type="number"] {
        width: 100%;
    }

    nav ul.main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px;
    }

    nav ul.main-nav li {
        display: block;
        margin: 0;
        width: auto;
    }

    nav ul.main-nav li a {
        display: block;
        padding: 10px 15px;
        font-size: 15px;
        background-color: #444;
        border: 1px solid #555;
    }

    nav ul.main-nav li a:hover {
        background-color: #ffcc00;
        color: #333;
        border-color: #ffcc00;
    }
}

@media (max-width: 480px) {
    /* Further adjustments for smaller screens */
    .container,
    .calculator-container,
    .blog-container,
    main,
    section {
        padding: 10px !important;
    }

    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    p, li, span { font-size: 16px !important; }

    /* Reduce padding and margins */
    .calculator-sections,
    .calculator-item,
    #how-to-calculator,
    #what-is-fire,
    #trading-faq,
    #futureCalculatorSection,
    .future-calculator,
    .blog-post,
    .blog-post-full {
        padding: 10px !important;
        margin: 10px 0 !important;
    }

    nav ul.main-nav li {
        margin: 0 4px;
    }

    nav ul.main-nav li a {
        padding: 6px 10px;
        font-size: 14px;
    }

    #how-to-calculator,
    #what-is-fire,
    #trading-faq {
        padding: 15px 10px;
    }

    #how-to-calculator h2,
    #what-is-fire h2,
    #trading-faq h2 {
        font-size: 20px;
        padding: 0 5px;
    }

    #how-to-calculator p,
    #what-is-fire p,
    #trading-faq p,
    #how-to-calculator li,
    #what-is-fire li {
        font-size: 15px;
        padding: 0 5px;
    }

    #how-to-calculator ol,
    #what-is-fire ul {
        padding-left: 20px;
        margin: 0 5px;
    }
}

/* Fix for any inline styles that might cause overflow */
* {
    max-width: 100%;
    box-sizing: border-box;
}

#tree-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

#tree-container {
    width: 100%;
    height: 600px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

#tree-container svg {
    width: 100%;
    height: 100%;
}

.node circle {
    fill: #fff;
    stroke: #333;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.node text {
    font-family: Arial, sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
}

.link {
    fill: none;
    stroke: #ccc;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
    #tree-section {
        padding: 10px;
    }

    #tree-container {
        height: 400px;
    }

    .node circle {
        stroke-width: 1.5px;
    }

    .link {
        stroke-width: 1px;
    }

    .node text {
        font-size: 12px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    #tree-section {
        padding: 5px;
    }

    #tree-container {
        height: 300px;
    }

    .node circle {
        stroke-width: 1px;
    }

    .link {
        stroke-width: 0.8px;
    }

    .node text {
        font-size: 10px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .node circle {
        stroke-width: 2px;
    }

    .node text {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #tree-container {
        background: #1a1a1a;
    }

    .node circle {
        fill: #1a1a1a;
        stroke: #ffcc00;
    }

    .node text {
        fill: #fff;
    }

    .link {
        stroke: #666;
    }
}
