﻿/* ============================================================
   calculator-style.css – Merged & Improved
   Home Z Calc – Home, Garden, DIY & Craft Calculators
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #1D9E75;
    --primary-dark: #0F6E56;
    --accent: #E1F5EE;
    --text: #1a1a1a;
    --text-light: #555;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* ========== CALCULATOR PAGE STYLES (existing, kept) ========== */
.calc-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px;
}
.calc-breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}
.calc-breadcrumb a { color: var(--primary); text-decoration: none; }
.calc-page-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.1;
}

/* Hide the default GeneratePress title and Page Heroes on Calculator pages */
.single-calculator header.entry-header,
.single-calculator .page-hero {
    display: none !important;
}

/* Ensure no stray H1s appear before our custom calculator wrapper */
.single-calculator .site-main > h1:not(.calc-page-title),
.single-calculator .site-content > h1:not(.calc-page-title) {
    display: none !important;
}

.calc-page-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin-bottom: 32px;
}
.calc-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}
@media (max-width: 992px) {
    .calc-layout { grid-template-columns: 1fr; gap: 32px; }
}
.calc-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 24px;
}
.calc-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.calc-field {
    margin-bottom: 18px;
}
.calc-field label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}
.calc-field input, .calc-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}
.calc-field input:focus, .calc-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,158,117,0.15);
}
.calc-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    margin-top: 8px;
}
.calc-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29,158,117,0.3);
}
.calc-btn:active {
    transform: translateY(1px);
}
.calc-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.calc-stat {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f0f0f0;
}
.calc-stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.calc-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
}
.calc-summary {
    background: #f0fdf4;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 15px;
}
.calc-hidden {
    display: none !important;
}

