/* =========================================
   DINA ASHRAF PORTFOLIO — STYLES
========================================= */

/* سلاسة في فتح واغلاق الأسئلة */
.faq-answer {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.faq-answer.active {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 2rem;
}

.active-filter {
    background-color: #D4AF37 !important;
    border-color: #D4AF37 !important;
    color: white !important;
}

/* Real CSS keyframes (not left to Tailwind's runtime class-scanning,
   which only generates @keyframes for utility classes present in the
   initial HTML — this was why some sections stayed invisible). */
@keyframes fadeUpReal {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes scaleInReal {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideDownReal {
    0% { opacity: 0; transform: translateY(-16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal: elements start hidden and animate in once visible */
.reveal {
    opacity: 0;
}
.reveal.in-view {
    animation: fadeUpReal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal.reveal-scale.in-view {
    animation: scaleInReal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobile-menu.animate-slide-down {
    animation: slideDownReal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shimmer effect for gold accent text */
.text-shimmer {
    background: linear-gradient(90deg, #D4AF37 0%, #f4e2a1 25%, #D4AF37 50%, #f4e2a1 75%, #D4AF37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Card lift on hover, smoother easing */
.lift-hover {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}

/* Mobile menu */
#mobile-menu {
    transform-origin: top;
}

.hamburger-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.open .line-1 {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open .line-2 {
    opacity: 0;
}
.hamburger.open .line-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* ================================
   PREMIUM MOBILE MENU
================================ */

#mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;

    z-index: 99999 !important;

    background: #FCFBF9 !important;

    overflow-y: auto;
    overflow-x: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);

    transition:
        transform 0.6s cubic-bezier(0.77, 0, 0.175, 1),
        opacity 0.4s ease,
        visibility 0.6s ease;

    isolation: isolate;
}

/* Dark Mode */
.dark #mobile-menu {
    background: #0F0F0E !important;
}

/* القائمة مفتوحة */
#mobile-menu.mobile-menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* منع الصفحة من التحرك */
body.mobile-menu-active {
    overflow: hidden !important;
}

/* كل محتوى القائمة */
#mobile-menu > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 767px) {

    #mobile-menu {
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition:
            transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.4s ease,
            visibility 0.65s;
    }

    #mobile-menu.mobile-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-item {
        opacity: 0;
        transform: translateY(25px);
    }

    #mobile-menu.mobile-menu-open .mobile-menu-item {
        animation: mobileNavItem 0.65s
            cubic-bezier(0.16, 1, 0.3, 1)
            forwards;
    }

    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(1) { animation-delay: 0.08s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(2) { animation-delay: 0.13s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(3) { animation-delay: 0.18s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(4) { animation-delay: 0.23s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(5) { animation-delay: 0.28s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(6) { animation-delay: 0.33s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(7) { animation-delay: 0.38s; }
    #mobile-menu.mobile-menu-open .mobile-menu-item:nth-child(8) { animation-delay: 0.43s; }

    @keyframes mobileNavItem {
        from { opacity: 0; transform: translateY(25px); }
        to { opacity: 1; transform: translateY(0); }
    }

    body.mobile-menu-active {
        overflow: hidden;
    }

    /* Prevent content behind menu from interacting */
    #mobile-menu {
        overscroll-behavior: contain;
    }
}

/* =========================================
   PREMIUM SCROLL TO TOP
========================================= */

.scroll-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(252, 251, 249, 0.92);
    color: #0F0F0E;

    border: 1px solid rgba(212, 175, 55, 0.35);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);

    transition:
        opacity 0.4s ease,
        visibility 0.4s ease,
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.3s ease,
        color 0.3s ease;

    z-index: 50;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    background: #D4AF37;
    color: #0F0F0E;

    transform: translateY(-5px) scale(1.05);

    box-shadow:
        0 12px 35px rgba(212, 175, 55, 0.25),
        0 0 0 6px rgba(212, 175, 55, 0.08);
}

.scroll-arrow {
    position: relative;
    z-index: 3;
    transition: transform 0.35s ease;
}

.scroll-to-top:hover .scroll-arrow {
    transform: translateY(-3px);
}

.scroll-progress {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(#D4AF37 var(--scroll-progress, 0%), transparent var(--scroll-progress, 0%));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
    pointer-events: none;
}

.scroll-tooltip {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    padding: 8px 12px;
    border-radius: 8px;
    background: #0F0F0E;
    color: #FCFBF9;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.scroll-to-top:hover .scroll-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.dark .scroll-to-top {
    background: rgba(15, 15, 14, 0.9);
    color: #FCFBF9;
    border-color: rgba(212, 175, 55, 0.4);
}

.dark .scroll-tooltip {
    background: #FCFBF9;
    color: #0F0F0E;
}

@media (max-width: 767px) {
    .scroll-to-top {
        right: 18px;
        bottom: 18px;
        width: 48px;
        height: 48px;
    }
    .scroll-tooltip {
        display: none;
    }
}

/* =========================================
   PREMIUM PAGE LOADER
========================================= */

.page-loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    background: #FCFBF9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.dark .page-loader {
    background: #0F0F0E;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    width: min(320px, 80vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loader-logo {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    color: #D4AF37;
    font-family: serif;
    font-size: 34px;
    font-weight: 500;
    margin-bottom: 22px;
    position: relative;
    animation: loaderLogo 2s ease-in-out infinite;
}

.loader-logo::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
}

@keyframes loaderLogo {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
    50% { transform: scale(1.04); box-shadow: 0 0 35px rgba(212, 175, 55, 0.12); }
}

.loader-name {
    color: #0F0F0E;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.35em;
    margin-left: 0.35em;
    margin-bottom: 20px;
}

.dark .loader-name {
    color: #FCFBF9;
}

.loader-line {
    width: 100%;
    height: 1px;
    background: rgba(15, 15, 14, 0.1);
    position: relative;
    overflow: hidden;
}

.dark .loader-line {
    background: rgba(252, 251, 249, 0.1);
}

.loader-line span {
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background: #D4AF37;
    transition: width 0.15s linear;
}

.loader-percent {
    margin-top: 14px;
    color: #D4AF37;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
}

.loader-percent small {
    font-size: 8px;
    margin-left: 2px;
}

.loader-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0.5;
}

.loader-corner::before,
.loader-corner::after {
    content: "";
    position: absolute;
    background: #D4AF37;
}

.loader-corner::before { width: 30px; height: 1px; }
.loader-corner::after { width: 1px; height: 30px; }

.top-left { top: 30px; left: 30px; }
.top-left::before { top: 0; left: 0; }
.top-left::after { top: 0; left: 0; }

.top-right { top: 30px; right: 30px; transform: rotate(90deg); }
.bottom-left { bottom: 30px; left: 30px; transform: rotate(-90deg); }
.bottom-right { bottom: 30px; right: 30px; transform: rotate(180deg); }

@media (max-width: 767px) {
    .loader-logo { width: 62px; height: 62px; font-size: 28px; }
    .loader-name { font-size: 11px; letter-spacing: 0.28em; }
    .loader-corner { width: 20px; height: 20px; }
    .loader-corner::before { width: 20px; }
    .loader-corner::after { height: 20px; }
    .top-left { top: 20px; left: 20px; }
    .top-right { top: 20px; right: 20px; }
    .bottom-left { bottom: 20px; left: 20px; }
    .bottom-right { bottom: 20px; right: 20px; }
}

@media (max-width: 767px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* =========================================
   CERTIFICATES SHOWCASE (NEW — separated
   from the Events/Conferences section)
========================================= */

.cert-card {
    position: relative;
    overflow: hidden;
}

.cert-photo {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.5rem;
    position: relative;
}

.cert-photo img {
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.cert-card:hover .cert-photo img {
    transform: scale(1.08);
}

.cert-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* =========================================
   EDUCATION SECTION (Credentials)
========================================= */

.edu-featured {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.edu-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -15px rgba(212, 175, 55, 0.25);
}

.edu-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.event-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1.5rem 1.5rem 0 0;
    position: relative;
}

.event-photo img {
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.event-card:hover .event-photo img {
    transform: scale(1.08);
}