/*
Theme Name: Calculator Pro
Description: Professional multi-niche theme for calculator tools and educational content. Optimized for monetization across financial, automotive, woodworking, and health domains.
Version: 1.0
*/

/* CSS Variables for easy customization across niches */
:root {
  --primary-color: #2563eb; /* Professional blue */
  --secondary-color: #64748b; /* Neutral gray */
  --accent-color: #059669; /* Success green for CTAs */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --background: #ffffff; /* Main background - CHANGE THIS */
  --background-light: #f8fafc; /* Light background for sections */
  --background-body: #ffffff; /* Body background - CHANGE THIS */
  --header-background: #ffffff; /* Header background - CHANGE THIS */
  --footer-background: #1f2937; /* Footer background - CHANGE THIS */
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --border-radius: 8px;
  --max-width: 1200px; /* Standard content width */
  --max-width-full: 1600px; /* Full-width content max */
  --content-padding: 2rem; /* Standard padding */
  --content-padding-full: 4rem; /* Full-width padding */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-body);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Full-width container for modern layouts */
.container-full {
  max-width: var(--max-width-full);
  margin: 0 auto;
  padding: 0 2rem;
  width: 90%;
}

/* Extra wide container for calculators */
.container-ultra {
  max-width: none;
  margin: 0 auto;
  padding: 0 3rem;
  width: 95%;
}

/* Header */
.site-header {
  background: var(--header-background);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

/* Header content styling */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* Site branding in header */
.site-branding .site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-branding .site-logo:hover {
  opacity: 0.8;
}

.site-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
  font-weight: 400;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-navigation a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Main Content Area */
.site-main {
  min-height: calc(100vh - 200px);
}

/* Two-column layout for regular pages */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2rem 0;
}

/* Full-width layout for calculator pages */
.full-width-content {
  padding: var(--content-padding-full) 0;
  max-width: none;
}

.full-width-content .entry-content {
  max-width: none;
  width: 100%;
}

/* Modern full-width wrapper */
.full-width-wrapper {
  width: 100%;
  max-width: var(--max-width-full);
  margin: 0 auto;
  padding: 0 3rem;
}

/* Ultra-wide for calculators */
.calculator-full-width {
  width: 100%;
  max-width: none;
  padding: 0 2rem;
}

/* Calculator page specific width */
.calculator-page .container {
  max-width: var(--max-width-full);
  width: 90%;
  padding: 0 2rem;
}

/* Full-width page specific width */
.layout-full-width .container {
  max-width: var(--max-width-full);
  width: 85%;
  padding: 0 2rem;
}

/* Content Styles */
.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.entry-meta {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.entry-content {
  font-size: 1.125rem;
  line-height: 1.7;
}

.entry-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.entry-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content ul, .entry-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

/* Calculator Specific Styles */
.calculator-container {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  max-width: none;
  width: 100%;
}

/* Modern calculator form layout */
.calculator-form {
  display: grid;
  gap: 2rem;
  max-width: none;
}

/* Modern grid layouts for calculator forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* Auto-responsive grid */
.form-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Calculator intro section */
.calculator-intro {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: var(--border-radius);
}

.calculator-intro h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.calculator-intro p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

/* Modern form styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgb(37 99 235 / 0.1);
  transform: translateY(-1px);
}

.form-group small {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Modern button styling */
.calculate-btn {
  background: linear-gradient(135deg, var(--accent-color), #047857);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  border-radius: var(--border-radius);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  background: linear-gradient(135deg, #047857, var(--accent-color));
}

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

/* Modern result container */
.result-container {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 3px solid var(--accent-color);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin-top: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.result-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 0.5rem;
}

.result-description {
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Sidebar */
.sidebar {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.widget {
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

/* Ad Placement Areas */
.ad-container {
  background: var(--background-light);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
  margin: 2rem 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

.ad-header {
  min-height: 90px;
}

.ad-sidebar {
  min-height: 250px;
  margin-bottom: 2rem;
}

.ad-content {
  min-height: 250px;
}

.ad-footer {
  min-height: 100px;
}

/* Buttons and CTAs */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #1d4ed8;
}

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

.btn-secondary:hover {
  background: #475569;
}

/* Footer */
.site-footer {
  background: var(--footer-background);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .container-ultra {
    width: 92%;
  }
  
  .calculator-page .container {
    width: 88%;
  }
}

@media (max-width: 1200px) {
  .container-full {
    width: 92%;
    padding: 0 1.5rem;
  }
  
  .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 968px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sidebar {
    order: -1;
    position: static;
  }
  
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .calculator-container {
    padding: 2rem;
  }
  
  .container-full,
  .container-ultra {
    width: 95%;
    padding: 0 1rem;
  }
  
  .calculator-page .container {
    width: 95%;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .main-navigation ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-background);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 1rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }
  
  .main-navigation ul.show {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .entry-title {
    font-size: 1.875rem;
  }
  
  .calculator-form {
    grid-template-columns: 1fr;
  }
  
  .calculator-intro h2 {
    font-size: 2rem;
  }
  
  .calculator-intro p {
    font-size: 1.1rem;
  }
  
  .result-value {
    font-size: 2.5rem;
  }
  
  .calculate-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .entry-title {
    font-size: 1.5rem;
  }
  
  .calculator-container {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .result-value {
    font-size: 2rem;
  }
  
  .container,
  .container-full,
  .container-ultra {
    padding: 0 0.75rem;
  }
  
  .calculator-intro {
    padding: 1.5rem;
  }
  
  .calculator-intro h2 {
    font-size: 1.75rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }