/* Calculator24 Theme Custom Styles */

:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #fff;
}

/* Background gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Main Navigation */
.main-nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.navbar-brand {
    font-size: 28px;
    font-weight: bold;
    color: #007bff !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    margin: 0 15px;
    padding: 10px 0 !important;
    font-size: 16px;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

.dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 0;
}

.dropdown-item {
    padding: 8px 20px;
    color: #333;
    font-size: 15px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Hero Section - Like calculator24.site */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Calculator Cards */
.calculator-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.calculator-card h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 18px;
}

.calculator-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.calculator-card a {
    text-decoration: none;
    color: inherit;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin: 60px 0 40px 0;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px 0;
    margin-top: 80px;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
}

.footer ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #bdc3c7;
    font-size: 14px;
}

/* Calculator Page Styles */
.calculator-header {
    margin-bottom: 30px;
}

.calculator-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.calculator-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.widget-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.widget-body {
    padding: 30px;
}

/* Calculator Content Container - Critical fix for layout issues */
.calculator-content-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Force all calculator content to stay within bounds */
.calculator-content-container * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent absolute positioning from breaking layout */
.calculator-content-container .form-group,
.calculator-content-container .input-group,
.calculator-content-container .row,
.calculator-content-container .col,
.calculator-content-container .col-* {
    position: relative !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
}

/* Reset any problematic calculator styles */
.calculator-content-container input,
.calculator-content-container select,
.calculator-content-container textarea,
.calculator-content-container button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 5px 0 !important;
}

/* Contain any floating elements */
.calculator-content-container::after {
    content: "";
    display: table;
    clear: both;
}

.calculator-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.related-calculators {
    margin-top: 40px;
}

.related-calculators h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.related-calc-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
}

.related-calc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.related-calc-card h5 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.related-calc-card p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Sidebar Styles */
.sidebar {
    padding-left: 30px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-widget h4 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.popular-calc-list {
    display: flex;
    flex-direction: column;
}

.popular-calc-item {
    display: block;
    padding: 12px 0;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f4;
    transition: color 0.3s ease;
}

.popular-calc-item:last-child {
    border-bottom: none;
}

.popular-calc-item:hover {
    color: #007bff;
    text-decoration: none;
}

.category-list {
    display: flex;
    flex-direction: column;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f4;
    transition: color 0.3s ease;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    color: #007bff;
    text-decoration: none;
}

.category-item i {
    margin-right: 10px;
    width: 16px;
}

.category-count {
    margin-left: auto;
    background: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    font-size: 14px;
}

.share-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.share-btn i {
    margin-right: 8px;
}

.share-btn.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.copy:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* Blog Styles */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.blog-post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.blog-post-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.blog-post-card h2 a {
    color: #333;
    text-decoration: none;
}

.blog-post-card h2 a:hover {
    color: #007bff;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.post-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.read-more-btn i {
    margin-left: 8px;
}

.blog-search-form .input-group {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.recent-post-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.recent-post-item a:hover {
    color: #007bff;
}

.recent-post-date {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.blog-pagination {
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .navbar-nav .nav-link {
        margin: 0 5px;
    }
    
    .sidebar {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .calculator-header h1 {
        font-size: 28px;
    }
    
    .widget-header h3 {
        font-size: 20px;
    }
    
    .related-calculators h3 {
        font-size: 20px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
}
