/**
 * Instructor Singular Template Styles
 * Based on reference design from acmeitcentre.in
 * 
 * Color Palette:
 * - Dark Navy: rgb(0, 12, 41) / #000c29
 * - Primary Blue: rgb(17, 125, 188) / #117dbc
 * - Accent Gold: rgb(220, 175, 115) / #dcaf73
 * - Body Text: rgb(71, 85, 105) / #475569
 * - Light Gray: rgb(100, 116, 139) / #64748b
 */

/* ===========================
   Hero Section
   =========================== */
.acme-instructor-hero {
    position: relative;
    background-color: rgb(0, 12, 41);
    padding: 80px 0 120px;
    text-align: center;
    overflow: hidden;
}

.acme-instructor-hero-bg {
    display: none !important;
}

.acme-instructor-hero-content {
    position: relative;
    z-index: 1;
}

.acme-instructor-hero .acme-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
}

/* Avatar */
.acme-instructor-avatar {
    width: 168px;
    height: 168px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.acme-instructor-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acme-instructor-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(17, 125, 188) 0%, rgb(0, 12, 41) 100%);
    color: #fff;
    font-size: 64px;
    font-weight: 700;
}

/* Badge */
.acme-instructor-badge {
    display: inline-block;
    background-color: rgb(17, 125, 188);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 16px;
}

/* Name */
.acme-instructor-hero .acme-instructor-name {
    color: #fff !important;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Designation */
.acme-instructor-designation {
    color: rgb(220, 175, 115);
    font-size: 22px;
    font-weight: 400;
    margin: 0;
}

/* ===========================
   Stats Ribbon
   =========================== */
/* ===========================
   Stats Ribbon
   =========================== */
.acme-instructor-stats-ribbon {
    position: relative;
    z-index: 10;
    margin-top: -40px;
    /* Overlap effect */
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.acme-stats-grid {
    display: inline-flex;
    align-items: center;

    /* Glassmorphic Background */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    border-radius: 50px;
    /* Pill shape */
    padding: 12px 40px;

    /* Layered Shadows for Depth */
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.18) inset;

    gap: 40px;

    /* Subtle Border with Gradient */
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect */
.acme-stats-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s ease;
}

.acme-stats-grid:hover::before {
    left: 100%;
}

.acme-stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding: 0;
    text-align: left;
    border: none;
}

/* Vertical Separator Lines */
.acme-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 0;
}

.acme-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.acme-stat-item:hover .acme-stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.acme-stat-icon svg {
    width: 20px;
    height: 20px;
}

.acme-stat-content {
    display: flex;
    flex-direction: column;
}

.acme-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.acme-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    font-weight: 600;
}

/* Mobile Responsiveness for Stats */
@media (max-width: 768px) {
    .acme-stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-radius: 20px;
        padding: 20px;
        width: 100%;
        gap: 20px;
    }

    .acme-stat-item:not(:last-child)::after {
        display: none;
    }

    .acme-stat-item {
        justify-content: flex-start;
    }
}

/* ===========================
   Biography Section
   =========================== */
.acme-instructor-bio-section {
    padding: 80px 20px;
    background: #fff;
}

.acme-instructor-bio-section .acme-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
}

.acme-bio-title {
    font-size: 40px;
    font-weight: 800;
    width: fit-content;
    margin: 0 auto 50px;
    text-align: center;
    position: relative;
    letter-spacing: -0.5px;
    display: block;
    clear: both;

    /* Homepage Gradient Style */
    background-image: linear-gradient(to right, #0f172a 20%, #3b82f6 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.acme-bio-title::after {
    display: none;
}

.acme-bio-content {
    position: relative;
    text-align: left;
    overflow: hidden;
    max-height: 220px;
    transition: max-height 0.5s ease;
    clear: both;
    width: 100%;
    position: relative;
}

.acme-bio-content.is-expanded {
    max-height: 5000px;
}

.acme-bio-text {
    font-size: 18px;
    line-height: 1.8;
    color: rgb(71, 85, 105);
}

.acme-bio-text p {
    margin: 0 0 20px;
}

.acme-bio-text p:last-child {
    margin-bottom: 0;
}

.acme-bio-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.acme-bio-content.is-expanded .acme-bio-gradient {
    opacity: 0;
}

.acme-expand-all-btn {
    align-self: flex-start;
    padding: 6px 12px !important;
    margin-left: 0;
    margin-top: 16px !important;
    background-color: rgb(240, 235, 248) !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    /* Ensure flex for alignment */
    align-items: center;
    gap: 8px;
    /* Slightly increased gap for better breather */
    color: rgb(17, 125, 188) !important;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.acme-expand-all-btn:hover {
    background-color: rgb(226, 232, 240) !important;
    color: rgb(17, 125, 188) !important;
}

.acme-expand-all-btn .acme-toggle-icon {
    transition: transform 0.3s ease;
}

.acme-expand-all-btn.is-expanded .acme-toggle-icon {
    transform: rotate(180deg);
}

/* ===========================
   Social Links Section
   =========================== */
.acme-instructor-social-section {
    padding: 60px 20px 80px;
    background-color: var(--acme-navy-deep);
}

.acme-instructor-social-section .acme-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.acme-social-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0;
}

.acme-social-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.acme-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: #fff;
    border: 1px solid rgb(226, 232, 240);
    border-radius: 50%;
    color: rgb(71, 85, 105);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.acme-social-btn:hover {
    background: rgb(17, 125, 188);
    color: #fff;
    border-color: rgb(17, 125, 188);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 30px rgba(17, 125, 188, 0.3);
}

.acme-social-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.acme-social-btn:hover svg {
    transform: scale(1.1);
}

/* ===========================
   Courses Section
   =========================== */
.acme-instructor-courses-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, #fff, #f8fafc);
    position: relative;
}

.acme-instructor-courses-section .acme-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: block !important;
    width: 100%;
}

.acme-courses-title {
    font-size: 40px;
    font-weight: 800;
    width: fit-content;
    margin: 0 auto 50px;
    text-align: center;
    position: relative;
    letter-spacing: -0.5px;
    display: block;

    /* Homepage Gradient Style */
    background-image: linear-gradient(to right, #0f172a 20%, #3b82f6 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.acme-courses-title::after {
    display: none;
}

/* Carousel Layout */
.acme-carousel-wrapper {
    position: relative;
    width: 100%;
}

.acme-carousel-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0 40px;
    /* Space for shadow + dots */
}

.acme-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    /* Smooth easing */
    will-change: transform;
    width: 100%;
}

/* Slide Widths */
.acme-carousel-slide {
    /* Desktop: 3 Items 
       Total width = 100%
       Gaps = 2 * 30px = 60px
       Item = (100% - 60px) / 3
    */
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    height: auto;
    display: flex;
    flex-direction: column;
}

/* Pagination Dots */
.acme-carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.acme-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.acme-carousel-dot.is-active {
    background: rgb(17, 125, 188);
    transform: scale(1.2);
    width: 24px;
    /* Elongated active dot for modern feel */
    border-radius: 6px;
}

.acme-carousel-dot:hover {
    background: rgb(148, 163, 184);
}

/* Responsive */
@media (max-width: 991px) {
    .acme-carousel-track {
        gap: 20px;
    }

    .acme-carousel-slide {
        /* Tablet: 2 Items 
           Gap = 20px
           Item = (100% - 20px) / 2
        */
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .acme-carousel-track {
        gap: 15px;
    }

    .acme-carousel-slide {
        /* Mobile: 1 Item 
           Item = 100%
        */
        flex: 0 0 100%;
        max-width: 100%;
    }

    .acme-carousel-viewport {
        padding-bottom: 30px;
    }
}

/* Course Card */
.acme-instructor-course-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 12, 41, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.acme-instructor-course-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(17, 125, 188, 0.15);
    border-color: rgba(17, 125, 188, 0.3);
}

