/*
Theme Name: Calculators Theme
Theme URI: http://example.com/calculators-theme
Author: Antigravity
Author URI: http://example.com
Description: A minimal and clean theme for University Calculators.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calculators-theme
*/

/* -------------------------------------------------------------------------
   1. CSS Variables & Reset
------------------------------------------------------------------------- */
:root {
    --primary-color: #0056b3;
    --secondary-color: #00a8cc;
    --accent-color: #ff9f1c;
    --dark-color: #1a1a1a;
    --light-color: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #6c757d;
    --text-main: #333333;
    --header-height: 80px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--gray-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* -------------------------------------------------------------------------
   2. Header Styles
------------------------------------------------------------------------- */
.site-header {
    background: #192B39;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: 90px;
}

/* Secondary Category Header */
.category-nav {
    background: #0D1923; /* Slightly darker than main header */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    height: 50px;
    display: flex;
    align-items: center;
    overflow-x: auto; /* Allow scroll on mobile */
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for clean look */
}

.category-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    white-space: nowrap;
}

.category-nav-list li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.category-nav-list li a:hover {
    color: #FFB800; /* Theme yellow highlight */
}

.header-left {
    display: flex;
    align-items: center;
}

.site-branding {
    display: flex;
    justify-content: center;
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.logo-uni {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--light-color);
    letter-spacing: -1px;
}

.logo-uni .dot {
    color: #FFB800; /* Bright yellow dot */
}

.logo-calculators {
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--light-color);
    letter-spacing: 4px;
    margin-top: -2px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.auth-link {
    color: var(--light-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-signup {
    background: #3b82f6;
    color: var(--light-color);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-signup:hover {
    background: #2563eb;
}

/* Navigation Section */
.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#primary-menu li {
    position: relative;
}

#primary-menu a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--light-color);
    transition: var(--transition);
}

#primary-menu a:hover {
    color: #FFB800;
}

/* Dropdown Support */
#primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--light-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border-radius: 8px;
    z-index: 1050;
}

#primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#primary-menu .sub-menu a {
    color: var(--dark-color);
    padding: 0.5rem 1.5rem;
    display: block;
    font-size: 0.9rem;
}

#primary-menu .sub-menu a:hover {
    color: var(--primary-color);
    background: var(--gray-light);
}

/* -------------------------------------------------------------------------
   Mobile Navigation Drawer & Toggle
------------------------------------------------------------------------- */
.menu-toggle {
    display: none;
}

/* Mobile backdrop */
.mobile-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 17, 24, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    z-index: 1050;
    transition: opacity 0.3s ease;
}

/* Slide-out drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #192B39;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Drawer open state */
#menu-toggle:checked ~ .mobile-drawer {
    transform: translateX(0);
}

#menu-toggle:checked ~ .mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer Header */
.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #0D1923;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.drawer-logo .logo-uni {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--light-color);
    letter-spacing: -1px;
}
.drawer-logo .logo-uni .dot {
    color: #FFB800;
}
.drawer-logo .logo-calculators {
    font-size: 0.55rem;
    font-weight: 300;
    color: var(--light-color);
    letter-spacing: 3px;
}

.drawer-close-btn {
    font-size: 2.2rem;
    color: var(--light-color);
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}
.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Drawer Content */
.mobile-drawer-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer-search {
    margin-bottom: 1.5rem;
}

.mobile-search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.3rem 0.5rem;
}

.mobile-search-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    color: var(--light-color);
    font-size: 16px;
    outline: none;
}
.mobile-search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mobile-search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-dark);
    margin: 1.5rem 0 0.8rem;
    font-weight: 700;
}

.mobile-nav-links, .mobile-category-links, .mobile-legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li a, .mobile-category-links li a, .mobile-legal-links li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav-links li a:hover, .mobile-category-links li a:hover, .mobile-legal-links li a:hover {
    color: #FFB800;
    padding-left: 6px;
}

