/* Overlay */
.universal-popup-overlay {position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 36, 25, 0.86); backdrop-filter: blur(5px); z-index: 9998; -webkit-backdrop-filter: blur(5px);}

/* Popup container */
.universal-popup-container:not(:has(.search-popup-inner)) {position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--white); width: 70%; box-shadow: 0 8px 25px rgba(0,0,0,0.3); z-index: 9999; box-sizing: border-box; max-height: 90vh; display: flex; border-radius: var(--radius); padding: clamp(35px, 5vw, 75px); background-color: var(--light); flex-direction: column; max-width: 750px;}
.universal-popup-container > p {color: var(--wellington-green);}
.universal-popup-container > p > {color: var(--wellington-gold);}
.universal-popup-container > p:last-of-type {margin: 0;}
.universal-popup-container > p > a {color: var(--wellington-gold);}

/* Close button */
.universal-popup-close {position: absolute; top: -20px; right: 15px; border: none; background: transparent; font-size: 35px; cursor: pointer; line-height: 1; color: var(--white); background-color: var(--wellington-gold); border-radius: 50%; height: 60px; width: 60px; will-change: var(--btn-will-change); transition-delay: 0.05s; transition: var(--btn-smooth); font-weight: 300; display: flex; justify-content: center; align-items: center;}
.universal-popup-close:hover {background-color: var(--wellington-green); will-change: var(--btn-will-change); transition-delay: 0.05s; transition: var(--btn-smooth); cursor: pointer; color: var(--white);}
.universal-popup-container, .universal-popup-overlay {opacity: 0; animation: universal-popup-fadein 0.4s forwards;}

@keyframes universal-popup-fadein {to {opacity: 1;}}

/* Search Popup */
.universal-popup-container:has(.search-popup-inner) {position: fixed; top: 0; left: 0; transform: none; width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: var(--dark-green); padding: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; z-index: 999999;}
.search-popup-inner {display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;}
.search-popup-inner form {display: flex; align-items: center; gap: 12px;}
.search-popup-inner input[type="search"] {font-size: 23px; padding: 15px 25px; background: transparent; width: 450px; max-width: 60vw; font-family: var(--font-base); border: solid 1.5px var(--white); border-radius: var(--radius); font-weight: 300; line-height: 1;}
.search-popup-inner input[type="search"]::placeholder {color: rgba(255,255,255,0.6);}
.search-popup-inner button[type="submit"] {font-size: 13px; padding: 15px 25px; color: var(--wellington-green); border: none; cursor: pointer; transition: var(--btn-smooth); font-family: var(--font-base); text-transform: uppercase; letter-spacing: 2px; font-weight: 400; border-radius: var(--radius); background-color: var(--wellington-gold); height: 60px;}
.search-popup-inner button[type="submit"]:hover {background: var(--wellington-green); color: var(--white); transition: var(--btn-smooth);}
input:focus, textarea:focus, select:focus {border-color: var(--wellington-gold);}
.post-grid {display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px;}
input[type="search"]:focus {color: var(--white)!important;}
[type="search"] {border: 1.5px solid #fff; transition: border-color 0.3s ease!important;}
[type="search"]:focus {border-color: var(--wellington-gold)!important; outline: none!important;}
.cards-wrapper .archive-web-card {background: var(--wellington-green);}
.cards-wrapper .web-card {position: relative; flex: 1; display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; border-radius: var(--radius); transition: var(--smooth);}
.web-card.archive-web-card:hover {background-color: var(--wellington-gold); transition: var(--smooth);}
.search-results-content .category {display: inline-block; position: relative; box-sizing: border-box; padding: 7px 13px; text-transform: uppercase; letter-spacing: 2px; font-family: var(--font-base); background: var(--wellington-gold); color: var(--white); font-size: 10px; font-weight: 400; z-index: 1; border-radius: 0 0 var(--radius) 0;}
.search-results-content .cards-wrapper .web-card {align-items: flex-start;}
.cards-wrapper .web-card .card-text-container {box-sizing: border-box; padding: 35px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; min-height: 385px;}
.search-results-content .card-title {font-size: clamp(2.7rem, 1vw + 1.8rem, 3.4rem);}
.archive-web-card.web-card .card-title, .archive-web-card.web-card p {color: var(--white);}
.archive-web-card.web-card p {opacity: .7;}

/* Popup Split */
.popup-split {display: flex; align-items: center; justify-content: space-between;}
.popup-split .popup-text {box-sizing: border-box; padding: 75px; height: 100%; display: flex; flex-direction: column; justify-content: center; flex: 1;}
.popup-split .popup-image {display: flex; flex: 1; height: 100%; width: 100%;}
.popup-split .popup-image img {height: 100%; width: 100%; object-fit: cover; border-radius: var(--radius) 0 0 var(--radius);}
.popup-text p {color: var(--wellington-green);}

/* Responsive */

@media (max-width: 1440px) {
  .popup-split .popup-text {padding: 50px;}
}

@media (max-width: 1000px) {
  .popup-split {flex-direction: column;}
  .popup-split .popup-image img {object-position: bottom; max-height: 350px; border-radius: var(--radius) var(--radius) 0 0;}
}

@media (max-width: 800px) {
  .universal-popup-container:not(:has(.search-popup-inner)) {width: 90%;}
  .popup-split .popup-text {padding: 35px;}
}

@media (max-width: 480px) {
    .popup-split .popup-image img {max-height: 250px;}
    .universal-popup-close {height: 55px; width: 55px;}
}