/*
Theme Name: Calculator Zone fixed
Description: A comprehensive calculator theme for WordPress with multiple calculator types including financial, health, math, and other calculators.
Version: 1.0
Author: Calculator Zone Team
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* WordPress Header Styles */
.site-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-align: left;
}

.site-title {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #e8f4fd;
}



.site-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-style: italic;
    max-width: 280px;
    line-height: 1.2;
}

.main-navigation {
    display: none;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e8f4fd 0%, #c8e6f5 100%);
    padding: 1.5rem 0 !important;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 500px;
}

.hero-text {
    padding-right: 2rem;
}

.hero-text h1 {
    font-size: 2rem;
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 500px;
}

.hero-search-box input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.hero-search-box input::placeholder {
    color: #666;
}

.hero-search-box button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #ff9500;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-search-box button:hover {
    background: #e6850e;
}

.hero-search-box .clear-search {
    background: #666;
    padding: 8px 12px;
    font-size: 18px;
    min-width: auto;
}

.hero-search-box .clear-search:hover {
    background: #555;
}

.hero-search-suggestions {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    margin-top: 10px;
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.hero-search-suggestions .suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-search-suggestions .suggestion-item:hover {
    background: #f8f9fa;
}

.hero-search-suggestions .suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.hero-search-suggestions .suggestion-name {
    font-weight: 500;
    color: #333;
}

.hero-search-suggestions .suggestion-category {
    font-size: 0.8rem;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

.hero-calculator {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Calculator Styles */
.calculator-container {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.calculator {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.calculator-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 8px 16px;
    text-align: center;
}

.calculator-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Hero Calculator Screen Styles */
.calculator-screen {
    background: #ffffff !important;
    padding: 20px !important;
    border-bottom: none !important;
    min-height: 100px !important;
    border-radius: 12px 12px 0 0;
    border: 1px solid #e0e0e0 !important;
}

.screen-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    justify-content: flex-end !important;
    min-height: 80px !important;
}

.expression {
    font-size: 1rem !important;
    color: #666 !important;
    text-align: right !important;
    min-height: 20px !important;
    font-family: 'Segoe UI', monospace !important;
}

.result {
    font-size: 2.5rem !important;
    color: #000000 !important;
    text-align: right !important;
    font-weight: 300 !important;
    font-family: 'Segoe UI', monospace !important;
    background: transparent !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.display {
    background: #f8f9fa;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.display input {
    width: 100% !important;
    height: 40px !important;
    font-size: 1.2rem !important;
    text-align: right !important;
    padding: 0 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: white !important;
    color: black !important;
    font-family: monospace !important;
}

.calculator-body {
    padding: 8px;
    background: #f8f9fa;
}

.scientific-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.scientific-row button {
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: Arial, sans-serif;
}

.sci-btn {
    background: #e9ecef;
    color: #333;
}

.sci-btn:hover {
    background: #dee2e6;
}

.mode-btn {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.mode-btn:hover {
    background: #ffeaa7;
}

.num-btn {
    background: #ffffff;
    color: #333;
    font-weight: 500;
}

.num-btn:hover {
    background: #f8f9fa;
}

.op-btn {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.op-btn:hover {
    background: #ffeaa7;
}

.func-btn {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.func-btn:hover {
    background: #bee5eb;
}

.const-btn {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.const-btn:hover {
    background: #f5c6cb;
}

.paren-btn {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

.paren-btn:hover {
    background: #d6d8db;
}

.equals-btn {
    background: #2c5aa0;
    color: white;
    font-weight: 600;
}

.equals-btn:hover {
    background: #1e3a5f;
}

.scientific-row button:active {
    transform: translateY(1px);
}

/* Front Page Calculator Buttons */
.hero-calculator .calculator .calculator-buttons {
    padding: 8px !important;
    background: white;
    border-radius: 0 0 12px 12px;
}

.hero-calculator .calculator .button-row {
    display: grid;
    gap: 4px !important;
    margin-bottom: 4px !important;
}

.button-row-5 {
    grid-template-columns: repeat(5, 1fr);
}

.button-row:not(.button-row-5) {
    grid-template-columns: repeat(3, 1fr);
}

.calculator-buttons .btn {
    height: 50px;
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.calculator-buttons .btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: none;
}

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

.calculator-buttons .btn.number {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #333;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

.calculator-buttons .btn.number:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    border-color: #d0d0d0;
}

.calculator-buttons .btn.operator {
    background: linear-gradient(145deg, #a6a6a6, #8f8f8f);
    color: white;
    font-weight: 600;
    box-shadow: none;
}

.calculator-buttons .btn.operator:hover {
    background: linear-gradient(145deg, #8f8f8f, #787878);
    box-shadow: 0 6px 20px rgba(166, 166, 166, 0.4);
}

.calculator-buttons .btn.function {
    background: linear-gradient(145deg, #a6a6a6, #8f8f8f);
    color: white;
    font-weight: 600;
    box-shadow: none;
}

.calculator-buttons .btn.function:hover {
    background: linear-gradient(145deg, #8f8f8f, #787878);
    box-shadow: 0 6px 20px rgba(166, 166, 166, 0.4);
}

.calculator-buttons .btn.scientific {
    background: linear-gradient(145deg, #a6a6a6, #8f8f8f);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

.calculator-buttons .btn.scientific:hover {
    background: linear-gradient(145deg, #8f8f8f, #787878);
    box-shadow: 0 6px 20px rgba(166, 166, 166, 0.4);
}

.calculator-buttons .btn.memory {
    background: linear-gradient(145deg, #a6a6a6, #8f8f8f);
    color: white;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

.calculator-buttons .btn.memory:hover {
    background: linear-gradient(145deg, #8f8f8f, #787878);
    box-shadow: 0 6px 20px rgba(166, 166, 166, 0.4);
}

.calculator-buttons .btn.equals {
    background: linear-gradient(145deg, #ff9500, #e6850e);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 149, 0, 0.3);
}

.calculator-buttons .btn.equals:hover {
    background: linear-gradient(145deg, #e6850e, #cc7000);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

/* Removed btn-zero and btn-equals-wide special styling - all buttons are now uniform */

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0 !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
    }
    
    .hero-text {
        padding-right: 0;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .hero-search-box {
        max-width: 100%;
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-search-box input {
        padding: 14px 16px;
    }
    
    .hero-search-box button {
        padding: 14px 20px;
    }
    
    .calculator-container {
        max-width: 350px;
    }
    
    .calculator-buttons .btn {
        height: 55px;
        width: 55px;
        font-size: 18px;
        border-radius: 12px;
    }
    
    .calculator-buttons .btn.scientific,
    .calculator-buttons .btn.memory {
        font-size: 18px;
        height: 55px;
        width: 55px;
    }
    
    /* btn-zero now uses standard button styling */
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-search-box {
        margin-bottom: 25px;
    }
    
    .hero-search-box input {
        font-size: 16px;
        padding: 12px 14px;
    }
    
    .hero-search-box button {
        font-size: 16px;
        padding: 12px 18px;
    }
    
    .calculator-container {
        max-width: 320px;
    }
    
    .hero-calculator .calculator .calculator-buttons {
        padding: 8px !important;
    }
    
    .hero-calculator .calculator .calculator-buttons .btn {
        height: 50px;
        width: 50px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .hero-calculator .calculator .calculator-buttons .btn.scientific,
    .hero-calculator .calculator .calculator-buttons .btn.memory {
        font-size: 16px;
        height: 50px;
        width: 50px;
    }
    
    /* All buttons now use uniform styling on mobile */
    
    .hero-calculator .calculator .button-row {
        gap: 4px !important;
        margin-bottom: 4px !important;
    }
}

/* Search Results */
.search-results {
    background: white;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: none;
}

.results-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-results {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-results:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.result-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #2c5aa0;
}

.result-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c5aa0;
    border-radius: 8px;
}

.result-icon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.result-content h4 {
    color: #333;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.result-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.result-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
}

.no-results h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Search Section */
.search-section {
    text-align: center;
    padding: 1rem 0 !important;
}

.search-section h2 {
    color: #2c5aa0;
    font-size: 2rem;
    margin-bottom: 0.75rem !important;
    font-weight: 700;
}

.search-box {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    padding-right: 50px;
}

.search-box .clear-search {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-box .clear-search:hover {
    background: #f0f0f0;
    color: #333;
}

.search-box button:not(.clear-search) {
    padding: 12px 25px;
    background: #2c5aa0;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    min-width: 80px;
}

.search-box button:not(.clear-search):hover {
    background: #1e3a5f;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.suggestion-name {
    font-weight: 500;
    color: #333;
}

.suggestion-category {
    font-size: 0.8rem;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Search Results Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
}

.search-results-container {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 2rem;
}

.search-results-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-search {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-search:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-results-content {
    padding: 2rem;
}

.results-count {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.result-category {
    margin-bottom: 2rem;
}

.result-category h3 {
    color: #2c5aa0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 0.5rem;
}

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

.result-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #2c5aa0;
}

.result-item.unavailable {
    opacity: 0.6;
    background: #f5f5f5;
}

.result-item h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.result-link {
    display: inline-block;
    background: #2c5aa0;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.result-link:hover {
    background: #1e3a5f;
}

.coming-soon {
    display: inline-block;
    background: #ffc107;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.no-results h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Calculator Categories */
.calculator-categories {
    padding: 1.75rem 0 !important;
    background: white;
}

/* WordPress-specific body classes for maximum specificity */
body.home section.calculator-categories .categories-grid,
body.front-page section.calculator-categories .categories-grid,
body section.calculator-categories .categories-grid,
section.calculator-categories .categories-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100% !important;
    grid-auto-flow: row !important;
    grid-template-rows: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    overflow: visible !important;
}

body.home .categories-grid,
body.front-page .categories-grid,
body .categories-grid,
.categories-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100% !important;
    grid-auto-flow: row !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    overflow: visible !important;
}

/* Override WordPress theme containers that might affect grid */
.wp-site-blocks .categories-grid,
.wp-block-group .categories-grid,
.entry-content .categories-grid,
.site-content .categories-grid,
.site-main .categories-grid,
.content-area .categories-grid,
.hfeed .categories-grid,
.site .categories-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
}

/* Ultimate fallback with maximum specificity */
html body.wordpress .calculator-categories .categories-grid,
html body .calculator-categories .categories-grid,
html .calculator-categories .categories-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    grid-auto-flow: row !important;
}

.category {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    width: 100%;
    min-width: 0;
}

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

.category-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.category-icon img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.category h3 {
    color: #2c5aa0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.category ul {
    list-style: none;
}

.category li {
    margin-bottom: 0.5rem;
}

.category a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
}

.category a:hover {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
}

/* All Calculators Button */
.all-calculators {
    text-align: center;
}

.all-calculators-btn {
    display: inline-block;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.all-calculators-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.4);
}

/* Footer */
footer {
    background: #1e3a5f;
    color: white;
    padding: 0.5rem 0 0.5rem;
}

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

.footer-section h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-navigation {
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    margin: 10px 0 5px 0;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-nav a {
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 2px 0;
}

.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-nav .separator {
    color: #ccc;
    font-size: 14px;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    color: #ccc;
}

.footer-pages {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-pages a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-pages a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-info {
    text-align: center;
    padding: 10px 0;
    color: #ccc;
}

.site-info p {
    margin: 0;
    font-size: 14px;
}

/* Responsive Footer Navigation */
@media (max-width: 768px) {
    .footer-nav {
        gap: 10px;
        flex-direction: row;
        justify-content: center;
    }
    
    .footer-nav a {
        font-size: 13px;
    }
    
    .footer-nav .separator {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .footer-nav {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .footer-nav a {
        font-size: 12px;
    }
    
    .footer-nav .separator {
        font-size: 12px;
    }
}

/* Category Navigation Styles */
.category-nav {
    display: flex;
    gap: 2rem;
}

.category-nav li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.category-nav li a:hover,
.category-nav li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Category Grid Styles */
.category {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category h3 a {
    color: inherit;
    text-decoration: none;
}

.category h3 a:hover {
    color: #4a90e2;
}

/* Calculator Grid Layout */
.calculator-grid {
    padding: 4rem 0;
}

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

.calculator-item {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.calculator-item h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.calculator-item p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.calc-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.calc-btn:hover {
    background: linear-gradient(135deg, #357abd, #2968a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Page-specific Styles */
.page-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.page-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.page-icon {
    flex-shrink: 0;
}

.page-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-text {
    text-align: left;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* About Page Styles */
.about-content {
    padding: 4rem 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-text h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #555;
}

.about-text ul {
    margin: 1rem 0 1rem 2rem;
    color: #555;
}

.about-text li {
    margin-bottom: 0.5rem;
}

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

.feature {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #2c5aa0;
}

.feature h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stats-card, .values-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #f0f0f0;
}

.stats-card h3, .values-card h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.stat {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c5aa0;
}

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

.values-card ul {
    list-style: none;
    padding: 0;
}

.values-card li {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.values-card strong {
    color: #2c5aa0;
}

.team-section {
    margin-top: 3rem;
}

.team-section h2 {
    color: #2c5aa0;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

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

.benefit {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

/* Contact Page Styles */
.contact-content {
    padding: 4rem 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.contact-form h2 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.submit-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-info-section h2 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
}

.contact-details h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    color: #666;
    margin-bottom: 0.3rem;
}

.faq-section {
    margin-top: 2rem;
}

.faq-section h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.faq-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Privacy and Terms Pages */
.privacy-content,
.terms-content {
    padding: 4rem 0;
    background: white;
}

.privacy-text,
.terms-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.privacy-intro,
.terms-intro {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #2c5aa0;
}

.privacy-intro p,
.terms-intro p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
}

.privacy-section,
.terms-section {
    margin-bottom: 2.5rem;
}

.privacy-section h2,
.terms-section h2 {
    color: #2c5aa0;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Calculator Input Styles */
.calculator-input {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.calculator-input h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.calculate-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
}

/* Calculator Page Header Styles */
.calculator-header h1 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Calculator Results */
.calculator-results {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.calculator-results h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.result-label {
    font-weight: 500;
    color: #333;
}

.result-value {
    font-weight: 600;
    color: #2c5aa0;
    font-size: 1.1rem;
}

/* Calculator Info */
.calculator-info {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.calculator-info h3 {
    color: #2c5aa0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.calculator-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.calculator-info ul {
    margin: 1rem 0 1rem 2rem;
    color: #666;
}

.calculator-info li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .calculator-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .site-header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        text-align: center;
    }
    
    .site-title a {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    body.home .categories-grid,
    body.front-page .categories-grid,
    body .categories-grid,
    .categories-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 1rem;
    }
    
    body.home section.calculator-categories .categories-grid,
    body.front-page section.calculator-categories .categories-grid,
    body section.calculator-categories .categories-grid,
    section.calculator-categories .categories-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 1rem;
    }
    
    .category {
        padding: 1rem;
    }
    
    .category h3 {
        font-size: 1.1rem;
    }
    
    .category-icon img {
        width: 65px;
        height: 65px;
    }
    
    .category li {
        font-size: 0.9rem;
    }
    
    .page-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-text {
        text-align: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .calculators-list {
        grid-template-columns: 1fr;
    }
    
    .search-overlay {
        padding: 1rem;
    }
    
    .search-results-container {
        margin-top: 1rem;
    }
    
    .result-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    body.home .categories-grid,
    body.front-page .categories-grid,
    body .categories-grid,
    .categories-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 0.5rem;
    }
    
    body.home section.calculator-categories .categories-grid,
    body.front-page section.calculator-categories .categories-grid,
    body section.calculator-categories .categories-grid,
    section.calculator-categories .categories-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
        gap: 0.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 1rem 0 !important;
    }
    
    .search-section h2 {
        font-size: 1.5rem;
    }
    
    .category {
        padding: 0.8rem;
    }
    
    .category h3 {
        font-size: 1rem;
    }
    
    .category-icon img {
        width: 55px;
        height: 55px;
    }
    
    .category li {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .calculator-item {
        padding: 1.5rem;
    }
    
    .scientific-row {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .scientific-row button {
        height: 40px;
        font-size: 0.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Responsive Styles for Mobile Devices */
@media (max-width: 768px) {
    .modern-calculator {
        max-width: 100%;
        margin: 1rem;
        padding: 1rem;
    }
    
    .calc-display {
        font-size: 1.5rem;
        padding: 1rem;
    }
    
    .calc-buttons {
        gap: 0.5rem;
    }
    
    .calc-btn {
        height: 50px;
        font-size: 1rem;
    }
    
    .calc-btn.scientific {
        font-size: 0.8rem;
        padding: 0.3rem;
    }
}

@media (max-width: 480px) {
    .modern-calculator {
        margin: 0.5rem;
        padding: 0.8rem;
    }
    
    .calc-display {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
    
    .calc-buttons {
        gap: 0.3rem;
    }
    
    .calc-btn {
        height: 45px;
        font-size: 0.9rem;
    }
    
    .calc-btn.scientific {
        font-size: 0.7rem;
        padding: 0.2rem;
    }
    
    .calc-btn.zero {
        grid-column: span 2;
    }
}