/* Custom styles for new header */
.redesigned {
  /* Light Mode Color Palette */
  --color-background: #fbfbfbde;
  --color-background-purple: #3b074d;
  --color-foreground: #36234e;
  --color-accent-purple: #312541; /* Dark Purple, from user's dark mode */
  --color-accent-green: #d3ffc8;  /* A complementary dark green */
  --color-accent-neutral: #888888; /* Medium Gray */

  /* General variables for backwards compatibility */
  --background: var(--color-background);
  --foreground: var(--color-foreground);
  --animation-foreground: var(--color-accent-purple);

  --font-noto-sans: 'Noto Sans', sans-serif;
  --font-noto-rashi-hebrew: 'Noto Rashi Hebrew', serif;
}

body.dark-mode .redesigned {
  /* Dark Mode Color Palette (from user) */
  --color-background: #36234e;     /* Dark Purple */
  --color-foreground: #fbfbfbde;     /* Off-white */
  --color-accent-purple: hsl(257, 57%, 76%);  /* Light Purple */
  --color-accent-green: #85ee6b;   /* Light Green */
  --color-accent-neutral: #8F8389; /* Raisin Black */

  --background: var(--color-background);
  --foreground: var(--color-foreground);
  --animation-foreground: var(--color-accent-green);
}

.redesigned {
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-noto-sans);
  font-size: 1.25rem;
  max-width: 100vw;
}

.redesigned * {
  box-sizing: border-box;
}

.redesigned a {
  color: inherit;
  text-decoration: none;
}

.redesigned button:not(.header-button):not(.footer-button):not(.dark-mode-toggle) {
  font-family: var(--font-noto-sans) !important;
  font-size: 1rem;
  font-weight: 400;
  background-color: #ffffff;
  color: black;
  padding: 0px 30px;
  /* border: 1px solid black; */
  border: 1px solid salmon;
  border-radius: 20px;
  cursor: pointer;
/*   transition: background-color 0.3s ease; */
  line-height: .5;
/*   text-align: center; */
}

.redesigned button:not(.header-button):not(.footer-button):not(.dark-mode-toggle):hover {
  background-color: #f3f3f3;
}

.redesigned button:focus {
  outline: none;
}

.redesigned button a {
  /* display: inline-block; */
  line-height: 1;
  vertical-align: middle;
  position: relative;
  left: 2px; 
}

/* Page Structure */
.redesigned .page-section {
  position: relative;
  z-index: 1;
  height: auto;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  padding: 0 8vh;
}

.redesigned .page-section.hero-section {
  min-height: 100vh;
}


/* Header */
.redesigned .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2vh 8vh;
  /* background-color: var(--background);
   */
  background-color: var(--color-foreground);
  color: var(--foreground);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

body.dark-mode .redesigned .header {
  background-color: var(--color-background);
  color: var(--color-foreground);
}

.redesigned .header-left {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: var(--font-noto-rashi-hebrew);
  color: var(--color-background);
}

body.dark-mode .redesigned .header-left {
  color: var(--color-foreground);
}

.redesigned .header-button {
  font-family: var(--font-noto-sans);
  font-size: .75rem;
  font-weight: 400;
  background-color: transparent;
  color: var(--background);
  padding: 0px 30px;
  border: 1px solid var(--background);
  border-radius: 20px;
  cursor: pointer;
  line-height: .5;
  text-align: center;
  height: 40px;
}

.redesigned .header-button:hover {
  background-color: var(--color-accent-green);
  color: var(--color-foreground);
}

body.dark-mode .redesigned .header-button {
  border: 1px solid var(--color-foreground);
  color: var(--color-foreground);
}

body.dark-mode .redesigned .header-button:hover {
  background-color: var(--color-accent-green);
  color: var(--color-background);
}

/* Hero Section */
.redesigned .hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(100vh - 90px); /* Adjust for header height */
  width: 100%;
}

.redesigned #hero-animation-container {
	position: absolute;
	top: 2vh;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10; /*so we can click to stop it*/
}

