/* Add your css code here */

/* ── Login & Register page styling ── */
.path-user .layout-content {
  max-width: 500px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(37,53,90,0.12);
}
.path-user .page-title {
  color: #25355a;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.path-user input[type="text"],
.path-user input[type="password"],
.path-user input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #dde3ed;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.path-user input[type="text"]:focus,
.path-user input[type="password"]:focus,
.path-user input[type="email"]:focus {
  border-color: #007fa2;
  outline: none;
}
.path-user .form-submit {
  width: 100%;
  background: #25355a !important;
  color: #ffcc33 !important;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}
.path-user .form-submit:hover {
  background: #007fa2 !important;
  color: #ffffff !important;
}

/* ── Mobile Responsive Fix ── */
@media (max-width: 768px) {

  /* Header */
  .solo-inner.header-inner > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 10px !important;
  }
  nav {
    width: 100% !important;
    align-items: flex-start !important;
  }
  nav > div {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* Full width blocks */
  [style*="width:100vw"],
  [style*="width: 100vw"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }

  /* Fix images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Cards */
  .ms-cards,
  .mp-grid,
  .ws-activities,
  .sc-hours-grid {
    grid-template-columns: 1fr !important;
  }

  /* Font sizes */
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.4rem !important; }
  h3 { font-size: 1.1rem !important; }

  /* Hero sections */
  .sc-hero,
  .ws-hero,
  .mp-hero {
    padding: 40px 20px !important;
  }

  /* Tables */
  .tl-table {
    font-size: 0.8rem !important;
  }
  .tl-table th,
  .tl-table td {
    padding: 5px 8px !important;
  }

}

/* ── Mobile header fixes ── */
@media (max-width: 768px) {
  .ms-logo img:first-child,
  .ms-logo div:first-of-type {
    display: none !important;
  }
}

/* ── Carousel mobile fix ── */
@media (max-width: 992px) {
  #ms-carousel {
    height: 280px !important;
    width: 100% !important;
  }
  #ms-track {
    display: flex !important;
    flex-direction: row !important;
    height: 100% !important;
  }
  #ms-track > div {
    min-width: 100% !important;
    flex-direction: row !important;
    height: 100% !important;
  }
  #ms-track img {
    max-height: 100% !important;
    width: auto !important;
    max-width: 100% !important;
  }
  #ms-dots {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
}

/* ── CRAFT hive 5 themes image above footer copyright ── */
#copyright::before {
  content: '';
  display: block;
  background-image: url('/sites/default/files/2026-06/craft%20hive%205%20themes%20260527.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 100%;
  max-width: 600px;
  height: 120px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
}

/* ── Project cards mobile image fix ── */
@media (max-width: 992px) {
  .proj-img {
    height: 280px !important;
  }
  .proj-img img {
    object-fit: contain !important;
    height: 100% !important;
    background-color: #e8f0f5 !important;
  }
}

/* ── Tools individual page mobile fix ── */
@media (max-width: 992px) {
  .path-tools .node__content {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
  }
}

/* ── Footer image spacing fix ── */
#copyright::before {
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* ── Hero mobile fix ── */
@media (max-width: 992px) {
  .ms-hero {
    flex-direction: column !important;
    padding: 40px 20px !important;
    gap: 30px !important;
  }
  .ms-hero img {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ── Hero mobile fix ── */
@media (max-width: 992px) {
  [style*="background-color:#007fa2"][style*="display:flex"] {
    flex-direction: column !important;
    padding: 40px 20px !important;
    gap: 20px !important;
    min-height: unset !important;
  }
}

/* ── Hero decorative lines behind content on mobile ── */
@media (max-width: 992px) {
  [style*="border:3px solid #ffcc33"],
  [style*="border: 3px solid #ffcc33"] {
    z-index: 0 !important;
  }
  [style*="background-color:#007fa2"][style*="display:flex"] > div:not([style*="border"]) {
    z-index: 1 !important;
    position: relative !important;
  }
}

/* ── Hero diamonds behind content ── */
@media (max-width: 992px) {
  [style*="background-color:#007fa2"] > [style*="border:3px solid #ffcc33"] {
    z-index: 0 !important;
  }
}

/* ── Header alignment ── */
.ms-header {
  justify-content: flex-start !important;
}

/* Add focus states to ensure keyboard users get the same visual highlighting as mouse hover */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #0056b3; /* Replace with your brand color */
  outline-offset: 2px;
  box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
  background-color: #f1f8ff; /* Optional: Slight highlight on focus */
}

/******** Project CSS *****/

.proj-modal-inner {
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  max-height: 90vh;
  max-width: 960px;
  overflow-y: auto;
  position: relative;
  width: 92%;
}
.proj-modal-img {
  flex: 1.2;
  /*min-width: 280px;
  max-height: 50vh;*/
  background: #f0f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.proj-modal-img img {
  display: block;
  max-height: 50vh;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}
.proj-modal-body {
  flex: 1;
  min-width: 260px;
  overflow-y: auto;
  padding: 30px;
}
@media (max-width: 992px) {
  .proj-modal-inner {
    width: 96%;
    max-height: 85vh;
    border-radius: 12px;
  }
  .proj-modal-img {
    min-width: 100%;
    max-height: 280px;
  }
  .proj-modal-img img {
    max-height: 280px;
  }
  .proj-modal-body {
    padding: 20px;
    min-width: 100%;
  }
  .proj-card {
    min-width: 100%;
    max-width: 100%;
  }
}
.proj-modal-close {
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.5rem;
  height: 36px;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  z-index: 10000;
}

/************ Modal ***********/

.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}

.button {
  font-size: 1em;
  padding: 10px;
  color: #fff;
  border: 2px solid #06D85F;
  border-radius: 20px/50px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
}
.button:hover {
  background: #06D85F;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}

/***** Card *****/
/* Card Grid Layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Hide the modal by default */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}

/* Show the modal when the hash matches */
.modal-overlay:target {
  opacity: 1;
  visibility: visible;
}

/* Modal Box */
.modal-content {
  background: #fff;
 /* padding: 30px;8/
  border-radius: 8px;
  /*width: 90%;
  max-width: 600px;*/
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
}

/* Animate the content on open */
.modal-overlay:target .modal-content {
  transform: scale(1);
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  text-decoration: none;
  color: #333;
}

.proj-modal-inner {
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  max-height: 90vh;
  max-width: 960px;
  overflow-y: auto;
  position: relative;
  width: 92%;
}
.proj-modal-img {
  flex: 1.2;
  /*min-width: 280px;
  max-height: 50vh;*/
  background: #f0f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.proj-modal-img img {
  display: block;
  max-height: 50vh;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}
.proj-modal-body {
  flex: 1;
  min-width: 260px;
  overflow-y: auto;
  padding: 30px;
}
@media (max-width: 992px) {
  .proj-modal-inner {
    width: 96%;
    max-height: 85vh;
    border-radius: 12px;
  }
  .proj-modal-img {
    min-width: 100%;
    max-height: 280px;
  }
  .proj-modal-img img {
    max-height: 280px;
  }
  .proj-modal-body {
    padding: 20px;
    min-width: 100%;
  }
  .proj-card {
    min-width: 100%;
    max-width: 100%;
  }
}
.proj-modal-close {
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.5rem;
  height: 36px;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  z-index: 10000;
}
