/* TAMOOH - Achievements Page Styles */

/* ================================
   Hero Section
   ================================ */
.achievements-hero {
    position: relative;
    padding: 100px 0 60px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.08) 0%, rgba(0, 150, 136, 0.15) 100%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    text-align: center;
}

.achievements-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 188, 212, 0.2) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite alternate;
}

.achievements-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    margin: 0 auto;
}

.achievements-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0, 188, 212, 0.12);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 50px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.15);
}

.achievements-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-primary);
    line-height: 1.3;
}

.achievements-hero h1 span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.achievements-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Stats Counter Grid */
.achievements-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.ach-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 22px 18px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ach-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 188, 212, 0.15);
    border-color: var(--color-primary-light);
}

.ach-stat-card .icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: rgba(0, 188, 212, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.ach-stat-card h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ach-stat-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ================================
   Category Filters
   ================================ */
.achievements-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 40px 0 35px;
}

.filter-btn {
    padding: 10px 22px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 188, 212, 0.3);
}

/* ================================
   Achievements Grid & Cards
   ================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.achievement-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 188, 212, 0.18);
    border-color: rgba(0, 188, 212, 0.4);
}

.ach-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.ach-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.achievement-card:hover .ach-card-image img {
    transform: scale(1.08);
}

.ach-badge-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 2;
}

.ach-date-tag {
    position: absolute;
    bottom: 12px;
    left: 15px;
    padding: 4px 10px;
    background: rgba(0, 188, 212, 0.85);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    z-index: 2;
}

.ach-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ach-card-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.ach-card-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ach-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-view-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.btn-view-details:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Modal Popup */
.ach-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ach-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ach-modal-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ach-modal-overlay.active .ach-modal-container {
    transform: scale(1);
}

.ach-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ach-modal-close:hover {
    background: var(--color-error, #ef4444);
    border-color: #ef4444;
    transform: scale(1.08) rotate(90deg);
}

.ach-modal-img-wrapper {
    width: 100%;
    max-height: 380px;
    overflow: hidden;
    position: relative;
}

.ach-modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ach-modal-body {
    padding: 30px;
}

.ach-modal-header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.ach-modal-body h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.ach-modal-body p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-line;
}

/* ================================
   Admin Dashboard Achievements CSS
   ================================ */
.admin-ach-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.image-preview-box {
    width: 100%;
    height: 180px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    transition: border-color 0.3s ease;
}

.image-preview-box:hover {
    border-color: var(--color-primary);
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .achievements-hero h1 {
        font-size: 1.85rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .ach-modal-container {
        width: 95%;
        margin: 10px auto;
        border-radius: 16px;
        max-height: 94vh;
    }

    .ach-modal-video-wrapper {
        border-radius: 16px 16px 0 0;
        background: #000;
    }

    .video-responsive-container {
        padding-bottom: 0;
        height: 290px;
        min-height: 290px;
        max-height: 52vh;
    }

    .ach-modal-close {
        top: 10px;
        left: 10px;
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .ach-modal-body {
        padding: 20px 16px;
    }

    .ach-modal-body h2 {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }

    .ach-modal-body p {
        font-size: 0.92rem;
        line-height: 1.7;
    }


    .media-type-tabs {
        flex-direction: column;
    }

    .media-tab {
        width: 100%;
        justify-content: center;
    }
}

/* ================================
   Video Play Overlay (Public Cards)
   ================================ */
.ach-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 3;
    opacity: 0.85;
    transition: all 0.35s ease;
    cursor: pointer;
}

.achievement-card:hover .ach-video-play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.45);
}

.play-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ea4335;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.35s ease;
}

.achievement-card:hover .play-icon-circle {
    transform: scale(1.12);
    background: #fff;
    box-shadow: 0 12px 40px rgba(234, 67, 53, 0.35);
}

.play-icon-circle i {
    margin-right: -3px;
}

.ach-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

.ach-video-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ea4335;
    padding: 4px 10px;
    background: rgba(234, 67, 53, 0.08);
    border-radius: 6px;
}

/* ================================
   Modal Video Player (Responsive)
   ================================ */
.ach-modal-video-wrapper {
    width: 100%;
    background: #000;
    position: relative;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.video-responsive-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio on Desktop */
    height: 0;
    overflow: hidden;
    background: #000000;
}

.video-responsive-container iframe,
.video-responsive-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Blocker overlay for Google Drive top-right popout button (square with arrow) */
.video-popout-blocker {
    position: absolute;
    top: 0;
    right: 0;
    width: 85px;
    height: 56px;
    background: transparent;
    z-index: 25;
    pointer-events: auto;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}


/* ================================
   Admin Dashboard — Media Type Tabs
   ================================ */
.media-type-tabs {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.media-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.media-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0, 188, 212, 0.05);
}

.media-tab.active {
    border-color: var(--color-primary);
    background: rgba(0, 188, 212, 0.1);
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.15);
}

.media-tab[data-type="video"].active {
    border-color: #ea4335;
    background: rgba(234, 67, 53, 0.08);
    color: #ea4335;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.15);
}

.media-tab i {
    font-size: 1.1rem;
}

/* ================================
   Admin Dashboard — Video Badge in Table
   ================================ */
.admin-ach-video-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-ach-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(234, 67, 53, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.admin-video-badge i {
    margin-right: -1px;
}


