/*
Theme Name: BuildCalc
Theme URI: https://buildcalc.example.com
Author: BuildCalc
Author URI: https://buildcalc.example.com
Description: BuildCalc is a professional construction calculator WordPress theme with 100+ built-in calculators (concrete, roofing, framing, flooring, HVAC, electrical and more), a fast blog, SEO-ready markup, Gutenberg support and full Customizer options.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: buildcalc
Tags: construction, calculator, blog, one-column, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks
*/

/* Base */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--bc-font-body,"Inter",system-ui,-apple-system,Segoe UI,Roboto,sans-serif);color:#0b1f3a;background:#f7f8fb;line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,h5,h6{font-family:var(--bc-font-heading,"Space Grotesk","Inter",sans-serif);color:#0b1f3a;line-height:1.2;margin:0 0 .6em}
a{color:#0b1f3a;text-decoration:none}
a:hover{color:#c48a00}
img{max-width:100%;height:auto;display:block}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem 1.25rem;border-radius:12px;font-weight:600;transition:.2s;cursor:pointer;border:0}
.btn-primary{background:#f4b400;color:#0b1f3a}
.btn-primary:hover{background:#d99b00;color:#0b1f3a}
.btn-ghost{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.3)}
.btn-ghost:hover{background:rgba(255,255,255,.1);color:#fff}

/* Header */
.site-header{background:#fff;border-bottom:1px solid #eef1f5;position:sticky;top:0;z-index:50}
.site-header .container{display:flex;align-items:center;justify-content:space-between;padding:14px 20px}
.site-branding a{font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-weight:700;font-size:1.4rem;color:#0b1f3a}
.site-branding .brand-mark{color:#f4b400}
.main-navigation ul{list-style:none;display:flex;gap:22px;margin:0;padding:0}
.main-navigation a{font-weight:500;color:#0b1f3a}
.main-navigation a:hover{color:#c48a00}
.menu-toggle{display:none;background:transparent;border:0;font-size:1.5rem;cursor:pointer}
@media(max-width:860px){
  .menu-toggle{display:block}
  .main-navigation{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid #eef1f5}
  .main-navigation.is-open{display:block}
  .main-navigation ul{flex-direction:column;padding:16px 20px;gap:14px}
}

/* Hero */
.hero{background:linear-gradient(135deg,#0b1f3a 0%,#132f5c 100%);color:#fff;padding:80px 0}
.hero h1{color:#fff;font-size:clamp(2rem,4vw,3.4rem);margin-bottom:1rem}
.hero p.lead{color:#c9d5ea;font-size:1.15rem;max-width:720px;margin-bottom:2rem}
.hero .search-form{display:flex;gap:8px;max-width:640px;background:#fff;padding:8px;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.hero .search-form input[type=search]{flex:1;border:0;padding:.9rem 1rem;font-size:1rem;background:transparent;color:#0b1f3a}
.hero .search-form input:focus{outline:none}
.hero-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:20px;margin-top:3rem}
.hero-stats .stat{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);padding:20px;border-radius:14px}
.hero-stats .stat strong{display:block;font-size:1.8rem;color:#f4b400;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif)}
.hero-stats .stat span{color:#c9d5ea;font-size:.9rem}

/* Sections */
.section{padding:64px 0}
.section-white{background:#fff}
.section-dark{background:#0b1f3a;color:#fff}
.section-dark h2{color:#fff}
.section-dark .section-lead{color:#c9d5ea}
.section h2{font-size:clamp(1.5rem,2.5vw,2rem);margin-bottom:.5rem}
.section .section-lead{color:#516079;margin-bottom:2rem;max-width:720px}
.section .section-lead-center{max-width:640px;margin-left:auto;margin-right:auto}

/* Grids / cards */
.grid{display:grid;gap:20px}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}}

.card{background:#fff;border:1px solid #eef1f5;border-radius:16px;padding:22px;transition:.2s;display:flex;flex-direction:column;gap:8px}
.card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(11,31,58,.08);border-color:#dfe5ee}
.card h3{font-size:1.05rem;margin:0}
.card p{color:#516079;font-size:.92rem;margin:0}
.card .card-icon{width:44px;height:44px;border-radius:12px;background:#fff5d6;display:flex;align-items:center;justify-content:center;color:#c48a00;font-weight:700;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif)}

.badge{display:inline-block;font-size:.75rem;font-weight:600;color:#c48a00;background:#fff5d6;padding:4px 10px;border-radius:999px}

/* Calculator single */
.calc-wrap{display:grid;grid-template-columns:2fr 1fr;gap:32px}
@media(max-width:900px){.calc-wrap{grid-template-columns:1fr}}
.calc-panel{background:#fff;border:1px solid #eef1f5;border-radius:16px;padding:24px}
.calc-inputs{display:grid;gap:14px}
.calc-inputs label{display:block;font-weight:600;font-size:.9rem;margin-bottom:6px}
.calc-inputs input,.calc-inputs select{width:100%;padding:.75rem .9rem;border:1px solid #dfe5ee;border-radius:10px;font-size:1rem;background:#fff}
.calc-inputs input:focus,.calc-inputs select:focus{outline:2px solid #f4b400;border-color:#f4b400}
.unit-toggle{display:inline-flex;background:#f2f4f8;border-radius:10px;padding:4px;margin-bottom:16px}
.unit-toggle button{padding:.4rem .9rem;border:0;background:transparent;border-radius:8px;cursor:pointer;font-weight:600;color:#516079}
.unit-toggle button.active{background:#0b1f3a;color:#fff}
.calc-results{margin-top:24px;padding-top:20px;border-top:1px solid #eef1f5}
.calc-result{display:flex;justify-content:space-between;align-items:baseline;padding:10px 0;border-bottom:1px dashed #eef1f5}
.calc-result:last-child{border-bottom:0}
.calc-result .val{font-weight:700;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);color:#0b1f3a;font-size:1.15rem}
.calc-result.emphasis .val{color:#c48a00;font-size:1.5rem}

/* Article */
.entry-content{max-width:760px;margin:0 auto}
.entry-content p,.entry-content ul,.entry-content ol{margin:0 0 1em}
.entry-content h2,.entry-content h3{margin-top:1.6em}
.entry-content img,.entry-content .wp-block-image{border-radius:12px}
.alignwide{max-width:1100px;margin-left:auto;margin-right:auto}
.alignfull{max-width:none;width:100vw;margin-left:calc(50% - 50vw)}

/* Breadcrumbs */
.breadcrumbs{font-size:.85rem;color:#516079;padding:14px 0}
.breadcrumbs a{color:#516079}
.breadcrumbs .sep{margin:0 6px;color:#aab3c1}

/* Sidebar / widgets */
.content-sidebar{display:grid;grid-template-columns:2fr 1fr;gap:32px}
@media(max-width:900px){.content-sidebar{grid-template-columns:1fr}}
.widget{background:#fff;border:1px solid #eef1f5;border-radius:14px;padding:18px;margin-bottom:20px}
.widget-title{font-size:1rem;margin-bottom:12px}
.widget ul{list-style:none;padding:0;margin:0}
.widget li{padding:6px 0;border-bottom:1px solid #f1f3f7}
.widget li:last-child{border-bottom:0}

/* Footer */
.site-footer{background:#0b1f3a;color:#c9d5ea;padding:56px 0 20px;margin-top:64px}
.site-footer h4{color:#fff;font-size:1rem;margin-bottom:14px}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{margin-bottom:8px}
.site-footer .footer-brand-text{max-width:280px;margin:0;color:#c9d5ea}
.site-footer a{color:#c9d5ea}
.site-footer a:hover{color:#f4b400}
.site-footer .footer-nav{margin-top:24px}
.site-footer .footer-menu{display:flex;flex-wrap:wrap;gap:16px;list-style:none;margin:0;padding:0}
.site-footer .footer-bottom{border-top:1px solid rgba(255,255,255,.1);margin-top:32px;padding-top:20px;font-size:.85rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}

/* FAQ */
.faq details{background:#fff;border:1px solid #eef1f5;border-radius:12px;padding:14px 18px;margin-bottom:10px}
.faq summary{cursor:pointer;font-weight:600;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq details[open]{border-color:#f4b400}

/* Pagination */
.pagination{display:flex;gap:6px;justify-content:center;margin:30px 0}
.pagination a,.pagination span{padding:.5rem .9rem;border:1px solid #dfe5ee;border-radius:8px;color:#0b1f3a}
.pagination .current{background:#0b1f3a;color:#fff;border-color:#0b1f3a}

/* Utilities */
.text-center{text-align:center}
.mt-2{margin-top:2rem}
.mb-2{margin-bottom:2rem}
.hidden{display:none}

/* Comments */
.comment-list{list-style:none;padding:0}
.comment-list li{background:#fff;border:1px solid #eef1f5;border-radius:12px;padding:16px;margin-bottom:12px}
.comment-form input,.comment-form textarea{width:100%;padding:.7rem .9rem;border:1px solid #dfe5ee;border-radius:10px;margin-bottom:10px}
/* Card + posts */
.card-post .card-thumb{display:block;border-radius:12px;overflow:hidden;margin-bottom:12px;aspect-ratio:16/10;background:linear-gradient(135deg,#0b1f3a,#132f5c);position:relative}
.card-post .card-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.card-thumb-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#f4b400;font-weight:700;font-size:2rem;letter-spacing:.05em}
.card-cat{margin:0 0 4px;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em}
.card-cat a{color:#f4b400;text-decoration:none;font-weight:600}
.card-meta{color:#6b7280;margin:.3rem 0}
.btn-link{background:transparent;color:#0b1f3a;font-weight:600;padding:0;border:0}
.no-articles{padding:2rem;text-align:center;color:#6b7280;background:#fff;border:1px dashed #e5e7eb;border-radius:12px}
.newsletter-form input[type=email]{width:100%;padding:.7rem .9rem;border:1px solid #dfe5ee;border-radius:10px;margin-bottom:8px}

/* Footer refined layout */
.site-footer .footer-grid{gap:40px;align-items:flex-start}
.site-footer .footer-col--brand{max-width:340px}
.site-footer .footer-brand{display:flex;flex-direction:column;gap:14px}
.site-footer .footer-logo{display:inline-flex;align-items:center;gap:10px;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-weight:700;font-size:1.25rem;color:#fff}
.site-footer .footer-logo .brand-mark{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#f4b400;color:#0b1f3a;font-size:.9rem}
.site-footer .footer-logo .brand-name{color:#fff}
.site-footer .footer-brand-text{max-width:320px;margin:0;color:#c9d5ea;font-size:.95rem}
.site-footer .footer-social{display:flex;flex-wrap:wrap;gap:12px;font-size:.85rem;color:#c9d5ea}
.site-footer .footer-social a{color:#c9d5ea}
.site-footer .footer-social a:hover{color:#f4b400}
.site-footer .footer-menu-list{list-style:none;margin:0;padding:0}
.site-footer .footer-menu-list li{margin-bottom:8px}
.site-footer .footer-newsletter-text{margin:0 0 12px;color:#c9d5ea;font-size:.9rem}
.site-footer .newsletter-form input[type=email]{width:100%;padding:.7rem .9rem;border:1px solid rgba(255,255,255,.15);border-radius:10px;background:rgba(255,255,255,.06);color:#fff;margin-bottom:10px}
.site-footer .newsletter-form input[type=email]::placeholder{color:rgba(255,255,255,.5)}
.site-footer .newsletter-form .btn-primary{width:100%}
.site-footer .footer-bottom{justify-content:center;text-align:center}
@media(max-width:900px){.site-footer .footer-grid{gap:32px}.site-footer .footer-col--brand{max-width:none;grid-column:1/-1}}
@media(max-width:560px){.site-footer{padding:44px 0 20px}.site-footer .footer-grid{gap:28px}}

/* ===== Library Page ===== */
.library-hero{padding:3rem 0 2rem}
.library-hero .hero-title{margin:.5rem 0 .5rem}
.library-hero .hero-sub{opacity:.9;max-width:780px}
.library-controls{display:grid;grid-template-columns:1fr 260px;gap:.75rem;margin-top:1.5rem;max-width:900px}
.library-controls input[type=search],.library-controls select{width:100%;padding:.85rem 1rem;border-radius:10px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.08);color:#fff;font:inherit}
.library-controls input::placeholder{color:rgba(255,255,255,.7)}
.library-controls select option{color:#111}
.library-layout{display:grid;grid-template-columns:1fr 300px;gap:2rem;padding:2rem 0}
.library-counter{color:var(--bc-muted,#555);margin:.25rem 0 1rem;font-size:.95rem}
.library-grid.is-loading{opacity:.55;transition:opacity .15s}
.library-pagination{display:flex;flex-wrap:wrap;gap:.35rem;justify-content:center;margin-top:2rem}
.library-pagination .page-btn{padding:.5rem .85rem;border:1px solid #e2e5ea;background:#fff;border-radius:8px;cursor:pointer;font:inherit;color:var(--bc-primary,#0b1f3a)}
.library-pagination .page-btn.is-active{background:var(--bc-primary,#0b1f3a);color:#fff;border-color:var(--bc-primary,#0b1f3a)}
.library-pagination .page-btn[disabled]{opacity:.4;cursor:not-allowed}
.library-pagination .page-ellipsis{padding:.5rem .25rem;color:#888}
.card.is-skeleton{pointer-events:none}
.skeleton{background:linear-gradient(90deg,#eef1f5 0%,#f7f8fb 50%,#eef1f5 100%);background-size:200% 100%;animation:bcSkel 1.2s infinite;border-radius:8px;min-height:14px;margin:.5rem 0}
.card.is-skeleton .card-thumb.skeleton{min-height:180px;margin:0}
.skeleton-line{height:14px}.skeleton-line.short{width:60%}
@keyframes bcSkel{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media(max-width:900px){.library-layout{grid-template-columns:1fr}.library-controls{grid-template-columns:1fr}}

/* ===== Library (rebuilt) ===== */
.bc-library{max-width:1200px;margin:0 auto;padding:56px 20px}
.bc-library-header{margin-bottom:32px}
.bc-library-title{font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-size:clamp(1.9rem,3.2vw,2.5rem);font-weight:700;margin:0 0 .35em;color:#0b1f3a}
.bc-library-sub{color:#5b6577;margin:0;font-size:1rem}
.bc-library-controls{display:grid;grid-template-columns:1fr 260px;gap:12px;margin-bottom:28px}
.bc-library-controls input[type=search],.bc-library-controls select{width:100%;height:44px;padding:0 14px;border:1px solid #e2e5ea;background:#fff;border-radius:8px;font:inherit;color:#0b1f3a;outline:none;transition:border-color .15s,box-shadow .15s}
.bc-library-controls input[type=search]:focus,.bc-library-controls select:focus{border-color:#0b1f3a;box-shadow:0 0 0 3px rgba(11,31,58,.08)}
.bc-library-controls select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230b1f3a'><path d='M5 8l5 5 5-5H5z'/></svg>");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px}
.bc-library-count{color:#5b6577;font-size:.9rem;margin:0 0 16px;min-height:1.25em}
.bc-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.bc-library-grid[aria-busy=true].is-empty{opacity:.6}
@media(max-width:900px){.bc-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bc-library-controls{grid-template-columns:1fr}}
@media(max-width:600px){.bc-library-grid{grid-template-columns:1fr}}
.bc-card{background:#fff;border:1px solid #eef1f5;border-radius:14px;padding:24px;display:flex;flex-direction:column;gap:8px;transition:transform .18s,box-shadow .18s}
.bc-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px -18px rgba(11,31,58,.35)}
.bc-card-cat{font-size:.72rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#0b1f3a;margin:0}
.bc-card-title{font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-size:1.2rem;font-weight:600;margin:.15em 0 .25em;line-height:1.3}
.bc-card-title a{color:#0b1f3a}
.bc-card-excerpt{color:#5b6577;font-size:.92rem;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.bc-card-meta{color:#8892a3;font-size:.8rem;margin-top:auto;padding-top:12px}
.bc-lib-empty{grid-column:1/-1;text-align:center;padding:48px 16px;color:#5b6577;background:#fff;border:1px dashed #e2e5ea;border-radius:14px}
.bc-library-pager{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:40px}
.bc-lib-btn{background:#fff;border:1px solid #e2e5ea;border-radius:8px;padding:10px 18px;font:inherit;color:#0b1f3a;cursor:pointer;transition:.15s}
.bc-lib-btn:hover:not([disabled]){border-color:#0b1f3a}
.bc-lib-btn[disabled]{opacity:.4;cursor:not-allowed}
.bc-lib-pageinfo{color:#5b6577;font-size:.9rem}

/* ===== Footer (rebuilt) ===== */
.bc-footer{margin-top:96px;background:#0b1f3a;color:#e6ebf3;border-top:1px solid rgba(255,255,255,.06)}
.bc-footer-inner{max-width:1280px;margin:0 auto;padding:56px 20px 24px}
.bc-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1.4fr;gap:48px}
@media(max-width:1000px){.bc-footer-grid{grid-template-columns:1fr 1fr;gap:36px}}
@media(max-width:560px){.bc-footer-grid{grid-template-columns:1fr}}
.bc-footer-col{min-width:0}
.bc-footer-logo{display:inline-flex;align-items:center;gap:10px;color:#fff;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-weight:700;font-size:1.15rem;margin-bottom:12px}
.bc-footer-logo-mark{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#f4b400;color:#0b1f3a}
.bc-footer-desc{color:rgba(230,235,243,.7);font-size:.92rem;margin:0 0 16px;max-width:320px;line-height:1.6}
.bc-footer-title{color:#fff;font-family:var(--bc-font-heading,"Space Grotesk",sans-serif);font-size:.78rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;margin:0 0 14px}
.bc-footer-links,.bc-footer-social,.bc-footer-bottom-links{list-style:none;padding:0;margin:0}
.bc-footer-links li{margin-bottom:10px}
.bc-footer-links a{color:rgba(230,235,243,.7);font-size:.92rem;transition:color .15s}
.bc-footer-links a:hover{color:#f4b400}
.bc-footer-social{display:flex;gap:10px;margin-top:6px}
.bc-footer-social a{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;background:rgba(255,255,255,.06);color:#e6ebf3;transition:.15s}
.bc-footer-social a:hover{background:#f4b400;color:#0b1f3a}
.bc-newsletter{display:flex;gap:8px;margin-top:8px}
.bc-newsletter input[type=email]{flex:1;min-width:0;height:40px;padding:0 12px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.06);color:#fff;border-radius:8px;font:inherit;outline:none}
.bc-newsletter input[type=email]::placeholder{color:rgba(230,235,243,.55)}
.bc-newsletter input[type=email]:focus{border-color:#f4b400}
.bc-newsletter-btn{height:40px;padding:0 16px;border:0;border-radius:8px;background:#f4b400;color:#0b1f3a;font:inherit;font-weight:600;cursor:pointer;transition:.15s}
.bc-newsletter-btn:hover{background:#d99b00}
.bc-footer-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:40px;padding-top:24px;border-top:1px solid rgba(255,255,255,.08);color:rgba(230,235,243,.55);font-size:.8rem}
.bc-footer-bottom p{margin:0}
.bc-footer-bottom-links{display:flex;gap:20px}
.bc-footer-bottom-links a{color:rgba(230,235,243,.55)}
.bc-footer-bottom-links a:hover{color:#f4b400}
