* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.logo svg {
    display: block;
    width: 180px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #1e293b;
    font-weight: 500;
}

.main-nav a:hover {
    color: #f97316;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: #1e293b;
    cursor: pointer;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(
    145deg,
    #f8fafc,
    #eef2ff
  );
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 15px;
    color: #1e293b;
}

.hero p {
    color: #1e293b;
    font-size: 18px;
}


/* =========================================================
   GRID
========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 55px;
    margin-top: 30px;
}


/* =========================================================
   CARD
========================================================= */

.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;

    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.05),
        0 2px 4px -1px rgba(15, 23, 42, 0.03);

    transition: 0.3s;
}

.card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 15px -3px rgba(15, 23, 42, 0.1);

    border-color: #f97316;
}


/* =========================================================
   CONTENT
========================================================= */

.layout {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

.layout main {
    width: 100%;
    max-width: 100%;
}

.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}


/* =========================================================
   CALCULATOR
========================================================= */

.calculator-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;

    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

input,
select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 15px;

    border: 1px solid #cbd5e1;

    background: #f8fafc;
    color: #1e293b;

    border-radius: 8px;

    font-size: 16px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #f97316;
    background: #ffffff;
}

button {
    background: #f97316;
    color: #ffffff;

    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;

    transition: background 0.2s;
}

button:hover {
    background: #ea580c;
}

.result {
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #1e293b;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    background: linear-gradient(
    145deg,
    #f8fafc,
    #eef2ff
  );
    padding: 30px;
    text-align: center;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
}

footer a:hover {
    color: #f97316;
}


/* =========================================================
   MOBILE STICKY
========================================================= */

.mobile-sticky-ad {
    display: none;
}


/* =========================================================
   FORMULA
========================================================= */

.formula-section {
    margin: 30px 0 20px;
    padding: 20px;

    background: #f8fafc;

    border-radius: 12px;

    border-left: 4px solid #f97316;
}

.formula-section h2 {
    margin: 0 0 15px 0;
    padding: 0;

    font-size: 18px;

    font-weight: 600;

    color: #1e293b;

    text-transform: none;
}

.formula-card {
    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    padding: 16px;

    text-align: center;
}

.formula-content {
    font-size: 18px;

    font-weight: 600;

    color: #1e293b;

    margin: 12px 0;

    line-height: 1.8;

    letter-spacing: 0.3px;
}

.math-symbol {
    color: #f97316;

    font-style: italic;

    margin: 0 2px;
}

.formula-desc {
    font-size: 13px;

    color: #64748b;

    margin-top: 10px;

    font-weight: 400;
}


/* =========================================================
   SEARCH WRAPPER
========================================================= */

.search-wrapper {
    position: relative;

    width: 100%;

    max-width: 620px;

    margin: 0 auto;
}


/* =========================================================
   SEARCH RESULTS
========================================================= */

.search-results {
    display: none;

    position: absolute;

    top: calc(100% + 8px);

    left: 0;

    right: 0;

    width: 100%;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.12);

    /*
       MOSTRA APROXIMADAMENTE 2 RESULTADOS
       OS OUTROS FICAM DISPONÍVEIS COM ROLAGEM
    */

    max-height: 132px;

    overflow-y: auto;

    overflow-x: hidden;

    z-index: 9999;

    padding: 6px;

    box-sizing: border-box;

    scrollbar-width: thin;

    scrollbar-color:
        #cbd5e1
        transparent;
}


/* =========================================================
   SEARCH RESULT ITEM
========================================================= */

.search-result-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

    min-height: 58px;

    border-radius: 10px;

    text-decoration: none;

    color: inherit;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;

    transform: translateX(2px);
}


/* =========================================================
   SEARCH ICON
========================================================= */

.search-result-icon {
    width: 40px;

    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fff7ed;

    border-radius: 10px;

    font-size: 20px;
}


/* =========================================================
   SEARCH TEXT
========================================================= */

.search-result-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.search-result-info strong {
    color: #1e293b;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.3;
}

.search-result-info span {
    color: #64748b;

    font-size: 12px;

    line-height: 1.2;

    text-transform: capitalize;
}


/* =========================================================
   NO RESULTS
========================================================= */

.search-no-results {
    padding: 18px 12px;

    text-align: center;

    color: #64748b;

    font-size: 14px;
}


