/*
Theme Name: Property Calculator PK
Theme URI: https://propertycalculator.pk
Author: PropertyCalculator.pk
Author URI: https://propertycalculator.pk
Description: Pakistan's #1 Property Calculator Platform — Mortgage, Rental Yield, Construction Cost, Area Converter and more.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: propertycalculator-pk
Tags: real-estate, calculator, pakistan, property
*/

/* ===================================================
   DESIGN TOKENS
=================================================== */
:root {
  --brand-green:      #16a34a;
  --brand-green-dark: #15803d;
  --brand-green-light:#dcfce7;
  --brand-teal:       #0d9488;
  --brand-teal-light: #ccfbf1;
  --accent-amber:     #f59e0b;
  --neutral-50:       #f8fafc;
  --neutral-100:      #f1f5f9;
  --neutral-200:      #e2e8f0;
  --neutral-400:      #94a3b8;
  --neutral-600:      #475569;
  --neutral-700:      #334155;
  --neutral-800:      #1e293b;
  --neutral-900:      #0f172a;
  --white:            #ffffff;
  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        20px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,.08);
  --shadow-md:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:        0 12px 40px rgba(0,0,0,.14);
  --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:       .2s ease;
}

/* ===================================================
   RESET & BASE
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--neutral-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-green-dark); }
ul { list-style: none; }

/* ===================================================
   LAYOUT HELPERS
=================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.text-green { color: var(--brand-green); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: var(--brand-green-light); color: var(--brand-green-dark);
}

/* ===================================================
   TYPOGRAPHY
=================================================== */
h1,h2,h3,h4,h5,h6 { color: var(--neutral-900); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { color: var(--neutral-600); }
.lead { font-size: 1.15rem; color: var(--neutral-600); max-width: 640px; }
.section-title { margin-bottom: 12px; }
.section-subtitle { margin-bottom: 48px; font-size: 1.05rem; }

/* ===================================================
   BUTTONS
=================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: none; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--brand-green); color: var(--white);
  box-shadow: 0 2px 8px rgba(22,163,74,.3);
}
.btn-primary:hover {
  background: var(--brand-green-dark); color: var(--white);
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,163,74,.4);
}
.btn-outline {
  background: transparent; color: var(--brand-green);
  border: 2px solid var(--brand-green);
}
.btn-outline:hover {
  background: var(--brand-green); color: var(--white);
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ===================================================
   HEADER / NAV
=================================================== */
#site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}
.header-inner { height: 72px; }
.site-branding { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-branding .logo-icon {
  width: 40px; height: 40px; background: var(--brand-green);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
}
.site-branding .logo-icon svg { fill: white; width: 22px; height: 22px; }
.site-branding .logo-text { font-size: 1.1rem; font-weight: 700; color: var(--neutral-900); }
.site-branding .logo-text span { color: var(--brand-green); }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--neutral-700);
  transition: all var(--transition);
}
.primary-nav a:hover,
.primary-nav a.current { background: var(--brand-green-light); color: var(--brand-green-dark); }

.header-cta { margin-left: 16px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--neutral-800); margin: 5px 0;
  transition: all var(--transition);
}

/* ===================================================
   HERO SECTION
=================================================== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #134e2a 100%);
  padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="60" fill="rgba(22,163,74,0.06)"/><circle cx="80" cy="80" r="40" fill="rgba(13,148,136,0.06)"/></svg>');
  background-size: 600px;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge { margin-bottom: 20px; }
.hero-badge .badge { background: rgba(22,163,74,.2); color: #4ade80; border: 1px solid rgba(74,222,128,.3); }
.hero h1 { color: white; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: #4ade80; }
.hero .lead { color: rgba(255,255,255,.75); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 56px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .stat-num { font-size: 1.75rem; font-weight: 800; color: white; line-height: 1; }
.hero-stat .stat-label { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 4px; }
.hero-image { position: relative; }
.hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ===================================================
   CALCULATOR CARDS
=================================================== */
.calculators-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.calc-card {
  background: var(--white); border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md); padding: 28px 24px;
  transition: all var(--transition); text-decoration: none;
  display: flex; flex-direction: column; gap: 12px;
}
.calc-card:hover {
  border-color: var(--brand-green); box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.calc-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: var(--brand-green-light);
}
.calc-card h3 { font-size: 1.05rem; color: var(--neutral-900); }
.calc-card p { font-size: .875rem; color: var(--neutral-600); flex: 1; }
.calc-card .card-link {
  font-size: .85rem; font-weight: 600; color: var(--brand-green);
  display: flex; align-items: center; gap: 4px;
}
.calc-card:hover .card-link { gap: 8px; }

/* ===================================================
   CALCULATOR PAGE TEMPLATE
=================================================== */
.calc-page-hero {
  background: linear-gradient(135deg, var(--neutral-900), var(--neutral-800));
  padding: 60px 0 48px; color: white;
}
.calc-page-hero h1 { color: white; margin-bottom: 12px; }
.calc-page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.calc-breadcrumb { margin-bottom: 20px; }
.calc-breadcrumb a { color: rgba(255,255,255,.5); font-size: .85rem; }
.calc-breadcrumb span { color: rgba(255,255,255,.5); margin: 0 8px; }
.calc-breadcrumb .current { color: rgba(255,255,255,.9); }

