/* styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    transition: all 0.3s ease-in-out;
}

/* Body & Page Layout */
body {
    background:#faf8ef ;
    color: #333;
    padding: 20px;
    overflow-x: hidden;
}

*{
    word-wrap: break-word; /* Allows long words to break */
    overflow-wrap: break-word; /* Same as word-wrap for better support */
}

/* Navbar */
.logo {
    position: fixed; /* Fix it to the top-left */
    top: 20px;
    left: 20px; /* Adjust left spacing if needed */
    z-index: 10;
    transform: translateY(0);
    animation: fadeInDown 1s ease-in-out;
}

.logo a{
    color:  #203354;
    font-size: 2rem;
    text-decoration: none;
    font-weight: bold;
}
.logo a:hover{
    color: #fff;
    background: #203354;
    padding: 5px 15px;
    border-radius: 5px;
    transition: background 0.4s, color 0.3s;
}

/*main container */
.container{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
/* Main container */
.what-is-it-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    width: calc(100% - 30px);
    background: #203354;;
    border: 5px solid #fefbea;
    border-radius: 15px;
    padding: 15px;
    margin: 0 auto;
    margin-top: 90px;
    animation: fadeIn 1.2s ease-in-out;
}
.first-paragraph{
    display: flex;
    font-size: 1.5rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    color: transparent;
    -webkit-text-stroke: 3px  #fefbea;
    text-transform: uppercase;
}
.header{
    position: relative;
    display: flex;
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    color: #fefbea;
    -webkit-text-stroke: 3.5px  #203354;
    font-size: 5rem;
    font-weight:900 ;
    margin-top: 50px;
    animation: slideIn 1s ease-in-out;
}
.what{
    position: relative;
    color: #fefbea;
    font-size: 7rem;
    font-weight: 900;
    bottom: 0px;
}
.def-what{
    position: relative;
    font-size: 2rem;
    animation: fadeIn 1.5s ease-in-out forwards;
    
}
.formula-container{
    position: relative;
    display: flex;
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: flex-start; 
    height: auto; 
    width: calc(100% - 30px); 
    background: #fefbea; 
    border: 5px solid #203354;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Adds depth */
    padding: 25px;
    margin: 0 auto;
    margin-top: 40px;
    color: #203354;
    animation: fadeIn 1.5s ease-in-out;
    font-family: 'Poppins', sans-serif;
}
.formula-header{
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    color: #203354;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
    border-bottom: 3px solid #203354;
    padding-bottom: 10px;
}
.formula-words{
    flex-direction: column;
    width: 100%;
    text-align: left;
    color: #333;
}
.formula-words p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}
.formula-words ul{
    padding-left: 20px;
    margin-bottom: 15px;
}
.formula-words ul li{
    font-size: 1rem;
    margin: 8px 0;
    line-height: 1.5;
    color: #203354;
}
.formula-box{
    background-color: #203354;
    color: #fefbea;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin:15px 0;
}

/* Friction Problem Solver Section */
.friction-problem-solver{
    background: #fefbea;
    border: 5px solid #203354;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin: 0 auto;
    margin-top: 30px; /* Optional for extra spacing */
    max-width: 600px;
    text-align: center;
    animation: zoomIn 1.2s ease-in-out forwards;
}
.friction-problem-solver h2 {
    font-size: 2.2rem;
    font-weight: bold;
    color: #203354;
    text-align: center;
    margin-bottom: 25px;
}
.form-group{
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

label {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #203354;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease-in-out;
}

input[type="number"]:focus {
    border-color: #67aaf1;
    box-shadow: 0 0 10px rgba(103, 170, 241, 0.5);
}

button {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    background: #203354;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background 0.3s;
    margin-top: 20px;
}

button:hover {
    background-color:#67aaf1;
    transform: scale(1.05);
}

/* Result Text */
.result-text {
    font-size: 1.4rem;
    color: #203354;
    font-weight: bold;
    margin-top: 25px;
    text-align: center;
}

.friction-problem-solver .form-group input[type="number"]:not(:last-child) {
    margin-bottom: 15px;  /* Space between each input field */
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    .friction-problem-solver {
        padding: 20px;
        margin: 20px auto;
        width: 100%;
    }

    .friction-problem-solver h2 {
        font-size: 1.8rem;
    }

    button {
        width: 100%;
    }

    .what-is-it-container {
        width: calc(100% - 30px);
        padding: 15px;
        margin-top: 20px;
    }

    .header {
        font-size: 3rem;
    }

    .what {
        font-size: 5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}