.redesigned .hero-content {
  position: static;
  width: 45%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.redesigned .hero-content p {
  line-height: 1.6;
  font-weight: 200;
}

.redesigned .page-content {
  position: static;
  width: 55%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.redesigned .page-content p {
  line-height: 1.7rem;
  font-weight: 200;
}

.redesigned .hero-header {
  font-size: 3rem;
  font-weight: 400;
  font-family: var(--font-noto-rashi-hebrew);
}

.redesigned .section-header {
  font-size: 2rem;
  font-weight: 400;
  font-family: var(--font-noto-rashi-hebrew);
  padding-top: 30px;
  padding-bottom: 20px;
}

/* Utility Classes */
.redesigned .massive-text {
  font-size: 1.7rem;
  font-weight: 300;
  font-family: var(--font-noto-sans);
  padding-right: 50px;
  padding-top: 30px;
  padding-bottom: 50px;
  align-self: center;
  margin-bottom: 0;
}

.redesigned .center-heading {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 300;
  font-family: var(--font-noto-rashi-hebrew);
}

.redesigned .thesis-section {
  background-color: var(--color-foreground);
  color: var(--color-background);
  padding-bottom: 50px;
  padding-top: 50px;
}

body.dark-mode .redesigned .thesis-section {
  background-color: var(--color-background);
  color: var(--color-foreground);
}

.redesigned .thesis-section .page-content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Footer */
.redesigned .footer-box {
  height: auto;
  min-height: 50vh;
  background-color: var(--color-foreground);
  font-family: var(--font-noto-sans);
  position: relative;
  padding: 40px 50px;
}

body.dark-mode .redesigned .footer-box {
  background-color: var(--color-background);
  color: var(--foreground);
}

.redesigned .footer-heading {
  font-size: 2rem;
  font-family: var(--font-noto-rashi-hebrew);
  font-weight: 400;
  color: var(--color-background);
}

body.dark-mode .redesigned .footer-heading {
  color: var(--color-foreground);
}

.redesigned .footer-button {
  font-family: var(--font-noto-sans);
  font-size: .75rem;
  font-weight: 400;
  background-color:   transparent;
  color: var(--color-background);
  padding: 0px 30px;
  border: 1px solid var(--color-background);
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  line-height: .5;
  text-align: center;
  height: 40px;
}

.redesigned .footer-button:hover {
  background-color: var(--color-accent-green);
  color: var(--color-foreground);
}

body.dark-mode .redesigned .footer-button {
  border: 1px solid var(--color-foreground);
  color: var(--color-foreground);
}

body.dark-mode .redesigned .footer-button:hover {  
  background-color: var(--color-accent-green);
  color: var(--color-background);
}

.redesigned .footer-button:first-of-type {
  margin-right: 10px;
}

.redesigned .footer-copyright {
  font-size: 0.8rem;
  font-weight: 200;
  color: var(--color-background);
}

body.dark-mode .redesigned .footer-copyright {
  color: var(--color-foreground);
}

.redesigned .footer-brand {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--color-background);
}

.redesigned .footer-icons {
  font-size: 0.9em;
  margin: 0;
  color: var(--color-background);
}

body.dark-mode .redesigned .footer-icons {
  color: var(--color-foreground);
}

.redesigned .footer-text {
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-background);
}

body.dark-mode .redesigned .footer-text {
  color: var(--color-foreground);
}

.redesigned .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 80px; /* Space for bottom row */
  color: var(--color-background);
}

body.dark-mode .redesigned .footer-content {
  color: var(--color-foreground);
}

.redesigned .footer-left-col {
  width: 40%;
}

.redesigned .footer-right-col {
  width: 40%;
  max-width: 400px;
}

