html,
body {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    padding-top: 35px;
    /* Ensure content starts below fixed nav */
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

main {
    flex: 1 0 auto;
}

.footer {
    margin-top: auto;
}

.navbar {
    background-color: #ffffff;
    /* background-color: #ff6f00; */
    /* Orange */
}

.navbar.scrolled {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Navbar divider line for non-home pages */
.navbar-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1030;
}

.navbar-brand,
.nav-link {
    color: rgb(60, 60, 60) !important;
}

.hero {
    color: rgb(60, 60, 60);
    text-align: center;
}

/* Hero Image and Text Setup */
.hero1 {
    /* background-image: url('./images/hero1_forge2.png'); */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    min-height: 400px;
    /* NEW: Increase height for desktop to prevent squishing */
    flex-wrap: wrap;
    /* NEW: Allow wrapping on smaller screens */
}

/* Hero2 Section - Text Wrapping and Padding */
.hero2 {
    z-index: 2;
    padding: 20px 10px;
    max-width: 400px;
    /* NEW: Limit width for better wrapping */
    text-align: center;
    word-break: break-word;
    /* NEW: Ensure long words don't overflow */
    flex: 1 1 300px;
    /* NEW: Allow hero2 to shrink before image */
}

.hero2 h1 {
    color: #1d1d1d;
    padding: 20px;
    font-size: 2.0em;
    font-weight: bold;
    line-height: 1.3;
    /* NEW: Better line spacing */
    /*text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);*/
}

.hero2 p {
    color: #1d1d1d;
    padding: 15px;
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1.3;
    /* NEW: Better line spacing */
    /*text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.9);*/

}

/* Hero Image Styles */
.hero-img-container {
    flex: 1 1 auto;
    max-width: 500px;
    height: auto;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    /* Limit max and min width for larger screens */
    max-width: 100%;
    min-width: 400px;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    object-fit: contain;
}

/* Dividing Line Between Hero and Features */
.divider {
    border-top: 2px solid #ddd;
    margin: 30px 0;
}

.btn-orange {
    background-color: #ff6f00;
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-orange:hover {
    background-color: #ff7f1d;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 167, 99, 0.8);
}

/* Features Section */
.features {
    max-width: 900px;
    padding: 50px 30px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    text-align: center;
    padding: 10px;
}

.feature h3 {
    color: #ff6f00;
    font-weight: 700;
}

.feature p {
    color: #6c757d;
}

.feature2 {
    background-image: url("../images/3Decks_V2.png");
    background-size: cover;
    background-position: center;
    padding: 150px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loginsignup {
    padding: 30px;
    padding: 60px 0;
}

.normtextsm {
    font-size: 1rem;
    font-weight: bold;
    color: rgb(40, 40, 40);
}

.normtextlitesm {
    font-size: 1rem;
    color: rgb(40, 40, 40);
}

.normtextlitexsm {
    padding: 10px 0px;
    font-size: 0.7rem;
    font-weight: normal;
    color: rgb(100, 100, 100);
}

/* new marketing content styles added 2/27/25 */

.feature-row {
    margin-bottom: 60px;
}

.feature-text {
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    text-align: left !important;
    padding: 30px;
}

.feature-text h3 {
    color: #ff6f00;
    font-weight: 700;
    text-align: center;
}

.feature-text p {
    color: #6c757d;
}

.feature-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-img img {
    max-width: 100%;
    height: auto;
    max-height: 330px;
    max-width: 330px;

}

.call-to-action {
    margin-top: 60px;
    /* Space above the button */
    margin-bottom: 30px;
    /* Space below the button */
    text-align: center;
    /* Ensures horizontal centering */
}

/* Ensure proper stacking on mobile (max-width: 768px) */
@media (max-width: 768px) {
    .hero1 {
        flex-direction: column;
        /* Stack hero image on top of text */
        padding-top: 20px;
    }

    .hero-img-container {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin-bottom: 20px;
    }

    .hero-img {
        max-width: 300px;
        min-width: 200px;
        max-height: 300px;
        /* Limit height on mobile */
        margin: 0 auto;
    }

    .hero2 {
        padding: 20px;
        /* Reduce padding for mobile */
        max-width: 90%;
        /* Prevent text from stretching edge-to-edge */
    }

    .feature-row {
        flex-direction: column !important;
        text-align: center;
    }

    .feature-img {
        order: 2;
        margin-top: 10px;
    }

    #feature1_txt,
    #feature1_img,
    #feature2_txt,
    #feature2_img,
    #feature3_txt,
    #feature3_img {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Decrease widths of and between elements on larger screens */
@media (min-width: 768px) {
    .feature-row {
        display: flex;
        align-items: center;
        gap: 10px;
        /* Adjust the space between text & image */
    }
}

/* Tablet View (min-width: 768px and max-width: 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero1 {
        flex-direction: row;
        /* Side-by-side layout for tablets */
    }

    .hero-img {
        max-height: 280px;
        /* NEW: Limit height for tablets */
    }

    .hero2 {
        /* NEW: Reduce padding for tablets */
        padding: 20px 30px;
        margin-left: -30px;
    }

    .feature-row {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .feature-row:nth-child(odd) {
        flex-direction: row;
    }

    .feature-row:nth-child(even) {
        flex-direction: row-reverse;
    }

    .feature-text,
    .feature-img {
        flex: 1;
        max-width: 100%;
        padding: 5px;
    }

    #feature1_txt,
    #feature3_txt {
        padding-left: 80px;
    }

    #feature1_img,
    #feature3_img {
        padding-right: 80px;
    }

    #feature2_txt {
        padding-right: 80px;
    }

    #feature2_img {
        padding-left: 80px;
    }
}

