/* ---       COMPLETE STYLES FOR TUTORIALS PAGE     --- */

.learning-hub-container {
    max-width: var(--container-width-lg);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.filter-bar-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: var(--space-lg);
}

.filter-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-group-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-subtle);
}

.filter-btn {
    display: inline-block;
    height: 40px;
    padding: 0 1.25rem;
    background-color: #fff;
    color: var(--color-text-body);
    border: 1px solid #ddd;
    border-radius: 999px;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #bbb;
    background-color: #f9f9f9;
}

.filter-btn.active {
    background-color: var(--color-primary-gold-hover);
    color: var(--color-text-light);
    border-color: var(--color-primary-gold);
    font-weight: 600;
    box-shadow: 0 4px 12px -2px hsla(45, 100%, 28%, 0.3);
}

.filter-select {
    display: none;
}

.custom-select-wrapper {
    position: relative;
    width: 220px;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 1.25rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}


.custom-select-wrapper:hover .custom-select-trigger {
    border-color: #bbb;
}

.custom-select-trigger.filtered {
    background-color: var(--color-primary-gold-hover);
    color: var(--color-text-light);
    font-weight: 600;
}

.custom-select-trigger::after {
    content: '';
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em;
    transition: transform 0.3s ease;
}

.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.custom-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}
.custom-option:first-of-type { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.custom-option:last-of-type { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.custom-option:hover { background-color: #f5f5f7; }
.custom-option.selected { background-color: var(--color-primary-gold); color: white; font-weight: 600; }

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-select-wrapper.open .custom-select-trigger::after {
    transform: rotate(180deg);
}
.tutorial-grid.initially-hidden {
    opacity: 0;
    visibility: hidden;
    transition: none;
}
.tutorial-grid {
    margin-left: auto;
    margin-right: auto;
    transition: opacity 0.5s ease;

}

.grid-sizer { width: 0; }

.tutorial-item {
    width: 380px;
    margin-bottom: 30px;
}

.tutorial-item:has(.is-playlist) {
    padding-bottom: 20px;
}

.tutorial-card-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.card-thumbnail-wrapper {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.tutorial-card-link:hover .card-thumbnail-wrapper {
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.card-thumbnail {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.tutorial-card-link.is-playlist::before,
.tutorial-card-link.is-playlist::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(221, 221, 221, 0.8);
    left: 50%;
    z-index: 1; 
}

.tutorial-card-link.is-playlist::before {
    background-color: #5e5e5e;
    bottom: 20px;
    transform: translateX(-50%) scale(0.94);
}

.tutorial-card-link.is-playlist::after {
    background-color: #5c5c5c;
    bottom: 10px;
    transform: translateX(-50%) scale(0.97);
}

/* --- Card Info & Overlays --- */
.tutorial-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    padding-top: var(--space-xs);
  }
.tutorial-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 0.5rem;
}
.tutorial-meta-details {
    display: flex;
    align-items: center;
    gap: 0.75rem; 
    font-size: 0.875rem;
    color: var(--color-text-subtle);
}
.meta-left-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.video-count {
    background-color: var(--color-bg-light);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 12px;
    margin-left: 1rem;

}
.instructor-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-subtle);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
  }
  .instructor-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 0.75rem 0; 
}

.software-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; 
    margin-top: 0rem; 
}

