:root {
    --primary: #c65f2c;
    --primary-dark: #a84d1f;
    --secondary: #1f6f78;
    --secondary-dark: #163c40;
    --success: #059669;
    --warning: #d97706;
    --bg: #f8f6f3;
    --card-bg: #ffffff;
    --text: #22211f;
    --text-muted: #5c5346;
    --border: #ded7cd;
    --shadow: 0 4px 15px rgba(15,15,15,0.1);
    --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Trebuchet MS', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.header-container {
     background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%); 
               margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 70px;
     padding: 1rem 0;
      position: sticky;
       top: 0; z-index: 100; 
       box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    }

.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #fef7ef; padding-left: 100px; }
.logo-icon { font-size: 1.75rem; }
.logo-text { font-size: 1.4rem; font-weight: 700; }
.logo-text span { color: #f9c784; }
        nav {
            display: flex;
            align-items: center;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 5px;
        }

        .nav-item {
            position: relative;
            padding-right: 65px;
           
        }
.nav-link { color: #fef7ef; text-decoration: none; font-weight: 500; opacity: 0.9; transition: opacity 0.2s; }
.nav-link:hover { opacity: 1; }
  /* Dropdown Arrow */
        .has-submenu > .nav-link::after {
            content: '▼';
            font-size: 0.6rem;
            margin-left: 6px;
            transition: transform 0.3s ease;
        }

        /* Submenu Styles */
        .submenu {
            position: absolute;
            top: 100%;
            left: 0;
            background: #fff;
            min-width: 220px;
            list-style: none;
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.3s ease;
        }

        .nav-item:hover > .submenu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .submenu li {
            border-bottom: 1px solid #f0f0f0;
        }

        .submenu li:last-child {
            border-bottom: none;
        }

        .submenu a {
            color: #333;
            text-decoration: none;
            padding: 12px 20px;
            display: block;
            transition: all 0.3s ease;
        }

        .submenu a:hover {
            background: #f8f9fa;
            color: #e94560;
            padding-left: 25px;
        }

        /* Nested Submenu */
        .submenu .has-submenu {
            position: relative;
        }

        .submenu .has-submenu > a::after {
            content: '▶';
            font-size: 0.6rem;
            float: right;
            margin-top: 4px;
        }

        .submenu .submenu {
            top: 0;
            left: 100%;
        }

        /* Mobile Menu Toggle */
        .menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 5px;
            padding: 10px;
        }

        .menu-toggle span {
            width: 28px;
            height: 3px;
            background: #fff;
            border-radius: 3px;
            transition: all 0.3s ease;
        }

        /* Checkbox for mobile menu */
        #menu-checkbox {
            display: none;
        }