.redesigned .footer-bottom-row {
  position: absolute;
  bottom: 20px;
  left: 50px;
  right: 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.redesigned .footer-bottom-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.redesigned .footer-buttons-container {
  margin-top: 20px;
}

.redesigned .newsletter-prompt {
  margin-bottom: 15px;
  margin-left: 5px;
  font-weight: 200;
  font-size: .9rem;
}

.redesigned .newsletter-form {
  display: flex;
  align-items: center;
  position: relative;
}

.redesigned .newsletter-input {
  width: 100%;
  padding: 0px 80px 0px 15px;
  border: none;
  border-radius: 20px;
  background-color: rgba(0,0,0,0.05);
  outline: none !important;
  box-shadow: none !important;
  font-family: var(--font-noto-sans);
  font-size: .75rem;
  height: 40px;
  line-height: .5;
  color: black;
}

body.dark-mode .redesigned .newsletter-input {
  background-color: rgba(255,255,255,0.1);
  color: var(--background);
}

.redesigned .newsletter-input:focus {
  background-color: var(--color-accent-green);
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

body.dark-mode .redesigned .newsletter-input:focus {
  background-color: var(--color-accent-green);
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.redesigned .newsletter-submit-icon {
  position: absolute;
  right: 15px;
  color: #666;
  font-size: .75rem;
  font-family: var(--font-noto-sans);
  pointer-events: none;
}

body.dark-mode .redesigned .newsletter-submit-icon {
  color: #a0a0a0;
}

/* Research Focus Section */
.redesigned .research-focus-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 40px;
  background-color: none;
  border: none;
  /* border: 1px solid rgb(0, 0, 0); */
  /* padding: 60px; */
  /* gap: 60px; */
  /*min-height: 600px;*/
  margin-bottom: 40px;
  overflow: visible; /* Prevent clipping of 3D animations */
}

.redesigned .research-focus-container:last-of-type {
  margin-bottom: 40px;
}

body.dark-mode .redesigned .research-focus-container {
  background-color: var(--color-background);
  /* border: 1px solid var(--color-accent-green); */
}
body.dark-mode .redesigned .research-focus-container:last-of-type {
  margin-bottom: 100px;
}

.redesigned .research-focus-left {
  position: relative;
  flex: 1 1 calc(50% ); /* Compensate for right container's padding */
  display: flex;
  justify-content: center;
  align-items: center;
  /* border-radius: 15px; */
  background-color: rgba(255, 255, 255, 0.05); /* Frosted glass effect */
  backdrop-filter: blur(10px);
  /* border-right: 1px solid rgb(0, 0, 0); */
   /* .25px solid rgb(243, 238, 238); */
  min-height: 400px;
  overflow: hidden;
}


body.dark-mode .redesigned .research-focus-left {
  /* background-color: var(--color-accent-green); */
  /* border-right: 1px solid var(--color-accent-green); */
  line-height: 1.6;
  margin: 0;
  color: var(--foreground);
  opacity: 0.8;
}

.redesigned .research-focus-left img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* border-top: 1px solid var(--color-foreground); */
}

.redesigned .research-focus-right {
  flex: 1 1 calc(50%); /* Compensate for its own padding */
  display: flex;
  flex-direction: column;
  /* gap: 40px; */
  padding: 50px;
  background-color: var(--background);
  /* border-top: 1px solid var(--color-foreground); */
}

.redesigned .research-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.redesigned .research-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-noto-sans);
  margin-bottom: 8px;
}

.redesigned .research-heading {
  font-size: 1.3rem;
  font-weight: 500;
  font-family: var(--font-noto-sans);
  margin: 20px 0px;
  color: var(--foreground);
}

.redesigned .research-text {
  line-height: 1.6;
  margin: 0;
  color: var(--foreground);
  opacity: 0.8;
}


/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 1000px;
}

.dark-mode-toggle:focus {
  box-shadow: none;
}

.dark-mode-toggle .icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d; 
  transition: transform 0.5s ease;
}

body.dark-mode .dark-mode-toggle .icon-wrapper {
  transform: rotateY(180deg);
}

.dark-mode-toggle .moon,
.dark-mode-toggle .sun {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-sizing: border-box;
  backface-visibility: hidden;
  box-shadow: 0 0 0 1px var(--background);
}
body.dark-mode .dark-mode-toggle .moon,
body.dark-mode .dark-mode-toggle .sun {
  box-shadow: 0 0 0 1px var(--foreground);
}

.dark-mode-toggle .moon {
  background: linear-gradient(to right, var(--background) 50%, transparent 50%);
  transform: rotateY(0deg);
}

.dark-mode-toggle .sun {
  background: linear-gradient(to left, var(--background) 50%, transparent 50%);
  transform: rotateY(180deg);
}

body.dark-mode .dark-mode-toggle .moon {
  background: linear-gradient(to right, var(--foreground) 50%, transparent 50%);
}

body.dark-mode .dark-mode-toggle .sun {
  background: linear-gradient(to left, var(--foreground) 50%, transparent 50%);
}

.svg-separator-container {
  /* Spacing and centering */
  margin: 2rem auto;

  /* --- Desktop Size --- */
  width: 50%;
  max-width: 500px;
}

.svg-separator-image {
  /* Make the image fill its container */
  width: 100%;

  /* Maintain the image's aspect ratio */
  height: auto;

  /* Prevents a small gap from appearing below the image */
  display: block;
}