/* Desktop View (min-width: 992px) */
@media (min-width: 992px) {
    .hero1 {
        flex-direction: row;
    }

    .hero-img {
        max-height: 350px;
        max-width: 40%;
    }

    .hero2 {
        /* NEW: negative margin only on desktop to reduce gap*/
        max-width: 450px;
        margin-left: -30px;
    }

    .feature-text,
    .feature-img {
        flex: 1;
        max-width: 100%;
        padding: 5px;
    }

    #feature1_txt,
    #feature3_txt {
        padding-left: 75px;
    }

    #feature1_img,
    #feature3_img {
        padding-right: 75px;
    }

    #feature2_txt {
        padding-right: 75px;
    }

    #feature2_img {
        padding-left: 75px;
    }
}

/* TOS styles ----------------------------- */

.sidebar-nav-link {
    color: #ffb57d !important;
    font-size: 1.0em;
    padding: 10px 0;
}

.footer {
    background-color: #ff6f00;
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* Math Tips Style ----------------------------- */
/* Tab wrapper with gray baseline */
.tab-nav-wrapper {
    border-bottom: none;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-top: 20px;
    margin-bottom: -2px;
    overflow: visible;
    /* ✅ Allow pseudo-element to render below */
}

/* Create gray line using pseudo-element so we can control z-index */
.tab-nav-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #afafb1;
    z-index: 1;
}

.tab-link {
    background: none;
    border: none;
    font-weight: bold;
    font-size: 0.9rem;
    color: #afafb1;
    padding: 0px 5px 0px 5px;
    cursor: pointer;
    border-bottom: 8px solid transparent;
    outline: none;
    padding-bottom: 6px;
}

.tab-link.active {
    color: #ff6f00;
    position: relative;
    z-index: 10;
}

.tab-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -13px;
    /* Orange bar bottom overlaps with gray line bottom */
    width: 100%;
    height: 8px;
    background-color: #ff6f00;
    z-index: 2;
    /* Higher z-index than gray line (1) so orange appears on top */
}


/* Tab buttons */
.tab-nav {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    /* enable horizontal scroll on narrow viewports */
    white-space: nowrap;
    /* prevent line wrapping */
    -webkit-overflow-scrolling: touch;
    /* smooth scroll on iOS */
    scrollbar-width: none;
    /* hide scrollbar for Firefox */
}

.tab-nav::-webkit-scrollbar {
    display: none;
    /* hide scrollbar for WebKit */
}

/* Remove default browser focus outlines */
.tab-link:focus {
    outline: none;
    box-shadow: none;
}

/* Tab content */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Make the page fill at least the screen height */
body,
html {
    height: 100%;
}

