/* docs/en/assets/stylesheets/custom.css */

/* --- Custom Brand Colors (from previous step) --- */
:root {
    --md-primary-fg-color:        #820AD1;
    --md-primary-fg-color--light: #A549E5;
    --md-primary-fg-color--dark:  #6A08AA;
    --md-typeset-table-color:     #E0C2FF;
    
    /* --- Enlarge Header for bigger logo --- */
    --md-header-height: 4.5rem;
  }
  
  .md-input:focus {
    border-color: #A54AE5 !important;
  }
  
  /* --- Change sidebar navigation link hover color to brand purple --- */
  .md-nav__link:hover {
    color: #820AD1 !important; /* Your primary brand purple */
  }
  
  /* --- Enlarge the logo in the header --- */
  .md-header__button.md-logo img {
    height: 2.5rem; /* Adjust this value to your liking */
    width: auto;    /* Maintain aspect ratio */
  }

  /* --- Footer Customizations --- */
.md-footer-meta__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.md-footer-logo img {
  height: 2rem; /* Adjust the logo height as needed */
  width: auto;
  opacity: 0.8;
  transition: opacity 0.25s;
}

.md-footer-logo img:hover {
  opacity: 1;
}
/* --- App Store Download Cards --- */

.app-store-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 2em;
}

.app-store-card {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  text-align: center;
  
  /* 1. Set the initial grey border */
  border: 1px solid #ddd;
  
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease-in-out;

  /* 2. Prepare the card for the animation */
  position: relative; /* This is crucial for positioning the pseudo-element */
  overflow: hidden;   /* This hides the purple border until it slides in */
  z-index: 1;         /* Ensures card content is on top */
}

/* 3. Create the animated purple border element */
.app-store-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* Create a "border" inside this element using a shadow */
  box-shadow: inset 0 0 0 2px #820AD1;
  
  border-radius: 12px; /* Must match the parent's border-radius */
  
  /* Start with the element completely off-screen to the left */
  transform: scaleX(0);
  transform-origin: left; /* Animation starts from the left */
  
  /* Set the animation speed */
  transition: transform 0.5s ease-in-out;
  
  z-index: -1; /* Place it behind the card's content */
}

/* 4. The hover effect for both the card and the border */
.app-store-card:hover {
  /* The lifting shadow effect from before */
  box-shadow: 0 6px 12px rgba(130, 10, 209, 0.4);
  transform: translateY(-5px);
}

.app-store-card:hover::before {
  transform: scaleX(1);
}

.app-store-card h2 {
  margin-top: 0.2em;
  margin-bottom: 0.5em;
}

/* --- Final Verified Blog Card Styles --- */

.blog-card {
  display: flex;
  flex-direction: column; /* Stack image and content vertically */
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: all 0.3s ease-out;
  text-decoration: none;
  color: var(--md-default-fg-color);
  border: 1px solid #E0E0E0;
  overflow: hidden; /* Hide overflowing parts of the image */
  background-color: var(--md-default-bg-color);
}

.blog-card:hover {
  box-shadow: 0 8px 20px rgba(130, 10, 209, 0.2);
  transform: translateY(-6px);
  text-decoration: none;
  border-color: #820AD1;
}

/* Styles for the image part of the card */
.blog-card--with-image .md-post__image-container {
  height: 220px; /* Fixed height for the image */
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Use the CSS variable from the template */
  background-image: var(--background-image-url);
}

/* The content wrapper inside the card */
.blog-card .md-post__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allow content to fill remaining space */
}

/* Header with Avatar and Author Name */
.blog-card .md-post__header--card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.md-post__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.md-post__author {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Title styles */
.blog-card .md-post__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--md-primary-fg-color);
  flex-grow: 1; /* Push the footer meta down */
}

/* Snippet styles */
.blog-card .md-post__excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1.5rem;
}

/* --- THIS IS THE UPDATED SECTION --- */
/* Footer meta for categories and readtime */
.blog-card .md-post__meta--card-footer {
  /* Set the BASE size for the whole line (for the 'readtime') */
  font-size: 0.8rem;
  color: var(--md-meta-color);
  margin-top: auto; /* Push to the bottom of the card */
}

/* Target ONLY the date and the category span to make them larger */
.blog-card .md-post__meta--card-footer time,
.blog-card .md-post__meta--card-footer span:first-of-type {
  font-size: 0.95rem; /* Make them larger than the base size */
  font-weight: 500;   /* Make them slightly bolder for emphasis */
}
/* --- END OF UPDATED SECTION --- */

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .blog-card {
  border-color: #444;
}
[data-md-color-scheme="slate"] .blog-card .md-post__meta--card-footer {
  color: #aaa;
}
[data-md-color-scheme="slate"] .blog-card .md-post__excerpt {
  color: #ccc;
}