@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    font-family: 'Sarabun', sans-serif;
    margin: auto;
    padding: 30px 24px;
    text-align: left;
    background-color: #121212;
    color: #b3b3b3; 
    max-width: 1000px;
}

.desktop {
    display: block;
}

.mobile {
    display: none;
}

a {
    color: #b3b3b3;
    text-decoration: none;
}

a:hover {
    color: hsl(var(--accent));
}


h2 {
    font-size: 1.5em;
    text-align: left;
}

#title-container {
    display: flex;
    text-align: left;
    flex-direction: column;
    margin-block: 45px px;
}

#title-container h1 {
    font-size: 2.0em;
    margin-block: 4px;
}

#content-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0 20px;
    margin: 0 auto;
    overflow-x: auto;
}

main section {
    width: 25%; 
    box-sizing: border-box; 
    text-align: start;
}

main p {
    font-size: 18px;
    margin-block: 30px 35px;
    height: 120px;
}

main h3 {
    font-size: 20px;
    margin-block: 20px 30px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.image-container {
    overflow: hidden;
    border-radius: 5px;
    height: 350px;
}

.image-container img {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
}

.link {
    transition: transform 0.3s ease; /* Smooth transition for the transformation */
    position: relative; /* Needed for z-index to work properly */
}

.link:hover {
    transform: scale(1.1); /* Scales the content inside the anchor tag */
    z-index: 10; /* Brings the hovered item to the front */
}

.custom-gif-size {
    max-width: 350px;
    align-self: center;
}

.custom-img-size {
    max-width: none;
    width: 150px;
    height: 60px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.custom-img-size:hover {
    transform: scale(1.1);
    opacity: 1;
}

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

    .desktop {
        display: none;
    }

    .mobile {
        display: block;
    }

    #title-container {
        margin-block: 10px 10px ;
    }

    #title-container h1 {
        font-size: 1.0em;
    }

    #content-container {
        flex-direction: column;
        align-items: center;
    }

    main section {
        width: 100%;
    }

    .image-container {
        height: 200px;
    }

    main img {
        max-width: 100%;
        height: auto;
    }
    
    h2, #title-container h1, main h3 {
        font-size: 1.2em; /* Larger font size for better readability on mobile */
    }

    main p {
        font-size: 20px; /* Slightly larger paragraph font size */
        height: auto;
    }
}

/* Medium */
@media screen and (min-width: 601px) and (max-width: 900px) {

    .desktop {
        display: none;
    }

    .mobile {
        display: block;
    }

    #title-container {
        margin-block: 30px 30px ;
    }
    
    #content-container {
        flex-direction: row;
        flex-wrap: wrap; /* Allow wrapping for medium screens */
        align-items: center;
    }

    main section {
        width: 70%; /* Adjust for medium screens */
    }

    main h3 {
        margin-block: 20px; 
        font-size: 1.2em; /* Larger font size for better readability on medium screens */
    }

    main p {
        font-size: 14px;
        margin-block: 30px 30px;
    }

}

@layer base {
    :root {
      --background: 0 0% 8%;
      --foreground: 0 0% 85%;
  
      --card: 0 0% 100%;
      --card-foreground: 222.2 84% 4.9%;
   
      /* Off White */
      --popover: 0 0% 85%;
      --popover-foreground: 0 0% 12%;
   
      /* Off Black */
      --primary: 0 0% 8%; 
      --primary-foreground: 0 0% 85%;
   
      /* Off White */
      --secondary: 0 0% 85%;
      --secondary-foreground: 0 0% 12%;
  
      --muted: 210 40% 96.1%;
      --muted-foreground: 215.4 16.3% 46.9%;
   
      /* Yellow */
      --accent: 197 100% 40%; 
      --accent-foreground: 0 0% 12%;
  
      /* Purple */
      --accent2: 220 100% 80%;
      --accent2-foreground: 0 0% 85%;
  
      /* Red */
      --destructive: 0 100% 30%;
      --destructive-foreground: 0 100% 43%;
  
      --border: 0 0% 50%;
      --input: 0 0% 50%;
      --ring: 222.2 84% 4.9%;
   
      --radius: 0.5rem;
    }
   
    .dark {
      --background: 222.2 84% 4.9%;
      --foreground: 210 40% 98%;
   
      --card: 222.2 84% 4.9%;
      --card-foreground: 210 40% 98%;
   
      --popover: 222.2 84% 4.9%;
      --popover-foreground: 210 40% 98%;
   
      --primary: 210 40% 98%;
      --primary-foreground: 222.2 47.4% 11.2%;
   
      --secondary: 217.2 32.6% 17.5%;
      --secondary-foreground: 210 40% 98%;
   
      --muted: 217.2 32.6% 17.5%;
      --muted-foreground: 215 20.2% 65.1%;
   
      --accent: 217.2 32.6% 17.5%;
      --accent-foreground: 210 40% 98%;
   
      --destructive: 0 62.8% 30.6%;
      --destructive-foreground: 210 40% 98%;
   
      --border: 217.2 32.6% 17.5%;
      --input: 217.2 32.6% 17.5%;
      --ring: 212.7 26.8% 83.9%;
    }
  }
   
  @layer base {
    * {
      @apply border-border;
    }
    body {
      @apply bg-background text-foreground;
    }
  }