/* 
 * About me section
 */
#about-me-grid {
  display: flex;
  gap: var(--padding);
  align-items: stretch;
}

/* 1. The Container (The Frame) */
#about-me-grid > picture {
  flex: 1;
  display: block; /* Important: picture is inline by default */
  border-radius: var(--round-borders);
  overflow: hidden; /* Ensures the image doesn't spill out when zoomed */
  
  /* Optional: Ensures the frame takes up vertical space */
  min-height: 100%; 
}

/* 2. The Image (The Content) */
#about-me-grid > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Removes bottom ghost space */
  transition: transform 0.3s ease;
}

#about-me-grid > div {
  flex: 3;
}

/* 
 * Hover effect 
 * We hover the picture (frame), but transform the img (content)
 */
#about-me-grid > picture:hover img {
  transform: scale(1.2) rotate(4deg);
}

/* Mobile Layout */
@media (max-width: 800px) {
  #about-me-grid {
    flex-direction: column; 
    gap: 0;
  }
  
  #about-me-grid > picture {
    width: 100%;
    /* Reset height to auto so the mobile image determines the aspect ratio */
    height: auto; 
    min-height: 0;
  }
}

/* Abbreviation styling */
#about-me-grid abbr {
  cursor: help;
  border-bottom: 1px dotted;
}



/* Welcomve to the site buttons */
.welcome-to-the-site-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 800px) {
  .welcome-to-the-site-buttons {
    justify-content: center;
  }
}

/* Welcome section */
#welcome-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

#leyley_logo {
  margin: var(--margin);
  transition: transform 0.1s ease-in-out;
}

#leyley_logo:hover {
  animation: vibrate 0.1s infinite alternate;
  cursor: pointer;
}

@keyframes vibrate {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

#leyley_logo:active {
  transform: rotate(5deg);
  animation: jump 0.5s ease-in-out;
}

@keyframes jump {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-50px);
  }
}









/* ------------------------------------------------------------------------- */
/* RSS FEED from TELEGRAM */
/* ------------------------------------------------------------------------- */
#telegram-feed {
  display: flex;
  flex-direction: column;
  gap: var(--padding)
}

.post {
  display: flex;
  flex-direction: column;
  gap: var(--margin);
  
  border: 2px dotted #00000073;
  border-radius: var(--round-borders);
  padding: 15px;
  background: #00000014;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  
  overflow: hidden;
}

.post-date {
  color: #888;
  font-size: 0.85em;
}

.post-title {
  font-weight: bold;
  font-size: 1.2em;
  white-space: nowrap;
}

a:has(div.watch-in-tg) {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  font-size: 1.2em;
  font-weight: bold;
}

.post-content img {
  max-width: 100%; /* Чтобы картинки из телеграма не вылезали */
  height: auto;
  border-radius: var(--round-borders);
}

.post-content video {
  width: 100%;
  height: auto;
  border-radius: var(--round-borders);
}


.message_media_not_supported,
.post-content > blockquote,
.post-content > hr {
  display: none;
}

button#tg-load-more-btn {
  cursor: pointer;
  display: block;
  font-size: 2em;
  
  padding: var(--padding);
  border-radius: var(--round-borders);
  background-color: var(--background-color);
  border: 2px solid var(--text-color);
  color: var(--text-color);
  margin: var(--margin) auto;
  
}


/* Youtube Video */
.video-facade {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background-color: var(--background-color);
  cursor: pointer;
  overflow: hidden;

  border-radius: var(--round-borders);
}

.video-facade img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.video-facade:hover img {
  opacity: 0.9;
}

/* The Fake Play Button */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background-color: rgba(33, 33, 33, 0.8);
  border-radius: 12px;
  z-index: 2;
  transition: background-color 0.2s;
}

.video-facade:hover .play-button {
  background-color: #f00; /* YouTube Red on hover */
}

.play-button::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

/* Ensure the iframe fills the container when loaded */
.video-facade iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* The Title Text */
.video-title {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; 
  box-sizing: border-box;
  padding: 20px;
  
  /* Typography */
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 0 2px rgba(0,0,0,0.5); /* Slight shadow for crispness */
  
  /* The "Scrim" - Gradient background for readability */
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  
  /* Handle long titles */
  white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis;
  
  z-index: 3; /* Sit on top of image and play button */
  pointer-events: none; /* Clicks pass through to the container to start video */
}