/* =========================================================================
   PinkHatArt site styles
   Loaded after css/bootstrap.css on every page. All of the site's own
   styling lives here; bootstrap.css is the vendor theme and rarely changes.
   Page-specific rules are scoped by section id (#artwork, #aboutme, ...)
   or by a class on <body> (.page-gallery, .page-secret-cat).
   ========================================================================= */


/* --- Page background and main box --- */

body {
  background: url('../img/starsrbowbg.gif');
  cursor: url('/img/cursor.cur'), auto;
}

.container {
  background-color: #FFF2FC;
  border: 4px solid #8d6e63;
  border-radius: 15px;
  padding: 25px;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

section {
  margin-top: 60px;
  padding-top: 100px;
}

@media (max-width: 767px) {
  section {
    padding-top: 20px;
  }
}

@media (min-width: 768px) and (max-width: 979px) {
  section {
    padding-top: 20px;
  }
}

@media (min-width: 980px) {
  .preview {
    padding-top: 100px;
  }
}


/* --- Link Styles --- */
a:link {
  color: #ec008c;
  /* A vibrant pink for unvisited links */
  text-decoration: underline;
}

a:visited {
  color: #c40093;
  /* A slightly darker pink for visited links */
  text-decoration: underline;
}

a:hover {
  color: #ff8400;
  /* A bright orange for when you hover over a link */
  text-decoration: none;
  /* Removes the underline on hover */
}

a:active {
  color: #ff8400;
  /* The same orange for when a link is clicked */
  text-decoration: none;
}


/* --- Layout helpers --- */

.row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.squished {
  max-width: 600px;
  margin: 0 auto;
}

.big-text {
  font-size: 120%;
}


/* --- Header (includes/header.html) --- */

.subhead {
  padding-bottom: 0;
  margin-bottom: 9px;
}

.subhead h1 {
  font-size: 54px;
}

.subhead > div:first-child {
  min-height: 200px;
}

.jumbotron .row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* --- Jumbotron Desktop Styles --- */
.jumbotron .span5:first-child {
  text-align: left;
}

.jumbotron .span5:last-child {
  text-align: right;
}


/* --- Modern Marquee Magic --- */
.marquee-container {
  width: 100%;
  overflow: hidden;
  /* Hides the text before it enters and after it leaves */
  white-space: nowrap;
  /* Forces all your spans and gifs to stay on one line */
  box-sizing: border-box;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  /* Pushes the starting position off-screen to the right */
  animation: scroll-left 40s linear infinite;
  /* Adjust the '40s' to make it faster or slower */
  font-family: Asul;
}

/* Space between marquee messages (none after the last one) */
.marquee-content > span:not(:last-child) {
  margin-right: 100px;
}

.marquee-pink {
  color: #ec008c;
}

.marquee-plum {
  color: #ae4880;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}


/* --- Subnav --- */

.subnav {
  margin-bottom: 60px;
  width: 100%;
  height: 36px;
  background-color: #bde0fe;
  color: #bde0fe;
  border: 1px solid #e5e5e5;
}

.subnav .nav {
  margin-bottom: 0;
}

.subnav .nav > li > a {
  margin: 0;
  padding-top: 11px;
  padding-bottom: 11px;
  border-left: 1px solid #f5f5f5;
  border-right: 1px solid #e5e5e5;
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
  border-radius: 0;
  color: black;
}

.subnav .nav > li.active > a,
.subnav .nav > li > a:hover {
  padding-left: 13px;
  background: yellow;
  color: black;
  border-right-color: #ddd;
  border-left: 0;
}

.subnav .nav > li:first-child > a,
.subnav .nav > li:first-child > a:hover {
  border-left: 0;
  padding-left: 12px;
  -webkit-border-radius: 4px 0 0 4px;
  -moz-border-radius: 4px 0 0 4px;
  border-radius: 4px 0 0 4px;
}

.subnav .nav > li:last-child > a {
  border-right: 0;
}

@media (max-width: 767px) {
  .subnav {
    position: static;
    top: auto;
    z-index: auto;
    width: auto;
    height: auto;
    background: #fff;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
  }

  .subnav .nav > li {
    float: none;
  }

  .subnav .nav > li > a {
    border: 0;
  }

  .subnav .nav > li + li > a {
    border-top: 1px solid #e5e5e5;
  }

  .subnav .nav > li:first-child > a,
  .subnav .nav > li:first-child > a:hover {
    -webkit-border-radius: 4px 4px 0 0;
    -moz-border-radius: 4px 4px 0 0;
    border-radius: 4px 4px 0 0;
  }
}

@media (min-width: 980px) {
  .subnav .nav > li:first-child > a,
  .subnav .nav > li:first-child > a:hover {
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
  }
}


/* --- Footer social links (includes/footer.html) --- */

.social-label {
  background-color: #ffe8e8;
  font-family: Asul;
  border: 2px solid #8d6e63;
  border-radius: 12px;
  padding: 5px 15px;
  display: inline-block;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}


/* --- Home page (index.html) --- */

#artwork,
#email,
#newsletter {
  padding-top: 0;
}

/* Art of the month frame */
#artwork .box {
  background: #ffd1e8;
  font-family: sans-serif;
  font-size: 24px;
  line-height: 30px;
  font-weight: bold;
  color: #009688;
  padding: 27px;
  box-shadow:
    inset #ec008c 0 0 0 5px,
    inset #fd6db5 0 0 0 10px,
    inset #ff8fc7 0 0 0 16px,
    inset #ffb5da 0 0 0 21px;
  text-shadow: 3px 3px 1px #bfecf7;
  max-width: 80%;
  height: auto;
}