/* ========== HOMEPAGE STYLES (merged from additional css file.txt) ========== */
.home-hero {
    background: linear-gradient(145deg, #fff 0%, #f6f9fc 100%);
    border-bottom: 1px solid #e5e5e5;
    padding: 56px 20px 48px;
    text-align: center;
    position: relative;
}
.home-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(29,158,117,0.03) 1%, transparent 1%);
    background-size: 40px 40px;
    pointer-events: none;
}
.home-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.home-hero h1 span { color: #1D9E75; }
.home-hero p {
    font-size: 16px;
    color: #555;
    max-width: 480px;
    margin: 0 auto 28px;
}
.home-search {
    max-width: 560px;
    margin: 32px auto;
    display: flex;
    background: white;
    border-radius: 60px;
    padding: 4px 4px 4px 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.home-search input {
    flex: 1;
    border: none;
    padding: 16px 8px;
    font-size: 1rem;
    background: transparent;
    outline: none;
}
.home-search button {
    background: #1D9E75;
    border: none;
    border-radius: 40px;
    padding: 12px 28px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.home-search button:hover { background: #0F6E56; }
.home-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
}
.home-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1D9E75;
    display: block;
    line-height: 1;
}
.home-stat-label { font-size: 12px; color: #888; margin-top: 3px; }
.home-stat-divider {
    width: 1px;
    height: 28px;
    background: #e5e5e5;
}
.home-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px;
}
.home-section-band {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}
.home-section-band-gray { background: #f9fafb; border: none; }
.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}
.home-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    position: relative;
    display: inline-block;
}
.home-section-title:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 64px;
    height: 4px;
    background: #1D9E75;
    border-radius: 2px;
}
.home-section-sub { font-size: 13px; color: #888; margin-top: 3px; }
.home-view-all {
    font-size: 13px;
    font-weight: 600;
    color: #1D9E75;
    text-decoration: none;
    white-space: nowrap;
}
.home-view-all:hover { color: #0F6E56; text-decoration: underline; }

/* Category Grid */
.home-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.home-cat-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.home-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(29,158,117,0.2);
    border-color: #1D9E75;
}
.home-cat-icon {
    width: 48px;
    height: 48px;
    background: rgba(29,158,117,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.2s;
}
.home-cat-card:hover .home-cat-icon {
    background: #1D9E75;
    color: white;
    transform: scale(1.05);
}
.home-cat-name { font-size: 18px; font-weight: 600; color: #1a1a1a; }
.home-cat-count { font-size: 13px; color: #666; line-height: 1.4; }

/* Calculator Cards Grid */
.home-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.home-calc-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}
.home-calc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(29,158,117,0.2);
    border-color: #1D9E75;
}
.home-calc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.home-calc-tag {
    font-size: 11px;
    font-weight: 600;
    color: #0F6E56;
    background: #E1F5EE;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.home-calc-icon {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.home-calc-name { font-size: 18px; font-weight: 700; color: #1a1a1a; }
.home-calc-desc { font-size: 14px; color: #555; line-height: 1.5; flex: 1; }
.home-calc-btn {
    display: inline-block;
    background: #E1F5EE;
    color: #0F6E56;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    align-self: flex-start;
}
.home-calc-btn:hover {
    background: #1D9E75;
    color: #fff;
}

/* Trust / How It Works */
.home-how-grid, .home-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 28px;
}
.home-trust-grid {
    grid-template-columns: repeat(3, 1fr);
}
.home-how-step, .home-trust-item {
    text-align: center;
}
.home-how-num {
    width: 48px;
    height: 48px;
    background: #1D9E75;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.home-how-title, .home-trust-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.home-how-desc, .home-trust-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}
.home-trust-icon {
    width: 48px;
    height: 48px;
    background: rgba(29,158,117,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}
.home-faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.home-faq-item {
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
}
.home-faq-q {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.home-faq-a {
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}
.home-cta {
    background: #1D9E75;
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 24px;
    margin: 48px 20px;
}
.home-cta h2 { font-size: 28px; margin-bottom: 12px; }
.home-cta p { font-size: 16px; margin-bottom: 24px; opacity: 0.9; }
.home-cta-btn {
    background: white;
    color: #1D9E75;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.home-cta-btn:hover {
    background: #0F6E56;
    color: white;
}
.home-disclaimer {
    font-size: 12px;
    color: #777;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #fefefe;
}
/* Submenu dropdown fixes — Updated for new nav design */
/* These work as a safety net alongside the more specific styles in style.css */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    z-index: 99999;
    min-width: 200px;
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.main-navigation li:hover > ul,
.main-navigation li.sfHover > ul,
.main-navigation li.focus > ul {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    display: flex !important;
    flex-direction: column !important;
}
.main-navigation ul ul li {
    display: block !important;
    width: 100%;
    margin: 0;
    border-bottom: none;
}
.main-navigation ul ul a {
    display: block !important;
    width: 100%;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    background: transparent !important;
    border-radius: 8px !important;
    white-space: nowrap;
    transition: all 0.15s ease !important;
}
.main-navigation ul ul a:hover {
    background: #f0fdf4 !important;
    color: #1D9E75 !important;
}

/* ========== MISSING STYLES FOR GRAVEL CALCULATOR ========== */

/* Two-column row inside forms */
.calc-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

/* Steps list (How to Use) */
.calc-steps {
    margin: 0;
    padding-left: 1.5rem;
}
.calc-steps li {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Tables (Depth Guide) */
.calc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.calc-table th,
.calc-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.calc-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1a1a1a;
}
.calc-table tr:nth-child(even) {
    background: #fafafa;
}

/* FAQ styling */
.calc-faq {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}
.calc-faq:last-child {
    border-bottom: none;
}
.calc-faq-q {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}
.calc-faq-a {
    color: #555;
    line-height: 1.5;
}

/* Tips lists (Pro Tips, Sidebar lists) */
.calc-tips {
    margin: 0;
    padding-left: 1.25rem;
}
.calc-tips li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Sidebar specific – make links look nice */
.calc-sidebar .calc-card a {
    color: #1D9E75;
    text-decoration: none;
}
.calc-sidebar .calc-card a:hover {
    text-decoration: underline;
    color: #0F6E56;
}

/* Make the visual diagram responsive */
#gv-diagram-wrap {
    background: #f8f9fa;
    border-radius: 12px;
}
#gv-diagram-svg svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Better spacing for the Add/Remove buttons */
.calc-btn[style*="background:#e9ecef"]:hover {
    background: #dee2e6 !important;
    transform: none !important;
    box-shadow: none !important;
}