/* style.css */
:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e1e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
    --bmi-underweight: #4da6ff;
    --bmi-normal: #66cc66;
    --bmi-overweight: #ffcc66;
    --bmi-obese: #ff6666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    text-decoration: none;
    color: var(--footer-bg);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: var(--accent-pink);
}

/* Navigation */
.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: black;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.links a {
    color: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--accent-pink);
}

.nav-item:hover {
    color: var(--accent-pink);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.mega-dropdown {
    position: absolute;
    top: 45px;
    left: -750px;
    background-color: white;
    width: 1200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    display: none;
    z-index: 1001;
    grid-template-columns: repeat(6, 1fr);
    border-top: 3px solid var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: var(--accent-pink);
    background: rgba(255, 51, 102, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: var(--accent-pink);
}

.dropdown-link i {
    margin-right: 12px;
    color: var(--secondary-blue);
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: var(--accent-pink);
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafd;
    color: var(--text-dark);
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: var(--accent-pink);
}

.mobile-tool-link i {
    margin-right: 15px;
    color: var(--secondary-blue);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BMI Calculator Styles */
.container {
    max-width: 1000px;
    margin: 40px auto 200px;
    padding: 0 20px;
    flex: 1;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-title {
    text-align: center;
    margin: 30px 0 20px;
    color: var(--footer-bg);
    font-weight: 700;
    font-size: 2.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.calculator-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.input-section {
    flex: 1;
    min-width: 300px;
}

.result-section {
    flex: 1;
    min-width: 300px;
}

.section-title {
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.section-title i {
    color: var(--primary-blue);
}

.unit-toggle {
    display: flex;
    background: #f0f7ff;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 20px;
}

.unit-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.unit-btn.active {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
}

.input-group input:focus {
    border-color: var(--secondary-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.height-group {
    display: flex;
    gap: 15px;
}

.height-group .input-group {
    flex: 1;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.calculate-btn {
    flex: 1;
    padding: 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reset-btn {
    flex: 1;
    padding: 16px;
    background: #f5f5f5;
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.reset-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.bmi-result {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.bmi-result:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-pink);
}

.bmi-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 15px 0;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 8px 20px;
    border-radius: 30px;
    display: inline-block;
}

.underweight-bg {
    background: rgba(77, 166, 255, 0.2);
    color: #1a5fb4;
}

.normal-bg {
    background: rgba(102, 204, 102, 0.2);
    color: #2e7d32;
}

.overweight-bg {
    background: rgba(255, 204, 102, 0.2);
    color: #c66900;
}

.obese-bg {
    background: rgba(255, 102, 102, 0.2);
    color: #c62828;
}

.bmi-description {
    font-size: 1.1rem;
    color: var(--text-light);
}

.bmi-scale {
    display: flex;
    background: #e1e8f0;
    border-radius: 30px;
    height: 20px;
    overflow: hidden;
    margin: 30px 0;
    position: relative;
}

.scale-section {
    flex: 1;
    height: 100%;
}

.underweight {
    background: var(--bmi-underweight);
}

.normal {
    background: var(--bmi-normal);
}

.overweight {
    background: var(--bmi-overweight);
}

.obese {
    background: var(--bmi-obese);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.indicator {
    position: absolute;
    top: -10px;
    height: 40px;
    width: 4px;
    background: var(--primary-blue);
    transform: translateX(-50%);
    transition: left 1s ease-out;
}

.indicator::after {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--primary-blue);
}

.category-info {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.category-desc {
    line-height: 1.6;
    color: var(--text-light);
}

/* Footer */
.copyright {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.copyright a {
    color: var(--footer-hover);
    text-decoration: none;
    transition: all 0.3s;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .mega-dropdown {
        width: 700px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .mega-dropdown {
        width: 500px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .logo a {
        font-size: 22px;
    }

    .mobile-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .calculator-container {
        flex-direction: column;
    }

    .tool-title {
        font-size: 2rem;
    }

    .bmi-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .height-group {
        flex-direction: column;
    }

    .btn-group {
        flex-direction: column;
    }
}