/* KROFI 1.4: портфолио, самостоятельные фотографии задач, карта и архитектура. */

.task-photo img {
  object-position: center;
  filter: none;
  transform: none;
  transition: transform .45s ease;
}
.task-choice:hover .task-photo img,
.task-choice:focus-within .task-photo img { transform: scale(1.035); }

.works-section { background: #f8f7f3; }
.works-status {
  max-width: 270px;
  padding: 9px 13px;
  color: #4e6357;
  background: #e9eee7;
  border: 1px solid #cbd6c9;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.works-intro { max-width: 800px; margin-top: 15px; color: var(--muted); font-size: 16px; }
.works-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-block: 25px 24px; }
.works-toolbar .filter-row { margin: 0; }
.works-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.works-section .project-card { display: flex; flex-direction: column; box-shadow: 0 6px 22px #292e2610; transition: border-color .25s, box-shadow .25s, transform .25s; }
.works-section .project-card[hidden], .works-expand[hidden] { display: none; }
.works-section .project-card:hover, .works-section .project-card:focus-within { border-color: #bf947c; box-shadow: 0 12px 30px #292e2618; }
.works-section .project-image { aspect-ratio: 3 / 2; flex-shrink: 0; }
.works-section .project-image img { object-position: center; }
.works-section .project-open { opacity: 1; transform: none; background: #fffffff2; }
.works-section .project-copy { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.project-example { color: #6b5141; font-size: 14px; line-height: 1.5; margin-bottom: 9px; }
#top .works-section .project-copy h3 { font-size: 23px; line-height: 1.4; }
#top .works-section .project-copy p { margin-bottom: 18px; }
#top .works-section .project-detail { margin-top: auto; align-self: flex-start; color: var(--terra); min-height: 44px; font-weight: 650; }
.works-bottom { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.works-bottom > p { max-width: 430px; color: var(--muted); font-size: 16px; }
.works-expand { flex-shrink: 0; }
.case-example { color: #6b5141; background: #f6f1e9; border-radius: 6px; padding: 10px 13px; margin-top: 15px; font-size: 14px; }
.case-details { display: grid; grid-template-columns: 1.5fr 1fr; gap: 25px; margin-block: 25px; }
.case-details h3, .case-scope h3 { font-size: 19px; line-height: 1.4; margin-bottom: 9px; }
.case-details p, .case-scope li { color: var(--muted); font-size: 16px; line-height: 1.65; }
.case-scope { border-block: 1px solid #e0e2dc; padding-block: 20px; margin-bottom: 17px; }
.case-scope ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.case-scope li { display: flex; gap: 10px; }
.case-scope li .icon { color: var(--sage); flex-shrink: 0; margin-top: 4px; }
.project-case .gallery-navigation { flex-wrap: wrap; gap: 13px; }
.project-case .gallery-navigation .icon-button { width: 44px; height: 44px; border: 1px solid #a9b3ac; border-radius: 50%; }
.project-case .gallery-navigation > span { min-width: 46px; text-align: center; font-size: 16px; }

#geography .geography-panel { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 34px; padding: 34px; align-items: center; }
.map-figure { min-width: 0; }
.map-heading { display: flex; align-items: center; gap: 9px; color: #526457; font-size: 14px; line-height: 1.5; margin: 0 0 10px 4px; }
.map-heading > span { width: 7px; height: 7px; border-radius: 50%; background: var(--terra); }
#geography .region-art { position: relative; border-radius: 15px; background: radial-gradient(ellipse at 48% 50%, #e1e8da80, #f4f2eb 74%); }
#geography .region-art > svg { display: block; width: 100%; height: auto; overflow: visible; }
.moscow-region-path { fill: url(#map-land); stroke: #7b927e; stroke-width: 1.4; stroke-linejoin: round; }
.moscow-city-path { fill: #d4d6c6; stroke: #7b8e7c; stroke-width: 1.2; stroke-linejoin: round; }
.map-capital { font-family: 'Open Sans', sans-serif; fill: #384c40; font-size: 18px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: #f4f2eb; stroke-width: 4px; }
.map-label { font-family: 'Open Sans', sans-serif; fill: #35443a; font-size: 18px; font-weight: 600; paint-order: stroke; stroke: #f4f2eb; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.map-label-line { fill: none; stroke: #8c9e8c; stroke-width: 1; pointer-events: none; }
#geography .map-point { cursor: pointer; outline: none; }
#geography .map-point .map-hit { fill: transparent; stroke: transparent; }
#geography .map-point .map-halo { fill: #b5683b; opacity: .13; stroke: transparent; stroke-width: 2; animation: none; transition: opacity .2s; }
#geography .map-point .map-dot { fill: #a4492f; stroke: #fffdf7; stroke-width: 2; transition: fill .2s; }
#geography .map-point:hover .map-halo, #geography .map-point:focus-visible .map-halo, #geography .map-point.is-selected .map-halo { opacity: .32; }
#geography .map-point:focus-visible .map-hit { stroke: #3f624d; stroke-width: 2.5; }
#geography .map-point.is-selected .map-dot { fill: #315440; }
.map-tip { opacity: 0; pointer-events: none; transition: opacity .15s; }
.map-tip rect { fill: #29372d; stroke: #f4f2eb; stroke-width: 1; }
.map-tip text { font-family: 'Open Sans', sans-serif; fill: #fff; font-size: 16px; font-weight: 600; stroke: none; }
.map-point:hover .map-tip, .map-point:focus-visible .map-tip { opacity: 1; }
.map-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 7px; color: #4d5860; font-size: 14px; }
.map-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.map-legend-dot { width: 9px; height: 9px; background: #a4492f; border: 1px solid #fff; border-radius: 50%; }
.map-legend-square { width: 11px; height: 11px; background: #d4d6c6; border: 1px solid #7b8e7c; border-radius: 2px; }
.map-selection { border: 1px solid #c9d2c3; background: #e9eee4; padding: 12px 15px; border-radius: 8px; margin-top: 16px; line-height: 1.5; }
.map-selection > span { display: block; color: #526157; font-size: 14px; margin-bottom: 4px; }
.map-selected-city { display: block; color: #344b3d; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.map-selection.has-selection { border-color: #93a78e; }
.map-source { margin-top: 12px; color: #526157; font-size: 14px; line-height: 1.5; }
#top .map-source a { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
#geography .city-links button { padding: 10px 2px; min-height: 44px; text-align: left; }
#geography .city-links { gap: 3px 14px; }
#geography .region-actions { align-items: center; flex-wrap: wrap; }

.contact-copy { display: flex; flex-direction: column; justify-content: center; }
.contact-roof-art { position: relative; inset: auto; margin: 34px -18px -15px; opacity: 1; pointer-events: none; }
.contact-roof-art img { display: block; width: 100%; height: auto; max-width: 700px; }

@media (min-width: 701px) and (max-width: 1100px) {
  .works-section .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  #geography .geography-panel { gap: 24px; padding: 28px; }
  #geography .region-copy h2 { font-size: 31px; }
  #geography .city-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-layout { gap: 40px; }
}
@media (max-width: 850px) {
  #geography .geography-panel { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .map-figure { width: 100%; max-width: 560px; margin-inline: auto; }
  #geography .city-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 35px; }
  .contact-copy { padding-top: 0; }
  .contact-roof-art { margin-inline: auto; max-width: 600px; width: 100%; }
}
@media (max-width: 700px) {
  .works-section .section-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .works-status { max-width: none; }
  .works-toolbar { margin-top: 20px; gap: 14px; }
  .works-toolbar .filter-row { gap: 8px; }
  .works-section .projects-grid { grid-template-columns: minmax(0, 1fr); }
  .works-section .project-copy { padding: 23px; }
  .works-bottom { flex-direction: column; align-items: stretch; gap: 18px; }
  .works-bottom > p { max-width: none; }
  .case-details { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-block: 20px; }
  .case-scope ul { grid-template-columns: minmax(0, 1fr); }
  .project-case .gallery-navigation > .button { width: 100%; margin-left: 0; justify-content: center; }
  .project-case .gallery-full { aspect-ratio: 3 / 2; }
  #geography .geography-panel { padding: 24px 18px; }
  #geography .region-copy h2 { font-size: 30px; }
  .map-legend { gap: 9px 16px; }
  .map-label, .map-label-line { display: none; }
  .map-capital { font-size: 27px; }
  .map-selection { margin-top: 14px; }
  .contact-roof-art { margin-top: 25px; }
}
@media (max-width: 450px) {
  .map-capital { font-size: 34px; }
  #geography .city-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #geography .region-actions { flex-direction: column; align-items: stretch; gap: 18px; }
  #geography .region-actions > .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .task-photo img, .works-section .project-card, .map-tip, #geography .map-point circle { transition: none; }
  .task-choice:hover .task-photo img, .task-choice:focus-within .task-photo img { transform: none; }
}
