* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  background-color: var(--reyllit-background);
  min-width: 320px; 
}

main {
  padding: 80px 20px 0px 20px;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

/* Updated both grid classes to be shallow for laptops */
.hero-grid, .hero-grid-2 {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  aspect-ratio: 7 / 2.2; 
  max-height: 450px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.336);
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  overflow: hidden;
}

/* Specific background for the first grid if not using <img> tag */
.hero-grid {
  background-image: url('/images/Reyllit_hero_2.webp');
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* Sits behind everything */
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  z-index: 1; /* Ensures text is above absolute image */
  justify-content: center;
  padding: 20px;
}


@media screen and (max-width: 768px) {
  main {
    padding: 75px 5px 0px 5px; 
  }
  
  .hero-grid, .hero-grid-2 {
    grid-template-columns: 1fr; 
    height: clamp(220px, 44vw, 350px);
    aspect-ratio: auto;
    max-height: none; /* Allow clamp to take over on mobile */
    border-radius: 10px;
    background-size: 160%; 
    background-position: 40% center; 
    background-repeat: no-repeat; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
  }
}

/* ABOUT REYLLIT SECTION */
.reyllit {
  margin: 0 auto;
  margin-top: 50px;
  padding: 20px 80px;
  max-width: 1000px;
}

.reyllit h3, .reyllit h1 {
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  color: var(--reyllit-red);
  margin-bottom: 04px;
  text-align: center;
}

.reyllit h6 {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  color: var(--reyllit-grey);
  font-weight: 400;
  margin-bottom: 40px;
  text-align: center;
}

.reyllit p {
  font-size: clamp(0.8rem, 1.4vw, 1.2rem);
  color: var(--reyllit-grey);
  line-height: 1.6;
  text-align: center;
}



@media screen and (max-width: 1200px) {
  .reyllit h6 {
    margin-bottom: 40px;
    font-size: clamp(1.1rem, 2.4vw, 1.1rem);
  }

  .reyllit p {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
  }
}

@media screen and (max-width: 900px) {
  .reyllit {
    padding: 20px 40px;
  }

  .reyllit p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    text-align: left;
  }

  .reyllit h3, .reyllit h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }
}

@media screen and (max-width: 768px) {

  .reyllit {
    margin-top: 20px;
    padding: 10px;
  }

  .reyllit h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: var(--reyllit-red);
    margin-bottom: 5px !important;
  }

  .reyllit p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    color: var(--reyllit-grey);
    line-height: 1.6;
  }

  .reyllit h6 {
    font-size: clamp(1rem, 3.5vw, 1.4rem);
    color: var(--reyllit-grey);
  }
}


@media screen and (max-width: 600px) {

  .reyllit {
    padding: 20px 10px;
  }

}



/* CARDS - DESKTOP DEFAULTS */

.cards {
  margin: 50px auto; 
  padding: 20px;
  display: grid;
  /* Changed from auto to 1fr so columns are equal and fill the max-width */
  grid-template-columns: repeat(2, 1fr); 
  gap: 30px;
  width: 100%;
  max-width: 1200px; /* This keeps the whole group centered on the page */
  margin-bottom: 60px;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 585px; 
  justify-self: center; 
  scroll-margin-top: 400px;
  transition: outline 0.8s ease, box-shadow 0.8s ease, transform 0.8s ease, background-color 0.8s ease;
}


.highlight-flash {
    transition: none !important; 
    
    outline: 3px solid var(--reyllit-red);
    box-shadow: 0 0 20px rgba(227, 24, 55, 0.4);
    transform: scale(1.02);
    z-index: 2;
}

.cards .card:nth-child(5) {
    grid-column: 1 / -1; 
    justify-self: center;
    max-width: 585px;    
    width: 100%;
    margin: 0 auto;      
}

.card-left {
  height: 100%;
  width: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.card-left img {
  height: 60px;
  width: auto;
}

.icon-larger {
  height: 45px !important;
  width: auto;
}

.icon-larger-2 {
  height: 40px !important;
  width: auto;
}

.card-right h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  margin-bottom: 14px;
}