.svg-file-separator {
  /* --- The Aspect Ratio Trick --- */
  width: 100%; /* The element will be as wide as its container */
  height: 0;   /* We set height to 0... */

  /* ...and use padding to create the height based on the width. */
  padding-bottom: 5%;

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('../img/line_separator.svg');
}

/* --- Dark Mode Override --- */
/* When the body has the .dark-mode class, swap the background image */
body.dark-mode .svg-file-separator {
  background-image: url('../img/line_separator_light.svg');
}

/* === mobile view === */
@media (max-width: 768px) {
  /* Page Structure */
  .redesigned .page-section {
    padding: 15px 15px 5px 15px; /* Reduced bottom padding */
  }

  /* Header */
  .redesigned .header {
    padding: 15px 15px;
  }
  
  /* Hero Section */
  .redesigned .hero-header {
    font-size: 2.5rem;
  }

  .redesigned .hero-header br {
    display: none;
  }

  .redesigned .section-header {
    font-size: 1.8rem;
  }


  .redesigned .hero-content p {
    font-size: 1rem;
    font-weight: 200;
  }

  .redesigned .page-content p {
    font-size: 1rem;
    font-weight: 200;
  }

  .redesigned .page-content {
    width: 100% !important;
  }

  .redesigned .hero-container {
    flex-direction: column;
    height: auto;
    text-align: center;
  }

  .redesigned #hero-animation-container {
    width: 100%;
    height: 80vh;
    top: 0vh; /* Shift animation higher */
  }

  .redesigned .hero-content {
    width: 100% !important;
    padding-top: 50vh; /* Reduced to account for shifted animation */
    padding-bottom: 0;
  }

  /* Utility Classes */
  .redesigned .massive-text {
    font-size: 1.5rem;
    font-weight: 300;
    font-family: var(--font-noto-sans);
    padding-right: 0px;
  }
  
  .redesigned .center-heading {
    font-size: 2.5rem;
    /* padding-bottom: px; */
  }

  /* Footer */
  .redesigned .footer-box {
    padding: 30px 20px;
    text-align: left;
  }

  .redesigned .footer-content {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0;
    gap: 80px;
  }

  .redesigned .footer-left-col,
  .redesigned .footer-right-col {
    width: 100%;
    text-align: left;
  }

  .redesigned .footer-bottom-row {
    position: static;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 30px;
    margin-top: 40px;
  }

  .redesigned .footer-bottom-right {
    align-items: flex-start;
  }

  .redesigned .footer-brand.header-left {
    font-size: 1.5rem;
  }

  .redesigned .footer-heading {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
  }

  .redesigned .footer-text {
    font-size: .9rem;
    margin-bottom: 20px;
  }

  .redesigned .footer-box p {
    font-size: .9rem;
  }
  
  .redesigned .footer-button {
    font-size: .7rem;
    height: 36px;
  }

  .redesigned .footer-copyright {
    font-size: .75rem;
  }
  
  /* Research Focus Section */
  .redesigned .research-focus-container {
    flex-direction: column;
    padding: 0;
    gap: 0;
    margin-top: 60px;
    margin-left: 0;
    margin-right: 0;
    min-height: auto;
    border: none;
  }
  
  .redesigned .research-focus-left {
    width: 100%;
    height: 100px;
    order: 1;
    border: 1px solid rgb(0, 0, 0);
    margin-bottom: 30px;
  }
  
  .redesigned .research-focus-right {
    width: 100%;
    order: 2;
    gap: 30px;
    padding: 0;
    background-color: transparent;
  }
  
  .redesigned .research-item {
    gap: 10px;
  }
  
  .redesigned .research-circle {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .redesigned .research-heading {
    font-size: 1.2rem;
  }
  
  .redesigned .research-text {
    font-size: 0.95rem;
  }

  .svg-separator-container {
    width: 70%;
    margin: 1.5rem auto;
  }
}

@media (max-width: 480px) {
  .redesigned .center-heading {
    font-size: 2rem;
  }
  
  /* Research Focus Section */
  .research-focus-container {
    padding: 0;
    gap: 0;
    margin-left: 0;
    margin-right: 0;
    border: none;
  }
  
  .redesigned .research-focus-left {
    min-height: 100px;
    border: none;
  }
  
  
  .redesigned .research-focus-right {
    gap: 25px;
    padding: 0px;
    border: none;
  }
  
  .redesigned .research-heading {
    font-size: 1.1rem;
  }
  
  .redesigned .research-text {
    font-size: 0.9rem;
  }
}

