/**
 * Calculate7 - Main Stylesheet
 * Fully Responsive Version
 */

/* ===========================================
   CSS VARIABLES
   =========================================== */
:root {
    --primary: #1a1a2e;
    --secondary: #f8f9fa;
    --accent: #0066ff;
    --accent-hover: #0052cc;
    --accent-light: #e6f0ff;
    --green: #00a67e;
    --green-light: #e6f7f2;
    --orange: #ff6b00;
    --orange-light: #fff4eb;
    --red: #ef4444;
    --red-light: #fef2f2;
    --purple: #7c3aed;
    --purple-light: #f3f0ff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    
    /* Safe area for notched devices */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ===========================================
   RESET & BASE
   =========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--secondary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   TOP BAR
   =========================================== */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.top-bar a {
    color: #93c5fd;
}

/* ===========================================
   NAVIGATION
   =========================================== */
.main-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, #0044aa 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 0.15rem;
    list-style: none;
    flex-shrink: 1;
    overflow: hidden;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
    display: block;
}

.nav-links a:hover {
    background: var(--secondary);
    color: var(--accent);
    text-decoration: none;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 260px;
    min-width: 160px;
    flex-shrink: 1;
}

.search-box:focus-within {
    border-color: var(--accent);
    background: white;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.search-box svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===========================================
   MOBILE SEARCH & DRAWER
   =========================================== */
.mobile-search {
    display: none;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.mobile-search .search-box {
    width: 100%;
    max-width: 100%;
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: white;
    z-index: 999;
    transition: right 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-drawer-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.mobile-drawer-nav {
    padding: 1rem 0;
}

.mobile-drawer-nav a {
    display: block;
    padding: 0.85rem 1.25rem;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.mobile-drawer-nav a:hover {
    background: var(--accent-light);
    border-left-color: var(--accent);
    text-decoration: none;
}

.mobile-drawer-section-title {
    padding: 0.75rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-drawer-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0 1rem 1rem;
}

.mobile-drawer-categories a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: var(--secondary);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.75rem;
    text-decoration: none;
    text-align: center;
    word-break: break-word;
}

.mobile-drawer-categories a:hover {
    background: var(--accent-light);
    text-decoration: none;
}

/* ===========================================
   AD BANNERS
   =========================================== */
.ad-banner {
    background: linear-gradient(90deg, #f0f4f8 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin: 1rem 0;
    overflow: hidden;
}

.ad-banner-header {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.ad-banner-header .ad-banner {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.sidebar-ad {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===========================================
   MAIN LAYOUT
   =========================================== */
.main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.content-area {
    min-width: 0; /* Prevent grid blowout */
    overflow: hidden;
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    background: linear-gradient(180deg, white 0%, var(--secondary) 100%);
    padding: 3rem 0 4rem;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    color: var(--accent);
}

.hero p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto 2rem;
    gap: 0.5rem;
}

.hero-search input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    min-width: 0;
}

.hero-search input:focus {
    border-color: var(--accent);
}

.hero-search button {
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-search button:hover {
    background: var(--accent-hover);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 80px;
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
}

.stat-number.blue { color: var(--accent); }
.stat-number.green { color: var(--green); }
.stat-number.orange { color: var(--orange); }

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===========================================
   SECTIONS
   =========================================== */
.section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--primary);
}

.section-header a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.section-title,
h2.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===========================================
   CATEGORY CARDS
   =========================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--secondary);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.category-card:hover {
    background: white;
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
}

.category-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.category-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.category-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.category-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

/* ===========================================
   CALCULATOR LIST
   =========================================== */
.calculator-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.calculator-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.15s;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.calculator-item:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    text-decoration: none;
}

.calculator-item .icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    border-radius: 8px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.calculator-item:hover .icon {
    background: white;
}

.calculator-item .info {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
    overflow: hidden;
}

.calculator-item .info h3,
.calculator-item .info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.calculator-item .info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Allow text wrap on smaller containers */
@media (max-width: 1100px) {
    .calculator-item .info h3,
    .calculator-item .info h4 {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
    }
    
    .calculator-item .info p {
        display: none;
    }
}

.calculator-item .arrow {
    color: var(--text-secondary);
    opacity: 0;
    transition: all 0.15s;
    flex-shrink: 0;
    min-width: 16px;
}

.calculator-item:hover .arrow {
    opacity: 1;
    color: var(--accent);
}

/* ===========================================
   CALCULATOR CARDS (Grid Style)
   =========================================== */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.calculator-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.calculator-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
}

.calculator-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.calculator-card .icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.calculator-card .card-title-wrap {
    min-width: 0;
    flex: 1;
}

.calculator-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.calculator-card .tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.calculator-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calculator-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
}

