/* all-films-responsive.css
   Single modern stylesheet for old Artisteer-based all-films.com pages.
   Replaces style.css + style.responsive.css + old responsive JS for the uploaded templates.
*/

:root {
  --page-bg: #f3f6fb;
  --sheet-bg: #ffffff;
  --text: #20242a;
  --muted: #6b7280;
  --link: #0b63c7;
  --link-hover: #084b96;
  --nav-bg: #151a24;
  --nav-link: #ffffff;
  --border: #d8e0ea;
  --soft-border: #e8edf3;
  --card-bg: #ffffff;
  --card-soft: #f8fafc;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #dfe7f1 0, var(--page-bg) 260px) fixed;
  color: var(--text);
  font: 16px/1.58 Arial, Helvetica, sans-serif;
}

#art-main {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Top menu */
.art-nav {
  width: 100%;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

ul.art-hmenu,
ul.art-hmenu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.art-hmenu {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

ul.art-hmenu a,
ul.art-hmenu a:link,
ul.art-hmenu a:visited {
  display: block;
  padding: 14px 18px;
  color: var(--nav-link);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
}

ul.art-hmenu a:hover,
ul.art-hmenu a.active,
ul.art-hmenu a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  outline: none;
}

/* Main sheet */
.art-sheet {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 24px auto;
  padding: 0;
  background: var(--sheet-bg);
  border: 1px solid var(--soft-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.art-layout-wrapper,
.art-content-layout,
.art-content-layout-row,
.art-layout-cell,
.art-content,
.art-post,
.art-article,
.art-postcontent {
  max-width: 100%;
}

.art-content-layout {
  width: 100%;
  display: block;
}

.art-content-layout-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.art-layout-cell {
  min-width: 0;
  flex: 1 1 0;
}

.art-content {
  width: 100%;
}

.art-post,
.art-article {
  margin: 0;
  padding: 0;
}

.art-postcontent {
  padding: clamp(18px, 3vw, 34px);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
  margin-top: 0;
}

h1,
.art-postcontent h1 {
  margin: 0 0 18px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2,
.art-postcontent h2 {
  margin: 0 0 16px;
  color: #243044;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  font-weight: 750;
}

h3,
.art-postcontent h3 {
  margin: 28px 0 14px;
  padding-top: 4px;
  color: #111827;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.3;
  clear: both;
}

h4,
h5,
h6 {
  color: #374151;
  line-height: 1.35;
}

h6,
.art-postcontent h6 {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

p,
.art-postcontent p {
  margin: 0 0 12px;
}

.art-postcontent b,
.art-postcontent strong {
  font-weight: 700;
}

/* Links */
a,
a:link,
a:visited,
.art-postcontent a,
.art-postcontent a:link,
.art-postcontent a:visited {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible,
.art-postcontent a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Images and media */
img,
video,
iframe,
object,
embed {
  max-width: 100%;
}

img,
video {
  height: auto;
}

.art-postcontent img {
  border: 0;
  border-radius: 10px;
}

.art-postcontent p > img[src*="Star"],
.art-postcontent a > img[src*="Star"],
.art-postcontent img[src*="Logo"],
.art-postcontent img[src*="favicon"],
.art-postcontent img[src*="Star_20"] {
  border-radius: 0;
  vertical-align: middle;
}

.art-postcontent img[src*="tv_poster"],
.art-postcontent img[src*="poster"],
.art-postcontent img[src*="person_b"],
.art-postcontent img[src*="person_photo"],
.art-postcontent img[src*="no-photo"] {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0 auto 12px;
  background: #f3f4f6;
  border: 1px solid var(--soft-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* Movie/person detail rows */
.responsive-layout-row-2 {
  align-items: flex-start;
}

.art-content-layout + .art-content-layout,
hr + .art-content-layout {
  margin-top: 18px;
}

.art-postcontent .art-content-layout-row > .art-layout-cell[style*="25%"] {
  flex-basis: calc(25% - 12px);
}

.art-postcontent .art-content-layout-row > .art-layout-cell[style*="50%"] {
  flex-basis: calc(50% - 8px);
}

.art-postcontent .art-content-layout-row > .art-layout-cell[style*="75%"] {
  flex-basis: calc(75% - 12px);
}

/* Cast/filmography small cells: make repeated portrait blocks neat without changing HTML */
.art-postcontent h3 + .art-content-layout .art-layout-cell,
.art-postcontent hr + .art-content-layout .art-layout-cell {
  margin-bottom: 12px;
}

.art-postcontent .responsive-layout-row-2 .art-layout-cell p {
  text-align: left;
}

/* Lists and long rating pages */
ul,
ol {
  padding-left: 1.35em;
}

.art-postcontent li {
  margin: 4px 0;
}

.art-postcontent > p > a {
  line-height: 1.5;
}

.art-postcontent > p:has(> a[href*="/movies/"]) {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--card-soft);
  border: 1px solid var(--soft-border);
  border-radius: 10px;
}

.art-postcontent > p:has(> a[href*="/movies/"]):hover {
  background: #eef5ff;
  border-color: #c8d9f2;
}

.art-postcontent span[style*="font-size: 20px"],
.art-postcontent span[style*="font-size: 24px"] {
  color: #111827;
}

/* Tables from old Artisteer pages */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

td,
th {
  vertical-align: top;
}

.layout-item-old-0 {
  margin-bottom: 5px;
}

.layout-item-old-1 {
  border-spacing: 10px 0;
  border-collapse: separate;
}

.layout-item-old-2 {
  border: 1px solid #bbc5c9;
  padding-right: 10px;
  padding-left: 10px;
}

/* Horizontal rules */
hr {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--soft-border);
}

/* Footer */
.art-footer {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto 24px;
  color: #d1d5db;
  background: #111827;
  border-radius: var(--radius);
  overflow: hidden;
}

.art-footer-inner {
  padding: 18px clamp(18px, 3vw, 30px);
}

.art-footer .art-content-layout-row {
  align-items: center;
}

.art-footer p {
  margin: 0 0 8px;
}

.art-footer a,
.art-footer a:link,
.art-footer a:visited {
  color: #bfdbfe;
}

/* Forms/search placeholders if inserted later */
input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

input[type="text"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

button,
.art-button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  color: #ffffff;
  background: var(--link);
  border: 1px solid #0755aa;
  border-radius: 10px;
  cursor: pointer;
}

button:hover,
.art-button:hover,
input[type="submit"]:hover {
  background: var(--link-hover);
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --content-width: 100%;
  }

  .art-sheet,
  .art-footer {
    width: calc(100% - 20px);
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 12px;
  }

  .art-postcontent {
    padding: 20px;
  }

  .art-content-layout-row {
    gap: 14px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
    line-height: 1.55;
  }

  ul.art-hmenu {
    padding: 8px 10px;
    gap: 8px;
  }

  ul.art-hmenu li {
    flex: 1 1 auto;
  }

  ul.art-hmenu a,
  ul.art-hmenu a:link,
  ul.art-hmenu a:visited {
    padding: 11px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
  }

  .art-content-layout-row,
  .responsive-layout-row-2 {
    display: block;
  }

  .art-layout-cell,
  .art-postcontent .art-content-layout-row > .art-layout-cell[style] {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .art-postcontent img[src*="tv_poster"],
  .art-postcontent img[src*="poster"],
  .art-postcontent img[src*="person_b"],
  .art-postcontent img[src*="person_photo"],
  .art-postcontent img[src*="no-photo"] {
    margin-left: auto;
    margin-right: auto;
  }

  .art-postcontent > p:has(> a[href*="/movies/"]) {
    padding: 9px 10px;
  }

  .art-postcontent img[style*="float"] {
    float: none !important;
    display: inline-block;
  }
}

@media (max-width: 420px) {
  .art-sheet,
  .art-footer {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .art-postcontent {
    padding: 16px 14px;
  }

  h1,
  .art-postcontent h1 {
    font-size: 26px;
  }

  h2,
  .art-postcontent h2 {
    font-size: 21px;
  }
}

/* Fallback for older browsers without :has(). The layout still works; only rating-page cards become plain paragraphs. */
@supports not selector(p:has(a)) {
  .art-postcontent > p {
    margin-bottom: 12px;
  }
}

/* Top Movies pagination */
.top-pagination {
  margin: 28px 0;
  padding: 18px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.top-pagination__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.top-pagination a,
.top-pagination span {
  box-sizing: border-box;
}

.top-pagination__item,
.top-pagination__prev,
.top-pagination__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.top-pagination__item:hover,
.top-pagination__prev:hover,
.top-pagination__next:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1e40af;
  text-decoration: none;
}

.top-pagination__item--current {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  cursor: default;
}

.top-pagination__disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .top-pagination {
    margin: 22px 0;
    padding: 14px 0;
  }

  .top-pagination__inner {
    justify-content: flex-start;
    gap: 6px;
  }

  .top-pagination__item,
  .top-pagination__prev,
  .top-pagination__next {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
  }
}

/* Cast list */
.cast-list {
  margin: 34px 0;
  padding-top: 26px;
  border-top: 1px solid #e5e7eb;
}

.cast-list__title {
  margin: 0 0 20px 0;
  font-size: 24px;
  line-height: 1.25;
  color: #111827;
}

/* 5 actors per row on desktop */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 34px;
  align-items: start;
}

/* Actor card */
.cast-card {
  min-width: 0;
  text-align: left;
}

.cast-card__photo {
  display: block;
  width: 100px;
  height: 150px;
  margin: 0 0 10px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

/* Cast photo override */
.art-postcontent .cast-card__photo img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: cover;
  object-position: center top;
  background: transparent;
}

.cast-card__name {
  margin: 0 0 8px 0;
  color: #0563c1;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.cast-card__name a {
  color: inherit;
  text-decoration: none;
}

.cast-card__name a:hover {
  text-decoration: underline;
}

.cast-card__role {
  margin: 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
}

/* 4 actors per row */
@media (max-width: 1000px) {
  .cast-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 3 actors per row */
@media (max-width: 760px) {
  .cast-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 22px;
  }
}

/* 2 actors per row */
@media (max-width: 560px) {
  .cast-list__title {
    font-size: 21px;
  }

  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
  }

  .cast-card__photo {
    width: 90px;
    height: 135px;
  }

  .cast-card__name {
    font-size: 15px;
  }

  .cast-card__role {
    font-size: 14px;
  }
}