.cat-drawer-icon {
    font-size: 1.25rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.mobile-legal-links li a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Desktop vs Mobile display logic */
@media (min-width: 993px) {
    .hamburger, .mobile-drawer, .mobile-drawer-backdrop {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        padding: 0;
    }
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--light-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
}


/* -------------------------------------------------------------------------
   3. Footer Styles
------------------------------------------------------------------------- */
.site-footer {
    background: #0a1118;
    color: var(--light-color);
    padding: 8rem 0 3rem;
    margin-top: 6rem;
    border-top: 4px solid #3b82f6;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.1), transparent);
    pointer-events: none;
}

.footer-top {
    text-align: center;
    margin-bottom: 4rem;
}

.footer-logo img {
    max-height: 60px;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.footer-middle {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: #3b82f6;
    transform: translateX(5px);
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

/* -------------------------------------------------------------------------
   4. Homepage Specific Styles
------------------------------------------------------------------------- */

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    background: var(--light-color);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.search-field {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
    border-radius: 50px 0 0 50px;
}

.search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.search-submit:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Category Grid */
.categories-section {
    padding: 4rem 0;
    background: var(--light-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--gray-light);
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--gray-medium);
}

.category-card:hover {
    background: var(--light-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.cat-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.category-card p {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Platform Features Section */
.platform-features {
    padding: 7rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid var(--gray-medium);
    border-bottom: 1px solid var(--gray-medium);
}

.section-header {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.sub-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-dark);
    margin-top: 1rem;
    line-height: 1.6;
}

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

.feature-card {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.08);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-icon.gradient-1 { background: linear-gradient(135deg, #fef08a, #fef9c3); }
.feature-icon.gradient-2 { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.feature-icon.gradient-3 { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.feature-icon.gradient-4 { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }

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

.feature-card p {
    color: var(--gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Latest Blog Posts Section */
.latest-blog-posts {
    padding: 7rem 0;
    background: #ffffff;
}

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

.blog-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(0,0,0,0.1);
}

.blog-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.blog-badge {
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    background: var(--primary-color);
    color: #ffffff;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.blog-card-content {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1rem;
}

.blog-card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.8rem;
    flex-grow: 1;
}

.blog-card-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-read-more {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.btn-read-more:hover {
    gap: 0.8rem;
}

.btn-view-all-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--dark-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    transition: all 0.3s ease;
}

.btn-view-all-blog:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.3);
}


/* Popular Calculators */
.popular-calculators {
    padding: 6rem 0;
    background: #f1f4f8;
}

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

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.popular-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.popular-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.popular-card h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.popular-card p {
    font-size: 0.95rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-cat {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.view-all-container {
    text-align: center;
    margin-top: 4rem;
}

.btn-view-all {
    display: inline-block;
    background: var(--dark-color);
    color: var(--light-color);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-all:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

/* -------------------------------------------------------------------------
   5. Responsive Design Updates
------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .header-grid {
        height: 75px;
    }
    .logo-uni {
        font-size: 1.8rem;
    }
    .logo-calculators {
        font-size: 0.55rem;
    }
    .footer-middle {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    .category-grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0;
    }
    .category-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    .hero-section {
        padding: 3.5rem 0;
    }
    .hero-title { 
        font-size: 2.2rem; 
        margin-bottom: 1.5rem;
    }
    .search-field {
        font-size: 16px; /* Avoid iOS Safari zoom */
        padding: 0.8rem 1.2rem;
    }
    .search-submit {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    .category-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1rem;
    }
    .category-card {
        padding: 1.5rem 0.8rem;
    }
    .cat-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .popular-calculators {
        padding: 4rem 0;
    }
    .popular-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    .popular-card {
        padding: 1.5rem;
    }
    .trust-section {
        padding: 4rem 0;
    }
    .trust-content h2 { 
        font-size: 1.6rem; 
        margin-bottom: 2.5rem;
    }
    .trust-images { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    .calculator-links-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 1.25rem;
    }
    .site-footer {
        padding: 5rem 0 2rem;
        margin-top: 4rem;
    }
}

@media (max-width: 576px) {
    .footer-middle {
        grid-template-columns: 1fr;
        text-align: center;
        padding-bottom: 2.5rem;
        margin-bottom: 2.5rem;
    }
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .contact-info p {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-bottom-links {
        justify-content: center;
    }
    .calculator-single-wrapper {
        padding: 20px 15px;
    }
}

/* -------------------------------------------------------------------------
   6. Category Page Styles
------------------------------------------------------------------------- */
.category-page-wrapper {
    background: #fdfdfd;
}

.category-header {
    background: linear-gradient(rgba(25, 43, 57, 0.95), rgba(25, 43, 57, 0.95)), 
                url('https://images.unsplash.com/photo-1530210124550-912dc1381cb8?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    padding: 4rem 0 6rem;
    color: var(--light-color);
    text-align: center;
}

.category-header.other-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.9), rgba(25, 43, 57, 0.9)), 
                url('https://images.unsplash.com/photo-1493612276216-ee3925520721?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.finance-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.9), rgba(25, 43, 57, 0.9)), 
                url('https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.food-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.8), rgba(25, 43, 57, 0.8)), 
                url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.health-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.85), rgba(25, 43, 57, 0.85)), 
                url('https://images.unsplash.com/photo-1505751172876-fa1923c5c528?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.math-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.9), rgba(25, 43, 57, 0.9)), 
                url('https://images.unsplash.com/photo-1509228468518-180dd4864904?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.physics-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.85), rgba(25, 43, 57, 0.85)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.sports-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.8), rgba(25, 43, 57, 0.8)), 
                url('https://images.unsplash.com/photo-1517649763962-0c623066013b?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.statistics-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.85), rgba(25, 43, 57, 0.85)), 
                url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.category-header.other-theme {
    background: linear-gradient(rgba(25, 43, 57, 0.8), rgba(25, 43, 57, 0.8)), 
                url('https://images.unsplash.com/photo-1493612276216-ee3925520721?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
}

.medical-sidebar .sticky-nav {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 10px;
}

.medical-sidebar .sticky-nav::-webkit-scrollbar {
    width: 4px;
}

.medical-sidebar .sticky-nav::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 10px;
}

.health-nav li a {
    font-size: 0.9rem;
}

.finance-nav li {
    border-bottom: 1px solid var(--gray-medium);
    padding-bottom: 0.5rem;
}

.section-intro {
    font-size: 1rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
    font-style: italic;
    max-width: 800px;
}

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.category-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.category-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.category-search {
    max-width: 500px;
    margin: 0 auto;
}

.category-search input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: var(--light-color);
    font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.category-search input::placeholder {
    color: rgba(255,255,255,0.6);
}

/* Category Layout */
.category-grid-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding: 4rem 0;
}

.category-sidebar {
    display: block;
}

.sticky-nav {
    position: sticky;
    top: 120px;
}

.sticky-nav h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.sticky-nav ul li {
    margin-bottom: 0.8rem;
}

.sticky-nav ul li a {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.sticky-nav ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Sections */
.calculator-section {
    margin-bottom: 5rem;
}

.section-heading {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-medium);
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.calc-link {
    background: var(--light-color);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-medium);
    font-weight: 500;
    transition: var(--transition);
}

.calc-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 992px) {
    .category-grid-layout { grid-template-columns: 1fr; }
    .category-sidebar { display: none; }
}

