/*
Theme Name: CalculatorRank Theme
Theme URI: https://calculatorrank.com
Author: CalculatorRank
Description: A modern, minimal, highly performant custom theme for CalculatorRank.com
Version: 1.0.0
Text Domain: calculatorrank
*/

/* ==========================================================================
   1. Redesigned Premium Header & Mobile Menu
   ========================================================================== */
.nav-outer {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease;
}
@media (max-width: 768px) {
    .nav-outer {
        position: static !important;
    }
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 24px;
}
.brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.brand-container:hover {
    transform: scale(1.02);
}
.custom-header-logo {
    max-height: 40px;
    width: auto;
    display: block;
}
.header-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-menu li {
    position: relative;
}
.header-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    list-style: none;
    margin: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
.header-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.header-menu .sub-menu li {
    width: 100%;
}
.header-menu .sub-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}
.header-menu .sub-menu a:hover {
    background: #f8fafc;
    color: #10b981;
}
.header-menu .sub-menu a::after {
    display: none !important;
}
.header-menu a,
.header-menu-link {
    font-size: 14.5px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    position: relative;
    padding: 6px 0;
    transition: color 0.25s ease;
}
.header-menu a:hover,
.header-menu-link:hover {
    color: #0f172a;
}
.header-menu a::after,
.header-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #10b981;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}
.header-menu a:hover::after,
.header-menu-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.header-cta-btn {
    background: #1e2937;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: 1px solid #1e2937;
}
.header-cta-btn:hover {
    background: #84cc16;
    border-color: #84cc16;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.2);
}

/* Mobile Hamburger Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #0f172a;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: -400px !important;
    width: 100% !important;
    max-width: 380px !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 99999 !important;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    border-left: 1px solid #f1f5f9;
    padding: 24px;
    box-sizing: border-box !important;
    transform: none !important;
}
.mobile-menu.active {
    right: 0 !important;
}
.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
    width: 100%;
}
.mobile-menu-close {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.mobile-menu-close:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: rotate(90deg);
}
.mobile-menu-search {
    margin-bottom: 24px;
    position: relative;
    width: 100%;
}
.mobile-menu-search form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.mobile-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.mobile-search-submit-btn {
    background: #10b981;
    color: #ffffff;
    border: none !important;
    padding: 8px 18px !important;
    border-radius: 9999px !important;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.mobile-search-submit-btn:hover {
    background: #059669;
}
.mobile-search-box:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.mobile-search-icon {
    color: #94a3b8;
    margin-right: 8px;
    display: flex;
    align-items: center;
}
.mobile-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    padding: 8px 0 !important;
    min-width: 0;
}
.mobile-menu-links-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 24px;
}
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-menu-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}
.mobile-menu-list li a::after {
    content: '→';
    font-size: 14px;
    opacity: 0.3;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.mobile-menu-list li a:hover {
    color: #10b981;
    padding-left: 12px;
}
.mobile-menu-list li a:hover::after {
    opacity: 1;
    transform: translateX(3px);
    color: #10b981;
}
.mobile-menu-list .sub-menu {
    list-style: none;
    padding-left: 16px;
    margin: 4px 0 12px 0;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mobile-menu-list .sub-menu li a {
    background: transparent;
    padding: 8px 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0;
    border: none;
    border-bottom: none;
}
.mobile-menu-list .sub-menu li a::after {
    display: none;
}
.mobile-menu-list .sub-menu li a:hover {
    color: #10b981;
    background: transparent;
    padding-left: 16px;
}
.mobile-menu-actions {
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    width: 100%;
}
.mobile-theme-toggle-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s ease;
    font-family: inherit;
}
.mobile-theme-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.mobile-signin-btn {
    background: #10b981;
    color: #ffffff;
    border-radius: 30px;
    padding: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    display: block;
    transition: all 0.2s ease;
}
.mobile-signin-btn:hover {
    background: #059669;
}
@media (max-width: 480px) {
    .mobile-menu {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .header-menu, .nav-actions {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   2. Hero Section & Scientific Calculator Widget
   ========================================================================== */
.homepage-hero-wrap {
    background: #ffffff;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.calc-hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    padding: 20px 0;
}

