/* ==========================================================
   File: css/pages.css
   Chứa style dành riêng cho các trang con như Blog, Gallery...
   ========================================================== */

/* ---- Chung cho các trang con ---- */
.page-header {
    padding-top: 10rem; /* Đẩy nội dung xuống dưới header cố định */
    padding-bottom: 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: 4rem; 
    font-weight: 900;
    line-height: 1.2;
}

.page-header p {
    font-size: 1.125rem;
    color: #4B5563; 
    max-width: 600px;
    margin: 1rem auto 0;
}

.page-container {
    max-width: 1280px; 
    margin: 0 auto;
    padding: 1rem;
}

/* ---- Style cho trang BLOG ---- */

/* Bài viết nổi bật (Featured Post) */
.featured-post-card {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .featured-post-card {
        grid-template-columns: repeat(2, 1fr);
    }
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
}

.featured-post-content .category-tag {
    display: inline-block;
    background-color: #f3f4f6;
    color: #1f2937;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-post-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-post-content p {
    color: #4B5563;
    margin-bottom: 2rem;
}

.featured-post-content .cta-button {
    background-color: #111827; 
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.featured-post-content .cta-button:hover {
    background-color: #374151; 
}
/* Tiêu đề cho các bài viết khác */
.latest-posts-title {
    margin-top: 5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d1d5db;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

/* ---- Style cho trang GALLERY ---- */

.gallery-wrapper {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-wrapper #full-gallery-filters {
    padding-bottom: 2rem;
}
/* ==========================================================
   Styles for POST DETAIL PAGE
   ========================================================== */

/* ---- Post Hero Header ---- */
.post-hero {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 5rem;
}

.post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.post-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}

.post-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.post-hero-content p {
    font-size: 1.125rem;
    margin-top: 1rem;
    opacity: 0.9;
}

/* ---- Main Post Layout ---- */
.post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .post-layout {
        /* 3 phần cho nội dung chính, 1 phần cho sidebar */
        grid-template-columns: 3fr 1fr; 
    }
}

/* ---- Post Content Area ---- */
.post-body {
    max-width: 800px; /* Chiều rộng tối ưu cho việc đọc */
    width: 100%;
}

/* Style cho nội dung prose được cải thiện */
.post-body .prose img, .post-body .prose video {
    border-radius: 15px;
    margin-top: 2em;
    margin-bottom: 2em;
}

/* ---- Sidebar ---- */
.post-sidebar {
    position: sticky;
    top: 120px; 
    align-self: start;
}

.author-box {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.author-box .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-box .author-name {
    font-weight: 700;
    font-size: 1.25rem;
}

.author-box .author-bio {
    font-size: 0.9rem;
    color: #4B5563;
    margin-top: 0.5rem;
}

.share-box {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.share-box h3 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.share-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.5rem;
}

/* ---- Related Posts ---- */
.related-posts {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid #d1d5db;
}

.related-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ===== Album media container (video + grid) ===== */
.album-media-wrapper {
  max-width: 1280px;        /* khớp với main container */
  margin: 0 auto 4rem;      /* tách phần dưới một chút */
  padding: 1.5rem;          /* đệm trong container */
  border-radius: 30px;      /* bo góc lớn */
  background: rgba(255,255,255,0.55); /* glassy */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

/* Video bên trong container: full chiều ngang, bo góc */
.album-media-wrapper .aspect-video,
.album-media-wrapper iframe {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

/* Khoảng cách giữa video và lưới ảnh */
.album-media-wrapper #video-container {
  margin-bottom: 2rem;
}

/* Tuỳ chọn: nếu muốn sát viền hơn trên mobile */
@media (max-width: 640px) {
  .album-media-wrapper {
    padding: 1rem;
    border-radius: 24px;
  }
}
/* ===== Album Hero Split ===== */
.album-hero {
  display:grid; gap:2rem; align-items:center;
  grid-template-columns:1fr; margin-bottom:3rem;
}
@media (min-width:1024px){ .album-hero{ grid-template-columns:1.2fr 1fr; } }
.album-hero__media{ position:relative; }
.album-hero__img{ width:100%; height:100%; object-fit:cover; border-radius:30px; box-shadow:0 20px 50px rgba(15,23,42,.08); }
.album-hero__crumb{ color:#6b7280; font-size:.9rem; }
.album-hero__title{ font-size:clamp(2rem,4vw,3.5rem); font-weight:800; line-height:1.1; }
.album-hero__desc{ margin-top:1rem; color:#374151; }
.album-hero__meta{ margin-top:1.25rem; display:flex; gap:.5rem; flex-wrap:wrap; }
.meta-chip{ padding:.5rem .9rem; border-radius:999px; background:rgba(0,0,0,.05); font-size:.85rem; }
.meta-chip.link{ background:transparent; border:1px solid #d1d5db; }
