Login
Dashboard
Saved Stitches
Stitch Catalog
Demo
All
E-Commerce
All
(4)
Collections
(3)
Featured Products
(0)
Hero
(0)
Pop Up Modals
(0)
Promotional CTA
(1)
Store Products
(0)
Buttons
All
(1)
Non Standard
(0)
Squared
(1)
Navigation
All
(2)
+ Dropdown
(1)
+ Top Bar
(0)
Double Dropdown
(0)
Standard
(1)
Top Bar + Dropdown
(0)
Hero Section
All
(7)
Centered
(2)
Grid
(0)
Landing + Services
(3)
Left Aligned
(1)
Right Aligned
(1)
Services
All
(16)
3 Card
(4)
4 Card
(4)
5 Card
(1)
6 Card
(2)
8 Card
(1)
Combo
(2)
Side By Side
(2)
Content Flair
All
(3)
Button Boxes
(1)
Content Groups
(1)
Lists
(1)
Quotes
(0)
Stats
(0)
Toppers
(0)
Side By Side
All
(34)
Combo
(0)
Non Standard
(1)
Reverse
(11)
Reverse Pair
(5)
Reverse Triplet
(3)
Standard
(14)
Gallery
All
(7)
4 Images
(1)
5 Images
(1)
6 Images
(1)
8 Images
(2)
Full Width
(0)
Mosaic
(0)
Multi Gallery
(1)
Simple
(1)
Meet Our Team
All
(5)
2 Card
(0)
3 Card
(1)
4 Card
(2)
5 Card
(1)
6 Card
(0)
7 Card
(0)
8 Card
(1)
Combo
(0)
Steps
All
(4)
3 Steps
(2)
4 Steps
(2)
5 Steps
(0)
Stats
All
(5)
2 Stats
(0)
3 Stats
(0)
4 Stats
(3)
Combos
(1)
Timeline
(1)
Pricing
All
(7)
2 Card
(0)
3 Card
(3)
Menu's
(2)
Price List
(0)
w/ Toggles
(2)
FAQ
All
(4)
Multi FAQ's
(0)
Side By Side
(2)
Standard
(2)
Why Choose Us
All
(11)
3 Card
(1)
4 Card
(1)
6 Card
(0)
Side By Side
(9)
Quotes
All
(0)
Single Quotes
(0)
MISC
All
(5)
Careers
(0)
Content
(0)
Locations
(1)
Logos
(1)
Maps
(0)
Popups
(0)
Tables
(1)
Video
(2)
Reviews
All
(14)
2 Card
(4)
3 Card
(3)
4 Card
(0)
8 Card
(0)
Full Width
(0)
Single Review
(7)
Slideshow
(0)
Forms & Contact
All
(8)
Contact Forms
(8)
Contact Info
(0)
Subscribe
(0)
Events
All
(3)
3 Card
(1)
4 Card
(0)
Side By Side
(2)
Blog
All
(3)
Recent Posts
(3)
Call To Action
All
(4)
Combos
(1)
Contained
(0)
Full Width
(2)
Subscribe Forms
(1)
Footer
All
(6)
2 Column
(0)
3 Column
(1)
4 Column
(2)
5 Column
(1)
Combo
(0)
Simple
(2)
Dark Mode
All
(1)
Standard
(1)
Interior Pages
All
(3)
About Page
(0)
Contact Page
(0)
Content Page
(1)
FAQ Page
(1)
Menus
(0)
Page Banners
(1)
Service Page
(0)
+ Dropdown
HTML
JS
CSS
Core Styles
Choose your preferred CSS
CSS
LESS
SCSS
CSS
LESS
SCSS
CSS
LESS
SCSS
CSS Dark
LESS Dark
SCSS Dark
CSS Dark
LESS Dark
SCSS Dark
CSS Dark
LESS Dark
SCSS Dark
Choose your preferred Core Styles CSS
CSS
LESS
SCSS
-
Dark Mode
+
Dark Mode
Copy
to Clipboard
<!-- ============================================ --> <!-- Navigation --> <!-- ============================================ --> <header id="cs-navigation"> <div class="cs-container"> <!--Nav Logo--> <!--Logo is turned white in the css with a filter on dark mode--> <a href="" class="cs-logo" aria-label="back to home"> <img src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Graphics/day-care.svg" alt="logo" width="210" height="29" aria-hidden="true" decoding="async"> </a> <!--Navigation List--> <nav class="cs-nav" role="navigation"> <!--Mobile Nav Toggle--> <button class="cs-toggle" aria-label="mobile menu toggle"> <div class="cs-box" aria-hidden="true"> <span class="cs-line cs-line1" aria-hidden="true"></span> <span class="cs-line cs-line2" aria-hidden="true"></span> <span class="cs-line cs-line3" aria-hidden="true"></span> </div> </button> <!-- We need a wrapper div so we can set a fixed height on the cs-ul in case the nav list gets too long from too many dropdowns being opened and needs to have an overflow scroll. This wrapper acts as the background so it can go the full height of the screen and not cut off any overflowing nav items while the cs-ul stops short of the bottom of the screen, which keeps all nav items in view no matter how mnay there are--> <div class="cs-ul-wrapper"> <ul id="cs-expanded" class="cs-ul" aria-expanded="false"> <li class="cs-li"> <a href="" class="cs-li-link cs-active"> Home </a> </li> <li class="cs-li"> <a href="" class="cs-li-link"> About </a> </li> <!--Copy and paste this cs-dropdown list item and replace any .cs-li with this cs-dropdown group to make a new dropdown and it will work--> <li class="cs-li cs-dropdown" tabindex="0"> <span class="cs-li-link"> Services <img class="cs-drop-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/down-gold.svg" alt="dropdown icon" width="15" height="15" decoding="async" aria-hidden="true"> </span> <ul class="cs-drop-ul"> <li class="cs-drop-li"> <a href="" class="cs-li-link cs-drop-link">Registration</a> </li> <li class="cs-drop-li"> <a href="" class="cs-li-link cs-drop-link">Our Classes</a> </li> </ul> </li> <li class="cs-li"> <a href="" class="cs-li-link"> Blog </a> </li> <li class="cs-li"> <a href="" class="cs-li-link"> Contact </a> </li> </ul> </div> </nav> <div class="cs-contact-group"> <a href="tel:+84 1985 33 999" class="cs-phone"> <img class="cs-phone-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/phone-1a.svg" alt="logo" width="24" height="24" aria-hidden="true" decoding="async"> +84 1985 33 999 </a> <div class="cs-social"> <a href="" class="cs-social-link"> <img class="cs-social-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/facebook-1a.svg" alt="logo" width="12" height="12" aria-hidden="true" decoding="async"> </a> <a href="" class="cs-social-link"> <img class="cs-social-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/twitter-1a.svg" alt="logo" width="12" height="12" aria-hidden="true" decoding="async"> </a> <a href="" class="cs-social-link"> <img class="cs-social-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/instagram1a.svg" alt="logo" width="12" height="12" aria-hidden="true" decoding="async"> </a> <a href="" class="cs-social-link"> <img class="cs-social-icon" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Icons/youtube1a.svg" alt="logo" width="12" height="12" aria-hidden="true" decoding="async"> </a> </div> </div> <!--Dark Mode toggle, uncomment button code if you want to enable a dark mode toggle--> <!-- <button id="dark-mode-toggle" aria-label="dark mode toggle"> <svg class="cs-moon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" style="enable-background:new 0 0 480 480" xml:space="preserve"><path d="M459.782 347.328c-4.288-5.28-11.488-7.232-17.824-4.96-17.76 6.368-37.024 9.632-57.312 9.632-97.056 0-176-78.976-176-176 0-58.4 28.832-112.768 77.12-145.472 5.472-3.712 8.096-10.4 6.624-16.832S285.638 2.4 279.078 1.44C271.59.352 264.134 0 256.646 0c-132.352 0-240 107.648-240 240s107.648 240 240 240c84 0 160.416-42.688 204.352-114.176 3.552-5.792 3.04-13.184-1.216-18.496z"/></svg> <img class="cs-sun" aria-hidden="true" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons%2Fsun.svg" decoding="async" alt="moon" width="15" height="15"> </button> --> </div> </header>
// add classes for mobile navigation toggling var CSbody = document.querySelector("body"); const CSnavbarMenu = document.querySelector("#cs-navigation"); const CShamburgerMenu = document.querySelector("#cs-navigation .cs-toggle"); CShamburgerMenu.addEventListener('click', function() { CShamburgerMenu.classList.toggle("cs-active"); CSnavbarMenu.classList.toggle("cs-active"); CSbody.classList.toggle("cs-open"); // run the function to check the aria-expanded value ariaExpanded(); }); // checks the value of aria expanded on the cs-ul and changes it accordingly whether it is expanded or not function ariaExpanded() { const csUL = document.querySelector('#cs-expanded'); const csExpanded = csUL.getAttribute('aria-expanded'); if (csExpanded === 'false') { csUL.setAttribute('aria-expanded', 'true'); } else { csUL.setAttribute('aria-expanded', 'false'); } } // This script adds a class to the body after scrolling 100px // and we used these body.scroll styles to create some on scroll // animations with the navbar document.addEventListener('scroll', (e) => { const scroll = document.documentElement.scrollTop; if(scroll >= 100){ document.querySelector('body').classList.add('scroll') } else { document.querySelector('body').classList.remove('scroll') } }); // mobile nav toggle code const dropDowns = Array.from(document.querySelectorAll('#cs-navigation .cs-dropdown')); for (const item of dropDowns) { const onClick = () => { item.classList.toggle('cs-active') } item.addEventListener('click', onClick) }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body.cs-open { overflow: hidden; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { top: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active:before { transform: translateX(-50%) scale(1.03); } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } #cs-navigation.cs-active .cs-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: 0.25rem; display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 10; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } #cs-navigation .cs-active .cs-line3 { opacity: 0; bottom: 100%; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } #cs-navigation .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: 2.4em; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } #cs-navigation .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: 4rem 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 1.25rem; overflow: auto; } #cs-navigation .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-70/16rem); transition: transform 0.6s, opacity 0.9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li:nth-of-type(10) { transition-delay: 0.5s; } #cs-navigation .cs-li:nth-of-type(11) { transition-delay: 0.55s; } #cs-navigation .cs-li:nth-of-type(12) { transition-delay: 0.6s; } #cs-navigation .cs-li:nth-of-type(13) { transition-delay: 0.65s; } #cs-navigation .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-li { text-align: center; width: 100%; display: block; } #cs-navigation .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; margin: 0.75rem 0 0 0; padding: 0.75rem 0; opacity: 1; visibility: visible; } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity 0.3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: 0.75rem; overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } #cs-navigation .cs-drop-li { list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 1.5rem 1.5rem; visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } #cs-navigation .cs-drop-li { font-size: 1rem; text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link.cs-drop-link { font-size: 1rem; line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0.75rem; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: 9.375rem; margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 2rem; color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; } #cs-navigation .cs-button-solid:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode #dark-mode-toggle .cs-sun { opacity: 1; transform: translate(-50%, -50%); } body.dark-mode #dark-mode-toggle .cs-moon { opacity: 0; transform: translate(-50%, -150%); } #dark-mode-toggle { width: 3rem; height: 3rem; margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; } #dark-mode-toggle img, #dark-mode-toggle svg { width: 1.25rem; height: 1.25rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } #dark-mode-toggle .cs-moon { z-index: 2; transition: transform 0.3s, opacity 0.3s; } #dark-mode-toggle .cs-sun { opacity: 0; z-index: 1; transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; } #dark-mode-toggle:hover { cursor: pointer; } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body.cs-open { overflow: hidden; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { top: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active:before { transform: translateX(-50%) scale(1.03); } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } #cs-navigation.cs-active .cs-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: 0.25rem; display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 10; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } #cs-navigation .cs-active .cs-line3 { opacity: 0; bottom: 100%; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } #cs-navigation .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: 2.4em; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } #cs-navigation .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: 4rem 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 1.25rem; overflow: auto; } #cs-navigation .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-70/16rem); transition: transform 0.6s, opacity 0.9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li:nth-of-type(10) { transition-delay: 0.5s; } #cs-navigation .cs-li:nth-of-type(11) { transition-delay: 0.55s; } #cs-navigation .cs-li:nth-of-type(12) { transition-delay: 0.6s; } #cs-navigation .cs-li:nth-of-type(13) { transition-delay: 0.65s; } #cs-navigation .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode #cs-navigation:before { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-toggle { background-color: var(--secondary); } body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-line { background-color: #fff; } body.dark-mode #cs-navigation .cs-ul-wrapper { background-color: var(--medium); } body.dark-mode #cs-navigation .cs-li-link { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-li { text-align: center; width: 100%; display: block; } #cs-navigation .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; margin: 0.75rem 0 0 0; padding: 0.75rem 0; opacity: 1; visibility: visible; } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity 0.3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: 0.75rem; overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } #cs-navigation .cs-drop-li { list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 1.5rem 1.5rem; visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } #cs-navigation .cs-drop-li { font-size: 1rem; text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link.cs-drop-link { font-size: 1rem; line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0.75rem; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation .cs-drop-ul { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: 9.375rem; margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 2rem; color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; } #cs-navigation .cs-button-solid:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-li-link, body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-phone-icon { filter: grayscale(1) brightness(10005); } body.dark-mode #cs-navigation .cs-li-link.cs-active { color: var(--secondary); } body.dark-mode #cs-navigation .cs-li-link:hover { color: var(--secondary); } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: (4/16rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 10; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: (48/20em); background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: (64/16rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: (20/16rem); overflow: auto; } .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-70/16rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } &:nth-of-type(10) { transition-delay: 0.5s; } &:nth-of-type(11) { transition-delay: 0.55s; } &:nth-of-type(12) { transition-delay: 0.6s; } &:nth-of-type(13) { transition-delay: 0.65s; } } .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &.cs-active { color: var(--primary); } &:hover { color: var(--primary); } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: (12/16rem) 0 0 0; padding: (12/16rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: (12/16rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 (24/16rem) (24/16rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: (16/16rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: (16/16rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: (12/16rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 (24/16rem); display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: (150/16rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 (32/16rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { opacity: 1; transform: translate(-50%, -50%); } .cs-moon { opacity: 0; transform: translate(-50%, -150%); } } } #dark-mode-toggle { width: (48/16rem); height: (48/16rem); margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; img, svg { width: (20/16rem); height: (20/16rem); //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform 0.3s, opacity 0.3s; } .cs-sun { opacity: 0; z-index: 1; // Transition property transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: (4/16rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 10; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: (48/20em); background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: (64/16rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: (20/16rem); overflow: auto; } .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-70/16rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } &:nth-of-type(10) { transition-delay: 0.5s; } &:nth-of-type(11) { transition-delay: 0.55s; } &:nth-of-type(12) { transition-delay: 0.6s; } &:nth-of-type(13) { transition-delay: 0.65s; } } .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &.cs-active { color: var(--primary); } &:hover { color: var(--primary); } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-ul-wrapper { background-color: var(--medium); } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: (12/16rem) 0 0 0; padding: (12/16rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: (12/16rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 (24/16rem) (24/16rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: (16/16rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: (16/16rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: (12/16rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 (24/16rem); display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: (150/16rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 (32/16rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 10; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: calc(48 / 20 * 1em); background-color: #fff; border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: calc(64 / 16 * 1rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(20 / 16 * 1rem); overflow: auto; } .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(calc(-70 / 16 * 1rem)); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } &:nth-of-type(10) { transition-delay: 0.5s; } &:nth-of-type(11) { transition-delay: 0.55s; } &:nth-of-type(12) { transition-delay: 0.6s; } &:nth-of-type(13) { transition-delay: 0.65s; } } .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &.cs-active { color: var(--primary); } &:hover { color: var(--primary); } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 0; padding: calc(12 / 16 * 1rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(12 / 16 * 1rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { opacity: 1; transform: translate(-50%, -50%); } .cs-moon { opacity: 0; transform: translate(-50%, -150%); } } } #dark-mode-toggle { width: calc(48 / 16 * 1rem); height: calc(48 / 16 * 1rem); margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; img, svg { width: calc(20 / 16 * 1rem); height: calc(20 / 16 * 1rem); //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform 0.3s, opacity 0.3s; } .cs-sun { opacity: 0; z-index: 1; // Transition property transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { transform: scaleY(1); transition-delay: 0.15s; } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 10; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: auto; padding-bottom: calc(48 / 20 * 1em); background-color: #fff; border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); position: absolute; top: 85%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: calc(64 / 16 * 1rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(20 / 16 * 1rem); overflow: auto; } .cs-li { text-align: center; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(calc(-70 / 16 * 1rem)); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } &:nth-of-type(10) { transition-delay: 0.5s; } &:nth-of-type(11) { transition-delay: 0.55s; } &:nth-of-type(12) { transition-delay: 0.6s; } &:nth-of-type(13) { transition-delay: 0.65s; } } .cs-li-link { /* 16px - 24px */ font-size: clamp(1rem, 2.5vw, 1.5rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &.cs-active { color: var(--primary); } &:hover { color: var(--primary); } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-ul-wrapper { background-color: var(--medium); } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 0; padding: calc(12 / 16 * 1rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(12 / 16 * 1rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body.cs-open { overflow: hidden; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { border-radius: 0 0 0 1.5rem; top: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } #cs-navigation.cs-active .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: 0.25rem; display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 1; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } #cs-navigation .cs-active .cs-line3 { opacity: 0; bottom: 100%; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } #cs-navigation .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } #cs-navigation .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: 4rem clamp(2rem, 3vw, 2.5rem) 4rem 2rem; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 1.25rem; overflow: hidden; } #cs-navigation .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link { font-size: 1.25rem; line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: -0.125rem; left: 0; } #cs-navigation .cs-li-link.cs-active:before { display: block; } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; margin: 0.75rem 0 0 auto; padding: 1.5rem; opacity: 1; visibility: visible; transform: scale(1); } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity 0.3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; max-width: 15.625rem; height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 1.5rem 0 1.5rem; background-color: var(--primary); opacity: 0; border-radius: 1rem; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 0.75rem; overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } #cs-navigation .cs-drop-li { text-align: inherit; list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 1.5rem 1.5rem; visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } #cs-navigation .cs-drop-li { font-size: 1rem; text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link.cs-drop-link { font-size: 1rem; line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0.75rem; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: 9.375rem; margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 2rem; color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; } #cs-navigation .cs-button-solid:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode #dark-mode-toggle .cs-sun { opacity: 1; transform: translate(-50%, -50%); } body.dark-mode #dark-mode-toggle .cs-moon { opacity: 0; transform: translate(-50%, -150%); } #dark-mode-toggle { width: 3rem; height: 3rem; margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; } #dark-mode-toggle img, #dark-mode-toggle svg { width: 1.25rem; height: 1.25rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } #dark-mode-toggle .cs-moon { z-index: 2; transition: transform 0.3s, opacity 0.3s; } #dark-mode-toggle .cs-sun { opacity: 0; z-index: 1; transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; } #dark-mode-toggle:hover { cursor: pointer; } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body.cs-open { overflow: hidden; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { border-radius: 0 0 0 1.5rem; top: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } #cs-navigation.cs-active .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: 0.25rem; display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 1; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } #cs-navigation .cs-active .cs-line3 { opacity: 0; bottom: 100%; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } #cs-navigation .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } #cs-navigation .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: 4rem clamp(2rem, 3vw, 2.5rem) 4rem 2rem; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 1.25rem; overflow: hidden; } #cs-navigation .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link { font-size: 1.25rem; line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: -0.125rem; left: 0; } #cs-navigation .cs-li-link.cs-active:before { display: block; } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode #cs-navigation:before { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-toggle { background-color: var(--secondary); } body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-line { background-color: #fff; } body.dark-mode #cs-navigation .cs-ul-wrapper { background-color: var(--medium); } body.dark-mode #cs-navigation .cs-li-link { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; margin: 0.75rem 0 0 auto; padding: 1.5rem; opacity: 1; visibility: visible; transform: scale(1); } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity 0.3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; max-width: 15.625rem; height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 1.5rem 0 1.5rem; background-color: var(--primary); opacity: 0; border-radius: 1rem; display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 0.75rem; overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } #cs-navigation .cs-drop-li { text-align: inherit; list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 1.5rem 1.5rem; visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } #cs-navigation .cs-drop-li { font-size: 1rem; text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: 0.05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: 0.1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: 0.15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: 0.2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: 0.25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: 0.3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: 0.35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: 0.4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: 0.45s; } #cs-navigation .cs-li-link.cs-drop-link { font-size: 1rem; line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0.75rem; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation .cs-drop-ul { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: 9.375rem; margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 2rem; color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; } #cs-navigation .cs-button-solid:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-li-link, body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-phone-icon { filter: grayscale(1) brightness(10005); } body.dark-mode #cs-navigation .cs-li-link.cs-active { color: var(--secondary); } body.dark-mode #cs-navigation .cs-li-link:hover { color: var(--secondary); } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { border-radius: 0 0 0 (24/16rem); top: 100%; } } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: (4/16rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: (64/16rem) clamp(2rem, 3vw, 2.5rem) (64/16rem) (32/16rem); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: (20/16rem); overflow: hidden; } .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: (20/16rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: (-2/16rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: (12/16rem) 0 0 auto; padding: (24/16rem); opacity: 1; visibility: visible; transform: scale(1); } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; max-width: (250/16rem); height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 (24/16rem) 0 (24/16rem); background-color: var(--primary); opacity: 0; border-radius: (16/16rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: (12/16rem); overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } .cs-drop-li { text-align: inherit; list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 (24/16rem) (24/16rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: (16/16rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: (16/16rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: (12/16rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 (24/16rem); display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: (150/16rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 (32/16rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { opacity: 1; transform: translate(-50%, -50%); } .cs-moon { opacity: 0; transform: translate(-50%, -150%); } } } #dark-mode-toggle { width: (48/16rem); height: (48/16rem); margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; img, svg { width: (20/16rem); height: (20/16rem); //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform 0.3s, opacity 0.3s; } .cs-sun { opacity: 0; z-index: 1; // Transition property transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { border-radius: 0 0 0 (24/16rem); top: 100%; } } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: (4/16rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: (64/16rem) clamp(2rem, 3vw, 2.5rem) (64/16rem) (32/16rem); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: (20/16rem); overflow: hidden; } .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: (20/16rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: (-2/16rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-ul-wrapper { background-color: var(--medium); } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: (12/16rem) 0 0 auto; padding: (24/16rem); opacity: 1; visibility: visible; transform: scale(1); } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; max-width: (250/16rem); height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 (24/16rem) 0 (24/16rem); background-color: var(--primary); opacity: 0; border-radius: (16/16rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: (12/16rem); overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } .cs-drop-li { text-align: inherit; list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 (24/16rem) (24/16rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: (16/16rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: (16/16rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: (12/16rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 (24/16rem); display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: (150/16rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 (32/16rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { border-radius: 0 0 0 calc(24 / 16 * 1rem); top: 100%; } } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: calc(64 / 16 * 1rem) clamp(2rem, 3vw, 2.5rem) calc(64 / 16 * 1rem) calc(32 / 16 * 1rem); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: calc(20 / 16 * 1rem); overflow: hidden; } .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: calc(20 / 16 * 1rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: calc(-2 / 16 * 1rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 auto; padding: calc(24 / 16 * 1rem); opacity: 1; visibility: visible; transform: scale(1); } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; max-width: calc(250 / 16 * 1rem); height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem) 0 calc(24 / 16 * 1rem); background-color: var(--primary); opacity: 0; border-radius: calc(16 / 16 * 1rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: calc(12 / 16 * 1rem); overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } .cs-drop-li { text-align: inherit; list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { opacity: 1; transform: translate(-50%, -50%); } .cs-moon { opacity: 0; transform: translate(-50%, -150%); } } } #dark-mode-toggle { width: calc(48 / 16 * 1rem); height: calc(48 / 16 * 1rem); margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; img, svg { width: calc(20 / 16 * 1rem); height: calc(20 / 16 * 1rem); //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform 0.3s, opacity 0.3s; } .cs-sun { opacity: 0; z-index: 1; // Transition property transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { &.cs-open { overflow: hidden; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { border-radius: 0 0 0 calc(24 / 16 * 1rem); top: 100%; } } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { .cs-toggle { transform: rotate(180deg); } .cs-ul-wrapper { width: 60%; top: 85%; overflow: auto; transform: scaleY(1); } .cs-li { opacity: 1; overflow: visible; transform: translateX(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 20%; height: auto; max-height: 70vh; background-color: #fff; border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); position: absolute; top: 20%; right: 0; left: auto; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, width 0.5s, top 0.3s; transition-delay: width 0.3s; transform-origin: top right; } .cs-ul { width: auto; min-width: 40%; height: auto; margin: 0; /* 32px - 40px */ padding: calc(64 / 16 * 1rem) clamp(2rem, 3vw, 2.5rem) calc(64 / 16 * 1rem) calc(32 / 16 * 1rem); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: calc(20 / 16 * 1rem); overflow: hidden; } .cs-li { text-align: right; list-style: none; width: 100%; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateX(-2.5rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: calc(20 / 16 * 1rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: calc(-2 / 16 * 1rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-ul-wrapper { background-color: var(--medium); } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 auto; padding: calc(24 / 16 * 1rem); opacity: 1; visibility: visible; transform: scale(1); } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; max-width: calc(250 / 16 * 1rem); height: 0; margin: 0 0 0 auto; box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem) 0 calc(24 / 16 * 1rem); background-color: var(--primary); opacity: 0; border-radius: calc(16 / 16 * 1rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: calc(12 / 16 * 1rem); overflow: hidden; transform: scale(0); transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, transform 0.3s, visibility 0.3s; transform-origin: top right; } .cs-drop-li { text-align: inherit; list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; } body:before { content: ''; width: 100%; height: 0%; background: #fff; opacity: 1; position: absolute; display: block; top: 0; left: 0; transition: height .3s; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { top: 100%; } body.cs-open { overflow: hidden; } body.cs-open:before { height: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ''; width: 100%; height: 100%; background: #fff; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; position: absolute; display: block; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active:before { transform: translateX(-50%) scale(1.03); } #cs-navigation.cs-active .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-li { transform: translateY(0); opacity: 1; } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; padding: 0; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; border-radius: 0.25rem; background-color: #1A1A1A; border: none; display: flex; justify-content: center; align-items: center; position: relative; z-index: 1 ; transition: transform .6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 1; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform-origin: center; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); } #cs-navigation .cs-active .cs-line3 { bottom: 100%; opacity: 0; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; border-radius: 2px; background-color: #FAFBFC; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transform-origin: center; transition: transform .5s, top .3S, left .3S; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top .3s, left .3s, transform .5s; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom .3s, opacity .3s; } #cs-navigation .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: 3rem; opacity: 0; overflow: hidden; position: absolute; top: 100%; left: 0; z-index: -1; transform: scaleY(0); transform-origin: top; transition: transform .4s, opacity .3s; } #cs-navigation .cs-ul { margin: 0; padding: 3rem 0 0 0; width: 100%; height: auto; max-height: 65vh; overflow: scroll; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: 1.25rem; } #cs-navigation .cs-li { list-style: none; margin-right: 0; /* transition from these values */ transform: translateY(-4.375rem); opacity: 0; transition: transform .6s, opacity .9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: .05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: .1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: .15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: .2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: .25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: .3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: .35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: .4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: .45s; } #cs-navigation .cs-li-link { font-size: 1.5rem; line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link:before { /* active state underline */ content: ''; width: 100%; height: 1px; background: currentColor; opacity: 1; position: absolute; display: none; bottom: -0.125rem; left: 0; } #cs-navigation .cs-li-link.cs-active:before { display: block; } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-li { text-align: center; width: 100%; display: block; } #cs-navigation .cs-dropdown { position: relative; color: var(--bodyTextColorWhite); } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; opacity: 1; visibility: visible; margin: 0.75rem 0 0 0; padding: 0.75rem 0; } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity .3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); border-radius: 1rem; overflow: hidden; opacity: 0; visibility: hidden; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: 0.75rem; transition: padding .3s, margin .3s, height .3s, opacity .3s, visibility .3s; } #cs-navigation .cs-drop-li { list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { transform: scaleY(1); opacity: 1; visibility: visible; } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; overflow: hidden; opacity: 0; visibility: hidden; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; border-bottom: 5px solid var(--primary); /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; transform: scaleY(0); transform-origin: top; transition: transform .3s, visibility .3s, opacity .3s; } #cs-navigation .cs-drop-li { list-style: none; font-size: 1rem; text-decoration: none; opacity: 0; width: 100%; height: auto; display: block; transform: translateY(-0.625rem); transition: opacity .6s, transform .6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: .05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: .1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: .15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: .2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: .25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: .3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: .35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: .4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: .45s; } #cs-navigation .cs-li-link.cs-drop-link { text-transform: capitalize; white-space: nowrap; width: 100%; font-size: 1rem; line-height: 1.5em; text-decoration: none; padding: 0.75rem; /* prevents padding from affecting height and width */ box-sizing: border-box; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { background-color: var(--primary); color: var(--bodyTextColorWhite); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; /* prevents padding from affecting height and width */ box-sizing: border-box; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; padding: 0 1.5rem; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; visibility: visible; opacity: 1; display: none; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { filter: grayscale(1) brightness(10000%); opacity: 1; } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity .3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color .3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-decoration: none; font-weight: 700; text-align: center; margin: 0; color: #fff; min-width: 9.375rem; padding: 0 2rem; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; /* prevents padding from adding to the width */ box-sizing: border-box; transition: color .3s; } #cs-navigation .cs-button-solid:before { content: ''; position: absolute; height: 100%; width: 0%; background: #fff; opacity: 1; top: 0; left: 0; z-index: -1; transition: width .3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode #dark-mode-toggle .cs-sun { transform: translate(-50%, -50%); opacity: 1; } body.dark-mode #dark-mode-toggle .cs-moon { transform: translate(-50%, -150%); opacity: 0; } #dark-mode-toggle { width: 3rem; height: 3rem; margin: 0; padding: 0; background: transparent; border: none; overflow: hidden; display: block; order: 4; position: relative; z-index: 1000; } #dark-mode-toggle img, #dark-mode-toggle svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 1.25rem; height: 1.25rem; pointer-events: none; } #dark-mode-toggle .cs-moon { z-index: 2; transition: transform .3s, opacity .3s; } #dark-mode-toggle .cs-sun { z-index: 1; transform: translate(-50%, 100%); opacity: 0; transition: transform .3s, opacity .3s; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { position: relative; transform: none; top: auto; right: auto; margin: 0; } #dark-mode-toggle:hover { cursor: pointer; } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; } body:before { content: ''; width: 100%; height: 0%; background: #fff; opacity: 1; position: absolute; display: block; top: 0; left: 0; transition: height .3s; } body.scroll #cs-navigation { width: 100%; max-width: 100%; top: 0; } body.scroll #cs-navigation:before { border-radius: 0; } body.scroll #cs-navigation .cs-ul-wrapper { top: 100%; } body.cs-open { overflow: hidden; } body.cs-open:before { height: 100%; } #cs-navigation { width: 94%; max-width: 80rem; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation:before { /* background color */ content: ''; width: 100%; height: 100%; background: #fff; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; position: absolute; display: block; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } #cs-navigation.cs-active:before { transform: translateX(-50%) scale(1.03); } #cs-navigation.cs-active .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } #cs-navigation.cs-active .cs-toggle { transform: rotate(180deg); } #cs-navigation.cs-active .cs-li { transform: translateY(0); opacity: 1; } #cs-navigation .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; } #cs-navigation .cs-logo { width: auto; max-width: 12.5rem; height: 100%; margin: 0 auto 0 0; padding: 0; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: flex-start; align-items: center; z-index: 10; } #cs-navigation .cs-logo img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-toggle { width: 3.5rem; height: 3.5rem; margin: 0 0 0 auto; border-radius: 0.25rem; background-color: #1A1A1A; border: none; display: flex; justify-content: center; align-items: center; position: relative; z-index: 1 ; transition: transform .6s; } #cs-navigation .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } #cs-navigation .cs-contact-group { display: none; position: relative; z-index: 1; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { display: none; } #cs-navigation .cs-active .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } #cs-navigation .cs-active .cs-line2 { top: 50%; transform-origin: center; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); } #cs-navigation .cs-active .cs-line3 { bottom: 100%; opacity: 0; } #cs-navigation .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: 1rem; position: relative; } #cs-navigation .cs-line { width: 100%; height: 2px; border-radius: 2px; background-color: #FAFBFC; position: absolute; left: 50%; transform: translateX(-50%); } #cs-navigation .cs-line1 { top: 0; transform-origin: center; transition: transform .5s, top .3S, left .3S; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } #cs-navigation .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top .3s, left .3s, transform .5s; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } #cs-navigation .cs-line3 { bottom: 0; transition: bottom .3s, opacity .3s; } #cs-navigation .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: 3rem; opacity: 0; overflow: hidden; position: absolute; top: 100%; left: 0; z-index: -1; transform: scaleY(0); transform-origin: top; transition: transform .4s, opacity .3s; } #cs-navigation .cs-ul { margin: 0; padding: 3rem 0 0 0; width: 100%; height: auto; max-height: 65vh; overflow: scroll; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: 1.25rem; } #cs-navigation .cs-li { list-style: none; margin-right: 0; /* transition from these values */ transform: translateY(-4.375rem); opacity: 0; transition: transform .6s, opacity .9s; } #cs-navigation .cs-li:nth-of-type(1) { transition-delay: .05s; } #cs-navigation .cs-li:nth-of-type(2) { transition-delay: .1s; } #cs-navigation .cs-li:nth-of-type(3) { transition-delay: .15s; } #cs-navigation .cs-li:nth-of-type(4) { transition-delay: .2s; } #cs-navigation .cs-li:nth-of-type(5) { transition-delay: .25s; } #cs-navigation .cs-li:nth-of-type(6) { transition-delay: .3s; } #cs-navigation .cs-li:nth-of-type(7) { transition-delay: .35s; } #cs-navigation .cs-li:nth-of-type(8) { transition-delay: .4s; } #cs-navigation .cs-li:nth-of-type(9) { transition-delay: .45s; } #cs-navigation .cs-li-link { font-size: 1.5rem; line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; } #cs-navigation .cs-li-link:before { /* active state underline */ content: ''; width: 100%; height: 1px; background: currentColor; opacity: 1; position: absolute; display: none; bottom: -0.125rem; left: 0; } #cs-navigation .cs-li-link.cs-active:before { display: block; } #cs-navigation .cs-button-solid { display: none; } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation .cs-contact-group { display: block; } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode:before { background-color: var(--dark); } body.dark-mode #cs-navigation:before { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-toggle { background-color: var(--secondary); } body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-ul-wrapper { background-color: transparent; } body.dark-mode #cs-navigation .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-line { background-color: #fff; } body.dark-mode #cs-navigation .cs-li-link { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation .cs-li { text-align: center; width: 100%; display: block; } #cs-navigation .cs-dropdown { position: relative; color: var(--bodyTextColorWhite); } #cs-navigation .cs-dropdown.cs-active .cs-drop-ul { height: auto; opacity: 1; visibility: visible; margin: 0.75rem 0 0 0; padding: 0.75rem 0; } #cs-navigation .cs-dropdown.cs-active .cs-drop-link { opacity: 1; } #cs-navigation .cs-dropdown .cs-li-link { position: relative; transition: opacity .3s; } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; position: absolute; top: 50%; right: -1.25rem; transform: translateY(-50%); } #cs-navigation .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); border-radius: 1rem; overflow: hidden; opacity: 0; visibility: hidden; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: 0.75rem; transition: padding .3s, margin .3s, height .3s, opacity .3s, visibility .3s; } #cs-navigation .cs-drop-li { list-style: none; } #cs-navigation .cs-li-link.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation .cs-dropdown { position: relative; } #cs-navigation .cs-dropdown:hover { cursor: pointer; } #cs-navigation .cs-dropdown:hover .cs-drop-ul { transform: scaleY(1); opacity: 1; visibility: visible; } #cs-navigation .cs-dropdown:hover .cs-drop-li { opacity: 1; transform: translateY(0); } #cs-navigation .cs-drop-icon { width: 0.9375rem; height: auto; display: inline-block; } #cs-navigation .cs-drop-ul { min-width: 12.5rem; margin: 0; padding: 0; background-color: #fff; border-radius: 0 0 1.5rem 1.5rem; overflow: hidden; opacity: 0; visibility: hidden; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; border-bottom: 5px solid var(--primary); /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ position: absolute; top: 100%; z-index: -100; transform: scaleY(0); transform-origin: top; transition: transform .3s, visibility .3s, opacity .3s; } #cs-navigation .cs-drop-li { list-style: none; font-size: 1rem; text-decoration: none; opacity: 0; width: 100%; height: auto; display: block; transform: translateY(-0.625rem); transition: opacity .6s, transform .6s; } #cs-navigation .cs-drop-li:nth-of-type(1) { transition-delay: .05s; } #cs-navigation .cs-drop-li:nth-of-type(2) { transition-delay: .1s; } #cs-navigation .cs-drop-li:nth-of-type(3) { transition-delay: .15s; } #cs-navigation .cs-drop-li:nth-of-type(4) { transition-delay: .2s; } #cs-navigation .cs-drop-li:nth-of-type(5) { transition-delay: .25s; } #cs-navigation .cs-drop-li:nth-of-type(6) { transition-delay: .3s; } #cs-navigation .cs-drop-li:nth-of-type(7) { transition-delay: .35s; } #cs-navigation .cs-drop-li:nth-of-type(8) { transition-delay: .4s; } #cs-navigation .cs-drop-li:nth-of-type(9) { transition-delay: .45s; } #cs-navigation .cs-li-link.cs-drop-link { text-transform: capitalize; white-space: nowrap; width: 100%; font-size: 1rem; line-height: 1.5em; text-decoration: none; padding: 0.75rem; /* prevents padding from affecting height and width */ box-sizing: border-box; color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; } #cs-navigation .cs-li-link.cs-drop-link:hover { background-color: var(--primary); color: var(--bodyTextColorWhite); } #cs-navigation .cs-li-link.cs-drop-link:before { display: none; } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation .cs-drop-ul { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-li-link.cs-drop-link:hover { color: var(--bodyTextColorWhite); } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } #cs-navigation { width: 94%; max-width: 90rem; height: 6rem; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; /* prevents padding from affecting height and width */ box-sizing: border-box; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: 2rem; left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; } #cs-navigation .cs-container { width: 100%; max-width: 90rem; margin: auto; padding: 0 1.5rem; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; } #cs-navigation .cs-toggle { display: none; } #cs-navigation .cs-logo { width: 18.4%; max-width: 21.875rem; height: 2rem; /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; } #cs-navigation .cs-logo img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } #cs-navigation .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: 1.5rem; } #cs-navigation .cs-phone { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; transition: opacity 0.3s, color 0.3s; } #cs-navigation .cs-phone-icon { width: 1.5rem; height: auto; display: block; } #cs-navigation .cs-social { height: 2rem; visibility: visible; opacity: 1; display: none; justify-content: center; align-items: center; gap: 0.5rem; transition: opacity 0.3s, visibility 0.3s, height 0.3s; } #cs-navigation .cs-social-link { text-decoration: none; width: 2rem; height: 2rem; background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; } #cs-navigation .cs-social-link:hover { background-color: var(--primary); } #cs-navigation .cs-social-link:hover .cs-social-icon { filter: grayscale(1) brightness(10000%); opacity: 1; } #cs-navigation .cs-social-icon { width: 0.75rem; height: auto; opacity: 0.6; display: block; transition: opacity .3s; } #cs-navigation .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } #cs-navigation .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } #cs-navigation .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } #cs-navigation .cs-li-link { font-size: 1rem; line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color .3s; } #cs-navigation .cs-li-link:hover { color: var(--primary); } #cs-navigation .cs-li-link.cs-active { color: var(--primary); } #cs-navigation .cs-button-solid { font-size: 1rem; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-decoration: none; font-weight: 700; text-align: center; margin: 0; color: #fff; min-width: 9.375rem; padding: 0 2rem; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; /* prevents padding from adding to the width */ box-sizing: border-box; transition: color .3s; } #cs-navigation .cs-button-solid:before { content: ''; position: absolute; height: 100%; width: 0%; background: #fff; opacity: 1; top: 0; left: 0; z-index: -1; transition: width .3s; } #cs-navigation .cs-button-solid:hover { color: #1a1a1a; } #cs-navigation .cs-button-solid:hover:before { width: 100%; } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation .cs-social { display: flex; } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode #cs-navigation { background-color: var(--dark); } body.dark-mode #cs-navigation .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } body.dark-mode #cs-navigation .cs-li-link, body.dark-mode #cs-navigation .cs-phone { color: var(--bodyTextColorWhite); } body.dark-mode #cs-navigation .cs-phone-icon { filter: grayscale(1) brightness(10005); } body.dark-mode #cs-navigation .cs-li-link.cs-active { color: var(--secondary); } body.dark-mode #cs-navigation .cs-li-link:hover { color: var(--secondary); } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; &:before { content: ''; width: 100%; height: 0%; background: #fff; opacity: 1; position: absolute; display: block; top: 0; left: 0; transition: height .3s; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } &.cs-open { overflow: hidden; &:before { height: 100%; } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* 12px - 24px */ padding: clamp(.75rem, 2vw, 1.5rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top .3s, border-radius .3s, width .3s, max-width .3s; &:before { /* background color */ content: ''; width: 100%; height: 100%; background: #fff; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; position: absolute; display: block; top: 0; left: 50%; transform: translateX(-50%); transition: transform .2s, border-radius .3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } .cs-toggle { transform: rotate(180deg); } .cs-li { transform: translateY(0); opacity: 1; } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; padding: 0; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; border-radius: (4/16rem); background-color: #1A1A1A; border: none; display: flex; justify-content: center; align-items: center; position: relative; z-index: 1 ; transition: transform .6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform-origin: center; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); } .cs-line3 { bottom: 100%; opacity: 0; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; border-radius: 2px; background-color: #FAFBFC; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transform-origin: center; transition: transform .5s, top .3S, left .3S; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top .3s, left .3s, transform .5s; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } .cs-line3 { bottom: 0; transition: bottom .3s, opacity .3s; } .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: (48/16rem); opacity: 0; overflow: hidden; position: absolute; top: 100%; left: 0; z-index: -1; transform: scaleY(0); transform-origin: top; transition: transform .4s, opacity .3s; } .cs-ul { margin: 0; padding: (48/16rem) 0 0 0; width: 100%; height: auto; max-height: 65vh; overflow: scroll; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: (20/16rem); } .cs-li { list-style: none; margin-right: 0; /* transition from these values */ transform: translateY(-4.375rem); opacity: 0; transition: transform .6s, opacity .9s; &:nth-of-type(1) { transition-delay: .05s; } &:nth-of-type(2) { transition-delay: .1s; } &:nth-of-type(3) { transition-delay: .15s; } &:nth-of-type(4) { transition-delay: .2s; } &:nth-of-type(5) { transition-delay: .25s; } &:nth-of-type(6) { transition-delay: .3s; } &:nth-of-type(7) { transition-delay: .35s; } &:nth-of-type(8) { transition-delay: .4s; } &:nth-of-type(9) { transition-delay: .45s; } } .cs-li-link { font-size: (24/16rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ''; width: 100%; height: 1px; background: currentColor; opacity: 1; position: absolute; display: none; bottom: (-2/16rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { position: relative; color: var(--bodyTextColorWhite); &.cs-active { .cs-drop-ul { height: auto; opacity: 1; visibility: visible; margin: (12/16rem) 0 0 0; padding: (12/16rem) 0; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity .3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); border-radius: (16/16rem); overflow: hidden; opacity: 0; visibility: hidden; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: (12/16rem); transition: padding .3s, margin .3s, height .3s, opacity .3s, visibility .3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { transform: scaleY(1); opacity: 1; visibility: visible; } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); overflow: hidden; opacity: 0; visibility: hidden; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; border-bottom: 5px solid var(--primary); /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; transform: scaleY(0); transform-origin: top; transition: transform .3s, visibility .3s, opacity .3s; } .cs-drop-li { list-style: none; font-size: (16/16rem); text-decoration: none; opacity: 0; width: 100%; height: auto; display: block; transform: translateY(-.625rem); transition: opacity .6s, transform .6s; &:nth-of-type(1) { transition-delay: .05s; } &:nth-of-type(2) { transition-delay: .1s; } &:nth-of-type(3) { transition-delay: .15s; } &:nth-of-type(4) { transition-delay: .2s; } &:nth-of-type(5) { transition-delay: .25s; } &:nth-of-type(6) { transition-delay: .3s; } &:nth-of-type(7) { transition-delay: .35s; } &:nth-of-type(8) { transition-delay: .4s; } &:nth-of-type(9) { transition-delay: .45s; } } .cs-li-link { &.cs-drop-link { text-transform: capitalize; white-space: nowrap; width: 100%; font-size: (16/16rem); line-height: 1.5em; text-decoration: none; padding: (12/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; color: var(--headerColor); display: block; transition: color .3s, background-color .3s; &:hover { background-color: var(--primary); color: var(--bodyTextColorWhite); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* 12px - 24px */ padding: clamp(.75rem, 2vw, 1.5rem) 0; /* prevents padding from affecting height and width */ box-sizing: border-box; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top .3s, border-radius .3s, width .3s, max-width .3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; padding: 0 (24/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); visibility: visible; opacity: 1; display: none; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color .3s; &:hover { background-color: var(--primary); .cs-social-icon { filter: grayscale(1) brightness(10000%); opacity: 1; } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity .3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color .3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-decoration: none; font-weight: 700; text-align: center; margin: 0; color: #fff; min-width: (150/16rem); padding: 0 (32/16rem); background-color: var(--primary); display: inline-block; position: relative; z-index: 1; /* prevents padding from adding to the width */ box-sizing: border-box; transition: color .3s; &:before { content: ''; position: absolute; height: 100%; width: 0%; background: #fff; opacity: 1; top: 0; left: 0; z-index: -1; transition: width .3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { transform: translate(-50%, -50%); opacity: 1; } .cs-moon { transform: translate(-50%, -150%); opacity: 0; } } } #dark-mode-toggle { width: (48/16rem); height: (48/16rem); margin: 0; padding: 0; background: transparent; border: none; overflow: hidden; display: block; order: 4; position: relative; z-index: 1000; img, svg { //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: (20/16rem); height: (20/16rem); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform .3s, opacity .3s; } .cs-sun { z-index: 1; // Transition property transform: translate(-50%, 100%); opacity: 0; transition: transform .3s, opacity .3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { position: relative; transform: none; top: auto; right: auto; margin: 0; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; &:before { content: ''; width: 100%; height: 0%; background: #fff; opacity: 1; position: absolute; display: block; top: 0; left: 0; transition: height .3s; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } &.cs-open { overflow: hidden; &:before { height: 100%; } } } #cs-navigation { width: 94%; max-width: (1280/16rem); /* 12px - 24px */ padding: clamp(.75rem, 2vw, 1.5rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top .3s, border-radius .3s, width .3s, max-width .3s; &:before { /* background color */ content: ''; width: 100%; height: 100%; background: #fff; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; position: absolute; display: block; top: 0; left: 50%; transform: translateX(-50%); transition: transform .2s, border-radius .3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } .cs-toggle { transform: rotate(180deg); } .cs-li { transform: translateY(0); opacity: 1; } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: (24/16rem); } .cs-logo { width: auto; max-width: (200/16rem); height: 100%; margin: 0 auto 0 0; padding: 0; /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: (56/16rem); height: (56/16rem); margin: 0 0 0 auto; border-radius: (4/16rem); background-color: #1A1A1A; border: none; display: flex; justify-content: center; align-items: center; position: relative; z-index: 1 ; transition: transform .6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform-origin: center; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); } .cs-line3 { bottom: 100%; opacity: 0; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: (16/16rem); position: relative; } .cs-line { width: 100%; height: 2px; border-radius: 2px; background-color: #FAFBFC; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transform-origin: center; transition: transform .5s, top .3S, left .3S; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top .3s, left .3s, transform .5s; animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: forwards; animation-direction: normal; } .cs-line3 { bottom: 0; transition: bottom .3s, opacity .3s; } .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: (48/16rem); opacity: 0; overflow: hidden; position: absolute; top: 100%; left: 0; z-index: -1; transform: scaleY(0); transform-origin: top; transition: transform .4s, opacity .3s; } .cs-ul { margin: 0; padding: (48/16rem) 0 0 0; width: 100%; height: auto; max-height: 65vh; overflow: scroll; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: (20/16rem); } .cs-li { list-style: none; margin-right: 0; /* transition from these values */ transform: translateY(-4.375rem); opacity: 0; transition: transform .6s, opacity .9s; &:nth-of-type(1) { transition-delay: .05s; } &:nth-of-type(2) { transition-delay: .1s; } &:nth-of-type(3) { transition-delay: .15s; } &:nth-of-type(4) { transition-delay: .2s; } &:nth-of-type(5) { transition-delay: .25s; } &:nth-of-type(6) { transition-delay: .3s; } &:nth-of-type(7) { transition-delay: .35s; } &:nth-of-type(8) { transition-delay: .4s; } &:nth-of-type(9) { transition-delay: .45s; } } .cs-li-link { font-size: (24/16rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ''; width: 100%; height: 1px; background: currentColor; opacity: 1; position: absolute; display: none; bottom: (-2/16rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { &:before { background-color: var(--dark); } #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-ul-wrapper { background-color: transparent; } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { position: relative; color: var(--bodyTextColorWhite); &.cs-active { .cs-drop-ul { height: auto; opacity: 1; visibility: visible; margin: (12/16rem) 0 0 0; padding: (12/16rem) 0; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity .3s; } } .cs-drop-icon { width: (15/16rem); height: auto; position: absolute; top: 50%; right: (-20/16rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); border-radius: (16/16rem); overflow: hidden; opacity: 0; visibility: hidden; display: flex; justify-content: flex-start; flex-direction: column; align-items: center; gap: (12/16rem); transition: padding .3s, margin .3s, height .3s, opacity .3s, visibility .3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { transform: scaleY(1); opacity: 1; visibility: visible; } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: (15/16rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: (200/16rem); margin: 0; padding: 0; background-color: #fff; border-radius: 0 0 (24/16rem) (24/16rem); overflow: hidden; opacity: 0; visibility: hidden; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; border-bottom: 5px solid var(--primary); /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; transform: scaleY(0); transform-origin: top; transition: transform .3s, visibility .3s, opacity .3s; } .cs-drop-li { list-style: none; font-size: (16/16rem); text-decoration: none; opacity: 0; width: 100%; height: auto; display: block; transform: translateY(-.625rem); transition: opacity .6s, transform .6s; &:nth-of-type(1) { transition-delay: .05s; } &:nth-of-type(2) { transition-delay: .1s; } &:nth-of-type(3) { transition-delay: .15s; } &:nth-of-type(4) { transition-delay: .2s; } &:nth-of-type(5) { transition-delay: .25s; } &:nth-of-type(6) { transition-delay: .3s; } &:nth-of-type(7) { transition-delay: .35s; } &:nth-of-type(8) { transition-delay: .4s; } &:nth-of-type(9) { transition-delay: .45s; } } .cs-li-link { &.cs-drop-link { text-transform: capitalize; white-space: nowrap; width: 100%; font-size: (16/16rem); line-height: 1.5em; text-decoration: none; padding: (12/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; color: var(--headerColor); display: block; transition: color .3s, background-color .3s; &:hover { background-color: var(--primary); color: var(--bodyTextColorWhite); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: (1440/16rem); height: (96/16rem); /* 12px - 24px */ padding: clamp(.75rem, 2vw, 1.5rem) 0; /* prevents padding from affecting height and width */ box-sizing: border-box; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: (32/16rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top .3s, border-radius .3s, width .3s, max-width .3s; .cs-container { width: 100%; max-width: (1440/16rem); margin: auto; padding: 0 (24/16rem); /* prevents padding from affecting height and width */ box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: (24/16rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: (350/16rem); height: (32/16rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: (24/16rem); } .cs-phone { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: (8/16rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: (24/16rem); height: auto; display: block; } .cs-social { height: (32/16rem); visibility: visible; opacity: 1; display: none; justify-content: center; align-items: center; gap: (8/16rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: (32/16rem); height: (32/16rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color .3s; &:hover { background-color: var(--primary); .cs-social-icon { filter: grayscale(1) brightness(10000%); opacity: 1; } } } .cs-social-icon { width: (12/16rem); height: auto; opacity: 0.6; display: block; transition: opacity .3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: (16/16rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color .3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: (16/16rem); /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-decoration: none; font-weight: 700; text-align: center; margin: 0; color: #fff; min-width: (150/16rem); padding: 0 (32/16rem); background-color: var(--primary); display: inline-block; position: relative; z-index: 1; /* prevents padding from adding to the width */ box-sizing: border-box; transition: color .3s; &:before { content: ''; position: absolute; height: 100%; width: 0%; background: #fff; opacity: 1; top: 0; left: 0; z-index: -1; transition: width .3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
/*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; &:before { content: ""; width: 100%; height: 0%; background: #fff; opacity: 1; display: block; position: absolute; top: 0; left: 0; transition: height 0.3s; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } &.cs-open { overflow: hidden; &:before { height: 100%; } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } .cs-toggle { transform: rotate(180deg); } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 1; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: calc(48 / 16 * 1rem); opacity: 0; position: absolute; top: 100%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s, opacity 0.3s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: calc(48 / 16 * 1rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(20 / 16 * 1rem); overflow: scroll; } .cs-li { list-style: none; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-4.375rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: calc(24 / 16 * 1rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: calc(-2 / 16 * 1rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 0; padding: calc(12 / 16 * 1rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; border-radius: calc(16 / 16 * 1rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(12 / 16 * 1rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } }
/*-- -------------------------- --> <--- Dark Mode Toggle --> <--- -------------------------- -*/ /* Mobile - 360px */ @media only screen and (min-width: 0rem) { body.dark-mode { #dark-mode-toggle { .cs-sun { opacity: 1; transform: translate(-50%, -50%); } .cs-moon { opacity: 0; transform: translate(-50%, -150%); } } } #dark-mode-toggle { width: calc(48 / 16 * 1rem); height: calc(48 / 16 * 1rem); margin: 0; padding: 0; background: transparent; border: none; display: block; order: 4; position: relative; z-index: 1000; overflow: hidden; img, svg { width: calc(20 / 16 * 1rem); height: calc(20 / 16 * 1rem); //center image inside button position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } .cs-moon { z-index: 2; // Transition properties transition: transform 0.3s, opacity 0.3s; } .cs-sun { opacity: 0; z-index: 1; // Transition property transform: translate(-50%, 100%); transition: transform 0.3s, opacity 0.3s; } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #dark-mode-toggle { margin: 0; position: relative; top: auto; right: auto; transform: none; &:hover { cursor: pointer; } } } /*-- -------------------------- --> <--- Mobile Navigation --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { body { position: relative; z-index: 1; &:before { content: ""; width: 100%; height: 0%; background: #fff; opacity: 1; display: block; position: absolute; top: 0; left: 0; transition: height 0.3s; } &.scroll { #cs-navigation { width: 100%; max-width: 100%; top: 0; &:before { border-radius: 0; } .cs-ul-wrapper { top: 100%; } } } &.cs-open { overflow: hidden; &:before { height: 100%; } } } #cs-navigation { width: 94%; max-width: calc(1280 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem); /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; &:before { /* background color */ content: ""; width: 100%; height: 100%; background: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; opacity: 1; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); transition: transform 0.2s, border-radius 0.3s ease-in-out; } &.cs-active { &:before { transform: translateX(-50%) scale(1.03); } .cs-ul-wrapper { opacity: 1; transform: scaleY(1); } .cs-toggle { transform: rotate(180deg); } .cs-li { opacity: 1; transform: translateY(0); } } .cs-container { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-logo { width: auto; max-width: calc(200 / 16 * 1rem); height: 100%; margin: 0 auto 0 0; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 10; img { width: 100%; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-toggle { width: calc(56 / 16 * 1rem); height: calc(56 / 16 * 1rem); margin: 0 0 0 auto; background-color: #1a1a1a; border: none; border-radius: calc(4 / 16 * 1rem); display: flex; justify-content: center; align-items: center; position: relative; z-index: 1; transition: transform 0.6s; } .cs-nav { /* sends it to the right in the 3rd position */ order: 3; } .cs-contact-group { display: none; position: relative; z-index: 1; } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { display: none; } .cs-active { .cs-line1 { top: 50%; transform: translate(-50%, -50%) rotate(225deg); } .cs-line2 { top: 50%; transform: translate(-50%, -50%) translateY(0) rotate(-225deg); transform-origin: center; } .cs-line3 { opacity: 0; bottom: 100%; } } .cs-box { /* 24px - 28px */ width: clamp(1.5rem, 2vw, 1.75rem); height: calc(16 / 16 * 1rem); position: relative; } .cs-line { width: 100%; height: 2px; background-color: #fafbfc; border-radius: 2px; position: absolute; left: 50%; transform: translateX(-50%); } .cs-line1 { top: 0; transition: transform 0.5s, top 0.3s, left 0.3s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; transform-origin: center; } .cs-line2 { top: 50%; transform: translateX(-50%) translateY(-50%); transition: top 0.3s, left 0.3s, transform 0.5s; animation-duration: 0.7s; animation-timing-function: ease; animation-direction: normal; animation-fill-mode: forwards; } .cs-line3 { bottom: 0; transition: bottom 0.3s, opacity 0.3s; } .cs-ul-wrapper { width: 100%; height: 100vh; padding-bottom: calc(48 / 16 * 1rem); opacity: 0; position: absolute; top: 100%; left: 0; z-index: -1; overflow: hidden; transform: scaleY(0); transition: transform 0.4s, opacity 0.3s; transform-origin: top; } .cs-ul { width: 100%; height: auto; max-height: 65vh; margin: 0; padding: calc(48 / 16 * 1rem) 0 0 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(20 / 16 * 1rem); overflow: scroll; } .cs-li { list-style: none; margin-right: 0; opacity: 0; /* transition from these values */ transform: translateY(-4.375rem); transition: transform 0.6s, opacity 0.9s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { font-size: calc(24 / 16 * 1rem); line-height: 1.2em; text-decoration: none; margin: 0; color: var(--headerColor); display: inline-block; position: relative; &:before { /* active state underline */ content: ""; width: 100%; height: 1px; background: currentColor; opacity: 1; display: none; position: absolute; bottom: calc(-2 / 16 * 1rem); left: 0; } &.cs-active { &:before { display: block; } } } .cs-button-solid { display: none; } } } /* Tablet - 768px */ @media only screen and (min-width: 48rem) { #cs-navigation { .cs-contact-group { display: block; } } } /* Dark Mode */ @media only screen and (max-width: 63.9375rem) { body.dark-mode { &:before { background-color: var(--dark); } #cs-navigation { &:before { background-color: var(--dark); } .cs-logo { /* makes it white */ filter: grayscale(1) brightness(1000%); } .cs-toggle { background-color: var(--secondary); } .cs-phone { color: var(--bodyTextColorWhite); } .cs-ul-wrapper { background-color: transparent; } .cs-phone-icon { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-line { background-color: #fff; } .cs-li-link { color: var(--bodyTextColorWhite); } } } } /*-- -------------------------- --> <--- Navigation Dropdown --> <--- -------------------------- -*/ /* Mobile - 1023px */ @media only screen and (max-width: 63.9375rem) { #cs-navigation { .cs-li { text-align: center; width: 100%; display: block; } .cs-dropdown { color: var(--bodyTextColorWhite); position: relative; &.cs-active { .cs-drop-ul { height: auto; margin: calc(12 / 16 * 1rem) 0 0 0; padding: calc(12 / 16 * 1rem) 0; opacity: 1; visibility: visible; } .cs-drop-link { opacity: 1; } } .cs-li-link { position: relative; transition: opacity 0.3s; } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; position: absolute; top: 50%; right: calc(-20 / 16 * 1rem); transform: translateY(-50%); } .cs-drop-ul { width: 100%; height: 0; margin: 0; padding: 0; background-color: var(--primary); opacity: 0; border-radius: calc(16 / 16 * 1rem); display: flex; visibility: hidden; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(12 / 16 * 1rem); overflow: hidden; transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s, visibility 0.3s; } .cs-drop-li { list-style: none; } .cs-li-link { &.cs-drop-link { /* 14px - 16px */ font-size: clamp(0.875rem, 2vw, 1.25rem); color: #fff; } } } } /* Desktop - 1024px */ @media only screen and (min-width: 64rem) { #cs-navigation { .cs-dropdown { position: relative; &:hover { cursor: pointer; .cs-drop-ul { opacity: 1; visibility: visible; transform: scaleY(1); } .cs-drop-li { opacity: 1; transform: translateY(0); } } } .cs-drop-icon { width: calc(15 / 16 * 1rem); height: auto; display: inline-block; } .cs-drop-ul { min-width: calc(200 / 16 * 1rem); margin: 0; padding: 0; background-color: #fff; box-shadow: inset rgba(149, 157, 165, 0.1) 0px 8px 10px; opacity: 0; border-bottom: 5px solid var(--primary); border-radius: 0 0 calc(24 / 16 * 1rem) calc(24 / 16 * 1rem); visibility: hidden; /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */ // columns: 2; position: absolute; top: 100%; z-index: -100; overflow: hidden; transform: scaleY(0); transition: transform 0.3s, visibility 0.3s, opacity 0.3s; transform-origin: top; } .cs-drop-li { font-size: calc(16 / 16 * 1rem); text-decoration: none; list-style: none; width: 100%; height: auto; opacity: 0; display: block; transform: translateY(-0.625rem); transition: opacity 0.6s, transform 0.6s; &:nth-of-type(1) { transition-delay: 0.05s; } &:nth-of-type(2) { transition-delay: 0.1s; } &:nth-of-type(3) { transition-delay: 0.15s; } &:nth-of-type(4) { transition-delay: 0.2s; } &:nth-of-type(5) { transition-delay: 0.25s; } &:nth-of-type(6) { transition-delay: 0.3s; } &:nth-of-type(7) { transition-delay: 0.35s; } &:nth-of-type(8) { transition-delay: 0.4s; } &:nth-of-type(9) { transition-delay: 0.45s; } } .cs-li-link { &.cs-drop-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-transform: capitalize; text-decoration: none; white-space: nowrap; width: 100%; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: calc(12 / 16 * 1rem); color: var(--headerColor); display: block; transition: color 0.3s, background-color 0.3s; &:hover { color: var(--bodyTextColorWhite); background-color: var(--primary); } &:before { display: none; } } } } } /* Dark Mode - Desktop */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { .cs-drop-ul { background-color: var(--dark); } .cs-li-link.cs-drop-link { &:hover { color: var(--bodyTextColorWhite); } } } } } /*-- -------------------------- --> <--- Desktop Navigation --> <--- -------------------------- -*/ /* Small Desktop - 1024px */ @media only screen and (min-width: 64rem) { body.scroll { #cs-navigation { width: 100%; max-width: 100%; border-radius: 0; top: 0; } } #cs-navigation { width: 94%; max-width: calc(1440 / 16 * 1rem); height: calc(96 / 16 * 1rem); /* prevents padding from affecting height and width */ box-sizing: border-box; /* 12px - 24px */ padding: clamp(0.75rem, 2vw, 1.5rem) 0; background-color: #fff; box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; /* 12px - 24px */ border-radius: clamp(0.75rem, 2vw, 1.5rem); display: flex; align-items: center; position: fixed; top: calc(32 / 16 * 1rem); left: 50%; z-index: 10000; transform: translateX(-50%); transition: top 0.3s, border-radius 0.3s, width 0.3s, max-width 0.3s; .cs-container { width: 100%; max-width: calc(1440 / 16 * 1rem); margin: auto; /* prevents padding from affecting height and width */ box-sizing: border-box; padding: 0 calc(24 / 16 * 1rem); display: flex; justify-content: space-between; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-toggle { display: none; } .cs-logo { width: 18.4%; max-width: calc(350 / 16 * 1rem); height: calc(32 / 16 * 1rem); /* margin-right auto pushes everything away from it to the right */ margin: 0 auto 0 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; z-index: 100; img { width: auto; height: 100%; /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */ object-fit: contain; } } .cs-contact-group { display: flex; justify-content: center; align-items: center; gap: calc(24 / 16 * 1rem); } .cs-phone { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: flex; justify-content: flex-start; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, color 0.3s; } .cs-phone-icon { width: calc(24 / 16 * 1rem); height: auto; display: block; } .cs-social { height: calc(32 / 16 * 1rem); opacity: 1; display: none; visibility: visible; justify-content: center; align-items: center; gap: calc(8 / 16 * 1rem); transition: opacity 0.3s, visibility 0.3s, height 0.3s; } .cs-social-link { text-decoration: none; width: calc(32 / 16 * 1rem); height: calc(32 / 16 * 1rem); background-color: #f7f7f7; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s; &:hover { background-color: var(--primary); .cs-social-icon { opacity: 1; filter: grayscale(1) brightness(10000%); } } } .cs-social-icon { width: calc(12 / 16 * 1rem); height: auto; opacity: 0.6; display: block; transition: opacity 0.3s; } .cs-ul-wrapper { height: 100%; display: flex; align-items: center; /* absolutely positioned to be dead center */ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .cs-ul { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: flex-start; align-items: center; /* 20px - 36px */ gap: clamp(1.25rem, 2.6vw, 2.25rem); } .cs-li { list-style: none; height: 100%; padding: 0; display: flex; align-items: center; /* prevent flexbox from squishing it */ flex: none; } .cs-li-link { font-size: calc(16 / 16 * 1rem); line-height: 1.5em; text-decoration: none; margin: 0; color: var(--headerColor); display: block; position: relative; transition: color 0.3s; &:hover { color: var(--primary); } &.cs-active { color: var(--primary); } } .cs-button-solid { font-size: calc(16 / 16 * 1rem); font-weight: 700; /* 46px - 56px */ line-height: clamp(2.875em, 5.5vw, 3.5em); text-align: center; text-decoration: none; min-width: calc(150 / 16 * 1rem); margin: 0; /* prevents padding from adding to the width */ box-sizing: border-box; padding: 0 calc(32 / 16 * 1rem); color: #fff; background-color: var(--primary); display: inline-block; position: relative; z-index: 1; transition: color 0.3s; &:before { content: ""; width: 0%; height: 100%; background: #fff; opacity: 1; position: absolute; top: 0; left: 0; z-index: -1; transition: width 0.3s; } &:hover { color: #1a1a1a; &:before { width: 100%; } } } } } /* Large Desktop - 1300px */ @media only screen and (min-width: 81.25rem) { #cs-navigation { .cs-social { display: flex; } } } /* Dark Mode */ @media only screen and (min-width: 64rem) { body.dark-mode { #cs-navigation { background-color: var(--dark); .cs-logo { /* turns it white */ filter: grayscale(1) brightness(1000%); } .cs-li-link, .cs-phone { color: var(--bodyTextColorWhite); } .cs-phone-icon { filter: grayscale(1) brightness(10005); } .cs-li-link { &.cs-active { color: var(--secondary); } &:hover { color: var(--secondary); } } } } }
:root { /* Add these styles to your global stylesheet, which is used across all site pages. You only need to do this once. All elements in the library derive their variables and base styles from this central sheet, simplifying site-wide edits. For instance, if you want to modify how your h2's appear across the site, you just update it once in the global styles, and the changes apply everywhere. */ --primary: #ff6a3e; --primaryLight: #ffba43; --secondary: #ffba43; --secondaryLight: #ffba43; --headerColor: #1a1a1a; --bodyTextColor: #4e4b66; --bodyTextColorWhite: #fafbfc; /* 13px - 16px */ --topperFontSize: clamp(0.8125rem, 1.6vw, 1rem); /* 31px - 49px */ --headerFontSize: clamp(1.9375rem, 3.9vw, 3.0625rem); --bodyFontSize: 1rem; /* 60px - 100px top and bottom */ --sectionPadding: clamp(3.75rem, 7.82vw, 6.25rem) 1rem; } body { margin: 0; padding: 0; } *, *:before, *:after { /* prevents padding from affecting height and width */ box-sizing: border-box; } .cs-topper { font-size: var(--topperFontSize); line-height: 1.2em; text-transform: uppercase; text-align: inherit; letter-spacing: .1em; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; display: block; } .cs-title { font-size: var(--headerFontSize); font-weight: 900; line-height: 1.2em; text-align: inherit; max-width: 43.75rem; margin: 0 0 1rem 0; color: var(--headerColor); position: relative; } .cs-text { font-size: var(--bodyFontSize); line-height: 1.5em; text-align: inherit; width: 100%; max-width: 40.625rem; margin: 0; color: var(--bodyTextColor); }
:root { /* Add these styles to your global stylesheet, which is used across all site pages. You only need to do this once. All elements in the library derive their variables and base styles from this central sheet, simplifying site-wide edits. For instance, if you want to modify how your h2's appear across the site, you just update it once in the global styles, and the changes apply everywhere. */ --primary: #ff6a3e; --primaryLight: #ffba43; --secondary: #ffba43; --secondaryLight: #ffba43; --headerColor: #1a1a1a; --bodyTextColor: #4e4b66; --bodyTextColorWhite: #fafbfc; /* 13px - 16px */ --topperFontSize: clamp(0.8125rem, 1.6vw, 1rem); /* 31px - 49px */ --headerFontSize: clamp(1.9375rem, 3.9vw, 3.0625rem); --bodyFontSize: 1rem; /* 60px - 100px top and bottom */ --sectionPadding: clamp(3.75rem, 7.82vw, 6.25rem) 1rem; } body { margin: 0; padding: 0; } *, *:before, *:after { /* prevents padding from affecting height and width */ box-sizing: border-box; } .cs-topper { font-size: var(--topperFontSize); line-height: 1.2em; text-transform: uppercase; text-align: inherit; letter-spacing: .1em; font-weight: 700; color: var(--primary); margin-bottom: (4/16rem); display: block; } .cs-title { font-size: var(--headerFontSize); font-weight: 900; line-height: 1.2em; text-align: inherit; max-width: (700/16rem); margin: 0 0 (16/16rem) 0; color: var(--headerColor); position: relative; } .cs-text { font-size: var(--bodyFontSize); line-height: 1.5em; text-align: inherit; width: 100%; max-width: (650/16rem); margin: 0; color: var(--bodyTextColor); }
:root { /* Add these styles to your global stylesheet, which is used across all site pages. You only need to do this once. All elements in the library derive their variables and base styles from this central sheet, simplifying site-wide edits. For instance, if you want to modify how your h2's appear across the site, you just update it once in the global styles, and the changes apply everywhere. */ --primary: #ff6a3e; --primaryLight: #ffba43; --secondary: #ffba43; --secondaryLight: #ffba43; --headerColor: #1a1a1a; --bodyTextColor: #4e4b66; --bodyTextColorWhite: #fafbfc; /* 13px - 16px */ --topperFontSize: clamp(0.8125rem, 1.6vw, 1rem); /* 31px - 49px */ --headerFontSize: clamp(1.9375rem, 3.9vw, 3.0625rem); --bodyFontSize: 1rem; /* 60px - 100px top and bottom */ --sectionPadding: clamp(3.75rem, 7.82vw, 6.25rem) 1rem; } body { margin: 0; padding: 0; } *, *:before, *:after { /* prevents padding from affecting height and width */ box-sizing: border-box; } .cs-topper { font-size: var(--topperFontSize); line-height: 1.2em; text-transform: uppercase; text-align: inherit; letter-spacing: .1em; font-weight: 700; color: var(--primary); margin-bottom: calc(4 / 16 * 1rem); display: block; } .cs-title { font-size: var(--headerFontSize); font-weight: 900; line-height: 1.2em; text-align: inherit; max-width: calc(700 / 16 * 1rem); margin: 0 0 calc(16 / 16 * 1rem) 0; color: var(--headerColor); position: relative; } .cs-text { font-size: var(--bodyFontSize); line-height: 1.5em; text-align: inherit; width: 100%; max-width: calc(650 / 16 * 1rem); margin: 0; color: var(--bodyTextColor); }
Lorem Ipsum
Undo