:root {
    --primary-color: #0056b3;
    --primary-hover: #004494;
    --success-color: #054691;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-color: #dee2e6;
    --text-dark: #212529;
    --text-light: #495057;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --light-orange-bg: #fff4e5; 
}

html, body {
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    
}

main {
    flex-grow: 1; 
}


header {
    position: relative; 
    z-index: 3;     
}


.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    transition: background-color 0.2s ease-in-out;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}


#main-content {
    max-width: 900px;
    width: 100%;
    margin: 0;
    margin-top: 50px;
    line-height: 1.6;
    
}

.sidebar {
    max-width: 300px;
    width: 100%;
    margin: 0 0 0 auto;
    margin-top: 50px;
}

.sidebar-title {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
    font-size: 1.25rem;
}

.conversion-box h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

 .header h2 {
     font-size: 1.6rem;
 }

.lead-description {
    font-size: 1rem;
    color: var(--text-light);
}

#sentenceResult {
    
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(5, 131, 125);
    border: 1px solid black;
    background-color: #eee;
    padding: 8px;
    border-radius: 20px;
    
}

.calculation-area {
    padding: .5rem; 
    background-color: var(--light-orange-bg); 
    border-radius: 5px;
    margin-bottom: 1.2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

.input-result-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-container, .result-container {
    flex: 1 1 0;
    min-width: 0;
}

#inputValue {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    width: 100%;
}

#outputResult {
    font-size: 2rem;
    font-weight: 600;
    color: var(--success-color);
    margin: 0;
    word-break: break-all;
}

.equals-sign {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
}

.conversion-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.conversion-controls select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    flex-grow: 1;
    min-width: 0;
}

#swapBtn {
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 0.375rem;
}

#swapBtn:hover {
    background-color: var(--primary-hover);
}

.error-message {
    color: #dc3545;
    font-weight: 500;
    margin-top: 1rem;
    min-height: 1.5em;
}

.dynamic-sections, .information-section, .more-conversions-container {
    padding: 0.75rem; 
    background-color: #ffffff;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

 .code-box {
    background-color: rgb(250, 248, 247);
    padding: 1.2rem;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    word-wrap: break-word;
    font-size: 1.2rem;
    color: #031353;
}

optgroup {
    font-weight: bold;
    font-style: italic;
    color: var(--primary-color);
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-top: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
}
.search-suggestions a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
}
.search-suggestions a:hover {
    background-color: var(--medium-gray);
}
.search-suggestions a small {
    color: var(--text-light);
}

.related-list {
    list-style: none;
    padding: 0;
}
.related-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--primary-color);
    background-color: #ffffff;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
}
.related-list li a:hover {
    background-color: var(--light-gray);
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.related-list .arrow {
    font-weight: bold;
}


.site-footer {
    background-color: #000000; 
    color: #adb5bd;
    padding: 3rem 0 1.5rem 0;
    margin-top: 60px; 
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #343a40; 
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.site-footer h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

 

.copy {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}


@media (max-width: 991.98px) {
    #main-content {
        margin: 0 auto;
    }
    .sidebar {
        margin: 1.5rem auto 0 auto;
    }
}

@media (max-width: 768px) {
    
    
    .code-box {
     background-color: rgb(250, 248, 247);
     padding: 1rem;
     border-radius: 5px;
     font-family: 'Courier New', Courier, monospace;
     font-weight: bold;
     word-wrap: break-word;
     font-size: 1.2rem;
     color: #031353;
}
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .container-xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .conversion-box h1 {
        font-size: 1.5rem;
    }
    .description {
        font-size: 1rem;
    }
    #inputValue, #outputResult {
        font-size: 1.2rem;
    }
    .equals-sign {
        font-size: 1.5rem;
    }
    .calculation-area {
        padding: 0.5rem; 
    }
}



.hero-section {
    position: relative;
    padding: 6rem 1rem;
    background-image: url('/assets/images/background.jpg');
    background-size: cover;
    background-position: center center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 40, 85, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .lead {
    color: rgba(255, 255, 255, 0.9);
}


.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.75rem;
    display: inline-block;
}


.category-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.75rem; 
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.category-card-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-light);
    flex-grow: 1; 
    margin-bottom: 1.5rem;
}

.category-card .btn {
    width: 100%;
}



header .navbar {
    background-color: #ffffff; 
    border-bottom: 1px solid #dee2e6; 
}


.navbar-light .navbar-brand {
    color: #000000;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

#reverse-conversion-link-container {
    text-align: center;
    margin-top: 0.5rem; 
    margin-bottom: 2rem;
}

#reverse-conversion-link-container a {
    font-weight: 500;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px; 
    transition: all 0.2s ease-in-out;
}

#reverse-conversion-link-container a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}