/* ===================================================================
   Arte Michell — main.css
   Diseño idéntico al sitio original. Tipografía editorial, layout
   minimalista, blanco sobre negro con detalles en sepia/marfil.
   =================================================================== */

/* ------------------------------------------------------------------ */
/*  Variables                                                           */
/* ------------------------------------------------------------------ */
:root {
  --color-bg:        #ffffff;
  --color-surface:   #f8f6f2;
  --color-border:    #e8e4dc;
  --color-text:      #1a1814;
  --color-muted:     #6b6560;
  --color-accent:    #1a1814;
  --color-gold:      #c9a96e;
  --color-error:     #b91c1c;
  --color-success:   #166534;

  --font-display:    'Cormorant Garamond', Georgia, serif;
  --font-body:       'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --header-h:        72px;
  --container-max:   1280px;
  --sidebar-w:       240px;
  --gap:             32px;

  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.4, 0, 0.2, 1);

  --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);
}

/* ------------------------------------------------------------------ */
/*  Reset & Base                                                        */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ------------------------------------------------------------------ */
/*  Typography                                                          */
/* ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text);
}

/* ------------------------------------------------------------------ */
/*  Container                                                           */
/* ------------------------------------------------------------------ */
.am-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}

/* ------------------------------------------------------------------ */
/*  HEADER                                                              */
/* ------------------------------------------------------------------ */
.am-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--color-bg);
  z-index: 100;
  /* border-bottom: 1px solid var(--color-border); */ /* Removed border for clean look if desired, or keep it */
  transition: transform .3s, top .2s;
}
.am-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}
body.admin-bar .am-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .am-header {
    top: 46px;
  }
}
@media (max-width: 768px) {
  .am-header {
    position: absolute;
  }
}
.am-header.is-hidden { transform: translateY(-100%); }

.am-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 100%; /* Full width as per image? Or container? Image looks wide. */
  margin-inline: auto;
  padding-inline: clamp(20px, 3vw, 40px);
}

/* --- LEFT: Menu & Search --- */
.am-header__left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.am-nav-toggle,
.am-search-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase; /* Assuming uppercase from image "Menú" looks title case but font might be uppercase styled */
  letter-spacing: 0.05em;
  color: var(--color-text);
  transition: color 0.2s;
}
.am-nav-toggle svg,
.am-search-toggle svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5px;
}
.am-nav-toggle:hover,
.am-search-toggle:hover {
  color: var(--color-primary);
}

/* --- CENTER: Logo --- */
.am-header__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.am-header__logo-link img {
  height: 50px; /* Adjust based on logo aspect ratio */
  width: auto;
  display: block;
}
.am-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- RIGHT: Social, Contact, Lang --- */
.am-header__right {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase; /* Image: "Síguenos", "Contáctenos", "Español" - looks title case? Let's check user input "100% identico". Image text is Title Case. */
}
/* Re-check image: "Menú", "Buscar" (Title Case). "Síguenos", "Contáctenos", "Español" (Title Case). */
/* So I should remove text-transform uppercase if it was there */

.am-header__right > * {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Social */
.am-header__social {
  display: flex;
  align-items: center;
  gap: 12px; 
}
.am-social-label {
  color: var(--color-text);
}
.am-social-sep {
  color: var(--color-border);
}
.am-social-list {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0; padding: 0;
  list-style: none;
}
.am-social-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-size: 1.1rem; /* Icon size */
  transition: opacity .2s;
}
.am-social-icon {
  display: flex;
  align-items: center;
}
.am-social-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.am-social-list li a:hover { opacity: 0.7; }

/* Contact */
.am-header__contact {
  text-decoration: none;
  color: var(--color-text);
  gap: 8px;
}
.am-header__contact svg {
  width: 18px;
  height: 18px;
}

/* Lang */
.am-lang-link {
  text-decoration: none;
  color: var(--color-text);
  gap: 8px;
  display: flex;
  align-items: center;
}
.am-lang-link svg {
  width: 16px;
  height: 16px;
}

/* Nav Overlay (Hidden menu) */
.am-nav-overlay[hidden] { display: none; }
.am-nav-overlay {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--color-bg);
  z-index: 90;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}
.am-nav-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}
.am-nav-overlay__inner {
  text-align: left;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}