/* On tablets and mobile: stack left panel first, calculator below */
@media (max-width: 992px) {
    .calc-hero-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px;
        padding: 15px 0;
        text-align: center;
    }
    .left-hero-panel {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        order: 1; /* Hero text comes first */
    }
    .right-hero-panel {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        order: 2; /* Calculator comes second (below) */
    }
    .hero-search-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    .hero-title {
        font-size: 38px !important;
    }
    .hero-trust-badges {
        justify-content: center !important;
    }
    .rating-row {
        justify-content: center !important;
    }
    .sci-calc-card {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .calc-hero-layout {
        gap: 24px;
    }
    .hero-title {
        font-size: 30px !important;
        line-height: 1.2 !important;
    }
    .homepage-hero-wrap {
        padding: 40px 0 !important;
    }
}
@media (max-width: 768px) {
    .wrap {
        padding: 0 20px !important;
    }
}
@media (max-width: 600px) {
    .hero-title {
        font-size: 30px;
    }
    .hero-subtitle {
        font-size: 14.5px;
    }
}
.right-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.hero-title {
    font-size: 40px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1px;
    margin: 0 0 14px 0;
    line-height: 1.15;
}
.hero-title span {
    color: #2563eb;
}
.hero-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 24px 0;
    line-height: 1.5;
}
.hero-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
}
.hero-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    padding: 6px 6px 6px 18px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search-box:focus-within {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
}
.hero-search-icon {
    color: #94a3b8;
    margin-right: 10px;
    display: flex;
    align-items: center;
}
.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #0f172a;
    font-family: inherit;
    background: transparent;
}
.hero-search-input::placeholder {
    color: #94a3b8;
}
.hero-search-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.hero-search-btn:hover {
    background: #1d4ed8;
}
.search-suggestions {
    width: 100%;
    top: 100%;
    left: 0;
    position: absolute;
    background: #fff;
    z-index: 100;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 8px;
    display: none;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
}
.suggestion-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.15s;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: #f8fafc;
}
.suggestion-item strong {
    color: #0f172a;
    font-size: 14px;
}
.suggestion-item span {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}
.rating-row {
    margin-top: 24px;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rating-row .stars {
    color: #eab308;
    font-size: 16px;
}

/* Scientific Calculator Panel (Mockup Alignment) */
.sci-calc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.sci-calc-screen {
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 36px;
    font-weight: 800;
    text-align: right;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 80px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
    word-wrap: break-word;
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.sci-calc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}
.sci-calc-tab {
    flex: 1;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}
.sci-calc-tab:hover {
    color: #0f172a;
}
.sci-calc-tab.active {
    color: #10b981;
}
.sci-calc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #10b981;
    border-radius: 99px;
}
.sci-calc-grid {
    display: none;
}
.sci-calc-grid.active-layout {
    display: grid !important;
}
.sci-calc-grid.basic-layout {
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.sci-calc-grid.scientific-layout {
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}
.sci-calc-grid.programmer-layout {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.sci-calc-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 2px;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sci-calc-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.sci-calc-btn:active {
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
.sci-calc-btn.num-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
    font-size: 14px;
}
.sci-calc-btn.num-btn:hover {
    background: #cbd5e1;
}
.sci-calc-btn.op-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
.sci-calc-btn.op-btn:hover {
    background: #cbd5e1;
}
.sci-calc-btn.action-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}
.sci-calc-btn.action-btn:hover {
    background: #cbd5e1;
}
.sci-calc-btn.action-btn.clear-btn {
    background: #fee2e2;
    border-color: #fee2e2;
    color: #ef4444;
}
.sci-calc-btn.action-btn.clear-btn:hover {
    background: #fca5a5;
}
.sci-calc-btn.equal-btn {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    font-size: 16px;
}
.sci-calc-btn.equal-btn:hover {
    background: #059669;
    border-color: #059669;
}
.sci-calc-btn.mode-toggle-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
    font-size: 11px;
}
.sci-calc-btn.mode-toggle-btn.active-mode {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #16a34a;
}
.sci-calc-mode-row {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}
.deg-rad-pill {
    display: flex;
    align-items: center;
    width: 100%;
    background: #e2e8f0;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}
.deg-rad-option {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding: 4px 2px;
    border-radius: 4px;
    transition: all 0.15s ease;
    cursor: pointer;
    line-height: 1;
}
.deg-rad-option.active-pill {
    background: #ffffff;
    color: #10b981;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}


/* Homepage category section grid */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 992px) {
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .category-cards-grid {
        grid-template-columns: 1fr;
    }
}
.cat-card-item {
    display: block;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cat-card-item:hover {
    transform: translateY(-4px);
}
.cat-card-item.finance-card {
    background: #f0fdf4;
    border: 1.5px solid #dcfce7;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.02);
}
.cat-card-item.finance-card:hover {
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.08);
}
.cat-card-item.health-card {
    background: #fff5f5;
    border: 1.5px solid #ffe3e3;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.02);
}
.cat-card-item.health-card:hover {
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.08);
}
.cat-card-item.math-card {
    background: #eff6ff;
    border: 1.5px solid #dbeafe;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.02);
}
.cat-card-item.math-card:hover {
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}
.cat-card-item.other-card {
    background: #faf5ff;
    border: 1.5px solid #f3e8ff;
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.02);
}
.cat-card-item.other-card:hover {
    box-shadow: 0 12px 30px rgba(147, 51, 234, 0.08);
}