#aboutme {
  width: 100%;
  max-width: 90%;
  /* keeps padding proportional */
  margin: 0 auto;
  padding-left: 5%;
  padding-right: 5%;
}

#aboutme .row {
  justify-content: space-between;
  /* spreads text and image to edges */
  align-items: center;
  /* keeps them aligned in the middle */
}

#aboutme .span6 {
  flex: 1;
  /* text area fills available space */
  max-width: 60%;
  /* optional: balance width ratio */
}

#aboutme .span3 {
  flex-shrink: 0;
  /* prevents wizard image from shrinking */
  text-align: right;
  /* keeps it flush right */
}


/* --- Gallery pages (gallery.html, gallery-tv.html) --- */

.page-gallery .container {
  max-width: 1200px;
  margin: 30px auto;
}

#gallery {
  padding-top: 0;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

.gallery-container .box {
  background: #FFF2FC;
  font-family: Nunito Sans;
  font-size: 24px;
  line-height: 30px;
  font-weight: bold;
  padding: 27px;
  max-width: 70%;
  height: auto;
  text-align: left;
}

.placard {
  margin-top: 5px;
  border: 4px ridge;
  background-color: white
}

.title {
  margin-top: 10px;
  font-size: 20px;
  margin-left: 8px;
  margin-right: 8px;
}

.material {
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 8px;
  margin-left: 8px;
  margin-right: 8px;
}

.description {
  font-size: 14px;
  line-height: 1.2;
  margin-top: 18px;
  margin-bottom: 8px;
  margin-left: 8px;
  margin-right: 8px;
}


/* --- News page (news.html) --- */

#news {
  padding-top: 0;
}

.news-post {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 30px 0;
}

/* Divider between posts */
.news-post + .news-post {
  border-top: 4px solid #8d6e63;
}

.news-slides {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
}

.news-slides img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #ffd1e8;
  border: 4px ridge #ec008c;
  box-sizing: border-box;
}

/* Slide animation: pictures move inside the frame, and the outgoing one sits on top of the new one */
.news-slides {
  overflow: hidden;
}

.news-slides img.news-leaving {
  position: absolute;
  top: 0;
  left: 0;
}

.news-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 26px;
  line-height: 30px;
  color: #ec008c;
  background: #fff2fc;
  border: 2px solid #8d6e63;
  border-radius: 50%;
  cursor: pointer;
}

.news-arrow:hover {
  background: yellow;
}

.news-prev {
  left: 8px;
}

.news-next {
  right: 8px;
}

.news-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 8px;
  font-size: 13px;
  background: #fff2fc;
  border: 1px solid #8d6e63;
  border-radius: 10px;
}

