/*
 Theme Name: WM4U
 Theme URI: wm4u.tividev.pro
 Author: tividev
 Author URI: @tividev
 Description: WM4U Website wordpress theme
 Version: 1.0
*/

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
}

/* SF Mono */

@font-face {
    font-family: 'SF Mono';
    src: url('/wp-content/themes/wm4u/fonts/SFMonoRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'SF Mono';
    src: url('/wp-content/themes/wm4u/fonts/SFMonoMedium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

/* SF Pro Display */

@font-face {
    font-family: 'SF Pro Display';
    src: url('/wp-content/themes/wm4u/fonts/SFProDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/wp-content/themes/wm4u/fonts/SFProDisplay-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

/* DEFAULT */

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    box-sizing: border-box;
}

@media (max-width: 1240px) {
    .container {
        max-width: 1200px;
        padding: 0 24px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
        margin: 0;
    }
}

a {
    color: #fff;
    text-decoration: none;
}

body {
    background: #ECECEC;
}

section h2 {
    font-family: 'SF Mono', monospace;
    font-weight: 400;
    font-size: 48px;
    line-height: 1.2;
}

/* HEADER */

header {
    font-family: 'SF Pro Display', sans-serif;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    z-index: 9999;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    padding: 32px 0;
}

.logo {
    cursor: pointer;
}

.header-top-menu {
    flex: 1;
}

.header-top-menu ul {
    display: flex;
    gap: 44px;
    padding-left: 8px;
}

.header-top-menu li {
    list-style: none;
    position: relative;
}


.header-top-menu li a, .header-top-right a {
    font-weight: 400;
    transition: all 0.3s ease;
}

.header-top-menu a:hover, .header-top-right a:hover {
    opacity: 0.5;
}

.header-top-menu ul .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    display: none;
    padding-left: 0;
}

.header-top-menu ul li:hover > .sub-menu {
    display: block;
    padding-top: 10px;
    padding-bottom: 10px;
}

.header-top-menu ul .sub-menu li a {
    white-space: nowrap;
}

.menu-item-has-children a img {
    width: 11px;
    height: 8px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

header.search-active .menu-item-has-children a img {
    filter: invert(1);
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.burger {
    display: none;
    transform: scale(0.7);
}

.header-top-search {
    background: none;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'SF Pro Display', sans-serif;
    width: 116px;
    height: 38px;
    box-sizing: border-box;
    box-shadow: 0px 0px 0px 1px rgba(255,255,255,1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-top-search svg {
    stroke: #fff;
}

.header-top-search:hover {
    color: #2EFB80;
    box-shadow: 0px 0px 0px 1px rgba(46,251,128,1);
}


.header-top-search svg {
    transition: all 0.3s ease;
}

.header-top-search:hover svg {
    stroke: #2EFB80;
}

body.search-active, body.mobile-active  {
    background: #ECECEC;
}

main.search-active, main.mobile-active {
    display: none;
}

header.search-active .logo, header.mobile-active .logo {
    filter: invert(1);
}

header.search-active .header-top-menu li a, header.search-active .header-top-right a, header.mobile-active .header-top-right a {
    color: #000;
}

header.search-active .header-top-search {
    background: none;
    filter: invert(1);
    opacity: 0.4;
}

header.mobile-active .header-top-search {
    background: none;
    filter: invert(1);
}

header.mobile-active .burger {
    filter: invert(1);
}

.search, .mobile-toggle {
    display: none;
    background: #ECECEC;
    min-height: 100vh;
}

.search.search-active, .mobile-toggle.mobile-active {
    display: block;
    padding-top: 24px;
}

.search-content {
    width: 100%;
}

.search-field {
    width: 100%;
    background: #ECECEC;
    font-size: 48px;
    line-height: 1.2;
    font-family: 'SF Mono', monospace;
    color: #000;
    border-radius: 24px;
    padding: 21px 24px;
    box-sizing: border-box;
    border: none;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,1);
    outline: none;
    position: relative;
}

.search-field::placeholder {
    color: #000;
}

.search-field-area {
    position: relative;
}

.search-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 21px;
    cursor: pointer;
}

.popular-searches {
    margin-top: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.popular-searches span {
    font-family: 'SF Pro Display', sans-serif;
    font-size: 16px;
    line-height: 1.2;
    width: 160px;
}

.search-item {
    font-family: 'SF Mono', monospace;
    font-size: 36px;
    line-height: 1.2;
    background: #fff;
    padding: 11px 46px 11px 24px;
    border-radius: 24px;
    box-sizing: border-box;
    cursor: pointer;
}

.search-results {
    display: none;
    padding: 24px 0;
    overflow: visible;
}

.search-results.active {
    display: block;
}

.results-items {
    column-count: 3;
    column-gap: 8px;
}


.result-item {
    display: flex;
    background: #fff;
    padding: 20px 24px;
    box-sizing: border-box;
    border-radius: 24px;
    flex-direction: column;
    gap: 31px;
    margin-bottom: 8px;
    break-inside: avoid;
}

.result-item-info {
    display: flex;
    justify-content: space-between;
    font-family: 'SF Pro Display', sans-serif;
    line-height: 1.4;
    
}

.result-item-content {
    font-family: 'SF Mono', monospace;
    color: #000;
    line-height: 1.2;
}

.result-item-content h3 {
    margin-bottom: 8px;
}

.result-item-content h3 a {
    color: #000;
    font-weight: 500;
    transition: all 0.3s ease;
}

.result-item-content h3 a:hover {
    opacity: 0.5;
}


.mobile-toggle.mobile-active {
    display: flex;
}


.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

.mobile-toggle li, .mobile-menu .copy {
    list-style: none;
    font-size: 24px;
    line-height: 1.8;
}

.mobile-toggle a {
    color: #000;
}

/* FOOTER */
footer {
    background: #000;
    padding: 110px 0 28px 0;
}

footer.mobile-active {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    font-family: 'SF Pro Display', sans-serif;
}

.footer-logo-area {
    display: flex;
    gap: 57px;
    align-items: flex-start;
    width: 40%;
}

.footer-navigation {
    width: 60%;
    display: flex;
    justify-content: space-between;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-nav ul li {
    transition: all 0.3s ease;
}

.footer-nav ul li:hover {
    opacity: 0.5;
}

.footer-nav li.copy:hover {
    opacity: 1;
}

.footer-nav ul li a {
    line-height: 1.6;
}

footer .copy {
    color: #fff;
    list-style: none;
    line-height: 1.6;
}




@media (max-width: 1240px) {
    
    section h2 {
        font-size: 44px;    
    }
    
    .footer-logo-area {
        gap: 24px;
    }
    
    .footer-logo-area img {
        height: 100px;
    }
    
    .header-top-menu ul, .header-top-right {
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    
    section h2 {
        font-size: 32px;    
    }
    
    .footer-logo-area {
        gap: 15px;
    }
    
    .footer-logo-area img {
        height: 72px;
    }
    
    .footer-nav ul li {
        font-size: 10px;
    }
    
    footer {
        padding-top: 60px;
    }
    
    .header-top {
        padding: 25px 0;
        gap: 0;
    }
    
    .header-top-right {
        gap: 14px;
        font-size: 12px;
    }
    
    .header-top-menu, .header-top-right a:first-child {
        display: none;
    }
    
    .burger {
        position: relative;
        width: 40px;
        height: 30px;
        background: transparent;
        display: block;
      }
      
      .burger input {
        display: none;
      }
      
      .burger span {
        display: block;
        position: absolute;
        height: 4px;
        width: 100%;
        background: #fff;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
      }
      
      .burger span:nth-of-type(1) {
        top: 0px;
        transform-origin: left center;
      }
      
      .burger span:nth-of-type(2) {
        top: 50%;
        transform: translateY(-50%);
        transform-origin: left center;
      }
      
      .burger span:nth-of-type(3) {
        top: 100%;
        transform-origin: left center;
        transform: translateY(-100%);
      }
      
      .burger input:checked ~ span:nth-of-type(1) {
        transform: rotate(45deg);
        top: 0px;
        left: 5px;
      }
      
      .burger input:checked ~ span:nth-of-type(2) {
        width: 0%;
        opacity: 0;
      }
      
      .burger input:checked ~ span:nth-of-type(3) {
        transform: rotate(-45deg);
        top: 28px;
        left: 5px;
      }
    
    .logo {
        cursor: none;
        width: 85px;
    }
    
    .header-top-search {
        font-size: 12px;
        width: 84px;
        height: 30px;
        gap: 6px;
    }
    
    .header-top-search svg {
        width: 12px;
    }
    
    .mobile-menu .copy {
        position: absolute;
        bottom: 0;
        right: 0;
    }
    
    .search-field {
        font-size: 32px;
        border-radius: 18px;
        padding: 17px 16px;
    }
    
    .search-clear {
        width: 31px;
    }
    
    .popular-searches span {
        font-size: 12px;
        width: 90px;
    }
    
    .search-item {
        font-size: 20px;
        border-radius: 18px;
        padding: 11px 16px;
    }
    
    .result-item {
        padding: 20px 16px;
        gap: 28px;
        border-radius: 16px;
    }
    
    .result-item-info {
        font-size: 12px;
    }
    
    .result-item-content h3 {
        font-size: 14px;
    }
    
    .result-item-content p {
        font-size: 12px;
    }
    
    header.search-active .burger {
        filter: invert(1);
    }
}

@media (max-width: 767px) {
    
    section h2 {
        font-size: 36px;
    }
    
    .search-field {
        font-size: 24px;
    }
    
    .search-clear {
        width: 31px;
        height: 31px;
    }
    
    .popular-searches.hide-popular {
        display: none;
    }
    
    .popular-searches span {
        width: 100%;
        margin-bottom: 16px;
        font-size: 16px;
    }
    
    
    
    .popular-searches span br {
        display: none;
    }
    
    .search-item {
        font-size: 24px;
        padding: 14px 20px 14px 14px;
    }
    
    .results-items {
        display: flex;
        flex-direction: column;
    }
    
    .result-item-info {
        font-size: 16px;   
    }
    
    .result-item-content h3 {
        font-size: 20px;
    }
    
    header.search-active .burger {
        filter: invert(1);
    }
    
    .search.search-active, .mobile-toggle.mobile-active {
        padding-top: 0;
    }
    
    .logo {
        cursor: none;
        width: 108px;
    }
    
    .header-top-right {
        gap: 18px;
        font-size: 16px;
    }
    
    .header-top-search {
        font-size: 16px;
        width: 108px;
        height: 38px;
        gap: 9px;
    }
    
    .header-top-search svg {
        width: 15px;
    }
    
    .header-top-search:hover {
        color: #fff;
        box-shadow: 0px 0px 0px 1px rgba(255,255,255,1);
    }
    
    .header-top-search:hover svg {
        stroke: #fff;
    }
    
    footer {
        padding-top: 41px;
    }
    
    .footer-content {
        flex-direction: column-reverse;
    }
    
    .footer-navigation {
        width: 100%;
        flex-wrap: wrap;
        row-gap: 42px;
        margin-bottom: 80px;
    }
    
    .footer-nav {
        width: 50%;
    }
    
    .footer-logo-area {
        gap: 0;
        justify-content: space-between;
        width: 100%;
    }
    
    .footer-logo-area img {
        height: 100px;
        width: auto;
    }
    
    .footer-nav-4 {
        gap: 54px;
    }
    
    .footer-nav ul li {
        font-size: 16px;
    }
    
    .mobile-menu .copy {
        position: relative;
    }
}


/* HOVERS */

.underline {
    position: relative;
    width: fit-content;
    transition: opacity 0.3s ease;
}

.underline:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000; 
    transition: width 0.3s ease, opacity 0.3s ease; 
    opacity: 0.5;
    
}

.underline:hover {
    opacity: 0.5;
}

.underline:hover::after {
    width: 100%;
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    background-color: #2EFB80;
    transform: scale(1.015);
    box-shadow: none;
}