/* Remove default body and html margin/padding */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif; /* Ensures consistent font */
}
.nav {
  background-color: #333;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 65px; /* Set fixed height */
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-shadow: 0px 10px 5px rgba(41, 36, 72, 0.418);
}

.nav h1 {
  font-size: 40px;
  color: rgba(240, 240, 240, 0.8);
  font-family: "Roboto Slab", serif;
  padding-left: 30px;
  line-height: 1;           /* Prevents extra vertical spacing */
  margin: 0;                /* Remove default margin */
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;             /* So children align to nav bar height */
}

.nav-links a {
  color: #f2f2f2;
  text-align: center;
  text-decoration: none;
  padding: 17px 25px;
  font-size: 20px;
  font-family: "Tajawal", sans-serif;
  font-weight: 400;
  height: 100%;             /* Match parent height */
  display: flex;
  align-items: center;
}

/* Change the color of links on hover */
.nav a:hover {
  background-color: #ddd;
  color: black;
}

/* Add a color to the active/current link */
.nav a.active {
  background-color: #478316;
  color: white;
}

  /* Header font */

.roboto-slab {
    font-family: "Roboto Slab", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
  }
  
  /* Body font */
  
  .tajawal-light {
    font-family: "Tajawal", sans-serif;
    font-weight: 300;
    font-style: normal;
  }
  
  .tajawal-regular {
    font-family: "Tajawal", sans-serif;
    font-weight: 400;
    font-style: normal;
  }
  
  .tajawal-bold {
    font-family: "Tajawal", sans-serif;
    font-weight: 700;
    font-style: normal;
  }

  h1 {
    font-family: "Roboto Slab";
  }

  h1 span {
    position: relative;
    z-index: 1;
  }
  
  h1 span::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -15px;
    right: -15px;
    background-color: #478316;
    transform: skew(-15deg);
    z-index: -1;
  }

/* Stock Title */
.stock-title {
    text-align: center;
    color: white;
    font-size: 3em;
    margin-top: 90px;
    font-family: "Roboto Slab";
}

.row {
    display: block;
}

/* General reset for the page */
html, body {
    margin: 0;
    padding: 0;
}

/* General Page Styling */
body {
    display: block;
    text-align: center; /* Centers content */
}

p {
    font-family: "Tajawal", sans-serif;
    font-size: 20px;
}

/* Flip Card Container - To hold the cards */
.flip-card-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto; /* Center the container */
}

/* Styling for each card */
.flip-card {
    display: inline-block;
    width: 300px;
    height: 250px;
    margin: 10px; /* Space between cards */
    perspective: 1000px;
    padding-bottom: 50px;
    vertical-align: top; /* Aligns cards properly */
}

/* Flip card inner container */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* Flip card on hover */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Flip card front and back */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.flip-card-front {
    background-color: #195688;
    color: rgba(240, 240, 240, 0.8);
}

.flip-card-front h1 {
    text-align: center;
    padding: 15px;
}

.flip-card-back {
    background-color: #478316;
    color: white;
    transform: rotateY(180deg);
    text-align: left;
    font-size: 22px;
}

/* Ensure top row has 2 cards */
.flip-card:nth-child(1),
.flip-card:nth-child(2) {
    display: inline-block;
    width: 300px;
    height: 250px;
}

/* Ensure bottom row has 3 cards */
.flip-card:nth-child(3),
.flip-card:nth-child(4),
.flip-card:nth-child(5) {
    display: inline-block;
    width: 300px;
    height: 250px;
}

/* Clearfix - Ensures that the bottom row doesn't overlap */
.clearfix {
    clear: both;
}

.request-box {
    position: fixed; /* Stays in place */
    bottom: 40px;
    right: 40px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

.request-box p {
    font-size: 22px;
    font-family: "Tajawal", sans-serif;
}

.request-button {
    background-color: #4EA0FC;
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: "Tajawal", sans-serif;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
}

.request-button:hover {
    background-color: #2b67a3;
}


  footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(221, 221, 221, 0.8);
  }
  
  footer img {
    padding: 10px;
    max-width: 25%;
  }

  @media screen and (max-width: 768px) {
    .nav {
      flex-direction: column;
      height: auto;
      padding-bottom: 10px;
    }
  
    .nav h1 {
      font-size: 32px;
      padding-left: 0;
      padding-top: 10px;
      text-align: center;
    }
  
    .nav-container {
      flex-direction: column;
      align-items: center;
    }
  
    .nav-links {
      flex-wrap: wrap;
      justify-content: center;
      width: 100%;
    }
  
    .nav-links a {
      padding: 12px 15px;
      font-size: 18px;
      height: auto;
    }

    .stock-title {
      font-size: 25px;
    }

    .request-box {
      position: fixed; 
      bottom: 20px;
      right: 20px;
      background: white;
      padding: 10px;
      border-radius: 10px;
      box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
      text-align: center;
      z-index: 1000;
  }

  .request-box p {
    font-size: 18px;
    font-family: "Tajawal", sans-serif;
}

    .flip-card:hover .flip-card-inner {
      transform: none;
    }
  
  
  /* Flip when tapped — only when the flipped class is added (via JS) */
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }

    footer {
      display: flex;
      flex-direction: column;  
      justify-content: center;
      align-items: center;
      padding: 20px;
      background: rgba(221, 221, 221, 0.8);
      text-align: center;
    }
    
    footer img {
      margin-top: 10px;
      max-width: 80%; 
      height: auto;
    }
  }
  