/* Nav */
.am-nav { display: block; }
.am-nav__list {
  display: flex;
  gap: 20px;
  align-items: center;
}
@media (max-width: 768px) {
  .am-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .am-nav__list li { width: 100%; }
  .am-nav__list li a {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .am-nav__list li:last-child a { border-bottom: none; }
  .am-nav__list li a::after { bottom: 10px; left: 0; right: auto; width: 100%; }
}
.am-nav__list li a {
  display: block;
  padding: 8px 14px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color .2s;
  border-radius: 4px;
  position: relative;
}
.am-nav__list li a::after {
  content: '';
  position: absolute;
  left: 14px; /* match padding */
  right: 14px; /* match padding */
  bottom: 6px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.am-nav__list li a:hover {
  /* color: var(--color-text); Remove color change */
}
.am-nav__list li a:hover::after,
.am-nav__list li.current-menu-item > a::after {
  transform: scaleX(1);
  transform-origin: left;
}
.am-nav__list li.current-menu-item > a {
  color: var(--color-text);
}

/* Hide toggle spans on very small screens? */
@media (max-width: 768px) {
  .am-header__left span,
  .am-header__right span:not(.am-lang-sep) {
    display: none;
  }
  .am-header__right { gap: 16px; }
  .am-header__center img { height: 32px; }
}

/* Search bar dropdown */
.am-search-bar {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
  animation: slideDown .25s var(--ease-out);
}
.am-search-bar[hidden] { display: none; }
.am-search-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}
.am-search-bar__inner form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-text);
}
.am-search-bar__inner input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: .95rem;
  background: transparent;
}
.am-search-bar__inner button[type=submit] {
  color: var(--color-muted);
}
.am-search-close {
  font-size: .85rem;
  color: var(--color-muted);
  padding: 8px;
}

/* ------------------------------------------------------------------ */
/*  HERO                                                                */
/* ------------------------------------------------------------------ */
.am-hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: 860px;
  margin-top: var(--header-h);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #f5f0e8;
}
/* Removed overlay effect */
.am-hero__overlay {
  display: none;
}
.am-hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 64px);
  max-width: 680px;
}
.am-hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: #fff; /* May need adjustment if image is light, but requested to remove effect */
  letter-spacing: -.01em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.am-hero__desc {
  font-size: clamp(.85rem, 1.2vw, 1rem);
  color: #fff; /* Changed from rgba for better visibility without overlay */
  text-shadow: 0 1px 4px rgba(0,0,0,0.5); /* Added shadow for readability */
  font-weight: 300;
  line-height: 1.7;
  max-width: 520px;
}
.am-hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  right: clamp(20px, 4vw, 64px);
  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  animation: bounce 2s infinite;
}

/* ------------------------------------------------------------------ */
/*  ARCHIVO — Header                                                    */
/* ------------------------------------------------------------------ */
.am-section-separator {
  height: 1px;
  background-color: var(--color-border);
  margin: 32px auto 16px; /* Reduced bottom margin to move search up */
  width: 90%;
  max-width: 1400px;
}
.am-archivo { padding-top: clamp(48px, 6vw, 80px); }

.am-archivo__header {
  padding-bottom: 264px; /* Increased bottom padding for more space below */
}
.am-archivo__title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 12px;
}
.am-archivo__subtitle {
  font-size: .875rem;
  color: var(--color-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Buscador inline */
.am-search-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 14px 24px; /* Slightly more padding for better look */
  width: 100%;
  background: #f4f4f4; /* Gray background */
  transition: border-color .2s, box-shadow .2s;
}
.am-search-inline:focus-within {
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(26,24,20,.06);
}
.am-search-inline svg { color: var(--color-muted); flex-shrink: 0; }
.am-search-inline input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .875rem;
  background: transparent;
  color: var(--color-text);
}
.am-search-inline input::placeholder { color: var(--color-muted); }

/* ------------------------------------------------------------------ */
/*  ARCHIVO — Layout (sidebar + grid)                                  */
/* ------------------------------------------------------------------ */
.am-archivo__layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--gap);
  align-items: start;
  padding-bottom: 80px;
}

/* ------------------------------------------------------------------ */
/*  FILTERS SIDEBAR                                                     */
/* ------------------------------------------------------------------ */
.am-filters {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.am-filters__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 16px;
  width: 100%;
}

.am-filter-group {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.am-filter-group:last-child { border-bottom: none; }

.am-filter-group__title {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tabs tipo / calificado */
.am-filter-tabs {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.am-filter-tab {
  flex: 1;
  padding: 7px 8px;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-right: 1px solid var(--color-border);
  transition: all .2s;
  text-align: center;
}
.am-filter-tab:last-child { border-right: none; }
.am-filter-tab.am-filter-tab--active,
.am-filter-tab:hover {
  background: var(--color-text);
  color: #fff;
}

/* Range slider */
.am-range-slider {
  position: relative;
  height: 20px;
  margin: 4px 0 8px;
}
.am-range-track {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  transform: translateY(-50%);
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
}
.am-range-fill {
  position: absolute;
  height: 100%;
  background: var(--color-text);
  border-radius: 2px;
  pointer-events: none;
}
.am-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
}
.am-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--color-muted);
}

