/* style.css - Global Styles for Header, Footer, and general layout */

/* --- ROOT VARIABLES --- */
:root {
    --primary-color: #3498db;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: #777;
    --border-color: #ddd;
    --white: #fff;
    --light-gray: #f5f5f5;
    /* Colors from header.PNG */
    --header-bg-start: #703bda; /* A darker purple */
    --header-bg-end: #8e2de2;   /* A lighter purple */

    /* Global Container Width */
    --container-max-width: 1400px;
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa; /* Light background for the overall page */
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex;
    flex-direction: column; /* Allows footer to stick to bottom if content is short */
}

/* Global Container for content centering and max-width */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px; /* Horizontal padding for content within the container */
}

/* --- HEADER STYLES --- */
.main-site-header {
    background: linear-gradient(to right, var(--header-bg-start), var(--header-bg-end));
    padding: 15px 0;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.header-inner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Uses the global .container's max-width via inheritance */
}

.header-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo-container a {
    text-decoration: none; /* Remove underline from logo link */
    display: flex;
    align-items: center;
    color: white; /* Ensure text color is white for the link */
}

.header-brand-logo {
    height: 70px;
    width: auto;
    vertical-align: middle;
}

.header-brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* Main Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.main-navigation ul li a:hover::after,
.main-navigation ul li a.active::after {
    width: 100%;
}

.main-navigation ul li a:hover,
.main-navigation ul li a.active {
    color: #e0e0e0;
    transform: translateY(-1px);
}

/* --- MAIN PAGE CONTENT WRAPPER --- */
.page-main-content {
    flex: 1; /* Allows this section to grow and push footer to bottom */
    padding-top: 40px; /* Space below header */
    padding-bottom: 40px; /* Space above footer */
}

/* --- FOOTER STYLES --- */
.site-footer {
    background-color: #2c3e50; /* Dark blue from footer.PNG */
    color: white;
    padding: 40px 0 20px;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
/* Binary-Decimal-Hex-Octal-Converter.css - Page-specific styles */

/* Removed the * { margin: 0; padding: 0; box-sizing: border-box; } here
   as it's now in style.css */

/* Removed body styles here as they are now in style.css */
/* body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(to right, #d3cce3, #e9e4f0);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
} */

/* Adjusted .container for the converter box to be a *section* within the main content */
.converter-section {
    background: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    max-width: 550px; /* Keep this max-width for the converter box */
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 0 auto; /* Center within its parent (page-main-content) */
    margin-bottom: 40px; /* Space below the converter section */
}


h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #333;
    display: flex; /* Make h1 a flex container to align icon and text */
    align-items: center; /* Vertically align icon and text */
    justify-content: center; /* Center horizontally */
}

.icon-small {
    width: 35px; /* Adjusted icon size for better alignment with text */
    height: 35px;
    margin-right: 12px;
}

.converter-aim { /* Changed class from .aim to .converter-aim for clarity */
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
}

.converter-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"] {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
}

input:focus {
    border-color: #007bff;
    outline: none;
}

button {
    padding: 12px;
    font-size: 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #0056b3;
}

.result-box {
    text-align: left;
    margin-top: 10px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    color: #222;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Info Sections */
.info-section {
    background-color: #f4f9ff;
    padding: 30px;
    margin: 40px auto; /* Centered with top/bottom margin */
    max-width: 900px; /* Max-width for info sections */
    border-radius: 14px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    text-align: left; /* Ensure text within sections is left-aligned */
}

.info-section h2 {
    color: #2a3459;
    font-size: 26px;
    margin-bottom: 15px;
}

.info-section p, .info-section ol {
    font-size: 17px;
    color: #333;
    line-height: 1.8;
    text-align: justify;
}

.info-section ol {
    padding-left: 20px;
}

/* Responsive styles for converter page */
@media (max-width: 500px) {
    .converter-section h1 { /* More specific selector for h1 */
        font-size: 1.4rem;
        flex-direction: column; /* Stack icon and text on small screens */
        gap: 5px; /* Space between stacked icon and text */
    }

    .icon-small {
        margin-right: 0; /* Remove right margin when stacked */
    }

    .converter-aim {
        font-size: 0.9rem;
    }

    .info-section {
        padding: 20px;
        margin: 20px auto;
    }

    .info-section h2 {
        font-size: 22px;
    }

    .info-section p, .info-section ol {
        font-size: 15px;
    }
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-brand-logo {
    height: 40px;
    width: auto;
}

.footer-brand-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.about-us-footer p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- RESPONSIVE STYLES --- */

/* Header Responsive */
@media (max-width: 992px) {
    .header-inner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .main-navigation ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .header-brand-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .header-inner-content {
        padding: 0 15px;
    }

    .header-brand-logo {
        height: 40px;
    }

    .header-brand-title {
        font-size: 1.4rem;
    }

    .main-navigation ul li a {
        font-size: 0.9rem;
        padding: 3px 0;
    }

    /* Footer Responsive */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        margin-bottom: 20px;
    }

    .footer-section h3 {
        text-align: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-logo-container {
        justify-content: center;
    }
}