.card-right p {
    font-size: clamp(0.8rem, 1.4vw, 1.2rem);
    color: var(--reyllit-grey);
    line-height: 1.6;
}

@media screen and (max-width: 1200px) {
  .card-right h6 {
    margin-bottom: 40px;
    font-size: clamp(1.1rem, 2.4vw, 1.1rem);
  }

  .card-right p {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
  }
}

@media screen and (max-width: 1100px) {
  .cards {
    grid-template-columns: 1fr; 
    width: 90%; /* Increased from 70% to give cards more room to breathe */
  }

  .cards .card:nth-child(5) {
    grid-column: auto;
    justify-self: center;
    max-width: 585px;
  }

  .card-left {
    height: 100%;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
  }
}

@media screen and (max-width: 1000px) {
  .cards {
    width: 80%;
  }
}

@media screen and (max-width: 900px) {

  .cards {
    width: 90%;
  }

  .card-right p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    text-align: left;
  }

  .card-right h3 {
    font-size: clamp(1rem, 3vw, 1.3rem);
  }
}



@media screen and (max-width: 768px) {

  .cards {
    width: 100%;
  }

  .card-right p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    color: var(--reyllit-grey);
    line-height: 1.6;
  }
}

@media screen and (max-width: 500px) {

  .cards {
    padding: 5px;
    gap: 20px;
    width: 100%;
  }

  .card {
    padding: 20px 10px 20px 20px;
  }

  .card-left {
    min-width: 50px;
  }

  .card-left img {
    height: 50px;
  }

  .icon-larger {
    height: 35px !important;
    width: auto;
  }

  .icon-larger-2 {
    height: 32px !important;
    width: auto;
  }
}

@media screen and (max-width: 600px) {

  .card {
    scroll-margin-top: 200px;
  }
}

@media screen and (max-width: 400px) {

  .cards {
    gap: 20px;
    padding: 4px;
  }

  .card {
    gap: 10px;
    padding: 20px 5px 20px 10px;
  }
}


/* ABOUT REYLLIT UNDER */

.reyllit-under {
    margin: 0 auto;
    margin-top: 50px;
    padding: 20px 80px;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reyllit-under p {
    font-size: clamp(0.8rem, 1.4vw, 1.2rem);
    color: var(--reyllit-grey);
    line-height: 1.6;
}

.reyllit-under a {
  text-decoration: none !important;
  background-color: var(--reyllit-red);
  color: white;
  width: 300px;
  text-align: center;
  padding: 6px 0;
  border-radius: 5px;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  margin-top: 20px;
  margin-bottom: 50px;
}

.reyllit-under a:hover {
    background-color: var(--reyllit-dark-red);
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reyllit-under h1, .reyllit-under h4 {
    font-size: clamp(1rem, 3.5vw, 1.4rem);
    color: var(--reyllit-red);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 40px;
}

@media screen and (max-width: 1200px) {
  .reyllit-under h4 {
    margin-bottom: 40px;
    font-size: clamp(1.1rem, 2.4vw, 1.1rem);
  }

  .reyllit-under p {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
  }
}

@media screen and (max-width: 900px) {
  .reyllit-under {
    padding: 20px 40px;
  }

  .reyllit-under p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    text-align: left;
  }

  .reyllit-under h3 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }
}

@media screen and (max-width: 768px) {

  .reyllit {
    margin-top: 20px;
    padding: 10px;
  }

  .reyllit h3 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: var(--reyllit-red);
  }

  .reyllit p {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    color: var(--reyllit-grey);
    line-height: 1.6;
  }

  .reyllit h1, .reyllit h4 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    color: var(--reyllit-red);
    margin-bottom: 40px;
  }
}

@media screen and (max-width: 500px) {

  .reyllit-under p{
    text-align: center !important;
  }

  .reyllit-under {
    margin-top: 20px;
    padding: 0px;
  }

}

/* for contact p */

.reyllit-under .contact-p {
    margin-bottom: 20px;
}