/* style.css for ZIMTEC | Web Developers */

/********    BODY, HTML    ********/
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}


/********    HEADER    ********/
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    background-color: white; 
    z-index: 100; 
    box-shadow: 0px 2px 31px rgba(0, 0, 0, 0.2); 
}

#main-logo {
    display: flex;
    align-items: center;    
    justify-content: left;
    width: 345px; 
    height: auto; 
}

#main-logo img {
    max-width: 100%;
    height: auto; 
}

/* Styles for the navigation links */
nav {
    position: relative;
}

.nav-links {
    list-style: none;
    display: flex; 
    position: static; 
    background-color: #fff; 
    text-align: center;
    padding: 0;
    margin: 0 50px;
}
.nav-links li {
    width: auto;
    position: relative; 
}
.nav-links a {
    display: block;
    padding: 10px 40px 0px 40px ;
    color: #737373;
    font-size: 30px;
    text-decoration: none;
    transition: color 0.2s ease; 
}
.nav-links a:hover {
    color: #14b7fa; 
}

/* added class to disable clicks on main menu items with a submenu for laptop and desktop */
.no-click > a {
    pointer-events: none;
    color: #737373;
    cursor: default;
}
.no-click:hover > a {
    color: #14b7fa;
}

.submenu {
    display: none; /* Hide the submenu by default */
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 0 0 8px 8px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
}
.nav-links li:hover .submenu {
    display: block;
    position: absolute;
    top: 100%; /* So it appears directly below the parent */
    left: 50%; /* Start at 50% of parent <li> */
    transform: translateX(-50%); /* Shift left by half its width to center it */
    background-color: #e5e2e2;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    min-width: max-content;
    z-index: 1000;
} 
.submenu li {
    padding: 10px; 
}
.submenu li a {
    display: block; /* Ensures full-width clickable area */
    padding: 10px;   
    text-decoration: none;
    color: #333;
    font-size: 22px;
}
.submenu li a:hover {
    background-color: #f0eeee; 
    color: #14b7fa; 
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Styles for the login button */
#login-button {
    position: absolute;
    top: 5px;
    right: 33px;
}
#login-button a {
    display: inline-block;
    padding: 5px 10px;   
    color: black;
    background-color: white;
    text-decoration: none;
    font-family: 'Arial', cursive; 
    font-weight: 400; 
    border: 2px solid black;
    border-radius: 5px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, color 0.3s ease;
}
#login-button a:hover {
    background-color: #14b7fa; 
    color: white;
}


/********    All SECTIONS    ********/
section {
    min-height: 100vh; /* Needed to keep each section with whole screen */
    position: relative; /* Needed to position the pseudo-element correctly */
    z-index: 1;
    padding: 10px 10vw;
    padding-top: 150px; /* Add padding to the top to create space below the header */
}

/* needed to position the images for each sections background */
section::before {
    content: "";
    position: absolute;
    top: 138px;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover; /* Cover the entire section */
    background-position: center; /* Center the background image */
    opacity: 0.25; /* Reduced opacity for the background image */
}

/* Ensure links within section are clickable */
section h1{
	font-size: 40px;
	color: #14b7fa; /*#737373; */
	font-weight: bold;

    background-color: white; 
    padding: 10px; 
    border-radius: 6px; 
    display: inline-block; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
}
section h2{
	font-size: 30px;
	color: #046e2b;
}
section p, section a, section li {
	font-size:20px;
}
/* Ensure the text is available to copy and links are clickable as header is fixed with z-index */
section h1, section h2, section p, section a, section li {
    position: relative; /* Ensure z-index is applied */
    z-index: 100; /* Higher z-index to make links clickable */
}



/********    HOME    ********/
#slogan {
    position: relative; 
    margin-top: 70px;
    font-family: 'Allan', cursive; 
    font-size: 39px; 
    font-weight: 400; 
    text-align: center; 
    color:#c0c0c0; 
}

/** VIDEO **/
#video-container {
    display: flex;
    padding: 0;
    width: 100vw; /* Use viewport width to ensure full width */
    overflow: hidden;
    margin-top: 80px;
    position: relative; /* Ensure it can break out of parent constraints */
    left: 50%; /* Center the container */
    transform: translateX(-50%); /* Adjust for centering */
}

#video-container video {
    flex: 1 0 33.33%; /* Ensure each video takes up one-third of the container */
    width: 33.33%; /* Set the width of each video to one-third of the container */
    height: auto; 
    opacity: 0; /* Hide the video initially */
    animation: slide-in 1s forwards; /* Add slide-in animation */
}
#video-container video:nth-child(1) {
    animation-delay: 0s; /* No delay for the first video */
}
#video-container video:nth-child(2) {
    animation-delay: 1s; /* 1.6 seconds delay for the second video */
}
#video-container video:nth-child(3) {
    animation-delay: 2s; /* 3.2 seconds delay for the third video */
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0; /* Start with opacity 0 */
    }
    to {
        transform: translateX(0);
        opacity: 1; /* End with opacity 1 */
    }
}

/** CAROUSEL **/
#carousel {
    position:relative;
    width: 100%;
    overflow: hidden;
    margin: auto;
    margin-top: 50px;
    display: flex;
    justify-content: center; /* Center the carousel */
}
#carousel-container {
    width: 470px; 
    height: 80px; 
    overflow: hidden;
    position: relative;
    margin: auto; /* Center the container */
}
#carousel-slide {
    display: flex;
    width: calc(150px * 8); /* Width of the container times the number of images */
    animation: slide 20s infinite linear; /* Adjust the duration as needed */
}
#carousel-slide img {
    width: 150px; 
    height: 80px; 
    padding: 10px 20px; 
    background-color: white; 
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1200px); /* Negative width of all images combined */
    }
}

#affirmations{
	margin-top: 150px; 
	color:#737373; 
	font-size: 20px;
}

/********    ABOUT    ********/
#about {
    position: relative;
}
#about::before {
    background-image: url('../images/about.jpg');
}
#about h1{
    text-shadow: 2px 2px white; 
}

/********    SERVICES    ********/
#services {
    position: relative;
}
#services::before {
    background-image: url('../images/services.png');
}
.service-item {
	padding-top: 150px;
}
h1.service-item{
    color: #046e2b;
}

#service-list {
    list-style: none;
	margin-left: -41px;
    background-color: #fff; 
    text-align: left;
}
#service-list li {
    max-width: 600px; 
	margin: 10px 0;
}
#service-list a {
    display: none;
    padding: 10px 40px;
	border: 2px solid black;
    border-radius: 10px; 
	border-style: outset;
	border-width: 2px 5px 5px 2px;
    color: white;
	text-shadow: 2px 2px black;
    background-color: #c7c7c7;
    font-size: 30px;
    text-decoration: none;
}
#service-list a:hover {
    color: #14b7fa; 
	background-color: #fff;
}
#service-list a:active {
    color: #c7c7c7; 
}

/********    PROJECTS    ********/
#projects {
    position: relative;
}
#projects::before {
    background-image: url('../images/projects.jpg');
}
.project-item {
    padding-top: 150px; /* Ensures h2's are not hidden behind the header */
}
#projects h1{
	text-shadow: 2px 2px white; /* added to compensate for the background color */
}
#projects h2{
	text-shadow: 2px 2px white; /* added to compensate for the background color */
}

/********    PRODUCTS    ********/
#products {
    position: relative;
}
#products::before {
    background-image: url('../images/products.jpg');
}
#product-list {
    list-style: none;
	margin-left: -41px;
    background-color: #fff; 
    text-align: left;
}
#product-list li {
    max-width: 600px;
	margin: 10px 0;
}
#product-list a {
    display: none;
    padding: 10px 40px;
	border: 2px solid black;
    border-radius: 10px; 
	border-style: outset;
	border-width: 2px 5px 5px 2px;
    color: white;
	text-shadow: 2px 2px black;
    background-color: #c7c7c7;
    font-size: 30px;
    text-decoration: none;
}
#product-list a:hover {
    color: #14b7fa; 
	background-color: #fff;
}
#product-list a:active {
    color: #c7c7c7; 
}
.product-item{
	padding-top: 150px;
}
#rwt-download{
    display: inline-block;
    padding: 12px 30px;
    background-color: #046e2b;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid #02b242;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#rwt-download:hover {
    background-color: white;
    color: #02b242;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(20, 183, 250, 0.4);
}

#rwt-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#demo-button{
    display: inline-block;
    padding: 12px 30px;
    background-color: #14b7fa;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    border: 2px solid #14b7fa;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#demo-button:hover {
    background-color: white;
    color: #14b7fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(20, 183, 250, 0.4);
}

#demo-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/********    CONTACT    ********/
#contact {
    position: relative;
}
#contact::before {
    background-image: url('../images/contact.jpg');
	 opacity: 0.5;
}

#contact h1, #contact p{
	text-shadow: 2px 2px white;
}
#contact form {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    background: #f3f3f3;
    border-radius: 8px;
    position: relative; /* Ensure z-index is applied */
    z-index: 100; /* Higher z-index to make links clickable */
}
#contact label {
    margin-top: 10px;
    display: block;
    font-weight: bold;
}
#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    width: 95%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
#contact textarea {
    min-height: 150px;
    resize: vertical;
}
#contact input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#contact input[type="submit"]:hover {
    background-color: #45a049;
}


/********    FOOTER    ********/
footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white; 
    padding: 20px; 
    margin-top: 50px;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: footerCarousel 20s infinite linear;
    z-index: 0;
}

@keyframes footerCarousel {
    0% {
        background-image: url('../images/footer1.jpg');
        filter: brightness(1);
    }
    19% {
        background-image: url('../images/footer1.jpg');
        filter: brightness(1);
    }
    20% {
        background-image: url('../images/footer1.jpg');
        filter: brightness(0.1);
    }
    21% {
        background-image: url('../images/footer2.jpg');
        filter: brightness(0.1);
    }
    22% {
        background-image: url('../images/footer2.jpg');
        filter: brightness(1);
    }
    39% {
        background-image: url('../images/footer2.jpg');
        filter: brightness(1);
    }
    40% {
        background-image: url('../images/footer2.jpg');
        filter: brightness(0.1);
    }
    41% {
        background-image: url('../images/footer3.jpg');
        filter: brightness(0.1);
    }
    42% {
        background-image: url('../images/footer3.jpg');
        filter: brightness(1);
    }
    59% {
        background-image: url('../images/footer3.jpg');
        filter: brightness(1);
    }
    60% {
        background-image: url('../images/footer3.jpg');
        filter: brightness(0.1);
    }
    61% {
        background-image: url('../images/footer4.jpg');
        filter: brightness(0.1);
    }
    62% {
        background-image: url('../images/footer4.jpg');
        filter: brightness(1);
    }
    79% {
        background-image: url('../images/footer4.jpg');
        filter: brightness(1);
    }
    80% {
        background-image: url('../images/footer4.jpg');
        filter: brightness(0.1);
    }
    81% {
        background-image: url('../images/footer5.jpg');
        filter: brightness(0.1);
    }
    82% {
        background-image: url('../images/footer5.jpg');
        filter: brightness(1);
    }
    99% {
        background-image: url('../images/footer5.jpg');
        filter: brightness(1);
    }
    100% {
        background-image: url('../images/footer5.jpg');
        filter: brightness(0.1);
    }
}

footer p, footer a, footer li {
    font-size: 16px;
    color: #e5e2e2;
    text-shadow: 2px 1px #222121;
    position: relative; 
    z-index: 10; 
}

#left-foot, #center-foot, #right-foot {
    flex: 1 1 33.333%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}
#left-foot ul, #right-foot ul {
    list-style: none;
    padding: 0; 
    margin: 0; 
}
#left-foot li  {
    margin-right: 10px; 
    padding: 5px 0;
}

#center-foot p, #center-foot a {
    text-align: center;
    font-size: 18px;
}

#right-foot {
    text-align: right; 
}
#right-foot li {
    padding: 5px 0;
}

/********   Back to Top Button    ********/
#backToTop, #backToTop-mobile {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #028434;
    color: white;
    font-size: 24px;
    font-weight: bold;
    font-family: system-ui, sans-serif;
    line-height: 1;
    text-align: center;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px #151515;
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;

    /* hide by default */
    opacity: 0;
    pointer-events: none;
    /*display: flex; */
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* Only show button on projects page for larger screens */
#backToTop {
    display: flex;
}
/* Show button on mobile for services, projects and products */
#backToTop-mobile {
    display: none; 
}

#backToTop.show, #backToTop-mobile.show {
  opacity: 1;
  pointer-events: auto;
}

#backToTop:hover, #backToTop-mobile:hover {
  background-color: #4de24a;
  transform: scale(1.1);
}


/********    MEDIA RESPONSE    ********/
/* Good practice to keep Media styles at end of the file as they might override normal view settings */

/**  Hamburger Menu Setup  **/
.hamburger {
    position: fixed; 
    top: 50px; 
    right: 15px; 
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    
}
.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;

    transform-origin: left;
}
.hamburger.open .bar:nth-child(1) {
    transform: rotate(42deg);
}
.hamburger.open .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.open .bar:nth-child(3) {
    transform: rotate(-42deg);
    
}


/**  Screen Sizes large to small  **/

/* disables sticky hover color on iOS */
@media (hover: none) {
    #backToTop:hover, #backToTop-mobile:hover {
        background-color: #028434;
        transform: none;
    }
    .mobile-nav .nav-links a:hover {
        background-color: #d6d5d5;
        transform: none;
    }
}

@media (min-width: 2800px) and (max-width: 4000px)  {
	#main-logo {
        min-width: 500px;
    }
	
	.nav-links a {
        font-size: 53px;
    }
    .nav-links li:hover .submenu {
        display: none; /* hide submenu on hover */
    }

	#slogan {
        font-size: 73px; 
        margin-top: 220px;  
    } 

    #carousel{
        margin-top: 250px;
    }
    #carousel-container{
        width: 1000px;
        height: auto
    }
    #carousel-slide img {
        width: 250px; 
        height: auto; 
    }


    #affirmations{
        margin-top: 450px; 
        font-size: 40px;
    }	
}

@media (max-width: 1300px) {
    #main-logo {
        min-width: 250px; 
    }
    .nav-links a {
        font-size: 24px;
    }
}

@media (max-width: 1144px) {
    .hamburger {
        display: flex;
    }
    /* show backToTop button for services, projects and products */
    #backToTop-mobile {
        display: flex; 
    }
    .no-click > a {
        pointer-events: auto;
        color: inherit;
        cursor: pointer;
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 80px;
        right: -100%;
        width: 200px;
        height: auto;
        background-color: #d6d5d5;
        border-radius: 8px 0 0 8px;
        box-shadow: -7px 7px 8px rgba(0, 0, 0, 0.5); 
        overflow: hidden; 
        transition: right 0.3s ease;
        z-index: 100;
    }
    .mobile-nav.open {
        right: 0;
    }
    .mobile-nav .nav-links {
        flex-direction: column; 
        margin: 0;
    }
    .mobile-nav .nav-links li {
        width: 100%;
    }
    .mobile-nav .nav-links a {
        padding: 10px 20px;
        background-color: #d6d5d5;
    }

    .mobile-nav .nav-links a {
        color:#333;
    }
    .nav-links li:hover .submenu {
        display: none; /* hide submenu on hover */
    }

    #service-list a {
        display: block;
    }

    #product-list a {
        display: block;
    }
}


@media (max-width: 600px) {
  #backToTop, #backToTop-mobile {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

}

@media (max-width: 500px) {

    #main-logo {
        max-width: 250px; 
    }  

    .mobile-nav .nav-links a {
        padding: 10px 20px;
        background-color: #d6d5d5;
    }

    .nav-links a {
        font-size: 24px;
        color:#333;
    }
    .nav-links li:hover .submenu {
        display: none; 
    }

    #slogan {
        font-size: 24px; 
        margin-top: 10px;  
    } 

    #video-container {
        margin-top: 40px;
    }

    #carousel{
        margin-top: 25px;
    }
    #carousel-slide img {
        width: 70px; 
        height: 40px; 
    }
	
	#affirmations{
		margin-top: 50px; 
	}

    #service-list a {
        display: block;
    }

    #product-list a {
        display: block;
    }
    
    #left-foot, #right-foot {
        display: none;
    }    
}