/* With a mouse, the arrows and counter only show while hovering the picture */
@media (hover: hover) {
  .news-slides .news-arrow,
  .news-slides .news-counter {
    opacity: 0;
    transition: opacity 0.2s;
  }

  .news-slides:hover .news-arrow,
  .news-slides:hover .news-counter,
  .news-slides:has(:focus-visible) .news-arrow,
  .news-slides:has(:focus-visible) .news-counter {
    opacity: 1;
  }
}

/* On touch screens you swipe instead: no arrows, counter always shown */
@media (hover: none) {
  .news-arrow {
    display: none;
  }

  .news-slides img {
    touch-action: pan-y;
  }
}

/* Enlarged view (built by js/news.js). Below the click sparks (z-index 101). */
.news-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 0, 30, 0.85);
}

.news-lightbox[hidden] {
  display: none;
}

.news-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  background: #ffd1e8;
  border: 4px ridge #ec008c;
}

.news-lightbox .news-arrow {
  width: 46px;
  height: 46px;
  font-size: 36px;
  line-height: 40px;
}

.news-lightbox .news-prev {
  left: 16px;
}

.news-lightbox .news-next {
  right: 16px;
}

.news-lightbox .news-counter {
  bottom: 16px;
  font-size: 16px;
}

.news-lightbox.news-single .news-arrow,
.news-lightbox.news-single .news-counter {
  display: none;
}

.news-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 30px;
  line-height: 34px;
  color: #ec008c;
  background: #fff2fc;
  border: 2px solid #8d6e63;
  border-radius: 50%;
}

.news-lightbox-close:hover {
  background: yellow;
}

body.news-lightbox-open {
  overflow: hidden;
}

.news-text {
  flex: 1;
  min-width: 0;
}

.news-title {
  margin-top: 0;
  font-family: Asul;
  font-size: 30px;
  line-height: 36px;
}

.news-date {
  font-size: 14px;
  color: #ae4880;
}

.news-text p:not(.news-date) {
  font-size: 120%;
}

#news-pager {
  text-align: center;
  margin-top: 20px;
}

#news-pager .btn {
  margin: 5px;
}


/* --- Secret cat page (secret-cat-page.html) --- */

.page-secret-cat {
  background: url('../img/bluecatbg.png');
}

.page-secret-cat .container {
  background-color: #ffe5ec;
}


/* --- Phones and small tablets --- */
@media (max-width: 767px) {

  /* Stack the header's logo and avatar */
  .jumbotron .row {
    flex-direction: column !important;
  }

  .jumbotron .span5 {
    width: 100% !important;
    /* Forces full width for stacking */
    text-align: center !important;
  }

  .jumbotron .span5 img {
    display: block;
    /* Ensures margin:auto works */
    margin: 15px auto !important;
  }

  /* Stack the home page's art and about-me rows */
  #aboutme .row,
  #artwork .row {
    flex-direction: column !important;
    align-items: center;
  }

  #aboutme .span6 {
    max-width: 90%;
    /* Makes the text block wider on small screens */
    margin-bottom: 25px;
    /* Adds space between text and wizard image */
  }

  #aboutme .span3 {
    text-align: center;
    /* Ensures the wizard image is centered */
  }

  /* Stack each news post: slideshow on top, text below */
  .news-post {
    flex-direction: column;
    align-items: center;
  }

  .news-slides {
    flex-basis: auto;
    width: 100%;
    max-width: 400px;
  }

  /* Footer socials: size each link to its label, keep a gap between them,
     and wrap to a second line instead of overlapping on narrow phones */
  #socials .row {
    flex-wrap: wrap;
    gap: 0 14px;
  }

  #socials .row > .span3 {
    width: auto;
    min-width: max-content;
  }

  #socials .social-label {
    padding: 5px 10px;
  }

  /* Forms: Bootstrap only stacks horizontal-form labels below 480px, so between
     481-767px the 180px label column plus the 300px Turnstile widget pushed the
     forms off-screen. */
  .row > [class*="span"] {
    min-width: 0; /* let flex items shrink below their content width */
  }

  .form-horizontal.well {
    padding: 9px;
  }

  .form-horizontal .control-label {
    float: none;
    width: auto;
    padding-top: 0;
    text-align: left;
  }

  .form-horizontal .controls {
    margin-left: 0;
  }

  .form-horizontal .form-actions {
    padding-left: 10px;
    padding-right: 10px;
  }
}