/* Checkboxes */
.am-filter-list { display: flex; flex-direction: column; gap: 2px; }
.am-filter-child { padding-left: 20px; }
.am-filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
}
.am-filter-check:hover { background: var(--color-surface); }
.am-filter-check input[type=checkbox] { display: none; }
.am-checkmark {
  width: 15px;
  height: 15px;
  border: 1px solid #ccc;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.am-filter-check input:checked ~ .am-checkmark {
  background: var(--color-text);
  border-color: var(--color-text);
}
.am-filter-check input:checked ~ .am-checkmark::after {
  content: '';
  display: block;
  width: 4px;
  height: 7px;
  border: 1.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.am-filter-label {
  font-size: .8rem;
  color: var(--color-text);
}

.am-filter-subgroup {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 12px 0 8px;
}

/* Reset button */
.am-filters__reset {
  font-size: .75rem;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
  padding: 4px 0;
  transition: color .2s;
}
.am-filters__reset:hover { color: var(--color-text); }

/* ------------------------------------------------------------------ */
/*  OBRAS GRID                                                          */
/* ------------------------------------------------------------------ */
.am-obras-wrapper { min-width: 0; }

.am-obras-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.am-obras-count {
  font-size: .8rem;
  color: var(--color-muted);
}
.am-obras-count strong { color: var(--color-text); font-weight: 600; }

.am-obras-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--color-muted);
}
.am-select {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .78rem;
  color: var(--color-text);
  background: var(--color-bg);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.am-select:focus { border-color: var(--color-text); }

/* Grid */
.am-obras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  transition: opacity .3s;
}
.am-obras-grid.is-loading { opacity: .4; pointer-events: none; }

/* Loader */
.am-obras-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.6);
  z-index: 5;
}
.am-obras-loader[hidden] { display: none; }
.am-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* No results */
.am-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--color-muted);
  font-size: .95rem;
}

/* Paginación / load more */
.am-pagination {
  margin-top: 40px;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/*  OBRA CARD                                                           */
/* ------------------------------------------------------------------ */
.am-obra-card {
  display: flex;
  flex-direction: column;
}

.am-obra-card__link { display: block; }

.am-obra-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  aspect-ratio: 4/5;
}
.am-obra-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.am-obra-card:hover .am-obra-card__image { transform: scale(1.04); }

.am-obra-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  background: var(--color-surface);
}

/* Badge premio sobre la imagen */
.am-obra-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(26,24,20,.85);
  color: #fff;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.am-obra-card__badge--primer-premio   { background: rgba(201,169,110,.9); color: #1a1814; }
.am-obra-card__badge--segundo-premio  { background: rgba(26,24,20,.85); }
.am-obra-card__badge--tercer-premio   { background: rgba(26,24,20,.85); }

/* Body card */
.am-obra-card__body {
  padding: 14px 4px 0;
}
.am-obra-card__artista {
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.2;
  color: #444;
  margin-bottom: 3px;
}
.am-obra-card__region {
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: capitalize;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.am-obra-card__premio {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 2px;
}
.am-obra-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3px;
  color: #1a1814;
  font-style: normal;
}
.am-obra-card__title a { transition: opacity .2s; }
.am-obra-card__title a:hover { opacity: .7; }
.am-obra-card__meta {
  font-size: .7rem;
  color: var(--color-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.am-obra-card__year {
  font-size: .7rem;
  color: var(--color-muted);
}

/* ------------------------------------------------------------------ */
/*  SINGLE OBRA                                                         */
/* ------------------------------------------------------------------ */
.am-main--single-obra {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
}
.am-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--color-muted);
  margin-bottom: 32px;
}
.am-breadcrumb a:hover { color: var(--color-text); }
.am-breadcrumb span[aria-hidden] { color: var(--color-border); }

.am-single-obra__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.am-single-obra__figure {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.am-single-obra__image {
  width: 100%;
  height: auto;
  display: block;
}
.am-single-obra__no-image {
  aspect-ratio: 4/3;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-muted);
  border-radius: 6px;
}

