html, body {
  height: 100%; /* Ensure both html and body take the full viewport height */
  margin: 0;   /* Remove any default browser margins */
  padding: 0;  /* Remove any default browser padding */
  overflow: hidden; /* Crucial: Prevents both horizontal and vertical scrolling on the entire page */
}

@font-face{
  font-family: MyanmarKhyay;
  src: url(assets/MyanmarKhyay.ttf);
}

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

:root {
  /* Colors */
  --primary-color: #e32811;
  --secondary-color: #ffe5d5;
  --star-color: #ffa600;

  /* Font sizes */
  --fs-xxl: clamp(2.8rem, 9vw, 6rem); /* Adjusted for better control */
  --fs-xl: 3rem;
  --fs-lg: 2rem;
  --fs-md: 1.5rem;
  --fs-sm: 1.25rem;

  /* Spacing */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 2rem;
}

button{
  font-family: "Smooch Sans", sans-serif;
}

body{
  font-family: "Smooch Sans", sans-serif;
  background-color: var(--secondary-color);
}

main{
  padding: var(--space-lg) var(--space-xl);
  position: relative;
  height: 100vh; /* Set main to exactly 100% of the viewport height */
  display: flex;
  flex-direction: column; /* Stacks header, description, hero, and footer */
  overflow: hidden; /* Ensure nothing within 'main' itself causes overflow */
}

.heading{
  font-size: var(--fs-xxl);
  font-family: "MyanmarKhyay", sans-serif;
}

.description{
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-top: var(--space-sm);
}

.description span{
  font-size: var(--fs-xl);
}

.heading,
.description{
  text-align: center;
  color: var(--primary-color);
}

/* Hero Image */
.hero-img-container{
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
}

.hero-img{
  display: block;
  width: 100%;
  height: auto;
  transform-origin: bottom;
  clip-path: circle(43.2% at 50% 80%);
}

.mask{
  position: absolute;
  inset: 0;
  clip-path: circle(43.2% at 50% 80%);
  transform-origin: bottom;
  width: 100%;
  height: 100%;
}

/* --- MODIFIED ORDER BUTTON STYLES START --- */
.order-btn{
  position: absolute;
  top: 50%; /* Base: Moved down to be roughly in the middle of the screen */
  right: 15%; /* Base: Moved in from the right edge, percentage relative to 'main' */
  border: 0;
  background-color: var(--primary-color);
  color: white;
  width: 100px; /* Reduced base size */
  height: 100px; /* Reduced base size */
  border-radius: 50%;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem; /* Adjusted font size for smaller button */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-50%); /* Only vertical centering now */
  transition: width 200ms ease-in-out, height 200ms ease-in-out, transform 150ms;
  z-index: 10;
}

.order-btn-icon{
  width: 1.25rem; /* Adjusted icon size for smaller button */
  height: 0;
  overflow: hidden;
  transition: height 200ms ease-in-out;
}

.order-btn:hover,
.order-btn.hovering{
  width: 130px; /* Reduced hover size */
  height: 130px; /* Reduced hover size */
}

.order-btn:hover .order-btn-icon,
.order-btn.hovering .order-btn-icon{
  height: 1.25rem; /* Match icon size for hover state */
}
/* --- MODIFIED ORDER BUTTON STYLES END --- */

.footer{
  flex-grow: 1; /* Pushes the footer to the bottom when main is flex-column */
  display: flex;
  justify-content: space-between; /* Spacing between review and socials/contact */
  align-items: end; /* Aligns content to the bottom of the footer */
  padding: var(--space-lg) var(--space-xl); /* Default padding for footer */
  margin-top: auto; /* Pushes footer to the bottom of the main flex container */
}

/* Review */

.review-container{
  width: 24rem;
  position: relative; /* Keep this for internal absolute elements like review-btns */
}

.review-content{
  font-size: var(--fs-md);
  margin-bottom: var(--space-sm);
}

