* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    color: #333;
    max-width: 100%;
    margin: auto;
}


header {
    background: linear-gradient(to right, #aa1331, #8f0f33, #c98423);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: sticky;
    top: 20px;
    align-items: center;
    padding: 10px 10px;
    border-radius: 14px;
    color: white;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;

}



.header-container {
    max-width: 900px;
    margin: auto;

}

.logo {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
}

.tagline {
    font-size: 16px;
    color: #e3f2fd;
    margin-bottom: 30px;
    text-align: center;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #aa1331, #a7143e, #c98423);
    border-radius: 50px;
    padding: 8px 18px;
    width: 220px;
    box-shadow: inset 3px 3px 3px rgba(41, 40, 40, 0.5),
        inset -2px -2px 2px rgba(16, 97, 25, 0.7);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: white;
    flex-grow: 1;
}

.search-box input::placeholder {
    color: #e3f2fd;
}

.search-box button {
    background: transparent;
    border: none;
    color: #e3f2fd;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.2);
    color: #fff;
}


/* Search Results Dropdown - Themed */
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    /* Always just below the search box */
    left: 0;
    background: linear-gradient(to right, #aa1331, #8f0f33, #c98423);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 12;
    /* Ensures it stays above other elements */
    animation: fadeDown 0.2s ease-out;
}

/* Search Result Items */
.search-results a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    margin: 5px;
    color: #ffffff;
    font-size: 14px;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

/* Hover Effect - slight indent and brighter */
.search-results a:hover {
    background: rgba(250, 250, 250, 0.15);
    padding-left: 20px;
}

.search-results mark {
    background: none;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

/* Scrollbar styling */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Smooth dropdown animation */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 700px;
    margin: auto;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 15px;
    flex: 1;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar a {
    text-decoration: none;
    font-weight: bold;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Don't vertically center columns */
    gap: 20px;
    /* Space between calculator and sidebar */
}

.aside-content {
    width: 280px;
    margin: 0 auto;
    justify-content: left;
    position: sticky;
    top: 200px;
    background: linear-gradient(to right, #ff6a95, #ffb347);
   
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 8;
}

.related-content h3 {
    font-size: 18px;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.related-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

.related-content ul li {
    margin-bottom: 10px;
}

.related-content ul li a {
    text-decoration: none;
    color: white;
    font-size: 15px;
    display: inline-block;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.related-content ul li a:hover {
    color: #005bb5;
    padding-left: 5px;
}

/* -------Suggetion form for Desktop------ */

.idea-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.idea-popup-content {
    background: #fff;
    padding: 20px;
    max-width: 400px;
    margin: 300px auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: popupFade 0.3s ease-in-out;
}

.idea-popup-content h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.idea-popup-content input,
.idea-popup-content textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.idea-popup-content button {
    width: 100%;
    padding: 10px;
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.idea-popup-content button:hover {
    background: #005fcc;
}

.idea-close-btn {
    float: right;
    font-size: 22px;
    cursor: pointer;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.idea-trigger {
    background: #f4f8ff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #0077cc;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 30px;
}

.idea-trigger:hover {
    background: #e2efff;
}

.idea-trigger small {
    color: #555;
}

/* -------Suggetion form for mobile------ */
.suggestion-link {
    background: #f4f8ff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #0077cc;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 30px;
}

.suggestion-link:hover {
    background: #e2efff;
}

/* Popup Background */
#suggestion-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Popup Content */
.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    margin: 100px auto;
    position: relative;
}

/* Close Button */
.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
}

/* Form Styling */
.popup-content input,
.popup-content textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.popup-content button {
    background: #0077cc;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.popup-content button:hover {
    background: #005fa3;
}


/* -------- action button/ share and pdf-------- */


.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.action-buttons button {
    flex: 0 0 auto;
}

.acc-save-pdf-btn {
    all: unset;
    /* Reset all browser default styles */
    margin-top: 12px;
    background-color: white;
    color: #007bff;

    font-size: 16px;
    font-weight: 600;

    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.acc-save-pdf-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: scale(1.05);
    background-color: white;
    border: 2px solid #007bff;
    border-radius: 8px;
}

.acc-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.acc-share-btn {
    width: 42px;
    height: 42px;
    border: 2px solid #ccc;
    border-radius: 50%;
    font-size: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    background: white;
    color: #444;
}

.acc-share-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: scale(1.1);
}


/*----------Footer---------*/

footer {
    margin-top: 5%;
}

.container {
    max-width: 1170px;
    margin: auto;
    padding: 10px;

}

.row {
    display: flex;
    flex-wrap: wrap;
}

.footer-col h2 {
    font-size: 30px;
    color: #ffffff;
}

.footer-col p {
    color: #ffffff;
    text-align: center;
}

ul {
    list-style: none;
}

.footer {
    background-color: #24262b;
    padding: 70px 0;
}

.footer-col {
    width: 25%;
    padding: 0 15px;
}

.footer-col h4 {
    font-size: 18px;
    color: #ffffff;
    text-transform: capitalize;
    margin-bottom: 35px;
    font-weight: 500;
    position: relative;
}

.footer-col h4::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    background-color: #e91e63;
    height: 2px;
    box-sizing: border-box;
    width: 50px;
}

.footer-col ul li:not(:last-child) {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 16px;
    text-transform: capitalize;
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    color: #bbbbbb;
    display: block;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
    padding-left: 8px;
}

.footer-col .social-links a {
    display: inline-block;
    height: 40px;
    width: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 10px 10px 0;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.5s ease;
}

.footer-col .social-links a:hover {
    color: #24262b;
    background-color: #ffffff;
}

.footer-bottom {

    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #8b949e;
}

/*responsive*/
@media(max-width: 767px) {
    .footer-col {
        width: 50%;
        margin-bottom: 30px;
    }

    .footer {
        padding: 10%;
    }
}

@media(max-width: 574px) {
    .footer-col {
        width: 100%;
    }
}








/* -------- FIXED MOBILE FOOTER (Cross-Device) -------- */
.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 40px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

.footer-btn {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.footer-btn i {
    font-size: 18px;
    margin-bottom: 1px;
    color: #007BFF;
}

.footer-btn span {
    font-size: 16px;
}

.footer-btn:hover {
    background: #f0f4ff;
}

@media (min-width: 768px) {
    .mobile-footer {
        display: none;
    }
}



/* -------- TOOLS PANEL (TOGGLE) -------- */
.tools-panel {
    position: fixed;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    z-index: 1001;
}

.tools-panel a {
    text-decoration: none;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease;
}

.tools-panel a:hover {
    background: #e2e8f0;
    color: #007BFF;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

/*-------------- Sidebar Drawer-------------- */

/* Prevent body scroll when drawer is open */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.overlay {
    position: fixed;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility 0s .2s;
    z-index: 50;
    /* Below sidebar but above content */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .2s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: linear-gradient(to right, #ff6a95, #ffb347);
    padding-top: 60px;
    transition: 0.3s;
    z-index: 100;

}

.sidebar-suggetion {
    padding: 5px;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.sidebar.active {
    left: 0;
}

/* Responsive */
@media (max-width: 768px) {

    .nav-left,
    .nav-right,
    .aside-content {
        display: none;
    }

    .menu-toggle {
        display: block;
        color: white;

    }

    .navbar {
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    .tools-panel {
        display: none !important;
    }


}

/* -------- MOBILE FIX -------- */
@media (max-width: 600px) {
    body {
        padding: 20px 12px;
    }

    h1,
    h2 {
        font-size: 22px;
    }

    input,
    button {
        font-size: 16px;
    }

    p#result {
        font-size: 16px;
    }

    footer {
        font-size: 12px;
    }
}