.am-single-obra__region {
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--color-muted);
  margin-bottom: 4px;
}
.am-single-obra__premio {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.am-single-obra__title {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin-bottom: 24px;
  line-height: 1.15;
}

.am-single-obra__dl { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.am-single-obra__dl-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.am-single-obra__dl-row dt {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-top: 2px;
}
.am-single-obra__dl-row dd { font-size: .9rem; }
.am-single-obra__desc { margin-bottom: 28px; font-size: .9rem; line-height: 1.8; color: var(--color-muted); }

/* ------------------------------------------------------------------ */
/*  CONTACT SECTION                                                     */
/* ------------------------------------------------------------------ */
.am-contact {
  background: var(--color-surface);
  padding: clamp(64px, 8vw, 100px) 0;
}
.am-contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.am-contact__title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 16px;
}
.am-contact__desc {
  font-size: .9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.am-contact__cta {
  font-size: .875rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* Form */
.am-contact-form { display: flex; flex-direction: column; gap: 20px; }
.am-form-field { display: flex; flex-direction: column; gap: 6px; }
.am-form-field label {
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.am-form-field label span[aria-hidden] { color: var(--color-error); }
.am-optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .7rem; }

.am-form-field input,
.am-form-field textarea {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: .875rem;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  resize: vertical;
}
.am-form-field input:focus,
.am-form-field textarea:focus {
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(26,24,20,.06);
}
.am-form-field input.is-error,
.am-form-field textarea.is-error {
  border-color: var(--color-error);
}
.am-field-error {
  font-size: .72rem;
  color: var(--color-error);
  min-height: 1em;
}

.am-form-actions { padding-top: 4px; }

.am-form-response {
  padding: 14px 16px;
  border-radius: 6px;
  font-size: .85rem;
  text-align: center;
}
.am-form-response[hidden] { display: none; }
.am-form-response.is-success { background: #dcfce7; color: var(--color-success); }
.am-form-response.is-error   { background: #fee2e2; color: var(--color-error); }

/* Contact extra */
.am-contact-extra { padding: 48px 0; }
.am-contact-extra__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.am-contact-extra__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.am-contact-extra__item svg { flex-shrink: 0; margin-top: 2px; color: var(--color-muted); }
.am-contact-extra__item strong {
  display: block;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.am-contact-extra__item p { font-size: .875rem; color: var(--color-muted); }
.am-contact-extra__item a { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ */
/*  FOOTER                                                              */
/* ------------------------------------------------------------------ */
.am-footer {
  background: var(--color-text);
  color: rgba(255,255,255,.85);
  padding-top: clamp(48px, 6vw, 72px);
}
.am-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
  padding-bottom: clamp(40px, 5vw, 60px);
}

/* Brand */
.am-footer__logo img { filter: brightness(0) invert(1); max-height: 40px; margin-bottom: 16px; }
.am-logo-text .am-footer__logo { color: #fff; }
.am-footer__tagline {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 16px;
  line-height: 1.6;
}
.am-footer__address {
  font-style: normal;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 12px;
}
.am-footer__contact-item {
  font-size: .8rem;
  margin-bottom: 6px;
}
.am-footer__contact-item span {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 2px;
}
.am-footer__contact-item a { color: rgba(255,255,255,.85); transition: color .2s; }
.am-footer__contact-item a:hover { color: #fff; }

/* Footer nav */
.am-footer__nav h4,
.am-footer__social h4 {
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}
.am-footer__menu { display: flex; flex-direction: column; gap: 6px; }
.am-footer__menu li a {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  transition: color .2s;
  display: inline-block;
  padding: 2px 0;
}
.am-footer__menu li a:hover {  }

.am-footer__social-list { display: flex; flex-direction: column; gap: 6px; }
.am-footer__social-list li a {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.am-footer__social-list li a:hover {  }

/* Footer bottom */
.am-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
}
.am-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}
.am-footer__copyright {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}
.am-footer__grupo {
  max-width: 520px;
}
.am-footer__grupo p {
  font-size: .72rem;
  color: rgba(255,255,255,.35);
  line-height: 1.6;
}

/* ------------------------------------------------------------------ */
/*  BUTTONS                                                             */
/* ------------------------------------------------------------------ */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s var(--ease-out);
  border: 1px solid transparent;
}
.am-btn--primary {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}
.am-btn--primary:hover { background: #333; }
.am-btn--primary:disabled { opacity: .5; cursor: not-allowed; }

.am-btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}
.am-btn--ghost:hover { background: var(--color-text); color: #fff; }

.am-btn--load-more {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  padding: 12px 32px;
}
.am-btn--load-more:hover { border-color: var(--color-text); color: var(--color-text); }

/* ------------------------------------------------------------------ */
/*  PAGE HERO (páginas internas)                                        */
/* ------------------------------------------------------------------ */
.am-page-hero {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 48px;
}
.am-page-hero--sm { padding-top: calc(var(--header-h) + 32px); padding-bottom: 32px; }
.am-page-hero__title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
}

/* ------------------------------------------------------------------ */
/*  Animations                                                          */
/* ------------------------------------------------------------------ */
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes bounce      { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }
@keyframes slideDown   { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn      { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

.am-obra-card { animation: fadeIn .4s var(--ease-out) both; }

/* Spin utility */
.am-spin { animation: spin .8s linear infinite; }

/* ------------------------------------------------------------------ */
/*  FOOTER                                                              */
/* ------------------------------------------------------------------ */
.am-footer {
  background: var(--color-bg);
  padding: 64px 0 0;
  font-size: 0.8rem;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}

.am-footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(20px, 3vw, 40px);
  margin-bottom: 80px;
}

/* Col 1: Brand */
.am-footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.am-footer__logo a {
  display: block;
}
.am-footer__logo img {
  max-width: 180px;
  height: auto;
}
.am-footer__grupo-header {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
}
.am-footer__grupo-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
}
.am-footer__tagline {
  font-size: 0.8rem;
  color: var(--color-text);
  margin: 0;
}

/* Col 2, 3, 4: Headings */
.am-footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}

/* Col 2: Contact */
.am-footer__col--contact {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.am-footer__contact-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.am-footer__subheading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: 0.8;
}
.am-footer__contact-block address,
.am-footer__contact-block a {
  font-style: normal;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.5;
  position: relative;
  display: inline-block;
  width: fit-content;
}
.am-footer__contact-block a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.am-footer__contact-block a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Col 3: Nav */
.am-footer__menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.am-footer__menu li a {
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  width: fit-content;
}
.am-footer__menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.am-footer__menu li a:hover {
  /* No color change */
}
.am-footer__menu li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Col 4: Social */
.am-footer__social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.am-footer__social-list li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  width: fit-content;
}
.am-footer__social-list li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.am-footer__social-list li a:hover {
  /* No opacity change */
}
.am-footer__social-list li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Footer Bottom Menu (Horizontal with separators) */
.am-footer__inline-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px; /* Increased gap even more */
  list-style: none;
  padding: 0;
  margin: 0;
}
.am-footer__inline-menu li {
  font-size: 0.75rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
}
.am-footer__inline-menu li:not(:last-child)::after {
  content: '|';
  margin-left: 24px; /* Increased margin */
  color: #000; /* Solid black for maximum visibility */
  font-weight: 400;
  opacity: 1;
}
.am-footer__inline-menu a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.am-footer__inline-menu a:hover {
  color: var(--color-text);
}

/* --- Middle Section --- */
.am-footer__middle {
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(20px, 3vw, 40px);
  margin-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.am-copyright {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.am-footer__desc p {
  max-width: 600px;
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--color-text);
}

.am-footer__links {
  margin-top: 16px;
  border-top: 1px solid transparent; /* Spacer if needed */
}
.am-footer__inline-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0; /* Handled by separators */
}
.am-footer__inline-menu li {
  display: flex;
  align-items: center;
}
.am-footer__inline-menu li:not(:last-child)::after {
  content: "|";
  margin: 0 16px;
  color: #000;
}
.am-footer__inline-menu li a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.75rem;
  position: relative;
  display: inline-block;
  width: fit-content;
}
.am-footer__inline-menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.am-footer__inline-menu li a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --- Bottom Section --- */
.am-footer__bottom {
  background: #f9f9f9; /* Slight bg difference as per image usually, or white? Image looks same bg. */
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 40px clamp(20px, 3vw, 40px);
}
.am-footer__bottom-header {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--color-text);
}
.am-footer__bottom-addr,
.am-footer__bottom-contact {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 4px 0;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .am-archivo__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .am-filters {
    position: relative;
    top: 0;
    margin-bottom: 32px;
  }
  .am-filters__toggle {
    display: flex;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    width: 100%;
  }
  .am-filters__body {
    display: none;
    margin-top: 16px;
    border: 1px solid var(--color-border);
    padding: 24px;
    border-radius: 6px;
    background: #fff;
  }
  .am-filters__body.is-open {
    display: block;
    animation: slideDown .3s ease-out;
  }
}

/* Responsive Topbar */
@media (max-width: 600px) {
  .am-obras-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .am-obras-sort {
    width: 100%;
    justify-content: space-between;
  }
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .am-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}
@media (max-width: 600px) {
  .am-footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .am-footer__inline-menu {
    flex-direction: column;
    gap: 8px;
  }
  .am-footer__inline-menu li:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .am-obras-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