.calculator-card .rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.calculator-card .use-btn {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

/* ===========================================
   SIDEBAR
   =========================================== */
.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
    overflow: hidden;
}

.sidebar-list a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.sidebar-list .title,
.sidebar-list a span:not(.num) {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.sidebar-list .num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: var(--secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
    min-width: 0;
    overflow: hidden;
}

.sidebar-cat-item:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    text-decoration: none;
}

.sidebar-cat-item span:first-child {
    flex-shrink: 0;
}

.sidebar-cat-item .name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-cat-item .count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ===========================================
   BREADCRUMB
   =========================================== */
.breadcrumb {
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.9rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .separator {
    color: var(--border);
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================================
   PAGINATION
   =========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.pagination .active {
    background: var(--accent);
    color: white;
}

.pagination .nav-arrow {
    width: auto;
    padding: 0 1rem;
    gap: 0.35rem;
    white-space: nowrap;
}

/* ===========================================
   FOOTER
   =========================================== */
.main-footer {
    background: var(--primary);
    color: white;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 2rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    min-width: 0;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.main-footer .logo-text {
    color: white;
}

.main-footer .logo-text span {
    color: #93c5fd;
}

.footer-col {
    min-width: 0;
    overflow: hidden;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: block;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

.footer-links a:hover {
    color: white;
}

/* ===========================================
   FILTER BUTTONS
   =========================================== */
.filter-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Filter container for horizontal scroll on mobile */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===========================================
   SOCIAL SHARING BUTTONS
   =========================================== */
.share-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.share-section h4,
.share-section .share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

.share-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}

.share-btn:active {
    transform: translateY(0);
}

/* Twitter/X */
.share-btn-twitter {
    background: #000000;
}
.share-btn-twitter:hover {
    background: #333333;
}

/* Facebook */
.share-btn-facebook {
    background: #1877f2;
}
.share-btn-facebook:hover {
    background: #0d65d9;
}

/* LinkedIn */
.share-btn-linkedin {
    background: #0a66c2;
}
.share-btn-linkedin:hover {
    background: #004182;
}

/* WhatsApp */
.share-btn-whatsapp {
    background: #25d366;
}
.share-btn-whatsapp:hover {
    background: #1da851;
}

/* Reddit */
.share-btn-reddit {
    background: #ff4500;
}
.share-btn-reddit:hover {
    background: #e03d00;
}

/* Email */
.share-btn-email {
    background: #6b7280;
}
.share-btn-email:hover {
    background: #4b5563;
}

/* Copy Link */
.share-btn-copy {
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--border);
}
.share-btn-copy:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
}
.share-btn-copy.copied {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}

/* Compact mode for sidebar */
.share-buttons-compact {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.share-buttons-compact .share-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
}

.share-buttons-compact .share-btn span {
    display: none;
}

/* ===========================================
   TOAST NOTIFICATION
   =========================================== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-width: calc(100vw - 40px);
    text-align: center;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===========================================
   FAVORITE BUTTON
   =========================================== */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.favorite-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.favorite-btn.is-favorite {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.favorite-btn .heart {
    font-size: 1.1rem;
    line-height: 1;
}

/* ===========================================
   USER CALCULATOR LISTS (Favorites & Recent)
   =========================================== */
.user-calc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-calc-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    max-width: 100%;
    overflow: hidden;
}

.user-calc-list li a {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s ease;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.user-calc-list li a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.user-calc-list .calc-icon {
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: 6px;
    flex-shrink: 0;
}

.user-calc-list li a:hover .calc-icon {
    background: white;
}

.user-calc-list .calc-info {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 40px);
    overflow: hidden;
}

.user-calc-list .calc-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.user-calc-list .calc-category {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.user-calc-list .remove-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.user-calc-list li:hover .remove-btn {
    opacity: 1;
}

.user-calc-list .remove-btn:hover {
    background: #fef2f2;
    color: #ef4444;
}

.clear-all-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: none;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.clear-all-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0 0 0.25rem;
    font-weight: 500;
    color: var(--text);
}

.empty-state small {
    font-size: 0.8rem;
}

/* ===========================================
   BEFORE FOOTER AD
   =========================================== */
.before-footer-ad {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
}

.before-footer-ad:empty {
    display: none;
}

/* ===========================================
   STICKY ANCHOR AD
   =========================================== */
.sticky-anchor-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticky-anchor-ad .ad-container,
.sticky-anchor-ad .ad-banner {
    margin: 0;
    max-width: 728px;
}

.sticky-ad-close {
    position: absolute;
    top: -12px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 2px solid white;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.sticky-ad-close:hover {
    background: var(--red);
    transform: scale(1.1);
}

body.has-sticky-ad {
    padding-bottom: 100px;
}

/* ===========================================
   PWA INSTALL BUTTON
   =========================================== */
.install-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #0044aa 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.install-app-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.install-app-btn:active {
    transform: translateY(0);
}

.install-app-btn svg {
    flex-shrink: 0;
}

.mobile-install-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #0044aa 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    margin-top: 0.5rem;
    border-radius: 8px;
}

