/* Productivity Calculator Site - Main CSS File */
/* Modern, Responsive Design with Dark/Light Mode - PERFECT HORIZONTAL HEADER */

/* ========================================
   CSS Variables for Theme Management (REFINED)
   ======================================== */
:root {
    /* 1. Core Color Palette (Brand & Neutrals) */
    /* Brand Colors */
    --brand-primary: #9abef5;
    --brand-primary-hover: #2563eb;
    --brand-accent: #f59e0b;
    --brand-gradient-start: #667eea;
    --brand-gradient-end: #764ba2;

    /* Neutral Colors (Grayscale) */
    --neutral-0: #ffffff;
    --neutral-100: #e5e7eb; /* Light Gray for borders */
    --neutral-200: #d1d5db;
    --neutral-500: #6b7280; /* Secondary Text */
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #030526; /* Footer Background */
    --neutral-1000: #000000;

    /* Semantic Colors */
    --semantic-success: #10b981;
    --semantic-warning: #f59e0b;
    --semantic-danger: #ef4444;
    
    /* 2. Theme-Specific Semantic Variables (Light Theme - Default) */
    --bg-primary: var(--neutral-0);
    --bg-header: var(--neutral-0);
    --bg-card: var(--neutral-0);
    --bg-input: var(--neutral-0);
    --bg-footer: var(--neutral-900);

    --text-primary: var(--neutral-1000);
    --text-secondary: var(--neutral-500);
    --text-on-brand: var(--neutral-0);
    --text-footer-primary: var(--neutral-0);
    --text-footer-secondary: var(--neutral-200);

    --border-primary: var(--neutral-100);

    --button-bg-primary: var(--brand-primary);
    --button-bg-primary-hover: var(--brand-primary-hover);
    --button-bg-cta: var(--brand-accent);

    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-lg: rgba(0, 0, 0, 0.07);
    --shadow: 0 1px 3px var(--shadow-color);
    --shadow-lg: 0 4px 6px var(--shadow-color-lg);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   PERFECT HORIZONTAL HEADER - ALL SCREEN SIZES
   ======================================== */

.header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

/* ALWAYS HORIZONTAL NAVIGATION */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    min-height: 60px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Desktop Navigation Menu - SHOWS ON DESKTOP BY DEFAULT */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--button-bg-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--button-bg-primary);
    border-radius: 1px;
}

/* HORIZONTAL HEADER CONTROLS */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* MOBILE MENU TOGGLE - HIDDEN ON DESKTOP BY DEFAULT */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    cursor: pointer;
    width: 34px;
    height: 32px;
    position: relative;
    transition: all 0.3s ease;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-card);
    border-color: var(--button-bg-primary);
}

.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    transform-origin: center;
}

/* HAMBURGER TO X ANIMATION */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile Navigation - HIDDEN ON DESKTOP BY DEFAULT */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-nav.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--border-primary);
}

.mobile-nav-menu li:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--button-bg-primary);
    background-color: var(--border-primary);
}

/* ========================================
   CALCULATOR SEARCH FUNCTIONALITY
   ======================================== */

/* Search Icon Button in Header */
.search-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  min-width: 40px !important;
}

.search-icon-btn:hover {
  background: #f5f5f5;
  border-color: #9abef5;
  color: #9abef5;
}

/* Styles for the search emoji to control its size and alignment */
.search-icon-btn, .search-input-icon {
    font-size: 20px;
    line-height: 1;
}

.search-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.search-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.search-modal-content {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.search-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  min-width: 32px !important;
  padding: 0;
}

.search-close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.search-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-input-wrapper {
  position: relative;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.search-input-icon {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 48px;
  font-size: 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  border-color: #9abef5;
}

.search-clear-btn {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  min-width: 28px !important;
  padding: 0;
}

.search-clear-btn:hover {
  background: #e5e5e5;
  color: #333;
}

.search-clear-btn.hidden {
  display: none;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.search-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #9abef5;
  border-radius: 50%;
  animation: spinSearch 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spinSearch {
  to { transform: rotate(360deg); }
}

.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
  text-align: center;
}

.search-empty-state svg {
  color: #ccc;
  margin-bottom: 16px;
}

.search-empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

.search-results-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.search-results-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: #f9f9f9;
  border-color: #9abef5;
  transform: translateX(4px);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-title mark {
  background: #fff3cd;
  color: inherit;
  padding: 2px 4px;
  border-radius: 3px;
}

.search-result-description {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #9abef5;
  background: #f0f8ed;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
}

.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.search-no-results svg {
  color: #ccc;
  margin-bottom: 16px;
}

.search-no-results h3 {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 8px 0;
}

.search-no-results p {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 8px 0;
}

.search-request-text {
  margin-top: 16px !important;
}

.search-request-text a {
  color: #9abef5;
  text-decoration: underline;
  font-weight: 500;
}

.search-request-text a:hover {
  color: #45a049;
}

.search-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #dc3545;
  text-align: center;
}

