// ========================================
// Page Layout Styles
// Modern page layout to complement the header
// ========================================

// Body and main content
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #374151;
  background: #ffffff;

  &.search-open {
    overflow: hidden;
  }
}

// Skip link for accessibility
.skip-link {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--starman-main-color, #333);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0 0 0.375rem 0.375rem;
  z-index: 9999;
  transition: top 0.3s ease;

  &:focus {
    top: 0;
  }
}

// Main content
.main-content {
  min-height: calc(100vh - 120px); // Adjust based on header height
}

// Page sections
.highlighted,
.help {
  padding: 1rem 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;

  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
  }
}

.page-content {
  padding: 2rem 0;

  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  // Content with sidebars
  .content-main {
    margin-bottom: 2rem;

    @media (min-width: 992px) {
      margin-bottom: 0;
    }
  }

  .sidebar-first,
  .sidebar-second {
    margin-bottom: 2rem;

    @media (min-width: 992px) {
      margin-bottom: 0;
    }
  }
}

// Footer
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 1rem;
  margin-top: auto;

  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;

    &:hover {
      color: white;
    }
  }
}

// Page bottom
.page-bottom {
  background: #111827;
  color: #9ca3af;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.875rem;
}

// Container utility
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;

  @media (min-width: 576px) {
    padding: 0 1.5rem;
  }

  @media (min-width: 768px) {
    padding: 0 2rem;
  }

  @media (min-width: 1200px) {
    padding: 0 2.5rem;
  }
}

// Utility classes for spacing
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.5rem !important; }
.pb-2 { padding-bottom: 1rem !important; }
.pb-3 { padding-bottom: 1.5rem !important; }
.pb-4 { padding-bottom: 2rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.5rem !important; }
.pt-2 { padding-top: 1rem !important; }
.pt-3 { padding-top: 1.5rem !important; }
.pt-4 { padding-top: 2rem !important; }
.pt-5 { padding-top: 3rem !important; }

// Text utilities
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

// Responsive utilities
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

// Animation utilities
.animate {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

// Focus and accessibility
*:focus {
  outline: 2px solid var(--starman-main-color, #3b82f6);
  outline-offset: 2px;
}

// Smooth transitions
* {
  box-sizing: border-box;
}

a, button, input, select, textarea {
  transition: all 0.3s ease;
}

// Header scroll adjustments
.site-header {
  &.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  &.header-hidden {
    transform: translateY(-100%);
  }

  &.header-loaded {
    transition: all 0.3s ease;
  }
}