.software-tag {
    display: inline-block;
    background-color: var(--color-bg-light);
    color: var(--color-text-subtle);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.card-top {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
}
.difficulty-pill {
    display: inline-block;
    background-color: rgba(222, 222, 222, 0.3);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.card-middle {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}
.play-button-container {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}
.tutorial-card-link:hover .play-button-container {
    opacity: 1;
    transform: scale(1);
}
.play-icon {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.card-thumbnail-wrapper.is-playlist {
    position: relative;
}

.card-thumbnail-wrapper .card-thumbnail {
    position: relative;
    z-index: 2;
}

.card-thumbnail-wrapper.is-playlist::before,
.card-thumbnail-wrapper.is-playlist::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 16px; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    left: 50%;
}

.card-thumbnail-wrapper.is-playlist::before {
    bottom: -6px;
    transform: translateX(-50%) scale(0.95);
}

.card-thumbnail-wrapper.is-playlist::after {
    bottom: -12px;
    transform: translateX(-50%) scale(0.9);
}

.featured-tutorial-section {
    padding: 6.25rem 0;
    margin-top: 6.25rem;
    background-color: var(--color-bg-medium); 
}

.featured-tutorial-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center; 
    gap: 5rem;
    width: 1680px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 450px;
}

.featured-video-player {
    width: 600px; 
    flex-shrink: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    display: block; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-video-player img {
    width: 100%;
    height: 100%; 
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.featured-video-player img.is-loaded {
    opacity: 1;
}


.featured-video-player .play-button-container {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    opacity: 0;
    transition: all 0.3s ease;
}

.featured-video-player:hover .play-button-container {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.featured-tutorial-info {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    max-width: 500px;
    max-height: 335px;

}

.featured-tutorial-info h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary-gold); 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.featured-tutorial-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
}
.featured-tutorial-info p {
    font-size: 20px;
    line-height: 1.6;
    color: #4f4f52;
    margin-top: 0;
    margin-bottom: 2rem;
    overflow: hidden; /* Hides the extra text */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
    

.featured-tutorial-info .btn.btn-solid-gold {
    width: auto;
    white-space: nowrap;
    display: inline-block; 
    padding: 10px 24px;   
    height: auto;          
    line-height: normal;   
    white-space: nowrap;  
    margin-top: auto;
    align-self: flex-start;
}

/* Philosophy Section */
.philosophy-section {
    padding: 6.25rem 0;
    text-align: center;
}
.philosophy-section h2 {
    font-size: 2.66rem; /* ~32pt */
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}
.philosophy-text {
    max-width: var(--container-width-sm);
    margin: 0 auto;
    font-size: 1.66rem; /* ~20pt */
    font-weight: 400;
    line-height: var(--line-height-base);
    color: var(--color-text-body);
}

/* --- Placeholder Styles for Tutorial Cards --- */

.tutorial-item.is-placeholder .placeholder-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #e0e0e0;
    border-radius: 16px; /* Matches your .card-thumbnail-wrapper */
    animation: placeholder-shimmer 2s linear infinite;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
}

.tutorial-item.is-placeholder .placeholder-line {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: var(--radius-xs);
    animation: placeholder-shimmer 2s linear infinite;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    margin-bottom: 0.75rem;
}

.tutorial-item.is-placeholder .placeholder-line.title {
    height: 24px;
    width: 80%;
    margin-top: 0.5rem;
}

.tutorial-item.is-placeholder .placeholder-line.text {
    width: 50%;
}

.tutorial-item.is-placeholder .placeholder-line.tags {
    width: 90%;
    height: 30px;
    margin-top: 0.75rem;
}

#tutorial-placeholders-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; 
}

body.is-loading .featured-tutorial-info h2 {
    animation: placeholder-shimmer 2s linear infinite;
    background-color: #e0e0e0;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    padding: 1rem;
    color: transparent;
    border-radius: var(--radius-xs);
}

body.is-loading .featured-tutorial-info .btn {
    color: transparent;
    background-image: none; 
    border-color: transparent;
    animation: placeholder-shimmer 2s linear infinite;
    background-color: #e0e0e0;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    pointer-events: none;
}

body.is-loading .philosophy-section h2,
body.is-loading .philosophy-section .philosophy-text {
    animation: placeholder-shimmer 2s linear infinite;
    background-color: #e0e0e0;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 40%, #e0e0e0 80%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    color: transparent;
    border-radius: var(--radius-xs);
}

body.is-loading .philosophy-section h2 {
    width: 400px;
    min-height: 48px; 
    margin: 0 auto 1.5rem auto; 
}

body.is-loading .philosophy-section .philosophy-text {
    width: 100%; 
    min-height: 120px;
}


@media (max-width: 1680px) {
    .tutorial-grid{
        padding-top: 5rem;
    }
    .tutorial-item{
        width: 380px;
    }
    .featured-tutorial-info{
        height: 350px;
    }
    .featured-video-player{
        width: 620px;
    }
    .featured-tutorial-wrapper{
        width: 1169px;
        height: 100%;
    }
    .featured-tutorial-info p{
        font-size: 1.2rem;
        -webkit-line-clamp: 2;
        margin-bottom: 1rem;
    }
    .philosophy-section h2{
        font-size: 2.3rem;
    }
    }


@media (max-width: 743px) {

  /* --- 1. Main Container & Page Header --- */
  .learning-hub-container {
    padding: 0; /* Remove side padding to allow for edge-to-edge content */
  }

  .page-header-container {
    text-align: center;
  }
  .page-title {
    font-size: 2.5rem;
  }
  .page-slogan {
    font-size: 1.25rem;
  }

  /* --- 2. Filter Bar --- */
  .filter-bar-container {
    flex-direction: column; /* Stack filter groups vertically */
    align-items: stretch; /* Make each group full-width */
    gap: 1.5rem;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  
  .filter-group {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .custom-select-wrapper {
    width: 100%; /* Make the dropdown full-width */
  }

  /* --- 3. Tutorial Grid --- */
  .tutorial-grid {
    padding: 0 var(--space-sm); /* Add a little side padding for the grid */
  }

  .tutorial-item {
    width: 100%; 
    max-width: 350px;
    margin: 0 auto 1rem auto;
  }

  .tutorial-item:has(.is-playlist){
    margin-bottom: 0;
  }
  .software-tag{
    visibility: hidden;
  }
  /* --- 4. Featured Tutorial Section --- */
  .featured-tutorial-section {
    padding: 3rem 0;
    margin-top: 0;
  }

  .featured-tutorial-wrapper {
    flex-direction: column;
    align-items: center;
    width: 350px;
    height: auto;
    gap: 2rem;
    padding: 0;
  }
  
  .featured-video-player {
    width: 350px;
  }
.featured-tutorial-info h3{
    font-size: 1.3rem;
}
  .featured-tutorial-info {
    max-width: 100%;
    text-align: center;
  }

  .featured-tutorial-info p {
display: none;
  }

  .featured-tutorial-info .btn.btn-solid-gold {
    align-self: center;
    margin-top: 1rem;
  }
.featured-video-player .play-button-container {
opacity: 1;
}

.play-button-container{
    opacity: 1;
}
  /* --- 5. Philosophy Section --- */
  .philosophy-section {
    padding: 3rem var(--space-md);
  }
  
  .philosophy-section h2 {
    font-size: 1.3rem;
  }

  .philosophy-text {
    font-size: 1.3rem;
  }
}