.cat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}
.cat-card-icon.finance { background: #10b981; }
.cat-card-icon.health { background: #ef4444; }
.cat-card-icon.math { background: #2563eb; }
.cat-card-icon.other { background: #9333ea; }

.cat-card-item h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.cat-card-item p {
    font-size: 13.5px;
    color: #475569;
    margin: 0 0 20px;
    line-height: 1.5;
    min-height: 40px;
}

.cat-card-count {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
}
.cat-card-count.finance { color: #059669; }
.cat-card-count.health { color: #dc2626; }
.cat-card-count.math { color: #2563eb; }
.cat-card-count.other { color: #7e22ce; }

.cat-card-explore {
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cat-card-explore.finance { color: #059669; }
.cat-card-explore.health { color: #dc2626; }
.cat-card-explore.math { color: #2563eb; }
.cat-card-explore.other { color: #7e22ce; }

/* Popular section styles */
.popular-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
@media (max-width: 992px) {
    .popular-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .popular-list-grid {
        grid-template-columns: 1fr;
    }
}
.popular-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.popular-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 24px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 14.5px;
    transition: all 0.15s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
}
.popular-item:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.05);
}
.popular-item span {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.popular-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 14px 36px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 15px;
    text-decoration: none;
    gap: 8px;
}
.popular-view-all-btn:hover {
    background: #059669;
}

/* Suggestion banner styling */
.suggestion-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1.5px solid #dcfce7;
    border-radius: 16px;
    padding: 32px 40px;
    gap: 24px;
    flex-wrap: wrap;
}
.suggestion-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 280px;
}
.suggestion-icon {
    width: 54px;
    height: 54px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.suggestion-left h3 {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.suggestion-left p {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}
.suggest-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid #16a34a;
    color: #16a34a;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.suggest-btn:hover {
    background: #16a34a;
    color: #ffffff;
}

/* Footer layout rules */
.app-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 80px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links-list li {
    margin-bottom: 12px;
}
.footer-links-list a {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}
.footer-links-list a:hover {
    color: #10b981;
}
@media (max-width: 768px) {
    .sci-calc-card {
        padding: 16px;
    }
    .sci-calc-screen {
        font-size: 26px;
        padding: 16px;
        min-height: 60px;
    }
    .sci-calc-grid.scientific-layout {
        grid-template-columns: repeat(10, 1fr);
        gap: 4px;
    }
    .sci-calc-grid.scientific-layout .sci-calc-btn {
        font-size: 11px;
        padding: 10px 1px;
        border-radius: 6px;
    }
    .sci-calc-grid.basic-layout {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }
    .sci-calc-grid.basic-layout .sci-calc-btn {
        font-size: 12px;
        padding: 12px 2px;
        border-radius: 6px;
    }
    .sci-calc-grid.programmer-layout {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .sci-calc-grid.programmer-layout .sci-calc-btn {
        font-size: 12px;
        padding: 12px 2px;
        border-radius: 6px;
    }
}

@media (max-width: 576px) {
    .sci-calc-card {
        padding: 12px;
        border-radius: 12px;
    }
    .sci-calc-screen {
        font-size: 22px;
        padding: 12px;
        min-height: 50px;
        margin-bottom: 12px;
    }
    .sci-calc-tabs {
        margin-bottom: 16px;
        gap: 4px;
    }
    .sci-calc-tab {
        font-size: 12.5px;
        padding: 6px 0;
    }
    .sci-calc-grid.scientific-layout {
        gap: 3px;
    }
    .sci-calc-grid.scientific-layout .sci-calc-btn {
        font-size: 9.5px;
        padding: 8px 1px;
        border-radius: 4px;
    }
    .sci-calc-grid.basic-layout {
        gap: 4px;
    }
    .sci-calc-grid.basic-layout .sci-calc-btn {
        font-size: 10px;
        padding: 10px 1px;
        border-radius: 4px;
    }
    .sci-calc-grid.programmer-layout {
        gap: 4px;
    }
    .sci-calc-grid.programmer-layout .sci-calc-btn {
        font-size: 10px;
        padding: 10px 1px;
        border-radius: 4px;
    }
    .sci-calc-mode-row {
        font-size: 8px;
        gap: 3px;
        padding: 0;
    }
    
    /* Centered footer layout for mobile devices */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 32px;
    }
    .footer-brand-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand-col .footer-desc {
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    /* Suggestion CTA responsive styling */
    .suggestion-cta-banner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 24px 20px !important;
    }
    .suggestion-left {
        flex-direction: column !important;
        text-align: center !important;
        min-width: 100% !important;
    }
    .suggest-btn {
        width: 100% !important;
        text-align: center !important;
    }
}

@media (max-width: 400px) {
    .sci-calc-grid.scientific-layout {
        gap: 2px;
    }
    .sci-calc-grid.scientific-layout .sci-calc-btn {
        font-size: 8px;
        padding: 6px 0;
        border-radius: 3px;
    }
    .sci-calc-grid.basic-layout {
        gap: 2px;
    }
    .sci-calc-grid.basic-layout .sci-calc-btn {
        font-size: 9px;
        padding: 8px 0;
        border-radius: 3px;
    }
    .sci-calc-grid.programmer-layout {
        gap: 2px;
    }
    .sci-calc-grid.programmer-layout .sci-calc-btn {
        font-size: 9px;
        padding: 8px 0;
        border-radius: 3px;
    }
}


/* End of style.css */