.d-flex.min-vh-100 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 575.98px) {
    .tab-nav {
        gap: 16px;
        /* reduce spacing on mobile */
        padding-left: 10px;
        padding-right: 10px;
    }

    .features {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}


/* Footer styles ----------------------------- */
.footer-container {
    color: #ffdbc0;
    /* Brighter text color (white) */
}

.footer-container a {
    color: #ffdbc0;
    /* Bright cyan for links */
    text-decoration: none;
    /* Optional: remove underlines */
}

.footer-container a:hover {
    color: #ffffff;
    /* Optional: change color on hover */
}

.inline-icon {
    width: 20px;
    height: 20px;
    vertical-align: text-bottom;
    margin: 0 3px;
}

/* ----- Temperature Conversion Tips Styles ------------------------- */

.temp-converter-container {
    text-align: center;
    margin-top: 40px;
}

.converter-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.temp-box-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Input & Output Boxes */
.temp-box {
    width: 130px;
    height: 80px;
    position: relative;
}

.temp-box-input input {
    width: 100%;
    height: 100%;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #ececec;
    border-radius: 4px;
    outline: none;
    padding: 0;
    caret-color: black;
}

.temp-box-input input::placeholder {
    color: transparent;
}

/* Blinking cursor (mobile-style simulation) */
.temp-box-input input.blinking::placeholder {
    color: transparent;
}

.temp-box-input input.blinking:focus {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Output box */
.temp-box-output {
    width: 130px;
    height: 80px;
    background-color: #ececec;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    color: #333;
}

.output-display {
    width: 100%;
    text-align: center;
}

.output-label {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 6px;
    color: #444;
}

/* Arrow between boxes */
.temp-arrow {
    font-size: 2rem;
    color: #333;
}

/* Unit toggle (°C and °F) */
.temp-toggle {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 8px;
    font-size: 22px;
    font-weight: bold;
    color: #aaa;
}

.temp-unit-label {
    flex: 1;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.temp-unit-label.active {
    color: #3f63ec;
}

.temp-underline {
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50%;
    height: 8px;
    background-color: #3f63ec;
    transition: left 0.3s ease;
    z-index: 0;
}

.temp-unit-label[data-unit="F"].active~.temp-underline {
    left: 50%;
}

/* Callout text and CTA button */
.math-instructions {
    font-size: 1.1rem;
    text-align: center;
    color: #ff6f00;
    margin-top: 40px;
}

.temp-callout {
    font-size: 1.1rem;
    text-align: center;
    margin-top: 40px;
}

.temp-callout p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.temp-callout p strong {
    font-weight: 700;
}

.temp-callout .btn {
    width: 220px;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 24px;
}

.temp-box-output-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 120px;
}


.output-unit-label {
    font-size: 22px;
    font-weight: bold;
    color: #222;
    margin-top: 6px;
    text-align: center;
}

.dist-box-input input {
    width: 100%;
    height: 80px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #ececec;
    border-radius: 4px;
    outline: none;
    padding: 0;
    caret-color: black;
}

.btn-mathtips {
    background-color: #ff6f00;
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    min-width: 260px;
    white-space: nowrap;
}


@media (max-width: 575.98px) {
    .temp-box {
        width: 110px;
        height: 70px;
        flex: 0 0 auto;
        /* prevent growing to 100% */
    }

    .temp-box-output-wrapper {
        width: 110px;
        flex: 0 0 auto;
        /* important: enforce width */
    }

    .temp-box-output {
        width: 100%;
        height: 70px;
        font-size: 24px;
    }

    .temp-box-input input {
        height: 70px;
        font-size: 24px;
    }

    .dist-box-input input {
        height: 70px;
        font-size: 24px;
    }

    .temp-arrow {
        font-size: 1.5rem;
        margin: 0 8px;
    }

    .temp-toggle {
        font-size: 18px;
    }

    .output-unit-label {
        font-size: 18px;
    }
}

/* -------------------- Cookie Consent Banner -------------------- */

.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f4f4f4;
    border-top: 1px solid #ccc;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;
    z-index: 9999;
    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-text {
    margin-bottom: 10px;
    color: #333;
}

.cookie-actions button {
    font-size: 0.85rem;
    margin: 0 5px;
}

/* Optional: mobile tweaks */
@media (max-width: 768px) {
    .cookie-banner {
        font-size: 0.85rem;
        padding: 10px;
    }

    .cookie-actions button {
        font-size: 0.8rem;
        margin: 2px;
    }
}

/* Admin table button styling - reduce padding for compact rows */
.btn-sm {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.75rem;
    line-height: 1.2;
}