/* Header styles: background, text color, padding, and layout */

.header {
    background-color: #901f1f;
    /* Dark red background */
    color: #fff;
    /* White text */
    padding: 25px 10px;
    /* Padding around header */
    display: flex;
    justify-content: center;
    /* border: #000000 4px solid; /* Black border around header */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth 
  text-align: center;  */
}


/* Container for header content: aligns logo and text */

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    text-align: center;
}


/* Logo image size */

.header-logo img {
    height: 80px;
    width: auto;
    border-radius: 38px;
    /* Slightly rounded corners */
    box-shadow: 12px 12px 12px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
    image-resolution: from-image;
    /* Ensure high-res images look sharp */
    transition: transform 0.3s ease;
    /* Smooth hover effect */
    border: #ffffff 2px solid;
    /* Black border around logo */
}


/* Main header text size */

.header-text h1 {
    margin: 0;
    font-size: 2.5em;
}


/* Header tagline style */

.header-text p {
    margin: 5px 0 0;
    font-size: 1.1em;
}


/* Navigation bar styles: background, layout, and shadow */

.navbar {
    background-color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000;
}


/* Wrapper for menu and nav links */

.menu-wrapper {
    position: relative;
}


/* Navigation links layout */

.nav-links {
    display: flex;
}


/* Navigation link styles */

.navbar a {
    padding: 14px 15px;
    color: white;
    text-decoration: none;
}


/* Navigation link hover effect */

.navbar a:hover {
    background-color: #1fbdec;
}


/* Hamburger menu button for mobile */

.hamburger {
    display: none;
    background: none;
    border: 0;
    font-size: 26px;
    color: white;
    cursor: pointer;
}


/* Search bar container */

.search-container {
    position: relative;
}


/* Search input styling */

#searchInput {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    outline: none;
}


/* Suggestions dropdown styling */

#suggestions {
    position: absolute;
    top: 35px;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    width: 200px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}


/* Individual suggestion style */

#suggestions div {
    padding: 8px;
    cursor: pointer;
}


/* Suggestion hover effect */

#suggestions div:hover {
    background: #f1f1f1;
}


/* Responsive navigation for mobile screens */

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #333;
        width: 130px;
        flex-direction: column;
        padding: 8px 0;
        border-radius: 8px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    }
    .nav-links a {
        display: block;
        padding: 10px 14px;
        text-align: left;
    }
    /* Show nav links on hover or focus */
    .menu-wrapper:hover .nav-links,
    .menu-wrapper:focus-within .nav-links {
        display: flex;
    }
}


/* General styles for body and layout */

* {
    margin: auto;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 800px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    padding-top: 15px;
    flex-direction: column;
    margin: 20px auto;
}

section {
    background: linear-gradient(to right, #4a00e0, #8e2de2);
    color: white;
    text-align: center;
    padding: 30px 20px;
    align-items: center;
    justify-content: center;
    margin: revert;
    padding-top: 15px;
    length: auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
}

.input-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.result-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #4a00e0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus,
select:focus {
    border-color: #4a00e0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 0, 224, 0.1);
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #4a00e0, #8e2de2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.age-display {
    font-size: 3rem;
    font-weight: 700;
    color: #4a00e0;
    margin: 15px 0;
}

.age-breakdown {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.age-unit {
    text-align: center;
    padding: 15px;
}

.age-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4a00e0;
}

.age-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.additional-info {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    color: #4a00e0;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid #f0f0f0;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    .age-display {
        font-size: 2.5rem;
    }
    .age-value {
        font-size: 1.5rem;
    }
}