/*
Theme Name: TemzNet Calculator Theme
Theme URI: https://temz.net
Author: TemzNet Team
Author URI: https://temz.net
Description: A custom WordPress theme that replicates calculator.net with pixel-perfect accuracy. Built for temz.net with a modern, responsive design and SEO optimization.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: temznet
*/

:root {
    --primary-color: #0093E9;
    --primary-gradient: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #007bb5;
    text-decoration: underline;
}

/* WordPress Core Resets */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: lowercase;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none !important;
}

nav a:hover {
    color: var(--primary-color);
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    flex: 1;
}

.sidebar-left {
    width: 250px;
    flex-shrink: 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar-right {
    width: 300px;
    flex-shrink: 0;
}

/* Section Boxes */
.card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card h2,
.card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 1.25rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

/* Lists in sidebar */
.menu-list {
    list-style: none;
}

.menu-list li {
    margin-bottom: 8px;
}

.menu-list a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    text-decoration: none !important;
}

.menu-list a:hover {
    background-color: #f0f7ff;
    color: var(--primary-color);
}

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.calc-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.calc-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.calc-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.calc-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    opacity: 0.8;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 0;
    margin-top: auto;
}

.footer-about {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #34495e;
    line-height: 1.8;
}

.footer-about p {
    margin-bottom: 15px;
    color: #bdc3c7;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-col a {
    color: #bdc3c7;
    display: block;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: white;
}

.copyright {
    text-align: center;
    border-top: 1px solid #34495e;
    margin-top: 30px;
    padding-top: 20px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Calculator Form Styles */
.calc-form {
    background: #fdfdfd;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.form-group label {
    width: 150px;
    font-weight: 500;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    flex: 1;
    max-width: 300px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 147, 233, 0.1);
}

.btn-submit {
    background: var(--secondary-color);
    background-image: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-submit:hover {
    opacity: 0.9;
    text-decoration: none;
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    margin-left: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.result-box {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4fc;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
}

.result-box h2 {
    color: var(--secondary-color);
    border: none;
    margin-bottom: 10px;
    padding: 0;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar-left,
    .sidebar-right {
        width: 100%;
    }

    .sidebar-right {
        display: none;
    }

    .home-calc-section {
        flex-direction: column !important;
    }

    .basic-calculator {
        margin-bottom: 20px;
    }

    .home-categories {
        grid-template-columns: 1fr !important;
    }
}

/* Homepage Specific Styles */
.content-area-full {
    flex: 1;
    width: 100%;
    padding: 30px 20px;
}

.home-calc-section {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Basic Calculator Widget */
.basic-calculator {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    min-width: 300px;
}

.calc-display {
    background: #f5f5f5;
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    min-height: 80px;
}

#calc-input {
    font-size: 0.9rem;
    color: #666;
    min-height: 20px;
}

#calc-output {
    font-size: 2rem;
    font-weight: bold;
    text-align: right;
    color: var(--secondary-color);
}

.calc-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calc-row {
    display: flex;
    gap: 5px;
}

.calc-row button {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.calc-row button:hover {
    background: #f0f0f0;
}

.calc-row button.calc-op {
    background: #e3f2fd;
    color: var(--primary-color);
    font-weight: bold;
}

.calc-row button.calc-eq {
    background: var(--primary-gradient);
    color: white;
    font-weight: bold;
}

.calc-row button.calc-clear {
    background: #ffebee;
    color: #c62828;
}

/* Home Search Section */
.home-search {
    flex: 1;
}

.home-search h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    padding: 12px 30px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-submit:hover {
    opacity: 0.9;
}

/* Home Categories */
.home-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-tile {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    text-align: center;
    margin-bottom: 20px;
}

.icon-placeholder {
    width: 135px;
    height: 135px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.category-icon:hover .icon-placeholder {
    transform: scale(1.05);
}

.category-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.category-title a {
    color: var(--secondary-color);
    text-decoration: none !important;
}

.category-title a:hover {
    color: var(--primary-color);
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.category-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--primary-color);
    text-decoration: none !important;
}