.reviewer{
  font-size: var(--fs-sm);
  font-weight: 600;
  display: inline-block;
}

.review-btns{
  position: absolute; /* Default for desktop, relative to review-container */
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.review-btn{
  background-color: transparent;
  border: 0;
  font-size: var(--fs-lg);
  cursor: pointer;
  padding: 0 var(--space-xs);
  line-height: 70%;
  opacity: 0.7;
}

/* Animation */

.review.exit{
  opacity: 0;
  transition: opacity 200ms ease;
}

.review-content,
.reviewer{
  opacity: 0;
  transform: translateX(-20px);
  animation: slideFadeIn 600ms ease forwards;
}

.review-content{
  animation-delay: 200ms;
}

.reviewer{
  animation-delay: 400ms;
}

.review-star{
  opacity: 0;
  animation: fadeIn 500ms ease forwards;
}

.review-star.faded{
  opacity: 0;
  animation: fadeInFaded 500ms ease forwards;
}

.review-star:nth-child(1){
  animation-delay: 0.1s;
}

.review-star:nth-child(2){
  animation-delay: 0.2s;
}

.review-star:nth-child(3){
  animation-delay: 0.3s;
}

.review-star:nth-child(4){
  animation-delay: 0.4s;
}

.review-star:nth-child(5){
  animation-delay: 0.5s;
}

@keyframes fadeIn{
  to {
    opacity: 1;
  }
}

@keyframes fadeInFaded{
  to {
    opacity: 0.3;
  }
}

@keyframes slideFadeIn {
  to {
    opacity: 1;
    transform: translateX(0)
  }
}

.socials{
  display: flex;
  justify-content: end; /* For desktop, align right */
  gap: var(--space-xxs);
  margin-bottom: var(--space-xxs);
}

.socials a {
  opacity: 0.7;
}

.socials a:hover{
  opacity: 1;
}

.contact-link{
  display: block;
  text-align: right; /* For desktop, align right */
  text-decoration: none;
  color: var(--primary-color);
  font-size: var(--fs-md);
}

.contact-link:hover{
  text-decoration: underline;
}

/* === Media Queries === */

/* Tablets and small laptops (e.g., 768px and up) */
@media (min-width: 768px) {
  main {
    padding: var(--space-xl) var(--space-xxl);
  }

  .description {
    font-size: var(--fs-xl);
  }

  .description span {
    font-size: 3.5rem;
  }

  .hero-img-container {
    max-width: 600px;
  }

  /* --- MODIFIED ORDER BUTTON STYLES WITHIN MEDIA QUERY START --- */
  .order-btn {
    top: 40%; /* Adjusted for tablet/laptop vertical position */
    right: 15%; /* Adjusted for tablet/laptop horizontal position */
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    font-size: var(--fs-md);
  }

  .order-btn:hover,
  .order-btn.hovering{
    width: 180px;
    height: 180px;
  }

  .order-btn-icon{
    width: 1.75rem;
  }
  .order-btn:hover .order-btn-icon,
  .order-btn.hovering .order-btn-icon{
    height: 1.75rem;
  }
  /* --- MODIFIED ORDER BUTTON STYLES WITHIN MEDIA QUERY END --- */

  .footer {
    flex-direction: row; /* Ensure row direction for horizontal layout */
    justify-content: space-between;
    align-items: end;
    text-align: left;
    margin-top: auto; /* Keeps it pushed to bottom */
    padding: var(--space-lg) 0; /* Updated: Remove left/right padding for sticking to edges */
  }

  .review-container {
    margin-left: 0;
    margin-right: 0;
    position: relative; /* Ensure it's relative for its internal absolute child (.review-btns) */
  }

  .review-btns {
    position: absolute;
    right: 0;
    bottom: 0;
    justify-content: flex-end;
    margin-top: 0;
  }

  .socials {
    justify-content: flex-end;
    gap: var(--space-xxs);
  }

  .contact-link {
    text-align: right;
  }
}

/* Large Laptops and Desktops (e.g., 1024px and up) */
@media (min-width: 1024px) {
  .hero-img-container {
    max-width: 700px;
  }

  .order-btn {
    right: 20%; /* Keep consistent positioning relative to viewport */
  }
}

/* Specific adjustment for very small screens (e.g., up to 480px) */
@media (max-width: 480px) {
  .description {
    font-size: var(--fs-md);
  }
  .description span {
    font-size: var(--fs-lg);
  }

  /* --- MODIFIED ORDER BUTTON STYLES WITHIN SMALL SCREEN MEDIA QUERY START --- */
  .order-btn {
    width: 90px;
    height: 90px;
    font-size: 0.9rem;
    top: 45%; /* Adjusted for very small screen vertical position */
    right: 10%; /* Adjusted for very small screen horizontal position */
    transform: translateY(-50%);
  }
  .order-btn:hover,
  .order-btn.hovering{
    width: 110px;
    height: 110px;
  }
  .order-btn-icon {
    width: 1rem;
  }
  .order-btn:hover .order-btn-icon,
  .order-btn.hovering .order-btn-icon{
    height: 1rem;
  }
  /* --- MODIFIED ORDER BUTTON STYLES WITHIN SMALL SCREEN MEDIA QUERY END --- */

  /* --- FOOTER & REVIEW SECTION MOBILE REORDERING START --- */
  .footer {
    flex-grow: 0; /* Footer should not take up all remaining space on mobile */
    flex-direction: column; /* Stack children vertically */
    justify-content: center; /* Center the two main blocks vertically */
    align-items: center; /* Horizontally center content */
    text-align: center; /* Fallback for text alignment */
    gap: var(--space-xl); /* Increased gap between review and socials/contact for mobile */
    padding-bottom: var(--space-md);
    margin-top: var(--space-xl);
  }

  /* Order of main footer children */
  .footer > div:nth-child(1) { /* This targets the .review-container */
    order: -1; /* Make review-container appear first */
  }

  .footer > div:nth-child(2) { /* This targets the div containing socials and contact-link */
    order: 0; /* Make socials/contact appear second */
  }

  .review-container {
    width: 90%;             /* Control width on small screens */
    max-width: 24rem;       /* Keep your max-width */
    margin: var(--space-lg) auto var(--space-md) auto; /* Add vertical margin, center horizontally */
    text-align: center;     /* Center text content inside review-container */

    position: static;       /* Crucial: Ensure it's static for normal flow */
    top: auto;              /* Remove absolute positioning properties */
    left: auto;
    transform: none;
    z-index: auto;

    /* Make review-container a flex container to reorder its children (stars, text, buttons) */
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally within this flex container */
  }

  /* Apply flex 'order' to children of .review-container to ensure buttons are under text */
  /* This targets the actual stars, assuming they are directly within review-container or a flex wrapper */
  .review-container .review-star,
  .review-container .review-star:nth-child(1),
  .review-container .review-star:nth-child(2),
  .review-container .review-star:nth-child(3),
  .review-container .review-star:nth-child(4),
  .review-container .review-star:nth-child(5) {
    order: 1; /* Place stars first */
  }

  .review-content {
    text-align: center;
    order: 2; /* Place review content second */
  }

  .reviewer {
    text-align: center;
    order: 3; /* Place reviewer third */
  }

  .review-btns {
    position: static; /* Keep static so flex ordering works */
    right: auto;
    bottom: auto;
    justify-content: center;
    margin-top: var(--space-md);
    order: 4; /* Place buttons last within the review-container */
  }

  .socials {
    justify-content: center; /* Ensure social icons are centered on mobile */
    /* Removed explicit order here as it's handled by .footer > div:nth-child(2) */
  }

  .contact-link {
    text-align: center;     /* Ensure contact link is centered on mobile */
    /* Removed explicit order here as it's handled by .footer > div:nth-child(2) */
  }
  /* --- FOOTER & REVIEW SECTION MOBILE REORDERING END --- */
}