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

body{

    font-family:Arial,Helvetica,sans-serif;

    background:#f3f4f6;

    color:#1f2937;

}

.container{

    max-width:850px;

    margin:50px auto;

    background:white;

    padding:40px;

    border-radius:20px;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

}

h1{

    text-align:center;

    font-size:42px;

    margin-bottom:10px;

}

.subtitle{

    text-align:center;

    color:#6b7280;

    margin-bottom:35px;

    line-height:1.6;

}



/* ==========================
   Calculator Card
========================== */

.calculator{

    background:#f9fafb;

    border:1px solid #e5e7eb;

    border-radius:18px;

    padding:30px;

    display:flex;

    flex-direction:column;

    gap:28px;

}



.row{

    display:flex;

    flex-direction:column;

    gap:10px;

}



label{

    font-weight:bold;

    color:#374151;

}



input,
select{

    width:100%;

    padding:15px;

    font-size:18px;

    border:2px solid #d1d5db;

    border-radius:12px;

    outline:none;

}



input:focus,
select:focus{

    border-color:#2563eb;

}



/* ==========================
   Height & Weight Inputs
========================== */

.double-input{

    display:flex;

    align-items:center;

    gap:12px;

}



.double-input input{

    flex:1;

}



.double-input span{

    font-weight:bold;

    color:#6b7280;

}



/* ==========================
   Button
========================== */

button{

    border:none;

    background:#2563eb;

    color:white;

    padding:18px;

    font-size:18px;

    border-radius:12px;

    cursor:pointer;

    transition:.2s;

}



button:hover{

    background:#1d4ed8;

    transform:translateY(-2px);

}



button:active{

    transform:scale(.98);

}



/* ==========================
   Results
========================== */

.results{

    margin-top:35px;

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:18px;

}



.result-card{

    background:#eff6ff;

    border-left:5px solid #2563eb;

    border-radius:15px;

    padding:22px;

}



.result-card h3{

    color:#2563eb;

    margin-bottom:8px;

}



.result-card small{

    color:#6b7280;

}



.result-card p{

    margin-top:15px;

    font-size:30px;

    font-weight:bold;

    color:#1f2937;

}



/* ==========================
   Mobile
========================== */

@media(max-width:700px){

.container{

    margin:15px;

    padding:20px;

}

.results{

    grid-template-columns:1fr;

}

.double-input{

    flex-wrap:wrap;

}

button{

    font-size:16px;

}

}

/* =====================================
   Information Sections
====================================== */

.info-section{

    margin-top:45px;

    padding:30px;

    background:#ffffff;

    border:1px solid #e5e7eb;

    border-radius:18px;

    line-height:1.7;

}

.info-section h2{

    font-size:28px;

    margin-bottom:18px;

    color:#1f2937;

}

.info-section h3{

    font-size:20px;

    margin-top:25px;

    margin-bottom:8px;

    color:#2563eb;

}

.info-section p{

    color:#6b7280;

    margin-bottom:16px;

}

.info-section ol,
.info-section ul{

    padding-left:25px;

    color:#6b7280;

}

.info-section li{

    margin-bottom:10px;

}

.formula-box{

    background:#f9fafb;

    border-left:4px solid #2563eb;

    padding:20px;

    border-radius:12px;

    margin:20px 0;

}

.formula-box strong{

    display:block;

    color:#2563eb;

    margin-bottom:5px;

}

.formula-box p{

    color:#374151;

    font-weight:500;

}

/* =====================================
   Title + Print Link
====================================== */

.title-row{

    display:flex;

    justify-content:center;

    align-items:center;

    position:relative;

}


.print-link{

    position:absolute;

    right:0;

    top:50%;

    transform:translateY(-50%);

    text-decoration:none;

    color:#2563eb;

    font-size:16px;

    font-weight:bold;

}


.print-link:hover{

    color:#1d4ed8;

}

/* =====================================
   Calculator Buttons
====================================== */

.button-row{

    display:flex;

    gap:15px;

}


#calculateBtn{

    flex:1;

}


#clearBtn{

    width:140px;

    background:#dc2626;

}


#clearBtn:hover{

    background:#b91c1c;

}


@media(max-width:700px){

    .button-row{

        flex-direction:column;

    }


    #clearBtn{

        width:100%;

    }

}
/* =====================================
   Navigation
====================================== */

nav{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 40px;

    background:white;

    border-bottom:1px solid #e5e7eb;

    position:sticky;

    top:0;

    z-index:1000;

}


.logo a{

    color:#1f2937;

    text-decoration:none;

    font-size:22px;

    font-weight:bold;

}


.nav-links{

    display:flex;

    gap:25px;

}


.nav-links a{

    color:#4b5563;

    text-decoration:none;

    font-weight:600;

    transition:.2s;

}


.nav-links a:hover{

    color:#2563eb;

}