/* Hero */
.hero { background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%); color: white; padding: 3rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }
.hero-badges { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.hero-badge { background: rgba(255,255,255,0.2); padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.85rem; }

/* Categories */
.categories { padding: 3rem 0; }
.category-title { font-size: 1.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; color: var(--secondary-dark); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.calc-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; text-decoration: none; color: var(--text); border: 1px solid var(--border); transition: all 0.2s; display: flex; gap: 1rem; align-items: flex-start; position: relative; }
.calc-card:hover { box-shadow: var(--shadow); border-color: var(--primary); transform: translateY(-2px); }
.calc-icon { font-size: 2rem; flex-shrink: 0; }
.calc-info h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.calc-info p { font-size: 0.85rem; color: var(--text-muted); }
.calc-badge { position: absolute; top: 0.75rem; right: 0.75rem; background: var(--primary); color: white; font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 20px; font-weight: 600; }

/* Calculator Page */
.calculator-page { padding: 2rem 0; }
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.calculator-container { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
@media (max-width: 900px) { .calculator-container { grid-template-columns: 1fr; } .info-panel { order: -1; } }

/* Calculator Main */
.calculator-main { background: var(--card-bg); border-radius: var(--radius); padding: 2rem; border: 1px solid var(--border); }
.calculator-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.calculator-title-icon { font-size: 2.5rem; }
.calculator-title h1 { font-size: 1.75rem; }

/* Preferences Bar */
.preferences-bar { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding: 1rem; background: #f7f5f2; border-radius: 8px; }
.pref-group { display: flex; flex-direction: column; gap: 0.3rem; }
.pref-group label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.pref-group select { padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid var(--border); font-size: 0.9rem; background: white; }

/* Form */
.calc-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 500; font-size: 0.9rem; }
.input-wrapper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: white; }
.input-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(198, 95, 44, 0.1); }
.input-wrapper input, .input-wrapper select { flex: 1; padding: 0.75rem; border: none; font-size: 1rem; outline: none; background: transparent; }
.input-wrapper .unit { padding: 0.75rem; background: #f8f6f3; color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
.btn-calculate { background: var(--primary); color: white; border: none; padding: 1rem 2rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 0.5rem; }
.btn-calculate:hover { background: var(--primary-dark); }
.btn-reset { background: #f1efe9; color: var(--text); border: none; padding: 1rem 2rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; }

/* Results */
.result-section { margin-top: 1.5rem; }
.result-box { background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%); color: white; padding: 1.5rem; border-radius: var(--radius); text-align: center; }
.result-label { font-size: 0.9rem; opacity: 0.9; margin-bottom: 0.25rem; }
.result-value { font-size: 1.75rem; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.result-item { background: rgba(255,255,255,0.15); padding: 1rem; border-radius: 8px; text-align: center; }
.result-item .label { font-size: 0.8rem; opacity: 0.9; }
.result-item .value { font-size: 1.1rem; font-weight: 600; }

/* Summary Cards */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.summary-card { background: #f8f6f3; padding: 1rem; border-radius: 8px; text-align: center; }
.summary-card .label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.summary-card .value { font-size: 1.1rem; font-weight: 600; }
.summary-card.highlight { background: #fff3e6; border: 1px solid var(--primary); }
.summary-card.success { background: #dcfce7; border: 1px solid var(--success); }

/* Info Panel */
.info-panel { display: flex; flex-direction: column; gap: 1rem; }
.info-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.info-card h3 { font-size: 0.95rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); }
.quick-ref-table { width: 100%; font-size: 0.8rem; }
.quick-ref-table td { padding: 0.4rem 0; }
.quick-ref-table td:last-child { text-align: right; font-weight: 500; }
.related-calcs { display: flex; flex-direction: column; gap: 0.5rem; }
.related-calc-link { color: var(--secondary); text-decoration: none; font-size: 0.85rem; }
.related-calc-link:hover { text-decoration: underline; }

/* FAQs */
.faq-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.faq-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--secondary-dark); }
.faq-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: white; }
.faq-question { width: 100%; padding: 1rem 1.25rem; background: white; border: none; text-align: left; font-size: 0.95rem; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question:hover { background: #f8f6f3; }
.faq-question svg { transition: transform 0.3s; flex-shrink: 0; }
.faq-item.active .faq-question svg { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0 1.25rem 1.25rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* Footer */
.footer-container { background: var(--secondary-dark); color: #fef7ef; padding: 2rem 0; text-align: center; margin-top: 3rem; }
.footer p { opacity: 0.9; font-size: 0.9rem; margin: 0.25rem 0; }


        .footer-content {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 40px;
            margin-bottom: 40px;
        }

        .footer-section h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: #e94560;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-section h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: #e94560;
        }

        .footer-section p {
            color: #aaa;
            line-height: 1.8;
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 12px;
        }

        .footer-links a {
            color: #aaa;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .footer-links a:hover {
            color: #e94560;
            padding-left: 5px;
        }

        .contact-info {
            color: #aaa;
        }

        .contact-info p {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

     
        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 20px;
            text-align: center;
            color: #aaa;
        }

        /* Responsive Styles */
        @media (max-width: 992px) {
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .menu-toggle {
                display: flex;
                z-index: 1001;
            }

            nav {
                position: fixed;
                top: 0;
                right: -100%;
                width: 280px;
                height: 100vh;
                background: #1a1a2e;
                flex-direction: column;
                justify-content: flex-start;
                padding-top: 80px;
                transition: right 0.3s ease;
                box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
            }

            #menu-checkbox:checked ~ nav {
                right: 0;
            }

            #menu-checkbox:checked ~ .menu-toggle span:nth-child(1) {
                transform: rotate(45deg) translate(5px, 6px);
            }

            #menu-checkbox:checked ~ .menu-toggle span:nth-child(2) {
                opacity: 0;
            }

            #menu-checkbox:checked ~ .menu-toggle span:nth-child(3) {
                transform: rotate(-45deg) translate(5px, -6px);
            }

            .nav-menu {
                flex-direction: column;
                width: 100%;
                gap: 0;
            }

            .nav-link {
                padding: 15px 25px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .submenu {
                position: static;
                background: rgba(0, 0, 0, 0.2);
                box-shadow: none;
                border-radius: 0;
                max-height: 0;
                overflow: hidden;
                opacity: 1;
                visibility: visible;
                transform: none;
                transition: max-height 0.3s ease;
            }

            .nav-item:hover > .submenu {
                max-height: 500px;
            }

            .submenu a {
                color: #ccc;
                padding: 12px 25px 12px 40px;
            }

            .submenu a:hover {
                background: rgba(255, 255, 255, 0.05);
                color: #e94560;
            }

            .submenu li {
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            }

            .submenu .submenu {
                padding-left: 20px;
            }

            .footer-content {
                grid-template-columns: 1fr;
                gap: 30px;
            }

            .footer-section {
                text-align: center;
            }

            .footer-section h3::after {
                left: 50%;
                transform: translateX(-50%);
            }

            .social-links {
                justify-content: center;
            }
        }

        @media (max-width: 480px) {
            .logo {
                font-size: 1.4rem;
            }

            .header-container {
                height: 60px;
            }

            footer {
                padding: 40px 15px 15px;
            }
        }

/* Responsive */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.75rem; }
    .calculator-title h1 { font-size: 1.25rem; }
    .result-value { font-size: 1.5rem; }
   
    .form-row { grid-template-columns: 1fr; }
}
