/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: var(--light-grey);
}

:root {
  --white: #f9f9f9;
  --light-grey: #555;
  --black: #000;
  --yellow: #ffd700;
}

body {
  font-family: "Lato", sans-serif;
  background-color: var(--white);
}

/* Global H2 Styling */
h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  text-align: center;
  margin: 2rem 0;
}

/* Navbar */
.navbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  background: transparent;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 2rem;
  z-index: 10;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.navbar a {
  text-decoration: none;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: lighter;
  transition: color 0.3s;
}

.navbar a:hover {
  color: var(--yellow);
}

h2 {
  font-size: 2.5rem;
  font-weight: bolder;
}
/* Section 1 */
#section-1 {
  height: 100vh;
  background-image: url("global_warming.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Section 1 Heading Styles */
.rename-h1,
.gw-h1 {
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1rem;
  position: relative;
}

.rename-h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  background: linear-gradient(
    to right,
    #ffd700,
    #ff9900
  ); /* Gradient yellow to orange */
  -webkit-text-stroke: 2px #000;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gw-h1 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #f9f9f9;
  transform: rotateX(5deg); /* Slight warp effect */
  margin-top: -1rem;
}

/* Form Layout */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  gap: 0.5rem;
  justify-content: center;
}

#input-field {
  padding: 0.75rem;
  border: 2px solid var(--white);
  border-radius: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

#sub-button {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  background-color: var(--yellow);
  color: var(--black);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

#sub-button:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Section 2 */
#section-2 {
  padding: 2rem 1rem;
  text-align: left;
  background-color: var(--white);
  font-size: 1rem;
}

.content-wrapper {
  max-width: 100%;
  margin: 0 auto;
  font-size: 1rem;
}

#section-2 h2 {
  margin-bottom: 2rem;
}

/* Section 3 */
#story-header {
  text-align: center;
  margin-bottom: 2rem;
}

#section-3 {
  padding: 2rem 1rem;
  background-color: var(--white);
}

.case-carousel {
  position: relative;
  overflow: hidden;
}

.case-button {
  background-color: var(--yellow);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: bold;
  transition: background-color 0.3s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  width: 42.5px;
  height: 158.5px;
  z-index: 100;
}

.case-button:hover {
  background-color: var(--black);
  color: var(--yellow);
}

.case-left {
  left: calc(50% - 500px - 45px);
  top: calc(50% - 100px);
  transform: translateY(-50%) rotate(90deg);
}

.case-right {
  right: calc(50% - 500px - 45px);
  top: calc(50% - 100px);
  transform: translateY(-50%) rotate(90deg);
}

/* Case button text rotation */
.case-left::before {
  content: "<";
  transform: rotate(-90deg);
  display: inline-block;
  font-size: 1.25rem;
}

.case-right::before {
  content: ">";
  transform: rotate(-90deg);
  display: inline-block;
  font-size: 1.25rem;
}

#carousel-cases {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

#carousel-cases figure {
  min-width: 100%;
  object-fit: cover;
  flex: 0 0 100%;
}


.carousel-images {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%; /* Making sure images use the full width */
}

.carousel-images img {
  width: 100%; /* Ensuring each image fills its space */
  max-height: 400px; /* Adjusting max height */
  object-fit: cover; /* Filling without distortion */
  flex: 0 0 100%; /* Each image should take up exactly 100% of the container */
}

.carousel-button {
  background-color: var(--yellow);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: bold;
  transition: background-color 0.3s;
  z-index: 100;
  position: absolute;
  left: 50%;
  width: 50px;
  height: 60px;
  transform: rotate(90deg);
}

.carousel-button:hover {
  background-color: var(--black);
  color: var(--yellow);
}

.story-description {
  margin-top: 3rem;
  text-align: left;
  width: 70%;
  margin: 1rem auto;
}

.story-description p {
  font-size: 1.2rem;
  color: var(--black);
}

.story-headline {
  font-weight: bold;
  color: var(--black);
  text-decoration: none;
}

#case-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  max-width: 1000px;
  overflow: hidden;
}

.case-item {
  flex: 0 0 100%;
  transition: transform 0.5s ease-in-out;
}

/* Section 4 */
#section-4 {
  background-color: var(--white);
  text-align: center;
  padding: 2rem 2rem;
  margin-top: -2rem; /* Negative margin to overlap slightly with Section 3 */
  text-align: center;
}

#add-story {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  background-color: var(--yellow);
  color: var(--black);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#add-story:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Share My Story Section */
#share-story-section {
  display: none; /* Hidden by default */
  padding: 2rem 1rem;
  background-color: var(--white);
  text-align: center;
}

#content-wrapper-share-story {
  max-width: 600px;
  margin: 0 auto;
}

#story-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

#story-form button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--yellow);
  color: var(--black);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#share-story-section textarea {
  width: 100%;
  height: 150px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  resize: vertical;
  font-size: 1rem;
}

#share-story-section input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

#share-story-section button:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Section 5 */
#section-5 {
  padding: 4rem 2rem;
  background-color: var(--white);
  text-align: center;
  margin-top: 4rem;
}

/* Background for Section 5 */
#section-5 {
  position: relative;
  background-image: url("cases_photos/spain3.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
}

