:root {
  --color-primary: #31c5f0;
  --color-primary-dark: #24a8b4;
  --color-secondary: #67c6a3;
  --color-accent: #597dc2;
  /* --color-background: #f2f2f2; */ /* Removed background color variable */
  --color-surface: #1f273f;
  --color-text: #1d1f23;
  --title-font: "TitleFont", sans-serif;
  --body-font: "BodyFont", sans-serif;
}

@font-face {
  font-family: "TitleFont";
  src: url("fonts/Title.ttf") format("truetype");
}
@font-face {
  font-family: "BodyFont";
  src: url("fonts/Body.ttf") format("truetype");
}

body {
  font-family: var(--body-font), sans-serif;
  margin: 0; /* Removed top/bottom margin */
  background-color: transparent; /* Make body background transparent */
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* Ensure full viewport height */
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr; /* Single column for small screens */
  gap: 10px; /* Reduced gap between items */
  padding: 20px;
  width: 95%;
  max-width: 600px; /* Slightly narrower max-width for better mobile flow */
  background-color: transparent; /* Keep container transparent */
  border-radius: 0; /* Remove border radius */
  box-shadow: none; /* Remove box shadow */
}

.grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  color: white;
  border-radius: 8px; /* Slightly smaller border radius for links */
  padding: 12px; /* Adjusted padding */
  text-align: center;
}

/* Specific item styling */
.logo-area {
  background-color: transparent;
  color: var(--color-text);
  display: flex;
  justify-content: center;
  margin-bottom: 15px; /* Add some space below the logo */
}

.hero-logo-wrapper {
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.hero-logo {
  width: 80px; /* Further reduced logo size for better balance */
  height: auto;
  object-fit: contain;
  display: block;
}

.title-area {
  background-color: transparent;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 20px; /* Add more space below the title */
  display: flex; /* Arrange title and tagline in a column */
  flex-direction: column;
  align-items: center; /* Center them horizontally */
}

.title-area .hero-title {
  font-family: var(--title-font);
  font-size: 2em; /* Slightly larger title font size */
  letter-spacing: -0.03em;
  margin-bottom: 5px;
  white-space: nowrap; /* Prevent title from wrapping */
}

.title-area .hero-tagline {
  font-size: 1em; /* Slightly adjusted tagline font size */
  opacity: 0.8;
  margin-top: 5px;
  white-space: nowrap; /* Prevent tagline from wrapping */
}

.grid-item.icon {
  display: flex;
  flex-direction: row; /* Keep icons in a row on mobile */
  justify-content: center; /* Center icons horizontally */
  align-items: center; /* Center icons vertically */
  padding: 10px 15px; /* Adjust padding */
  margin-bottom: 8px; /* Add spacing between link boxes */
  text-decoration: none; /* Remove underline */
}

.grid-item.icon > i {
  font-size: 2em; /* Maintain icon size */
  margin-right: 15px; /* Spacing for potential text */
}
.grid-item.icon > i.fab {
  font-size: 2em;
  margin-right: 15px;
}

.grid-item.icon:hover {
  opacity: 0.95;
  transform: scale(1.02);
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.grid-item.icon a {
  color: inherit;
  font-size: inherit;
  text-decoration: none; /* Ensure no underline */
  pointer-events: none;
  display: flex;
  flex-direction: row; /* Align icon and text */
  align-items: center;
}

.grid-item.icon a:hover {
  color: inherit;
  transform: none;
}

/* Specific icon backgrounds */
.grid-item.icon.instagram {
  background-color: #e4405f;
}
.grid-item.icon.facebook {
  background-color: #1877f2;
}
.grid-item.icon.x {
  background-color: #000000; /* Or another X/Twitter color */
}
.grid-item.icon.x > i.fa-brands.fa-x-twitter {
  font-size: 2em;
  font-family: "Font Awesome 6 Brands";
  margin-right: 15px;
}
.grid-item.icon.telegram {
  background-color: #229ed9;
}
.grid-item.icon.threads {
  background-color: #8e64b9;
}
.grid-item.icon.threads > i.fa-brands.fa-threads {
  font-size: 2em;
  font-family: "Font Awesome 6 Brands";
  margin-right: 15px;
}
.grid-item.icon.youtube {
  background-color: #ff0000;
}
.grid-item.icon.tiktok {
  background-color: #000000; /* Or another TikTok color */
}

/* Optimized layout for larger screens */
@media (min-width: 600px) {
  .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto 1fr;
    padding: 40px;
    gap: 20px;
    max-width: 800px; /* Reset max-width for larger screens */
    background-color: transparent; /* Keep container transparent */
    border-radius: 0; /* Remove border radius */
    box-shadow: none; /* Remove box shadow */
  }

  .logo-area {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .hero-logo-wrapper {
    margin: 0 15px 15px 0;
  }

  .hero-logo {
    width: 100px; /* Adjusted logo size on larger screens */
  }

  .title-area {
    grid-column: 2 / 5;
    grid-row: 1 / 3;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    flex-direction: column;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .title-area .hero-title {
    font-size: 2.2em; /* Slightly larger title on larger screens */
  }

  .title-area .hero-tagline {
    font-size: 1em;
  }

  .grid-item.icon {
    flex-direction: row; /* Horizontal layout on larger screens */
    padding: 10px;
    margin-bottom: 0; /* Reset margin */
    text-decoration: none;
  }

  .grid-item.icon > i {
    font-size: 2.2em;
    margin: 0 10px;
  }
  .grid-item.icon > i.fab {
    font-size: 2.2em;
    margin: 0 10px;
  }
  .grid-item.icon.x > i.fa-brands.fa-x-twitter {
    font-size: 2.2em;
    margin: 0 10px;
  }
  .grid-item.icon.threads > i.fa-brands.fa-threads {
    font-size: 2.2em;
    margin: 0 10px;
  }
}
