/*
 * Base Styles for A1 Steels Theme
 * Includes reset, typography, and fundamental styling
 * Adapted from original HTML/CSS with WordPress enhancements
 */

/* ================= RESET & BASE ================= */


html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* WordPress Admin Bar Adjustment */
@media screen and (max-width: 782px) {
  html {
    margin-top: 46px !important;
  }
}

@media screen and (min-width: 783px) {
  html {
    margin-top: 32px !important;
  }
}

/* Remove admin bar margin for non-admin users */
html:not(.admin-bar) {
  margin-top: 0 !important;
}

/* ================= MEDIA ELEMENTS ================= */

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

/* ================= FORM ELEMENTS ================= */

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}



p {
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 400;
  font-style: normal;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* ================= LISTS ================= */

ul, ol {
  margin: 0 0 var(--space-sm) 0;
  padding-left: var(--space-md);
}

/* Remove default list styling for navigation */
.header__nav-list,
.header__mobile-nav,
.footer__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ================= ACCESSIBILITY ================= */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999999;
  padding: var(--space-sm);
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
}

/* Focus styles */
:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ================= WORDPRESS SPECIFIC ================= */

/* WordPress Core Alignment Classes */
.alignnone {
  margin: var(--space-sm) 0;
}

.aligncenter,
div.aligncenter {
  display: block;
  margin: var(--space-sm) auto;
}

.alignright {
  float: right;
  margin: var(--space-sm) 0 var(--space-sm) var(--space-sm);
}

.alignleft {
  float: left;
  margin: var(--space-sm) var(--space-sm) var(--space-sm) 0;
}

.aligncenter {
  display: block;
  margin: var(--space-sm) auto;
}

/* WordPress Gallery */
.gallery {
  margin-bottom: var(--space-md);
}

.gallery-item {
  display: inline-block;
  text-align: center;
  vertical-align: top;
  width: 100%;
}

.gallery-columns-2 .gallery-item {
  max-width: 50%;
}

.gallery-columns-3 .gallery-item {
  max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
  max-width: 25%;
}

.gallery-columns-5 .gallery-item {
  max-width: 20%;
}

.gallery-columns-6 .gallery-item {
  max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
  max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
  max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
  max-width: 11.11%;
}

/* WordPress Captions */
.wp-caption {
  margin-bottom: var(--space-sm);
  max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
  display: block;
  margin: 0;
}

.wp-caption-text {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  margin-top: var(--space-xs);
}

/* WordPress Embeds */
.wp-embed-responsive .wp-has-aspect-ratio iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ================= UTILITY CLASSES ================= */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }

/* Spacing Utilities */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

.mt-sm { margin-top: var(--space-sm) !important; }
.mb-sm { margin-bottom: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }