/* Import Google Fonts (Poppins & Marcellus) */
@import url("https://fonts.googleapis.com/css2?family=Marcellus&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Global Reset and Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 10px; /* Base font size for easy rem calculations */
}

body {
  min-height: 100dvh;
  font-family: "canada-type-gibson", sans-serif;
  /* font-family: "Poppins", sans-serif; */
  font-size: 1.8rem;
  line-height: 1.4;
  color: #fcfcfc;
  background-color: #2f3157; /* Fallback background color */
}
section[id] {
    scroll-margin-top: 5rem;
  }
/* Header (Fixed Navigation Bar) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: background-color 0.3s ease, transform 0.3s ease-out;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(40px);
  z-index: -1;
}

.header::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 1.5s;
}

.header:hover::after {
  left: 100%;
}

a:link {
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 90px;
  height: 60px;
  margin-right: 1rem;
}

a .myNameIs {
  color: #e6e6e6;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 2rem;
}

.icons {
  font-size: 3.6rem;
  color: #fcfcfc;
  cursor: pointer;
  display: none;
  background: none;
  border: none;
  z-index: 101; /* Ensure it's above the nav */
}

#close-icon {
  display: none;
}

.nav {
  margin-right: 12rem;
}

.nav a {
  font-size: 1.5rem;
  color: #fcfcfc;
  text-decoration: none;
  font-weight: 700;
  margin-left: 3.5rem;
  position: relative;
}

.visibility {
  display: none;
}

#check {
  display: none;
}

a:hover,
.nav a:hover {
  color: #fbc02d;
}

.profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile a {
  color: #e6e6e6;
  text-decoration: none;
  font-size: 2.4rem;
}

.profile a:hover {
  color: #fbc02d;
}

/* Video Hero Section */
.hero-section {
  width: 100%;
  height: 100vh;
}
.video-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -2;
}

.hero-buttons-wrapper {
  position: absolute;
  top: 40%;
  left: 70%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 0 2rem;
}

.button-container {
  display: flex;
  gap: 5rem;
  justify-content: center;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.download-btn,
.contact-btn {
  position: relative;
  display: inline-flex;
  padding: 12px 24px;
  background-color: rgba(41, 127, 107, 0); /* transparent background */
  border: 1px solid #f5f5f5;
  color: #e6e6e6;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  flex-shrink: 0;
  transition: background-color 0.4s ease;
}

.download-btn a,
.contact-btn a {
  color: #e6e6e6;
  text-decoration: none;
}
.btn-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  font-size: 2rem;
}

.btn-text {
  position: relative;
  display: inline-block;
  transition: all 0.5s ease;
}

/* Hover effects for buttons */
.download-btn:hover .btn-text,
.contact-btn:hover .btn-text,
.myBtn:hover .btn-text {
  opacity: 0;
  transform: translateY(-20px);
}
.download-btn:hover .btn-icon,
.contact-btn:hover .btn-icon,
.myBtn:hover .btn-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}
.download-btn:hover,
.contact-btn:hover {
  background-color: rgba(41, 127, 107, 0.2);
}

.myBtn {
  display: block;
  margin: 25px auto 0;
  width: 150px;
  padding: 12px;
  font-size: 1.4rem;
  font-weight: 600;
  outline: none;
  border: none;
  border-radius: 10px;
  background-color: rgb(51, 51, 51);
  color: #fff;
  cursor: pointer;
  transition: all 0.4s ease-in-out;
  position: relative;
  overflow: hidden;
}

.myBtn:hover {
  background-color: rgb(207, 207, 207);
  color: #000;
  transform: scale(1.05);
}

/* ===== ABOUT Section ===== */

.section-title-about {
  position: relative;
  font-size: 3.5rem;
  color: #fcfcfc;
  margin-top: 1rem;
  margin-bottom: 4rem;
  text-align: center;
}
.section-title-about::after {
  position: absolute;
  content: "";
  width: 110px;
  height: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.5rem;
  background-color: #fbc02d;
}

.about-section {
  padding-top: 4rem;
  width: 100%;
  min-height: 100dvh;
  background: #27233f;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 0.7fr 0.95fr;
  align-items: start;
  gap: 5rem;
  text-align: initial;
}

.about-subtitle {
  font-size: 2.4rem;
  margin-bottom: 2rem;
}

.about-text {
  font-size: 1.6rem;
  line-height: 1.8;
  letter-spacing: 1px;
  text-align: justify
}

.about-text:not(:last-child) {
  margin-bottom: 2rem;
}

.about-img {
  justify-self: end;
}

.about-img img {
  width: 250px;
  border-radius: 10px;
  border: 1px solid #4f516e;
  opacity: 0.8;
}

/* ======= SERVICES Section ======= */
.services-section {
  padding: 4rem 2rem;
  width: 100%;
  min-height: 100dvh;
  background: #3c4661;
}

.section-title-service {
    position: relative;
    font-size: 3.5rem;
    color: #fcfcfc;
    margin-top: 1rem;
    margin-bottom: 4rem;
    text-align: center;
  }
  .section-title-service::after {
    position: absolute;
    content: "";
    width: 270px;
    height: 0.2rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: -0.5rem;
    background-color: #fbc02d;
  }
  


.services-subTitle {
  font-size: 2.4rem;
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
}

.skills-title {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 2.4rem;
  font-weight: normal;
  margin-top: 6rem;
  color: #fcfcfc;
}

.service-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.service-item {
  flex: 1 1 300px; /* Flex-grow, flex-shrink, flex-basis */
  max-width: 350px;
  min-height: 25rem;
  padding: 2.5rem;
  background-color: #000;
  text-align: center;
  color: #fcfcfc;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: -1;
  transition: transform 0.4s ease;
}
.service-item:hover::before {
  transform: scale(1.1);
}

.service-item[data-service="web-design"]::before {
  background-image: url(assets/img/WebDes.jpg);
}

.service-item[data-service="web-development"]::before {
  background-image: url(assets/img/WebDev.webp);
}

.service-item[data-service="web-master"]::before {
  background-image: url(assets/img/webMaster.webp);
}

