
    /* ===== GLOBAL RESET & BASE STYLES ===== */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Your existing scrollbar, root variables, body styles remain the same */
    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;
        border: 2px solid transparent;
    }

    html::-webkit-scrollbar-thumb:hover {
        background: #2e4663;
    }

    html {
        scroll-behavior: smooth;
    }

    :root {
        --primary-color: #3a7bd5;
        --secondary-color: #00d2ff;
        --accent-color: #ff6b6b;
        --success-color: #4CAF50;
        --warning-color: #ff9f43;
        --dark-color: #2c3e50;
        --light-color: #f8f9fa;
        --text-color: #2d3436;
        --text-light: #ffffff;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        --gradient-primary: linear-gradient(135deg, #4b6d91, #3c5774);
        --gradient-secondary: linear-gradient(135deg, #82bcfa, #426589);
        --glass-bg: rgba(255, 255, 255, 0.518);
        --highlight: #4361ee;
        --highlight-gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
    }



    body {
        font-family: 'Montserrat';
        background: linear-gradient(to bottom right, #F8F9FA, #E1F5C4);
        min-height: 100vh;
        margin: 0;
        color: var(--text-color);
        display: flex;
        flex-direction: column;
        line-height: 1.6;
        overflow-x: hidden;
    }


    .animated-bg {
        background:
            radial-gradient(circle at 20% 80%, rgba(91, 135, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(120, 119, 198, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
            linear-gradient(to bottom right, #F8F9FA, #E1F5C4);
        background-size: 600px 600px, 500px 500px, 400px 400px, 100% 100%;
        animation: moveBackground 40s ease-in-out infinite;
    }

    @keyframes moveBackground {
        0% {
            background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
        }

        25% {
            background-position: 25% 75%, 75% 25%, 60% 40%, 0% 0%;
        }

        50% {
            background-position: 100% 100%, 0% 0%, 80% 20%, 0% 0%;
        }

        75% {
            background-position: 75% 25%, 25% 75%, 40% 60%, 0% 0%;
        }

        100% {
            background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
        }
    }

    hr {
        border: 0;
        height: 1px;
        background: linear-gradient(to right, transparent, var(--highlight), transparent);
        margin: 20px auto;
        width: 80%;
    }

    .hero-title::after {
        content: "";
        display: block;
        width: clamp(50px, 10vw, 100px);
        height: 4px;
        background: #1e3a8a;
        margin: 0.7rem auto 0;
        border-radius: 2px;
        animation: growLine 1.2s ease-out;
    }

    /* ===== HEADER STYLES ===== */
    header {
        text-align: center;
        padding: 2rem 1rem;
        background: var(--gradient-secondary);
        color: var(--text-light);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        box-shadow: var(--shadow);
        position: relative;
        overflow: hidden;
    }

    header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,128L48,117.3C96,107,192,85,288,112C384,139,480,213,576,218.7C672,224,768,160,864,138.7C960,117,1056,139,1152,149.3C1248,160,1344,160,1392,160L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
        background-size: cover;
        background-position: center;
        animation: wave 20s linear infinite;
    }

    @keyframes wave {
        0% {
            background-position-x: 0;
        }

        100% {
            background-position-x: 1440px;
        }
    }

    .header-content {

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        position: relative;
    }

    .logo {
        height: 120px;
        width: auto;
        max-width: 400px;
        object-fit: contain;
        filter: drop-shadow(2px 2px 8px rgba(229, 229, 229, 0.3));
        transition: transform 0.5s ease, filter 0.3s ease;
        cursor: pointer;
        animation: pulse s infinite ease-in-out;
    }

    @keyframes pulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }
    }

    .logo:hover {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(2px 2px 12px rgba(0, 0, 0, 0.4));
        animation: none;
    }

    /* ===== ENHANCED HERO SECTION ===== */
    .modern-hero {

        padding: 7rem 1rem;
        text-align: center;
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #f8f9fa6d, #e1f5c465);

    }

    .hero-bg-shapes {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 1;
    }

    .hero-bg-shapes div {
        position: absolute;
        display: block;
        list-style: none;
        width: 20px;
        height: 20px;
        background: rgba(20, 40, 68, 0.203);
        /* soft, light floating shapes */
        animation: animate 25s linear infinite;
        bottom: -150px;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
        /* gentle glow */
        border-radius: 50%;
    }

    .hero-bg-shapes div:nth-child(1) {
        left: 25%;
        width: 80px;
        height: 80px;
        animation-delay: 0s;
    }

    .hero-bg-shapes div:nth-child(2) {
        left: 10%;
        width: 20px;
        height: 20px;
        animation-delay: 2s;
        animation-duration: 12s;
    }

    .hero-bg-shapes div:nth-child(3) {
        left: 70%;
        width: 20px;
        height: 20px;
        animation-delay: 4s;
    }

    .hero-bg-shapes div:nth-child(4) {
        left: 40%;
        width: 60px;
        height: 60px;
        animation-delay: 0s;
        animation-duration: 18s;
    }

    .hero-bg-shapes div:nth-child(5) {
        left: 65%;
        width: 20px;
        height: 20px;
        animation-delay: 0s;
    }

    .hero-bg-shapes div:nth-child(6) {
        left: 75%;
        width: 110px;
        height: 110px;
        animation-delay: 3s;
    }

    .hero-bg-shapes div:nth-child(7) {
        left: 35%;
        width: 150px;
        height: 150px;
        animation-delay: 7s;
    }

    .hero-bg-shapes div:nth-child(8) {
        left: 50%;
        width: 25px;
        height: 25px;
        animation-delay: 15s;
        animation-duration: 45s;
    }

    .hero-bg-shapes div:nth-child(9) {
        left: 20%;
        width: 15px;
        height: 15px;
        animation-delay: 2s;
        animation-duration: 35s;
    }

    .hero-bg-shapes div:nth-child(10) {
        left: 85%;
        width: 150px;
        height: 150px;
        animation-delay: 0s;
        animation-duration: 11s;
    }

    @keyframes animate {
        0% {
            transform: translateY(0) rotate(0deg);
            opacity: 1;
            border-radius: 0;
        }

        100% {
            transform: translateY(-1000px) rotate(720deg);
            opacity: 0;
            border-radius: 50%;
        }
    }

    .hero-content {
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }

    .hero-title {
        font-size: clamp(2rem, 3.8vw, 4rem);
        font-weight: 500;
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 1.5rem;
        line-height: 1.2;
        animation: fadeInDown 1s ease-out;
    }

    .hero-subtitle {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
        color: var(--dark-color);
        margin-bottom: 2.5rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
        animation: fadeInUp 1s ease-out 0.2s both;
    }

    .hero-stats {
        display: flex;
        justify-content: center;
        gap: 3rem;
        margin: 3rem 0;
        flex-wrap: wrap;
        animation: fadeInUp 1s ease-out 0.4s both;
    }

    .stat-item {
        text-align: center;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.626);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        box-shadow: var(--shadow);
        transition: var(--transition);
        min-width: 150px;
        position: relative;
        overflow: hidden;
    }

    .stat-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.5s;
    }

    .stat-item:hover::before {
        left: 100%;
    }

    .stat-item:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .stat-number {
        font-size: 2.5rem;
        font-weight: 800;
        color: var(--primary-color);
        display: block;
        line-height: 1;
    }

    .stat-label {
        font-size: 1rem;
        color: var(--dark-color);
        font-weight: 600;
        margin-top: 0.5rem;
    }

    .hero-buttons {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
        animation: fadeInUp 1s ease-out 0.6s both;
    }

    .hero-btn {
        padding: 1rem 2.5rem;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1.1rem;
        text-decoration: none;
        transition: var(--transition);
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        overflow: hidden;
    }

    .hero-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .hero-btn:hover::before {
        left: 100%;
    }

    .btn-primary {
        background: var(--gradient-primary);
        color: white;
        box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(58, 123, 213, 0.4);
    }

    .btn-secondary {
        background: var(--glass-bg);
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
        backdrop-filter: blur(10px);
    }

    .btn-secondary:hover {
        background: var(--gradient-primary);
        color: white;
        transform: translateY(-3px);
    }

    /* Floating Calculator Icons */
    .floating-calc {
        position: absolute;
        width: 60px;
        height: 60px;
        background: rgb(255, 255, 255);
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        animation: float 2s ease-in-out infinite;
        font-size: 1.5rem;
        color: var(--primary-color);
        z-index: 1;
        transition: all 0.3s ease;
    }

    .floating-calc:hover {
        transform: scale(1.2);
        box-shadow: 0 12px 30px rgb(0, 0, 0);
    }

    .floating-calc:nth-child(1) {
        top: 20%;
        left: 10%;
        animation-delay: 0s;
    }

    .floating-calc:nth-child(2) {
        top: 60%;
        left: 5%;
        animation-delay: 1s;
    }

    .floating-calc:nth-child(3) {
        top: 30%;
        right: 10%;
        animation-delay: 2s;
    }

    .floating-calc:nth-child(4) {
        top: 70%;
        right: 8%;
        animation-delay: 3s;
    }

    @keyframes float {

        0%,
        100% {
            transform: translateY(0) rotate(0deg);
        }

        50% {
            transform: translateY(-20px) rotate(5deg);
        }
    }


    /* ===== FEATURED CALCULATORS SECTION ===== */
    .featured-calculators {
        padding: 5rem 1rem;
        background-image: url(../bg/grid.png);

    }

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

    .section-title {
        text-align: center;
        margin-bottom: 3rem;
    }

    .section-title h2 {
        font-size: clamp(2rem, 4vw, 3rem);
        color: var(--dark-color);
        margin-bottom: 1rem;
        font-weight: 500;
    }

    .section-title p {
        font-size: 1.2rem;
        color: #666;
        max-width: 600px;
        margin: 0 auto;
    }

    .section-title h2::after {
        content: "";
        display: block;
        width: clamp(50px, 10vw, 100px);
        height: 4px;
        background: #1e3a8a;
        margin: 0.7rem auto 0;
        border-radius: 2px;
        animation: growLine 1.2s ease-out;
    }

    .calculator-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .calc-card {
        background: var(--glass-bg);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        cursor: pointer;
        border: 1px solid rgba(0, 0, 0, 0.05);
        position: relative;
        overflow: hidden;
        transform: scale(1);
    }

    .calc-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transform: translateX(-100%);
        transition: transform 0.6s;
    }

    .calc-card:hover::before {
        transform: translateX(100%);
    }

    .calc-card:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .calc-icon {
        height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        color: white;
        background: var(--gradient-primary);
        position: relative;
        overflow: hidden;
        transition: all 0.4s ease;
    }

    .calc-card:hover .calc-icon {
        background: linear-gradient(135deg, #5a7fbb, #4b6d91);
        transform: scale(1.1);
    }

    .calc-icon i {
        transition: transform 0.4s ease;
    }

    .calc-card:hover .calc-icon i {
        transform: scale(1.2);
    }

    .calc-content {
        padding: 1rem 1rem 1rem 1rem;
        transition: transform 0.4s ease;
    }

    .calc-card:hover .calc-content {
        transform: translateY(-5px);
    }

    .calc-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: var(--dark-color);
        font-weight: 700;
        transition: color 0.3s ease;
    }

    .calc-card:hover .calc-content h3 {
        color: black;
    }

    .calc-content p {
        color: black;
        margin-bottom: 1rem;
        line-height: 1.2;
        transition: color 0.3s ease;
    }

    .calc-card:hover .calc-content p {
        color: black;
    }

    .usage-stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.9rem;
        color: #888;
        transition: all 0.3s ease;
    }

    .calc-card:hover .usage-stats {
        transform: translateY(3px);
    }

    .usage-count {
        color: var(--primary-color);
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .calc-card:hover .usage-count {
        color: black;
        transform: scale(1.1);
    }

    /* Mobile optimization */
    @media (max-width: 768px) {
        .calc-card:hover {
            transform: translateY(-3px) scale(1.03);
        }

        .calc-card:hover .calc-icon {
            transform: scale(1.05);
        }
    }

    /* ===== CATEGORIES OVERVIEW SECTION ===== */
    .categories-overview {
        padding: 5rem 1rem;
        background-image: url(../bg/grid.png);
    }

    .categories-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 2rem;
    }

    .category-card {
        background: var(--glass-bg);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: var(--shadow);
        transition: var(--transition);
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }

    .category-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transform: translateX(-100%);
        transition: transform 0.6s;
    }

    .category-card:hover::before {
        transform: translateX(100%);
    }

    .category-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

    .category-header {
        padding: 1.5rem;
        background: var(--gradient-primary);
        color: white;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .category-header i {
        font-size: 1.8rem;
    }

    .category-header h3 {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
    }

    .category-content {
        padding: 1.5rem;
    }

    .subcategories {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .subcategory {
        background: rgba(58, 123, 213, 0.1);
        color: var(--primary-color);
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: var(--transition);
        text-decoration: none;
    }

    .subcategory:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

    /* ===== FEATURES SECTION ===== */
    .features-section {
        padding: 5rem 1rem;
        background-image: url(../bg/grid.png);
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }

    .feature-card {
        text-align: center;
        padding: 2rem 1.5rem;
        background: var(--glass-bg);
        border-radius: 20px;
        box-shadow: var(--shadow);
        transition: var(--transition);
        position: relative;
        overflow: hidden;
    }

    .feature-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transform: translateX(-100%);
        transition: transform 0.6s;
    }

    .feature-card:hover::before {
        transform: translateX(100%);
    }

    .feature-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

    .feature-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
        background: var(--gradient-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 2rem;
        transition: var(--transition);
    }

    .feature-card:hover .feature-icon {
        transform: rotate(15deg) scale(1.1);
    }

    .feature-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        color: var(--dark-color);
        font-weight: 700;
    }

    .feature-card p {
        color: #666;
        line-height: 1.6;
    }

    /* ===== FOOTER STYLES ===== */
    a {
        color: white;
        text-decoration: none;
    }

    a:hover {
        color: #c4c1c1f0;
    }

    footer {
        background: var(--gradient-primary);
        color: #fff;
        text-align: center;
        padding: 40px 20px 20px;
        font-family: Arial, sans-serif;
    }

    .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;
    }

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

    /* ===== ANIMATIONS ===== */
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Animation delays for staggered appearance */
    .calc-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .calc-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .calc-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .calc-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .calc-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .calc-card:nth-child(6) {
        animation-delay: 0.6s;
    }

    /* ===== ENHANCED RESPONSIVE DESIGN ===== */

    /* Large Desktop Screens (1400px and above) */
    @media (min-width: 1400px) {
        .section-container {
            max-width: 1320px;
        }

        .calculator-grid {
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 2.5rem;
        }
    }

    /* Standard Desktop (1200px - 1399px) */
    @media (min-width: 1200px) and (max-width: 1399px) {
        .section-container {
            max-width: 1140px;
        }
    }

    /* Tablet Landscape (992px - 1199px) */
    @media (min-width: 992px) and (max-width: 1199px) {
        .section-container {
            max-width: 960px;
            padding: 0 1.5rem;
        }

        .calculator-grid {
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
        }

        .hero-stats {
            gap: 2rem;
        }

        .stat-item {
            min-width: 140px;
            padding: 1.2rem;
        }

        /* Fix zig-zag layout for tablet */
        .calc-card:nth-child(odd) {
            margin-top: 60px;
            margin-bottom: 6rem;
        }
    }

    /* Tablet Portrait (768px - 991px) */
    @media (min-width: 768px) and (max-width: 991px) {
        .section-container {
            max-width: 720px;
            padding: 0 1rem;
        }

        .modern-hero {
            padding: 5rem 1rem;
        }

        .hero-stats {
            gap: 1.5rem;
        }

        .stat-item {
            min-width: 130px;
            padding: 1rem;
        }

        .stat-number {
            font-size: 2.2rem;
        }

        .calculator-grid {
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.5rem;
        }

        /* Reduce zig-zag effect for smaller tablets */
        .calc-card:nth-child(odd) {
            margin-top: 30px;
            margin-bottom: 3rem;
        }

        .categories-grid,
        .features-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }

        .floating-calc {
            width: 50px;
            height: 50px;
            font-size: 1.2rem;
        }
         .footer-links a::after {
        display: none !important;
        content: none !important;
    }

    }

    /* Mobile Landscape (576px - 767px) */
    @media (min-width: 576px) and (max-width: 767px) {
        .section-container {
            max-width: 540px;
            padding: 0 1rem;
        }

        .modern-hero {
            padding: 4rem 1rem;
        }

        .hero-stats {
            gap: 1rem;
            flex-wrap: wrap;
        }

        .stat-item {
            min-width: calc(50% - 2rem);
            margin-bottom: 1rem;
        }

        .hero-buttons {
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .hero-btn {
            width: 100%;
            max-width: 280px;
            justify-content: center;
        }

        .calculator-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        /* Remove zig-zag effect on mobile */
        .calc-card:nth-child(odd) {
            margin-top: 0;
            margin-bottom: 0;
        }

        .categories-grid,
        .features-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        .floating-calc {
            display: none;
            /* Hide floating calculators on mobile */
        }

        .featured-calculators,
        .categories-overview,
        .features-section {
            padding: 3rem 1rem;
        }
         .footer-links a::after {
        display: none !important;
        content: none !important;
    }
    }

    /* Mobile Portrait (480px - 575px) */
    @media (min-width: 480px) and (max-width: 575px) {
        .section-container {
            padding: 0 1rem;
        }

        .modern-hero {
            padding: 3rem 1rem;
        }

        .hero-title {
            font-size: 2.2rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
            margin-bottom: 2rem;
        }

        .hero-stats {
            gap: 0.8rem;
        }

        .stat-item {
            min-width: calc(50% - 1rem);
            padding: 0.8rem;
        }

        .stat-number {
            font-size: 1.8rem;
        }

        .stat-label {
            font-size: 0.9rem;
        }

        .section-title h2 {
            font-size: 2rem;
        }

        .section-title p {
            font-size: 1rem;
        }

        .logo {
            height: 70px;
            max-width: 300px;
        }

        .footer-social a {
            width: 40px;
            height: 40px;
            margin: 0 6px;
        }

        .footer-links {
            gap: 12px;
        }

        .section-title h2 {
            font-size: clamp(1.7rem, 4vw, 3rem);
            color: var(--dark-color);
            margin-bottom: 1rem;
            font-weight: 500;
        }
         .footer-links a::after {
        display: none !important;
        content: none !important;
    }
    }

    /* Small Mobile (320px - 479px) */
    @media (max-width: 479px) {
        .section-container {
            padding: 0 0.5rem;
        }

        .modern-hero {
            padding: 2.5rem 0.5rem;
        }

        .hero-title {
            font-size: 1.8rem;
        }

        .hero-subtitle {
            font-size: 1rem;
            margin-bottom: 1.5rem;
        }

        .hero-stats {
            flex-direction: column;
            align-items: center;
            gap: 0.8rem;
        }

        .stat-item {
            width: 100%;
            max-width: 200px;
            padding: 1rem;
        }

        .hero-buttons {
            gap: 0.8rem;
        }

        .hero-btn {
            padding: 0.8rem 1.5rem;
            font-size: 1rem;
        }

        .calculator-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .calc-card {
            padding: 1rem;
        }

        .calc-icon {
            height: 80px;
            font-size: 2rem;
        }

        .categories-grid,
        .features-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .category-header,
        .feature-card {
            padding: 1rem;
        }

        .feature-icon {
            width: 60px;
            height: 60px;
            font-size: 1.5rem;
        }

        .footer-container {
            padding: 0 0.5rem;
        }

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

        .footer-links {
            flex-direction: column;
            gap: 8px;
        }

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

        .logo {
            height: 60px;
            max-width: 250px;
        }

        .section-title h2 {
            font-size: clamp(1.7rem, 4vw, 3rem);
            color: var(--dark-color);
            margin-bottom: 1rem;
            font-weight: 500;
        }
         .footer-links a::after {
        display: none !important;
        content: none !important;
    }
    }

    /* Ultra-small screens (below 320px) */
    @media (max-width: 319px) {
        body {
            min-width: 280px;
        }

        .section-container {
            padding: 0 0.25rem;
        }

        .modern-hero {
            padding: 2rem 0.25rem;
        }

        .hero-title {
            font-size: 1.6rem;
        }

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

        .stat-item {
            padding: 0.8rem 0.5rem;
        }

        .stat-number {
            font-size: 1.6rem;
        }

        .hero-btn {
            padding: 0.7rem 1rem;
            font-size: 0.9rem;
        }

        .calc-card {
            padding: 0.8rem;
        }
         .footer-links a::after {
        display: none !important;
        content: none !important;
    }
    }

    /* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
    @media (hover: none) and (pointer: coarse) {

        /* Reduce hover effects for touch devices */
        .calc-card:hover,
        .category-card:hover,
        .feature-card:hover {
            transform: none;
        }

        .stat-item:hover,
        .hero-btn:hover {
            transform: none;
        }

        /* Keep minimal feedback for touch */
        .calc-card:active,
        .category-card:active,
        .feature-card:active {
            transform: scale(0.98);
        }

        .hero-btn:active {
            transform: scale(0.98);
        }
    }

    /* ===== HIGH DPI SCREENS ===== */
    @media (-webkit-min-device-pixel-ratio: 2),
    (min-resolution: 192dpi) {
        .logo {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
    }

    /* ===== PRINT STYLES ===== */
    @media print {

        .floating-calc,
        .hero-bg-shapes,
        .footer-social,
        .hero-buttons {
            display: none !important;
        }

        body {
            background: white !important;
            color: black !important;
        }

        .modern-hero {
            padding: 2rem 0 !important;
        }
    }

    /* ===== Tooltip Only (Safe for Design) ===== */
    .tooltip {
        position: absolute;
        bottom: 100%;
        /* appear above the card */
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        background: rgba(0, 0, 0, 0.85);
        color: #fff;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        z-index: 9999;
    }

    /* Show on hover */
    .category-card:hover .tooltip {
        opacity: 1;
        transform: translateX(-50%) translateY(-12px);
    }

    /* Ensure it layers correctly but doesn’t break design */
    .category-card {
        position: relative;
        z-index: 0;
    }

    .calculator-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        grid-auto-flow: dense;
    }

    /* Standard card */
    .calc-card {
        background: var(--glass-bg);
        border-radius: 20px;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        overflow: hidden;
        transition: all 0.4s ease;
        box-shadow: var(--shadow);
        position: relative;
    }

    /* Taller cards for stagger */
    .calc-card.tall {
        grid-row: span 2;
        /* double height */
    }

    /* Optional zig-zag shift for odd cards */
    .calc-card:nth-child(odd) {
        margin-top: 30px;
    }

    /* Hover effects */
    .calc-card:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 20px 40px rgba(9, 94, 137, 0.384);
        border: 2px solid #2480b1a1;
    }

    .calc-content {
        /* padding: 1.5rem; */
        transition: transform 0.4s ease;
    }

    .calc-icon {
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        color: white;
        background: var(--gradient-primary);
        border-radius: 15px;
        transition: all 0.4s ease;
    }

    .calc-card:hover .calc-icon {
        transform: scale(1.1);
        background: linear-gradient(135deg, #364d71, #4b6d91);
    }

    .calc-content h3 {
        margin: 1rem 0 0.5rem;
        color: var(--dark-color);
        font-weight: 700;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .calc-card:hover .calc-content h3 {
        color: #009dff;
        transform: translateY(-2px);
    }

    .arrow {
        display: inline-block;
        margin-left: 5px;
        transition: transform 0.3s ease, color 0.3s ease;
        color: var(--primary-color);
        font-weight: bold;
    }

    .calc-card:hover .arrow {
        transform: translateX(5px);
        color: #007BFF;
    }

    .calc-card:nth-child(odd) {
        margin-top: 180px;
        margin-bottom: 11rem;
    }


    /* Responsive Zig-Zag Offsets */
    @media (max-width: 1024px) {
        .calc-card:nth-child(odd) {
            margin-top: 20px;
            margin-bottom: 5rem;
        }
    }

    @media (max-width: 768px) {
        .calc-card:nth-child(odd) {
            margin-top: 0;
            margin-bottom: 2rem;
        }
    }

    div#special {
        margin-top: 0rem;
        margin-bottom: auto;
    }

    /* Preloader overlay */
    .preloaderBg {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: linear-gradient(135deg, #439af6, #8fb4da);
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: opacity 0.8s ease, visibility 0.8s ease;
        overflow: hidden;
    }

    /* Loader wrapper */
    .loader {
        width: clamp(100px, 30vw, 200px);
        height: clamp(100px, 30vw, 200px);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* Logo (centered inside loader) */
    .preloader {
        background: url("../logo/logo.png") no-repeat center;
        background-size: contain;
        width: 60%;
        height: 60%;
        position: absolute;
        animation: pulse 1s ease-in-out infinite;
    }

    /* Spinner (circle around logo) */
    .preloader2 {
        border: 5px solid rgba(255, 255, 255, 0.3);
        border-top: 5px solid #000;
        border-radius: 50%;
        width: 100%;
        height: 100%;
        animation: spin 1s linear infinite;
        position: absolute;
    }

    /* Spin animation */
    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /* Pulse animation for logo */
    @keyframes pulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }
    }

    /* Hidden state (fade out) */
    .preloaderBg.hide {
        opacity: 0;
        visibility: hidden;
    }