.mobile-install-btn:hover {
    opacity: 0.9;
}

/* ===========================================
   LANGUAGE SELECTOR
   =========================================== */
.language-selector {
    position: relative;
    z-index: 200;
    flex-shrink: 0;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: white;
    border-color: var(--accent);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-code {
    font-weight: 600;
}

.lang-arrow {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.language-selector.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 9999;
}

.language-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.lang-option:hover {
    background: var(--secondary);
    text-decoration: none;
}

.lang-option.active {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-option .lang-flag {
    font-size: 1.25rem;
}

.lang-option .lang-name {
    flex: 1;
}

.lang-option .lang-check {
    color: var(--accent);
}

/* Mobile language selector in drawer */
.mobile-language-selector {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
}

.mobile-language-selector .mobile-lang-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.mobile-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mobile-lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.5rem;
    background: var(--secondary);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mobile-lang-option:hover {
    background: white;
    border-color: var(--border);
    text-decoration: none;
}

.mobile-lang-option.active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.mobile-lang-option .lang-flag {
    font-size: 1.1rem;
}

/* ===========================================
   CALCULATOR PAGE SPECIFIC STYLES
   =========================================== */
.calculator-hero {
    padding: 1.5rem 0;
}

.calculator-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.calculator-meta span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-result-card {
    background: var(--accent-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

.calc-result-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    /* color: var(--accent); */
    color: var(--accent-light); 
    word-break: break-all;
}

/* ===========================================
   FAQ ACCORDION
   =========================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    cursor: pointer;
    gap: 1rem;
}

.faq-question h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-question .faq-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    padding: 0 1.25rem 1.25rem;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===========================================
   TABLES
   =========================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--secondary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

td {
    font-size: 0.9rem;
}

/* ===========================================
   FORMS
   =========================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ===========================================
   RESPONSIVE - LARGE DESKTOP (1280px+)
   =========================================== */
@media (min-width: 1281px) {
    .nav-links a {
        padding: 0.6rem 1rem;
    }
}

/* ===========================================
   RESPONSIVE - DESKTOP (1024px - 1280px)
   =========================================== */
@media (max-width: 1280px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .search-box {
        max-width: 220px;
    }
}

/* ===========================================
   RESPONSIVE - TABLET LANDSCAPE (900px - 1024px)
   =========================================== */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
    
    .sidebar-ad {
        grid-column: span 2;
        height: 150px;
    }
    
    /* Footer - 3 columns on tablet */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 3;
    }
    
    .footer-col h4 {
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.3;
    }
    
    .footer-col a {
        font-size: 0.8rem;
    }
    
    .install-app-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.6rem;
    }
    
    .lang-code {
        display: none;
    }
    
    /* Calculator items - allow text wrap */
    .calculator-item .info h3,
    .calculator-item .info h4 {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
    }
    
    .calculator-item .info p {
        display: none;
    }
}