.search-error p {
  margin: 0;
}

/* Pill-shaped search bar styles */
.pill-search-wrapper {
    position: relative;
}

.pill-search-wrapper .search-input-icon {
    display: none;
}

.pill-search-wrapper .search-input {
    border-radius: 50px !important;
    border: 2px solid #e0e0e0 !important;
    padding: 15px 70px 15px 25px !important;
    font-size: 16px;
    height: 60px;
}

.pill-search-wrapper .search-input::placeholder {
    color: #a0a0a0;
}

.pill-search-wrapper .search-input:focus {
    border-color: #8fbdf1 !important;
    box-shadow: none;
}

.search-submit-btn {
    position: absolute;
    top: 50%;
    right: 28px;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    min-width: 48px !important;
    border-radius: 50%;
    background-color: #23c552;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 22px;
    transition: background-color 0.3s ease;
}

.search-submit-btn:hover {
    background-color: #1faa46;
    transform: translateY(-50%);
}

.pill-search-wrapper .search-clear-btn {
    right: 90px;
}

/* ========================================
   REST OF THE STYLES
   ======================================== */

/* Hero Section */
.hero {
    background-color: #9abef5;
    color: white;
    text-align: center;
    padding: 1rem 0 !important;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Sections */
.default-calculator {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.default-calculator h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.calc-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--button-bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   Calculate Button - Specific Styling
   ======================================== */
.calculate-btn {
    background-color: #9abef5 !important;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.calculate-btn:hover {
    background-color: #224ef0 !important;
    transform: translateY(-1px);
}

.quick-result {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--semantic-success);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
}

/* CTA Section */
.all-calc-cta {
    text-align: center;
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--button-bg-cta);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Categories Grid */
.popular-categories {
    margin-bottom: 4rem;
}

.popular-categories h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--button-bg-primary);
}

.category-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category-card a {
    color: var(--button-bg-primary);
    text-decoration: none;
    font-weight: 500;
}

.category-card a:hover {
    text-decoration: underline;
}

/* Simple fallback list styling */
.simple-list-fallback { margin: 2rem 0; }
.simple-list-fallback ul { padding-left: 1.25rem; }
.simple-list-fallback li { margin-bottom: 0.5rem; }

/* Calculator List */
.all-calculators-list {
    margin-bottom: 4rem;
}