#section-5::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  opacity: 0.8; /* Opacity for the overlay */
  z-index: 0; /* Placing the overlay behind content */
}

#section-5 .content-wrapper {
  position: relative;
  z-index: 1; /* Ensuring content is above the overlay */
}

#name-of-the-day {
  margin: 1.5rem 0;
  font-size: 10rem;
  font-weight: bold;
  font-family: "Oswald", sans-serif;
}

#return-to-section1 {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  background-color: var(--yellow);
  color: var(--black);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

#return-to-section1:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Footer */
footer {
  background-color: var(--black);
  padding: 3rem;
  text-align: center;
  color: var(--white);
}

footer h2 {
  color: var(--white);
  margin-bottom: 3rem;
}

footer .profile {
  color: var(--white);
}

#credentials,
.description,
.copyright {
  color: var(--white);
}

#credentials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.profile {
  text-align: center;
}

.profile img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  object-fit: cover;
}
.profile p {
  color: var(--yellow);
}
.description {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Developer Team Section */
#footer h2 {
  margin-bottom: 3rem;
}

.copyright {
  margin-top: 4rem;
  font-weight: lighter;
  font-size: 0.7rem;
}
.said-img {
  object-fit: cover;
}

/* Counter box */
#counter-box {
  display: inline-block;
  background: #ff5722;
  color: white;
  padding: 5px 10px;
  border-radius: 12px;
  font-weight: bold;
  margin-left: 10px;
}

/* General button styles - case buttons only */
.case-button {
  background-color: var(--yellow);
  border: none;
  padding: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: bold;
  transition: background-color 0.3s;
  z-index: 1000;
  position: absolute;
  width: 158.5px;
  height: 42.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-button:hover {
  background-color: var(--black);
  color: var(--yellow);
}

/* Carousel button positioning */
.carousel-left {
  top: 0;
  transform: translateX(-50%) rotate(90deg);
}

/* Desktop carousel button positioning */
.carousel-right {
  bottom: 0;
  transform: translateX(-50%) rotate(90deg);
}

/* Carousel container styles */
.carousel-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  height: 400px;
  padding: 0;
}

.carousel-images {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  height: 100%;
}

.carousel-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 0 0 100%;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Clean mobile carousel layout */
  .carousel-container {
    height: 300px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  
  /* Mobile carousel buttons - wider than tall */
  .carousel-container .carousel-button {
    width: 60px;
    height: 40px;
    font-size: 1rem;
    padding: 0;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 50%;
    margin: 0;
  }
  
  .carousel-container .carousel-button.carousel-left {
    top: 0;
    transform: translateX(-50%) rotate(0deg);
  }
  
  .carousel-container .carousel-button.carousel-right {
    bottom: 0px;
    transform: translateX(-50%) rotate(0deg);
  }
  
  /* Rotate text elements - left points up, right points down */
  .carousel-container .carousel-button.carousel-left {
    font-size: 0;
  }
  
  .carousel-container .carousel-button.carousel-left::after {
    content: "<";
    transform: rotate(90deg);
    display: inline-block;
    font-size: 1rem;
  }
  
  .carousel-container .carousel-button.carousel-right {
    font-size: 0;
  }
  
  .carousel-container .carousel-button.carousel-right::after {
    content: ">";
    transform: rotate(90deg);
    display: inline-block;
    font-size: 1rem;
  }
  
  /* Mobile case buttons - vertical sizing (taller than wide) */
  .case-carousel .case-button {
    width: 42px;
    height: 120px;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
  }
  
  /* Case button text positioning - higher specificity */
  .case-carousel .case-button.case-left::before {
    transform: rotate(0deg) translateX(5px);
    display: inline-block;
    font-size: 1.2rem;
  }
  
  .case-carousel .case-button.case-right::before {
    transform: rotate(0deg) translateX(-3px);
    display: inline-block;
    font-size: 1.2rem;
  }
  
  /* Case button positioning for mobile - on inner borders */
  .case-carousel .case-button.case-left {
    left: calc(50% - 500px);
    top: calc(40% - 100px);
    transform: translateY(-50%) rotate(0deg);
  }
  
  .case-carousel .case-button.case-right {
    right: calc(50% - 500px);
    top: calc(40% - 100px);
    transform: translateY(-50%) rotate(0deg);
  }
}

@media (max-width: 480px) {
  /* Small mobile adjustments */
  .carousel-container {
    height: 250px;
  }
  
  .case-carousel .case-button.case-left {
    left: calc(50% - 50vw);
    top: calc(40% - 80px);
  }
  
  .case-carousel .case-button.case-right {
    right: calc(50% - 50vw);
    top: calc(40% - 80px);
  }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  /* Landscape mobile adjustments */
  .carousel-container {
    height: 200px;
  }
  
  .case-carousel .case-button.case-left,
  .case-carousel .case-button.case-right {
    top: calc(50% - 60px);
  }
}

@media (max-height: 400px) and (orientation: landscape) {
  /* Very short landscape screens */
  .carousel-container {
    height: 150px;
  }
  
  .case-carousel .case-button.case-left,
  .case-carousel .case-button.case-right {
    top: calc(50% - 40px);
  }
}