/* ===========================================
   RESPONSIVE - TABLET PORTRAIT (768px - 900px)
   =========================================== */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    
    .nav-container .search-box {
        max-width: 200px;
    }
    
    .calculator-list,
    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================================
   RESPONSIVE - MOBILE LANDSCAPE / LARGE MOBILE (576px - 768px)
   =========================================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links,
    .nav-container .search-box {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-search {
        display: block;
    }
    
    .nav-container {
        height: 60px;
        padding: 0 1rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    /* Language selector hide on mobile (shown in drawer) */
    .language-selector:not(.mobile-language-selector) {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 2rem 0 3rem;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .hero-search button {
        width: 100%;
    }
    
    /* Main content */
    .main-wrapper {
        padding: 0 1rem 2rem;
    }
    
    .section {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.85rem;
    }
    
    .category-info h3 {
        font-size: 0.85rem;
        white-space: normal;
    }
    
    /* Calculator lists */
    .calculator-list,
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-item .info h3,
    .calculator-item .info h4 {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.3;
    }
    
    .calculator-item .info p {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    .calculator-item .arrow {
        opacity: 1;
    }
    
    /* Sidebar on mobile */
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad {
        grid-column: span 1;
        height: 100px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .footer-col {
        overflow: hidden;
    }
    
    .footer-col h4 {
        font-size: 0.85rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .footer-col a {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Ads */
    .ad-banner-header {
        padding: 0.75rem 1rem;
    }
    
    .ad-banner-header .ad-banner {
        height: 60px;
        font-size: 0.75rem;
    }
    
    /* Share buttons */
    .share-buttons {
        gap: 0.4rem;
    }
    
    .share-btn {
        padding: 0.5rem;
        font-size: 0;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .share-btn span {
        display: none;
    }
    
    /* Sticky ad */
    .sticky-anchor-ad {
        padding: 0.35rem;
    }
    
    .sticky-anchor-ad .ad-banner {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .sticky-ad-close {
        width: 24px;
        height: 24px;
        font-size: 1rem;
        top: -10px;
        right: 5px;
    }
    
    /* Install button */
    .install-app-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.35rem;
    }
    
    .install-app-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Filter buttons - horizontal scroll */
    .filter-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .filter-container::-webkit-scrollbar {
        display: none;
    }
    
    /* Pagination */
    .pagination {
        gap: 0.35rem;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .pagination .nav-arrow {
        padding: 0 0.75rem;
        font-size: 0.85rem;
    }
    
    /* User calc lists - show remove button always */
    .user-calc-list .remove-btn {
        opacity: 1;
    }
    
    /* Tables */
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem 0.75rem;
    }
}

/* ===========================================
   RESPONSIVE - SMALL MOBILE (480px and below)
   =========================================== */
@media (max-width: 480px) {
    /* Hero */
    .hero {
        padding: 1.5rem 0 2rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat {
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .category-card {
        padding: 0.75rem 0.5rem;
    }
    
    .category-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1.2rem;
    }
    
    .category-info h3 {
        font-size: 0.8rem;
    }
    
    .category-info span {
        font-size: 0.7rem;
    }
    
    /* Calculator items */
    .calculator-item {
        padding: 0.75rem;
    }
    
    .calculator-item .icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.9rem;
    }
    
    .calculator-item .info h3,
    .calculator-item .info h4 {
        font-size: 0.85rem;
    }
    
    .calculator-item .info p {
        font-size: 0.75rem;
    }
    
    /* Section */
    .section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-title,
    h2.section-title,
    .section-header h2 {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-col h4 {
        font-size: 0.85rem;
    }
    
    .footer-col a {
        font-size: 0.8rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    /* Mobile drawer */
    .mobile-drawer {
        width: 280px;
    }
    
    .mobile-drawer-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .mobile-drawer-categories a {
        font-size: 0.7rem;
        padding: 0.6rem 0.4rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        padding: 0.75rem 0;
    }
    
    .breadcrumb ul {
        font-size: 0.8rem;
    }
    
    .breadcrumb .current {
        max-width: 150px;
    }
    
    /* Pagination */
    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .pagination .nav-arrow {
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Forms */
    .form-control {
        padding: 0.65rem 0.85rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* FAQ */
    .faq-question {
        padding: 0.85rem 1rem;
    }
    
    .faq-question h3 {
        font-size: 0.9rem;
    }
    
    .faq-answer p {
        font-size: 0.85rem;
    }
    
    /* Toast */
    .toast-notification {
        padding: 10px 16px;
        font-size: 13px;
        bottom: 15px;
    }
    
    /* Favorite button */
    .favorite-btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* ===========================================
   RESPONSIVE - EXTRA SMALL (360px and below)
   =========================================== */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 1.35rem;
    }
    
    .categories-grid {
        gap: 0.4rem;
    }
    
    .category-card {
        padding: 0.6rem 0.4rem;
    }
    
    .category-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 1rem;
    }
    
    .category-info h3 {
        font-size: 0.75rem;
    }
    
    .section {
        padding: 0.85rem;
    }
    
    .mobile-lang-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .main-nav,
    .top-bar,
    .mobile-search,
    .mobile-drawer,
    .mobile-drawer-overlay,
    .sidebar,
    .ad-banner,
    .ad-banner-header,
    .sticky-anchor-ad,
    .share-section,
    .favorite-btn,
    .install-app-btn,
    .language-selector,
    .pagination,
    .filter-btn,
    .footer-grid,
    .toast-notification {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .main-wrapper {
        max-width: 100%;
        padding: 0;
    }
    
    .content-with-sidebar {
        display: block;
    }
    
    .section {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .hero {
        padding: 1rem 0;
    }
}

/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --text-secondary: #333;
    }
    
    .section,
    .calculator-item,
    .category-card {
        border-width: 2px;
    }
}

/* Dark mode support (optional - uncomment to enable) */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #f8f9fa;
        --secondary: #1a1a2e;
        --text: #f8f9fa;
        --text-secondary: #9ca3af;
        --border: #374151;
        --accent-light: #1e3a5f;
    }
    
    body {
        background: #0f0f1a;
    }
    
    .main-nav,
    .section,
    .calculator-item,
    .sidebar-section,
    .calculator-card {
        background: #1a1a2e;
    }
}
*/