/* =========================================================
   SEARCH SCROLLBAR
========================================================= */

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 768px) {

    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;

        position: absolute;

        top: 60px;

        right: 15px;

        background: #ffffff;

        padding: 15px;

        border-radius: 10px;

        flex-direction: column;

        width: 220px;

        border: 1px solid #e2e8f0;

        box-shadow:
            0 10px 25px rgba(15, 23, 42, 0.1);
    }

    .main-nav.active {
        display: flex;
    }

    .hero h1 {
        font-size: 28px;
    }

    .mobile-sticky-ad {
        display: flex;

        position: fixed;

        bottom: 0;

        left: 0;

        width: 100%;

        height: 70px;

        background: #ffffff;

        border-top: 1px solid #e2e8f0;

        justify-content: center;

        align-items: center;

        z-index: 9999;
    }

    body {
        padding-bottom: 0;
    }


    /* FORMULA */

    .formula-section {
        margin: 20px 0 15px;

        padding: 15px;
    }

    .formula-section h2 {
        font-size: 16px;
    }

    .formula-content {
        font-size: 16px;
    }

    .formula-desc {
        font-size: 12px;
    }
}


/* =========================================================
   MOBILE 600PX
========================================================= */

@media (max-width: 600px) {

    .search-wrapper {
        width: 100%;

        position: relative;
    }


    /* =====================================================
       SEARCH RESULTS MOBILE
    ===================================================== */

    .search-results {
        position: absolute;

        top: calc(100% + 8px);

        left: 0;

        right: 0;

        width: 100%;

        /*
           MOSTRA 2 RESULTADOS
           E ROLA PARA OS DEMAIS
        */

        max-height: 126px;

        overflow-y: auto;

        overflow-x: hidden;

        background: #ffffff;

        border: 1px solid #e2e8f0;

        border-radius: 12px;

        box-shadow:
            0 12px 30px rgba(15, 23, 42, 0.12);

        z-index: 9999;

        padding: 5px;

        box-sizing: border-box;

        -webkit-overflow-scrolling: touch;
    }


    /* =====================================================
       RESULT ITEM MOBILE
    ===================================================== */

    .search-result-item {
        display: flex;

        align-items: center;

        gap: 10px;

        padding: 9px;

        min-height: 56px;

        border-radius: 9px;

        box-sizing: border-box;
    }

    .search-result-item:hover {
        background: #f8fafc;

        transform: none;
    }


    /* =====================================================
       ICON MOBILE
    ===================================================== */

    .search-result-icon {
        width: 36px;

        height: 36px;

        flex-shrink: 0;

        display: flex;

        align-items: center;

        justify-content: center;

        background: #fff7ed;

        border-radius: 9px;

        font-size: 18px;
    }


    /* =====================================================
       TEXT MOBILE
    ===================================================== */

    .search-result-info {
        min-width: 0;

        display: flex;

        flex-direction: column;

        gap: 3px;
    }

    .search-result-info strong {
        color: #1e293b;

        font-size: 13px;

        font-weight: 700;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
    }

    .search-result-info span {
        color: #64748b;

        font-size: 11px;

        text-transform: capitalize;
    }


    /* =====================================================
       NO RESULTS MOBILE
    ===================================================== */

    .search-no-results {
        padding: 15px 10px;

        text-align: center;

        color: #64748b;

        font-size: 13px;
    }


    /* =====================================================
       SCROLLBAR MOBILE
    ===================================================== */

    .search-results::-webkit-scrollbar {
        width: 6px;
    }

    .search-results::-webkit-scrollbar-track {
        background: transparent;
    }

    .search-results::-webkit-scrollbar-thumb {
        background: #cbd5e1;

        border-radius: 10px;
    }


    /* =====================================================
       HOME HERO
    ===================================================== */

    .home-hero h1 {
        font-size: 34px;
    }

    .home-hero p {
        font-size: 16px;
    }


    /* =====================================================
       HERO SEARCH
    ===================================================== */

    .hero-search {
        flex-direction: column;

        background: transparent;

        border: none;

        box-shadow: none;

        gap: 10px;
    }

    .hero-search input {
        background: #ffffff;

        border: 1px solid #e2e8f0;

        border-radius: 8px;

        width: 100%;

        box-sizing: border-box;
    }

    .hero-search button {
        min-height: 48px;
    }


    /* =====================================================
       HERO VISUAL
    ===================================================== */

    .hero-visual-card {
        width: 100%;

        max-width: 330px;
    }


    /* =====================================================
       HOME SECTION
    ===================================================== */

    .home-section {
        padding-left: 18px;

        padding-right: 18px;
    }
}