.all-calculators-list h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.calculator-category {
    margin-bottom: 3rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calculator-category h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.calculator-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.calculator-list li {
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.calculator-list li:hover {
    background-color: var(--border-primary);
}

.calc-link {
    color: var(--button-bg-primary);
    text-decoration: none;
    font-weight: 500;
}

.calc-link:hover {
    text-decoration: underline;
}

.calc-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Star Rating */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.star {
    color: #fbbf24;
    font-size: 1.2rem;
}

.star.empty {
    color: var(--border-primary);
}

.rating-text {
    margin-left: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Social Share */
.social-share {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.social-share-title {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.social-share-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.social-share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.social-share-btn.facebook:hover {
    background-color: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-share-btn.twitter:hover {
    background-color: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.social-share-btn.linkedin:hover {
    background-color: #0a66c2;
    color: white;
    border-color: #0a66c2;
}

.social-share-btn.pinterest:hover {
    background-color: #bd081c;
    color: white;
    border-color: #bd081c;
}

.social-share-btn.whatsapp:hover {
    background-color: #25d366;
    color: white;
    border-color: #25d366;
}

.social-share-btn.email:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Breadcrumbs */
.breadcrumbs-container {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 0;
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--button-bg-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.separator {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--border-primary);
    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-title,
.footer-social h3,
.footer-social h4,
.footer-social p {
    margin-bottom: 1rem;
    color: var(--text-footer-primary);
}

.footer-description {
    color: var(--text-footer-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat {
    background-color: var(--text-footer-primary);
    color: var(--bg-footer);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-footer-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-footer-primary);
}

.footer-social {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-primary);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-link {
    color: var(--text-footer-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--text-footer-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--text-footer-secondary);
    text-align: center;
    width: 100%;
}

.footer-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-footer-secondary);
    font-size: 0.9rem;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--button-bg-primary);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 0;
    box-sizing: content-box;
    -webkit-appearance: none;
    appearance: none;
    min-width: 56px !important;
    max-width: 56px;
    min-height: 56px;
    max-height: 56px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

#back-to-top.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--button-bg-primary-hover);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#back-to-top,
#back-to-top:focus,
#back-to-top:active {
    padding: 0 !important;
}

#back-to-top:active {
    transform: translateY(0) scale(0.98);
}

/* ========================================
   RESPONSIVE DESIGN - FIXED FOR DESKTOP
   Desktop: Normal horizontal menu (769px+)
   Mobile: Hamburger menu (768px and below)
   ======================================== */

/* TABLET (768px and below) - Show hamburger, hide desktop menu */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    /* HIDE desktop navigation menu on mobile */
    .nav-menu {
        display: none;
    }
    
    /* SHOW hamburger toggle on mobile */
    .mobile-menu-toggle {
        display: flex;
        width: 26px;
        min-width: 0 !important;
        height: 32px;
        gap: 3px;
        padding: 4px;
        box-sizing: border-box;
        order: 2;
    }
    
    .nav {
        padding: 0.6rem 0;
        min-height: 56px;
    }
    
    .logo {
        font-size: 1.3rem;
        gap: 0.4rem;
    }
    
    .logo img {
        width: 34px;
        height: 34px;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle span {
        width: 12px;
        height: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-4px) rotate(-45deg);
    }

    /* Search Icon Mobile */
    .search-icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px !important;
        order: 1;
    }

    .search-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Search Modal Mobile */
    .search-modal {
        padding: 10px;
    }

    .search-modal-content {
        max-height: calc(100vh - 20px);
    }

    .search-modal-header {
        padding: 16px;
    }

    .search-modal-title {
        font-size: 1.1rem;
    }

    .search-close-btn {
        width: 28px;
        height: 28px;
        min-width: 28px !important;
    }

    .search-input-wrapper {
        padding: 16px;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 10px 36px 10px 40px;
    }

    .search-input-icon {
        left: 28px;
    }

    .search-clear-btn {
        right: 24px;
        width: 24px;
        height: 24px;
        min-width: 24px !important;
    }

    .search-results {
        padding: 16px;
    }

    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .search-result-item:hover {
        transform: none;
    }

    .search-result-title {
        white-space: normal;
        font-size: 0.95rem;
    }

    .search-result-description {
        white-space: normal;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .search-result-category {
        font-size: 0.75rem;
        padding: 3px 10px;
    }

    .search-empty-state,
    .search-no-results,
    .search-loading {
        padding: 40px 16px;
    }

    .search-empty-state svg,
    .search-no-results svg {
        width: 40px;
        height: 40px;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .input-row button {
        width: 100%;
        padding: 0.85rem 1.5rem;
    }
    
    .input-group {
        min-width: 100%;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .calculator-list {
        grid-template-columns: 1fr;
    }
    
    #back-to-top {
        width: 50px;
        height: 50px;
        min-width: 50px !important;
        max-width: 50px;
        min-height: 50px;
        max-height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 16px;
    }
}

/* MOBILE (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    
    .nav {
        padding: 0.5rem 0;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 1.2rem;
        gap: 0.35rem;
        flex: 1;
        min-width: 0;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .header-controls {
        gap: 0.4rem;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        width: 34px;
        min-width: 0 !important;
        height: 34px;
        gap: 5px;
        padding: 4px;
        box-sizing: border-box;
    }
    
    .mobile-menu-toggle span {
        width: 16px;
        height: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-4px) rotate(-45deg);
    }

    /* Search Icon Small Mobile */
    .search-icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px !important;
    }

    .search-icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .search-modal-title {
        font-size: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .default-calculator,
    .calculator-category,
    .social-share {
        padding: 1.25rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .social-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    #back-to-top {
        width: 44px;
        height: 44px;
        min-width: 44px !important;
        max-width: 44px;
        min-height: 44px;
        max-height: 44px;
        bottom: 1rem;
        right: 1rem;
        font-size: 14px;
    }
}

/* SMALL MOBILE (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .nav {
        padding: 0.4rem 0;
        min-height: 48px;
    }
    
    .logo {
        font-size: 1.1rem;
        gap: 0.3rem;
    }
    
    .logo img {
        width: 28px;
        height: 28px;
    }
    
    .header-controls {
        gap: 0.3rem;
    }
    
    .mobile-menu-toggle {
        width: 24px;
        min-width: 0 !important;
        height: 28px;
        gap: 2px;
        padding: 3px;
        box-sizing: border-box;
    }
    
    .mobile-menu-toggle span {
        width: 11px;
        height: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(3.5px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-3.5px) rotate(-45deg);
    }
    
    .hero h1 {
        font-size: 1.7rem;
    }
    
    .default-calculator,
    .calculator-category,
    .social-share {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--button-bg-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.hidden { display: none; }
.visible { display: block; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}