@media (max-width: 700px) {
   
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    padding: 14px 20px;
    gap: 16px;
    background: white;
    height: 58px;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-links > a,
.nav-links .tools-dropdown-button {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #4b5563;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links .tools-dropdown-button {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
}


    .tools-dropdown-button {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
}


/* =====================================
   Back to Top Button
====================================== */

#backToTop{

    position:fixed;

    bottom:30px;

    right:30px;

    width:52px;

    height:52px;

    border:none;

    border-radius:50%;

    background:#2563eb;

    color:white;

    font-size:24px;

    font-weight:bold;

    cursor:pointer;

    display:none;

    align-items:center;

    justify-content:center;

    box-shadow:0 6px 18px rgba(0,0,0,.18);

    transition:.2s;

    z-index:999;

}


#backToTop:hover{

    background:#1d4ed8;

    transform:translateY(-3px);

}


#backToTop:active{

    transform:scale(.95);

}

/* =====================================
   Tools Dropdown Navigation
====================================== */

.tools-dropdown {

    position: relative;

    display: inline-block;

}


.tools-dropdown-button {

    background: none;

    border: none;

    color: #4b5563;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    padding: 0;

    margin: 0;

}


.tools-dropdown-button:hover {

    background: none;

    color: #4b5563;

}


/* Dropdown menu */

.tools-dropdown-menu {

    display: none;

    position: absolute;

    right: 0;

    top: 100%;

    width: 240px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.12);

    padding: 8px;

    z-index: 2000;

}


/* Keep dropdown open while hovering */

.tools-dropdown:hover .tools-dropdown-menu {

    display: block;

}


/* Dropdown links */

.tools-dropdown-menu a {

    display: block;

    padding: 11px 14px;

    color: #374151;

    text-decoration: none;

    border-radius: 8px;

    font-size: 15px;

}


.tools-dropdown-menu a:hover {

    background: #f3f4f6;

    color: #2563eb;

}


/* Current tool */

.tools-dropdown-menu a.current-tool {

    background: #eff6ff;

    color: #2563eb;

    font-weight: bold;

}


.tools-dropdown-menu a.current-tool:hover {

    background: #dbeafe;

    color: #1d4ed8;

}

/* =====================================
   Calorie Calculator - Mobile Optimization
====================================== */

@media (max-width:700px){

    body{
        overflow-x:hidden;
    }


    .container{

        width:calc(100% - 20px);

        max-width:none;

        margin:20px auto;

        padding:22px 17px;

        border-radius:18px;

    }


    h1{

        font-size:32px;

        line-height:1.15;

        margin-bottom:10px;

    }


    .subtitle{

        font-size:15px;

        line-height:1.6;

        margin-bottom:28px;

    }


    /* Calculator */

    .calculator{

        padding:20px 16px;

        border-radius:16px;

        gap:22px;

    }


    .row{

        gap:8px;

    }


    label{

        font-size:15px;

    }


    input,
    select{

        width:100%;

        height:54px;

        padding:12px 14px;

        font-size:16px;

        border-radius:11px;

    }


    /* Height / weight inputs */

    .double-input{

        width:100%;

        gap:8px;

    }


    .double-input input{

        min-width:0;

    }


    .double-input span{

        font-size:14px;

    }


    /* Calculate / Clear buttons */

    .button-row{

        gap:10px;

    }


    button{

        width:100%;

        min-height:54px;

        padding:14px;

        font-size:16px;

        border-radius:11px;

    }


    #clearBtn{

        width:100%;

    }


    /* Results */

    .results{

        grid-template-columns:1fr;

        gap:12px;

        margin-top:25px;

    }


    .result-card{

        padding:18px;

        border-radius:13px;

    }


    .result-card h3{

        font-size:18px;

    }


    .result-card p{

        font-size:26px;

        margin-top:12px;

    }


    /* Information sections */

    .info-section{

        margin-top:30px;

        padding:20px;

        border-radius:16px;

    }


    .info-section h2{

        font-size:23px;

        line-height:1.3;

    }


    .info-section h3{

        font-size:18px;

    }


    .info-section p,
    .info-section li{

        font-size:15px;

        line-height:1.7;

    }


    .info-section ol,
    .info-section ul{

        padding-left:21px;

    }


    /* Formula */

    .formula-box{

        padding:17px;

    }


    /* Print link */

    .title-row{

        display:block;

    }


    .print-link{

        position:static;

        display:block;

        transform:none;

        text-align:center;

        margin-top:10px;

        font-size:14px;

    }


    /* Back to top */

    #backToTop{

        width:46px !important;

        height:46px !important;

        min-height:46px !important;

        padding:0 !important;

        right:20px;

        bottom:20px;

        font-size:21px;

    }

}

/* =====================================
   Share This Tool
====================================== */

.share-section {

    width: 100%;

    max-width: 700px;

    margin: 60px auto 40px auto;

    padding: 35px 25px;

    text-align: center;

    background: #f3f4f6;

    border-radius: 16px;

}


.share-section h2 {

    margin: 0 0 10px 0;

    text-align: center;

}


.share-section p {

    color: #6b7280;

    margin: 0 auto 20px auto;

    text-align: center;

}


#shareButton {

    display: block;

    margin: 0 auto;

    background: #2563eb;

    color: white;

    border: none;

    padding: 12px 24px;

    border-radius: 10px;

    font-size: 16px;

    cursor: pointer;

    transition: 0.2s;

}


#shareButton:hover {

    background: #1d4ed8;

}