/* Home Page Styles */

.welcome-header {
    text-align: center;
    margin: 3rem 0 2rem;
}

/* Two Column Layout */
.home-two-column {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.home-left-column {
    flex: 0 0 70%;
}

.home-right-column {
    flex: 0 0 calc(30% - 20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Featured Calculator Widget */
.featured-calculator {
    background: white;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.calculator-display {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.calculator-input {
    color: #888;
    font-size: 0.85em;
    min-height: 20px;
    margin-bottom: 8px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.calculator-output {
    color: white;
    font-size: 1.8em;
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.calculator-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calc-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.calc-row.sci-functions {
    margin-bottom: 6px;
    grid-template-columns: repeat(8, 1fr);
}

.calc-btn {
    padding: 6px 8px;
    font-size: 0.7em;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f0f0;
    color: #333;
    min-height: 32px;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calc-btn:active {
    transform: translateY(0);
}

.num-btn {
    background: white;
    border: 1px solid #e0e0e0;
}

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

.op-btn {
    background: var(--accent-color);
    color: white;
}

.op-btn:hover {
    background: #3d6b1f;
}

.func-btn {
    background: var(--primary-color);
    color: white;
    font-size: 0.65em;
    padding: 5px 6px;
}

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

.equals-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    font-size: 0.75em;
}

.equals-btn:hover {
    background: linear-gradient(135deg, #ff5520 0%, #ff7a2d 100%);
}

.clear-btn {
    background: #dc3545;
    color: white;
}

.clear-btn:hover {
    background: #c82333;
}

.home-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.home-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    width: 100%;
}

.home-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.home-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Calculators by Category */
.calculators-by-category {
    margin-top: 3rem;
}

.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.calculator-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.calculator-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.card-title {
    font-size: 0.85rem;
    color: var(--text-color);
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.2rem;
}

/* Latest Calculators Sidebar */
.latest-calculators-sidebar {
    background: white;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.sidebar-calculator-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-calculator-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-calculator-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.sidebar-calc-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sidebar-calc-name {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-title {
        font-size: 2rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    /* Stack two columns on mobile */
    .home-two-column {
        flex-direction: column;
    }
    
    .home-left-column,
    .home-right-column {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .calc-row {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .calc-row.sci-functions {
        grid-template-columns: repeat(4, 1fr);
    }
}
