
/* ===== GLOBAL BODY ===== */
body {
    font-family: 'Montserrat';
    background: linear-gradient(to bottom right, #F8F9FA, #E1F5C4);
    min-height: 100vh;
    margin: 0;
    color: #4A4A4A;
    display: flex;
    flex-direction: column;
}

/* ------------------------------ */
/* SCROLLBAR STYLES */
/* ------------------------------ */
html::-webkit-scrollbar {
    width: 1rem;
}

html::-webkit-scrollbar-track {
    background: linear-gradient(to bottom right, #F8F9FA, #E1F5C4);
}

html::-webkit-scrollbar-thumb {
    background: #426589;
    border-radius: 10px;
    /* rounded edges */
    border: 2px solid transparent;
    /* space around thumb */

}

html::-webkit-scrollbar-thumb:hover {
    background: #2e4663;
    /* darker on hover */
}

/* ===== CALCULATOR HEADER ===== */
.calculator-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.calculator-title {
    font-size: 2rem;
    font-weight: 600;
    color: #0e0e0e;
    margin-bottom: 0.5rem;
}

.calculator-subtitle {
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
    margin-bottom: 1rem;
}

footer {
    background: linear-gradient(135deg, #b5d2f0, #34495e);
    color: #fff;
    text-align: center;
    padding: 12px 0;
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
}


/* ===== IMPROVED NAVIGATION SYSTEM ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    width: 90%;
    height: 9vh;
    max-width: 1100px;
    margin: 0.5rem auto;
    position: sticky;
    top: 10px;
    z-index: 1000;
    background: #7aacde93;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Slight hover lift */
.navbar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 2100;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
    width: 35px;
    height: 3px;
    background: rgb(0, 0, 0);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Side Menu */
.calculator-nav {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: linear-gradient(135deg, #3c4a59, #34495e);
    padding: 80px 20px 20px 20px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1500;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2);
}

.calculator-nav.active {
    right: 0;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Category styles */
.nav-category {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
}

.category-btn {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.category-btn .arrow {
    transition: transform 0.3s ease;
}

.category-btn.active .arrow {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.active {
    max-height: 500px;
}

.submenu .nav-btn {
    background: none;
    border: none;
    text-align: left;
    color: #ddd;
    padding: 12px 20px 12px 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    width: 100%;
}

.submenu .nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding-left: 55px;
}

.nav-btn.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.nav-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Keep "always-open" category expanded */
.nav-category.always-open .submenu {
    max-height: none !important;
    /* no collapse */
    background: rgba(0, 0, 0, 0.2);
}

.nav-category.always-open .category-btn {
    cursor: default;
    justify-content: flex-start;
}

.nav-category.always-open .arrow {
    display: none;
    /* hide arrow since no toggle */
}


/* Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1200;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== FORM ===== */
.form-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 1.8rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #2d3748;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

#button {
    background: linear-gradient(135deg, #b5d2f0, #34495e);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 2rem auto;
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

#button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.result {
    margin-top: 2.5rem;
    padding: 1.8rem;
    background: #f8fafc;
    border-radius: 15px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #34495e;
}

.result h3 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #34495e;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.7rem 0;
}

.result-item span:last-child {
    font-weight: 600;
    color: #34495e;
}

/* ===== NEW PERCENTAGE CALCULATOR STYLES ===== */
.percentage-calc-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.percentage-calc-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 1.8rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #34495e;
}

.percentage-calc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.percentage-calc-card-title {
    color: #34495e;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

.percentage-calc-inputs {
    margin-bottom: 1.5rem;
}

.percentage-calc-inputs .input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
}

.percentage-calc-inputs .input-group label {
    color: #4a5568;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    min-width: fit-content;
}

.percentage-input {
    width: 120px;
    padding: 0.9rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    background: #ffffff;
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.percentage-input:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    transform: scale(1.05);
}

.input-suffix {
    color: #4a5568;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

.percentage-result {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.percentage-result.updated {
    transform: scale(1.02);
    background: #eef2ff;
    border: 2px solid #34495e;
}

.result-text {
    color: #4a5568;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.8rem;
}

.result-text strong {
    color: #34495e;
    font-size: 1.4rem;
    font-weight: 700;
}

.result-savings {
    color: #4a5568;
    font-size: 1.1rem;
    display: block;
}

.result-savings strong {
    color: #10b981;
    font-weight: 700;
}

.result-increase {
    color: #10b981 !important;
}

.result-decrease {
    color: #ef4444 !important;
}

/* Special styling for discount card */
.percentage-calc-card:nth-child(4) .result-text strong {
    color: #7c3aed;
}

/* ===== TWO-COLUMN LAYOUT FOR DESKTOP ===== */
@media (min-width: 992px) {
    .percentage-calc-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .form-container {
        max-width: 1200px;
    }

    .percentage-calc-inputs .input-group {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .percentage-calc-inputs .input-group label {
        margin: 0;
        min-width: auto;
        white-space: nowrap;
    }

    .percentage-input {
        width: 100px;
        margin: 0;
    }

    .input-suffix {
        margin: 0;
    }

    /* Add equals sign between inputs where needed */
    .percentage-calc-card:nth-child(1) .input-group::after,
    .percentage-calc-card:nth-child(3) .input-group::after,
    .percentage-calc-card:nth-child(5) .input-group::after,
    .percentage-calc-card:nth-child(6) .input-group::after {
        content: "=";
        font-size: 1.4rem;
        font-weight: bold;
        color: #34495e;
        margin: 0 0.5rem;
    }

    /* Adjust result positioning */
    .percentage-result {
        margin-top: 1.5rem;
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
    .percentage-calc-container {
        max-width: 900px;
    }
}

@media (max-width: 992px) {
    .percentage-calc-container {
        max-width: 700px;
    }

    .percentage-calc-card {
        padding: 1.5rem;
    }

    .percentage-calc-inputs .input-group {
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {

    /* Calculator header */
    .calculator-title {
        font-size: 1.6rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    /* Form container */
    .form-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
        max-width: 95%;
    }

    /* Percentage calculator cards */
    .percentage-calc-card {
        padding: 1.2rem;
    }

    .percentage-calc-card-title {
        font-size: 1.2rem;
    }

    .percentage-calc-inputs .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .percentage-calc-inputs .input-group label {
        text-align: center;
        margin-bottom: 0.3rem;
    }

    .percentage-input {
        width: 100%;
        margin: 0.3rem 0;
    }

    .input-suffix {
        text-align: center;
        margin: 0.3rem 0;
    }

    .result-text,
    .result-savings {
        font-size: 1rem;
    }

    .result-text strong {
        font-size: 1.2rem;
    }

    /* Remove the equals signs on mobile */
    .percentage-calc-card .input-group::after {
        content: "" !important;
    }

    .navbar {
        padding: 1rem;
    }

    .calculator-nav {
        width: 300px;
        right: -300px;
    }


    .submenu .nav-btn {
        padding: 10px 15px 10px 45px;
    }

    .submenu .nav-btn:hover {
        padding-left: 50px;
    }

}

@media (max-width: 576px) {

    /* Calculator header */
    .calculator-title {
        font-size: 1.4rem;
    }

    .calculator-subtitle {
        font-size: 0.9rem;
    }

    /* Form container */
    .form-container {
        padding: 1.2rem;
        margin: 1rem auto;
        border-radius: 12px;
    }

    /* Input groups */
    .input-group {
        margin-bottom: 1.5rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.8rem;
    }

    /* Percentage calculator cards */
    .percentage-calc-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .percentage-calc-card-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .percentage-input {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .input-suffix {
        font-size: 1rem;
    }

    /* Results */
    .percentage-result {
        padding: 1rem;
    }

    .result-text,
    .result-savings {
        font-size: 0.95rem;
    }

    .result-text strong {
        font-size: 1.1rem;
    }

    /* Button */
    #button {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    .calculator-title {
        font-size: 1.3rem;
    }

    .calculator-subtitle {
        font-size: 0.85rem;
    }

    .form-container {
        padding: 1rem;
    }

    .percentage-calc-card {
        padding: 0.8rem;
    }

    .percentage-calc-card-title {
        font-size: 1rem;
    }

    .percentage-input {
        padding: 0.7rem;
    }

    .input-suffix {
        font-size: 0.95rem;
    }

    #button {
        width: 100%;
        border-radius: 10px;
    }

    .calculator-nav {
        width: 280px;
        right: -280px;
        padding: 70px 15px 15px 15px;
    }
}

@media (max-width: 360px) {
    .calculator-title {
        font-size: 1.2rem;
    }

    .percentage-calc-inputs .input-group {
        gap: 0.3rem;
    }

    .percentage-input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .input-suffix {
        font-size: 0.9rem;
    }

    .calculator-nav {
        width: 280px;
        right: -280px;
        padding: 70px 15px 15px 15px;
    }
}


/* ===== GENERAL STYLES FOR INFO SECTIONS ===== */
.info-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 20px;
}

.form-container {
    background: #fff;
    padding: 20px;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    line-height: 1.3;
}

.section-text {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #444;
    font-size: 1rem;
}

.steps-list {
    padding-left: 1.5rem;
    line-height: 1.7;
    color: #444;
}

.steps-list li {
    margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.3rem;
    }

    .section-text {
        font-size: 0.95rem;
    }

    .form-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1rem;
        font-weight: 800;
    }

    .section-text,
    .steps-list {
        font-size: 0.9rem;
    }
}


/* ===== FOOTER STYLES ===== */
footer {
    background: linear-gradient(135deg, #4b6d91, #3c5774);
    color: #fff;
    text-align: center;
    padding: 40px 20px 20px;
    font-family: Arial, sans-serif;
}

#ppp {
    color: white;
}



.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Social Icons */
.footer-social {
    margin-bottom: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    text-decoration: none;
    height: 45px;
    margin: 0 8px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: #7777778f;
    color: #000;
}

/* Footer Links */
.footer-links {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #c4c1c1f0;
}

/* Tooltip from data-desc */
.footer-links a::after {
    content: attr(data-desc);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-links a:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    bottom: -35px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin-top: 20px;
    padding-top: 15px;
}

.footer-bottom p {
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

.footer-bottom span {
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        gap: 15px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-links a::after {
        display: none;
        /* hide tooltips on small screens */
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .popular-links a {
        color: #fff;
        font-size: 12px;
        text-decoration: none;
        transition: color 0.3s ease;
    }
}

/* Popular Links */
.popular-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-links a:hover {
    color: #c4c1c1f0;
    text-decoration: underline;
}