.acme-course-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Wrapper */
.acme-course-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #f1f5f9;
}

.acme-course-card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.acme-instructor-course-card:hover .acme-course-card-image-wrapper img {
    transform: scale(1.1);
}

/* Placeholder */
.acme-course-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
}

/* Overlay & View Button */
.acme-course-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 12, 41, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.acme-instructor-course-card:hover .acme-course-overlay {
    opacity: 1;
}

.acme-view-btn {
    background: #fff;
    color: rgb(0, 12, 41);
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 30px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.acme-instructor-course-card:hover .acme-view-btn {
    transform: translateY(0);
}

/* Content */
.acme-course-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title */
.acme-course-card-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    color: rgb(0, 12, 41);
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 5px;
    /* Reduced padding since footer is gone */
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 991px) {
    .acme-instructor-hero {
        padding: 60px 0 100px;
    }

    /* Fix Tablet Stats Width - Critical */
    .acme-instructor-stats-ribbon .acme-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px;
    }

    .acme-stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        /* Force single line */
        width: 100%;
        padding: 15px 5px;
        box-shadow: 0 10px 20px rgba(0, 12, 41, 0.08);
        /* Lighter shadow for tablet */
        gap: 0;
    }

    .acme-stat-item {
        border-right: none;
        padding: 0 5px;
        flex: 1 !important;
        /* Even distribution */
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .acme-stat-value {
        font-size: 18px !important;
    }

    .acme-stat-item::after {
        display: none !important;
        /* Remove dots on responsive to avoid layout issues */
    }

    .acme-instructor-hero .acme-instructor-name {
        font-size: 32px;
    }

    .acme-instructor-designation {
        font-size: 18px;
    }

    .acme-instructor-courses-grid {
        gap: 20px;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .acme-instructor-course-card {
        width: 100%;
        min-height: auto;
    }

    .acme-bio-title,
    .acme-courses-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .acme-instructor-hero {
        padding: 50px 0 90px;
    }

    /* Mobile Stats Structure */
    .acme-instructor-stats-ribbon {
        margin-top: -30px;
        padding: 0 15px;
    }

    .acme-instructor-stats-ribbon .acme-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .acme-stats-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        /* NO WRAPPING */
        padding: 12px 2px;
        gap: 0;
        justify-content: space-between;
    }

    .acme-stat-item {
        flex: 1 !important;
        width: auto !important;
        max-width: none !important;
        border-bottom: none;
        padding: 0 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Small Fonts for Mobile Single Row */
    .acme-stat-value {
        font-size: 15px !important;
        margin-bottom: 2px;
    }

    .acme-stat-label {
        font-size: 9px !important;
        letter-spacing: 0;
    }



    .acme-instructor-avatar {
        width: 130px;
        height: 130px;
    }

    .acme-instructor-avatar-placeholder {
        font-size: 48px;
    }

    .acme-instructor-hero .acme-instructor-name {
        font-size: 26px;
    }

    .acme-instructor-designation {
        font-size: 16px;
    }

    .acme-instructor-bio-section,
    .acme-instructor-courses-section {
        padding: 50px 20px;
    }

    .acme-bio-content {
        max-height: 200px;
    }

    .acme-bio-text {
        font-size: 16px;
    }

    /* Responsive Grid for Mobile */
    .acme-instructor-courses-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .acme-social-buttons {
        gap: 14px;
    }

    .acme-social-btn {
        width: 44px;
        height: 44px;
    }

    .acme-instructor-social-section .acme-container {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .acme-social-buttons {
        gap: 12px;
    }

    .acme-social-btn {
        width: 42px;
        height: 42px;
    }

    .acme-social-btn svg {
        width: 18px;
        height: 18px;
    }
}