.calc-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.calc-main-panel {
  background: var(--white); border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md); padding: 32px; box-shadow: var(--shadow-sm);
}
.calc-sidebar {
  display: flex; flex-direction: column; gap: 24px;
}
.calc-result-card {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-teal));
  color: white; border-radius: var(--radius-md); padding: 28px;
}
.calc-result-card .result-label { font-size: .85rem; opacity: .8; margin-bottom: 8px; }
.calc-result-card .result-value { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.calc-result-card .result-note { font-size: .8rem; opacity: .75; margin-top: 10px; }
.calc-info-card {
  background: var(--neutral-50); border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md); padding: 24px;
}
.calc-info-card h4 { margin-bottom: 12px; font-size: .95rem; }
.calc-info-card ul { display: flex; flex-direction: column; gap: 8px; }
.calc-info-card li { font-size: .875rem; color: var(--neutral-600); padding-left: 16px; position: relative; }
.calc-info-card li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-green); font-weight: 700; }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .875rem; font-weight: 600;
  color: var(--neutral-700); margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--neutral-200); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--neutral-800);
  background: var(--white); transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}
.form-hint { font-size: .8rem; color: var(--neutral-400); margin-top: 4px; }
.input-group { display: flex; }
.input-group .form-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .input-addon {
  padding: 11px 14px; background: var(--neutral-100);
  border: 1.5px solid var(--neutral-200); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem; color: var(--neutral-600); white-space: nowrap;
}
.range-slider { width: 100%; accent-color: var(--brand-green); cursor: pointer; }
.range-display { display: flex; justify-content: space-between; font-size: .8rem; color: var(--neutral-400); margin-top: 4px; }

/* Results table */
.results-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.results-table th {
  text-align: left; padding: 10px 12px;
  background: var(--neutral-100); font-size: .8rem;
  font-weight: 600; color: var(--neutral-600); text-transform: uppercase; letter-spacing: .04em;
}
.results-table td { padding: 12px; border-bottom: 1px solid var(--neutral-100); font-size: .9rem; }
.results-table tr:last-child td { border-bottom: none; }
.results-table .highlight { font-weight: 700; color: var(--brand-green); }

/* ===================================================
   AREA CONVERTER
=================================================== */
.converter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.converter-card {
  background: var(--neutral-50); border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md); padding: 20px; text-align: center;
}
.converter-card .unit-name { font-size: .8rem; color: var(--neutral-400); margin-bottom: 4px; }
.converter-card .unit-value { font-size: 1.4rem; font-weight: 700; color: var(--neutral-900); }
.converter-card .unit-value.active { color: var(--brand-green); }

/* ===================================================
   FEATURES / WHY SECTION
=================================================== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
  padding: 28px 24px; border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200); background: var(--white);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--brand-green-light); display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: .875rem; }

/* ===================================================
   TESTIMONIALS
=================================================== */
.testimonials-section { background: var(--neutral-50); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 28px; border: 1px solid var(--neutral-200); box-shadow: var(--shadow-sm);
}
.testimonial-stars { color: var(--accent-amber); font-size: 1rem; margin-bottom: 12px; }
.testimonial-text { font-size: .9rem; color: var(--neutral-700); margin-bottom: 16px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-green-light); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .9rem; color: var(--brand-green-dark);
}
.testimonial-name { font-weight: 600; font-size: .875rem; color: var(--neutral-800); }
.testimonial-role { font-size: .8rem; color: var(--neutral-400); }

/* ===================================================
   CTA SECTION
=================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-teal) 100%);
  padding: 80px 0; color: white; text-align: center;
}
.cta-section h2 { color: white; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,.85); margin-bottom: 32px; font-size: 1.1rem; }
.btn-white { background: white; color: var(--brand-green); }
.btn-white:hover { background: var(--neutral-100); color: var(--brand-green-dark); }

/* ===================================================
   CONTENT / BLOG
=================================================== */
.content-section { padding: 80px 0; }
.entry-content h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.entry-content h3 { font-size: 1.2rem; margin: 24px 0 10px; }
.entry-content p { margin-bottom: 16px; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 16px; }
.entry-content ul li { list-style: disc; margin-bottom: 6px; color: var(--neutral-600); }
.entry-content ol li { list-style: decimal; margin-bottom: 6px; color: var(--neutral-600); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.entry-content table th, .entry-content table td { padding: 10px 14px; border: 1px solid var(--neutral-200); text-align: left; }
.entry-content table th { background: var(--neutral-100); font-weight: 600; }

/* ===================================================
   FOOTER
=================================================== */
#site-footer { background: var(--neutral-900); color: rgba(255,255,255,.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-about .footer-logo { margin-bottom: 16px; }
.footer-about p { font-size: .875rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 { color: white; font-size: .875rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .06em; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--brand-green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: gap;
}
.footer-bottom p { font-size: .8rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,.5); font-size: .8rem; }
.footer-bottom-links a:hover { color: var(--brand-green); }

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 1024px) {
  .calculators-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 72px 0 60px; }
  .hero-image { display: none; }
}
@media (max-width: 768px) {
  .primary-nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .primary-nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--neutral-200);
    padding: 16px 24px; box-shadow: var(--shadow-md);
  }
  .primary-nav.open a { padding: 12px 0; border-bottom: 1px solid var(--neutral-100); }
  .calculators-grid, .features-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .section { padding: 56px 0; }
  .converter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .converter-grid { grid-template-columns: 1fr 1fr; }
}