.item-text {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.item-p {
  margin-top: 1rem;
  font-size: 1.4rem;
  text-align: justify;
}

.skills-container {
  max-width: 1100px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem auto;
  background-color: rgb(201, 202, 212, 0.1);
  border: 2px solid rgb(201, 202, 212, 0.2);
  border-radius: 15px;
  padding: 1rem;
}

.skills-item {
  margin: 1rem;
  text-align: center;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.skills-item:hover {
    transform: scale(1.1);
}


/* ======= CONTACT ======= */
.contact-section {
    padding-top: 8rem !important;
    padding-bottom: 8rem !important;
  width: 100%;
  min-height: auto !important;
  background: rgb(114, 121, 137);
  display: flex;
  flex-direction: column;
  justify-content: center;
  
}

.contact-container {
  width: 100%;
  max-width: 500px; 
  margin: 0 auto;     
  
}

.section-title-contact {
    position: relative;
    font-size: 3.5rem;
    color: #fcfcfc;
    margin-top: -4rem;
    margin-bottom: 4rem;
    text-align: center;
  }
  .section-title-contact::after {
    position: absolute;
    content: "";
    width: 140px;
    height: 0.2rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: -0.5rem;
    background-color: #fbc02d;
  }
  

fieldset {
  padding: 2rem 4rem;
  border: 2px solid rgb(189, 189, 189);
  border-radius: 15px;
  width: 100%;
  max-width: 1200px;
  background: rgba(52, 108, 43, 0.2);
  display: flex;
  flex-direction: column;
}

legend {
  font-size: 2.2rem;
  color: #fff;
  text-align: center;
  width: 100%;
  margin-bottom: 2rem;
  /* position: relative;
  top: -15px; */
}

.myForm {
  margin-bottom: 2rem;
  padding: 15px;
  border-radius: 10px;
  font-family: "canada-type-gibson";
  font-size: 1.6rem;
  font-weight: 500;
  border: 1px solid #ccc;
  background-color: rgba(255,255,255,0.9);
  width: 100%;
}
label {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

/* Footer */
footer {
  padding: 4rem 2rem 2rem;
  background-color: #222;
  text-align: center;
}

ul {
  list-style-type: none;
}

.social-media {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 2rem;
}

.social-media a {
  color: #fcfcfc;
  font-size: 2.8rem;
  transition: color 0.3s ease;
}

.social-media a:hover {
    color: #fbc02d;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

footer .scroll-up a {
  display: inline-block;
  font-size: 1.2rem;
  color: #fcfcfc;
  border: none;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 1rem;
}

.scroll-up a:hover {
  color: #fbc02d;
}

.copyright {
  font-size: 1.2rem;
}

/* =================================================================== */
/* =================== RESPONSIVE MEDIA QUERIES ====================== */
/* =================================================================== */


/* iMac and other large screens */
@media (min-width: 1800px) {
    html {
        font-size: 12px; /* Increase base font size */
    }
    .about-container {
        max-width: 1400px;
        gap: 8rem;
    }
    .service-container {
        max-width: 1600px;
    }

    .hero-buttons-wrapper {
        position: absolute;
        top: 40%;
        left: 70%;
        transform: translate(-50%, -50%);
        width: 100%;
        padding: 0 2rem;
    }

    .hero-buttons-wrapper {
        position: absolute;
        top: 40%;
        left: calc(70% + 8rem); 
        transform: translate(-50%, -50%);
        width: 100%;
        padding: 0 2rem;
    }
}


/* Desktops and Laptops */
@media (max-width: 1520px) {

  .hero-section {
        height: auto; /* Let the container inside determine the height */
    }

  .header {
    padding: 1.5rem 5%;
  }
  .nav {
    margin-right: 6rem;
  }

  .video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .bg-video {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%; 
    background-image: url('assets/img/TheImageBG.png');
    background-position: top;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #2f3157; /* Fallback color */
}

.hero-buttons-wrapper {
    position: absolute;
    top: 50%;
    left: 73%;
  }

  .button-container {
    display: flex;
    gap: 4rem;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
  }

.download-btn,
.contact-btn {
  padding: 8px 18px;
}
.about-section {
    padding-top: 2rem;
    
  }

  .section-title-about {
    position: relative;
    font-size: 3.5rem;
    color: #fcfcfc;
    margin-top: 1rem;
    margin-bottom: 8rem;
    text-align: center;
  }
  .about-img img {
    width: 200px; 
}
  .skills-container {
      margin: 2rem 5%;
  }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    /* Default rules for this breakpoint */
    html {
        font-size: 9.5px;
    }
    .about-section {
        
        min-height: 60dvh;
        
      }
    .about-container {
        gap: 3rem !important;
        padding-left: 6rem !important;
        padding-right: 6rem !important;
        grid-template-columns: 0.28fr 0.95fr;
    }
    
    .about-text {
        text-align: justify !important;
    }

    .service-item {
        flex-basis: 45%;
    }
    }



/* Tablet Portrait - The point where mobile navigation kicks in */
@media (max-width: 768px) {
  html {
      font-size: 9px;
  }
  .header {
    padding: 2rem 5%;
  }
  /* Show hamburger menu */
  .icons {
    display: block; 
    order: 3;
  }
  
  /* Hide standard nav links and profile icons */
  .nav {
    position: absolute;
    top: 100%; /* Position it right below the header */
    left: 0;
    width: 100%;
    height: auto;
    background-color: rgba(47, 49, 87, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem; /* Adjust padding for closed state */
    margin: 0;
  
    /* New animation properties */
    max-height: 0;
    overflow: hidden; /* Hide content when height is 0 */
    transition: max-height 0.5s ease-out, padding 0.5s ease-out; /* Smooth transition */
    opacity: 0.97;
  }

  .nav.active {
    max-height: 50vh; /* A value larger than the menu's content height */
    padding: 2rem 0;  /* Restore padding when open */
  }

  .nav a {
    margin: 1.5rem 0;
    font-size: 2rem;
  }
  .logo {
    order: 1; 
}
  .profile {
    order: 2;
    margin-right: 0;
  }
  .myNameIs {
      font-size: 2.2rem;
  }

  .button-container {
    margin-top:7rem;
      flex-direction: column;
      gap: 2.5rem;
  }
  
  .download-btn, .contact-btn {
      width: 120px;
      text-align: center;
      justify-content: center;
  }

  .section-title {
      font-size: 3rem;
  }
  .about-section, .services-section, .contact-section {
      padding: 2rem 2rem;
  }
  .about-container {
      padding: 0 5%;
  }
  .service-item {
      flex-basis: 100%;
      max-width: 400px;
  }

  .skills-container {
    max-width: 600px;
    display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem auto;
  }

  fieldset {
      padding: 2rem;
  }
  .about-section, .services-section, .contact-section {
    padding: 2rem 2rem;
}
}

/* Mobile Landscape */
@media (max-width: 576px) {
    html {
        font-size: 8.5px;
    }
    .header {
        padding: 2rem 4%;
    }
    .profile {
        margin-right: 5rem;
    }
    .video-container {
        position: relative;
        width: 100%;
        height: 0;
        margin-top: 5rem;
        padding-top: 56.25%; 
    }
    .button-container {
        flex-direction: row; /* Display items in a row */
        gap: 2rem;           /* Adjust the gap for horizontal layout */
        margin-top: 2rem;
        margin-bottom: 2.5rem; 
    }
    .download-btn::after,
.contact-btn::after {
    content: ''; /* Base content */
    position: absolute;
    top: 100%; /* Position the label right below the button */
    left: 50%;
    transform: translateX(-50%);
    margin-top: -1rem; /* Space between button and text */
    color: #fcfcfc;
    font-size: 1rem; /* Small, readable text */
    font-weight: 400;
    letter-spacing: 0.5px;
}
.download-btn::after {
    content: 'CV';
}

.contact-btn::after {
    content: 'Contact';
}

.download-btn,
.contact-btn {
    width: 4.5rem;
    height: 4.5rem;
    padding: 0;
    border: none; /* Remove the border */
    justify-content: center; /* This will center the icon */
    overflow: visible;
}

.btn-text {
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1.2rem;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.download-btn:hover .btn-text,
.contact-btn:hover .btn-text {
    visibility: visible;
    opacity: 1;
}
.download-btn:hover .btn-icon,
.contact-btn:hover .btn-icon {
    transform: scale(1.1); /* Simple grow effect on hover */
    color: #fff; /* Optional: change color on hover */
}

.btn-icon {
    /* Default State */
    position: static; /* This is crucial to keep it centered */
    transform: none;  /* Override any lingering transforms from desktop styles */
    opacity: 1;       /* Make it visible */
    color: #fbc02d;   /* The requested yellow/orange color */
    font-size: 3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}
.download-btn:hover .btn-text,
.contact-btn:hover .btn-text {
    transform: none;
    opacity: 0; /* Ensures the original text span stays hidden */
    visibility: hidden;
}
    .skills-container {
        padding: 0.5rem;
    }
    .skills-item {
        margin: 0.5rem;
        padding: 0.5rem;
    }
    .skills-item img {
        transform: scale(0.9);
    }
    fieldset {
        padding: 2rem 1.5rem;
    }
    legend {
        font-size: 1.8rem;
    }
}

/* Small Mobile */
@media (max-width: 440px) {
    html {
        font-size: 8px;
    }
    .header {
        padding: 2rem 3%;
    }
    .profile {
        gap: 1rem;
    }
    .profile a {
        font-size: 2.2rem;
    }
    .myNameIs {
      font-size: 2rem;
    }
    .hero-buttons-wrapper {
        padding: 0 1rem;
    }
   
    .about-text {
        font-size: 1.5rem;
    }

    .about-img img {
        width: 80px;
        border-radius: 10px;
        border: 1px solid #4f516e;
        opacity: 0.8;
      }
      .about-section {
        padding-top: 2rem;
      }
      .section-title-about {
        margin-bottom: 4rem; /* הקטנו את הרווח מ-8rem ל-4rem */
    }
     
    .social-media {
        gap: 20px;
    }
    .social-media a {
        font-size: 2.5rem;
    }
}

/* Edge case for very short screens */
@media (max-height: 450px) {
    .nav.active {
        overflow-y: auto;
        max-height: calc(100vh - 80px); /* Adjust based on header height */
    }
}