* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #0a0f1f;
    color: #ffffff;
    overflow: hidden;
    direction: rtl;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
    pointer-events: none;
}

.contact-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 249, 255, 0.1);
    border: 1px solid #00f9ff;
    border-radius: 50px;
    padding: 12px 30px;
    color: #00f9ff;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9000;
    pointer-events: auto;
}

.contact-button:hover {
    background: rgba(0, 249, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 249, 255, 0.5);
    transform: translateY(-3px);
}

.page-indicator {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.indicator-dot.active {
    background: #00f9ff;
    box-shadow: 0 0 10px rgba(0, 249, 255, 0.8);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0f1f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-size: 24px;
    font-weight: 700;
    color: #00f9ff;
    margin-bottom: 20px;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: rgba(0, 249, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: #00f9ff;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Page 1 Elements */
.page1-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

.main-title {
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 900;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(0, 249, 255, 0.5);
    margin-bottom: 10px;
    opacity: 0;
}

.subtitle {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    opacity: 0;
}

/* Navigation Panel Styles */
.nav-panels {
    position: fixed;
    bottom: 150px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 50;
}

.nav-panel {
    width: 180px;
    height: 220px;
    background: rgba(10, 15, 31, 0.7);
    border: 1px solid rgba(0, 249, 255, 0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.nav-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 249, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-panel:hover::before {
    left: 100%;
}

.nav-panel:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #00f9ff;
    box-shadow: 0 10px 40px rgba(0, 249, 255, 0.3);
    background: rgba(0, 249, 255, 0.05);
}

.panel-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    stroke: #00f9ff;
    stroke-width: 1.5;
    fill: none;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;

    text-align: center;      /* توحيد المحاذاة */
    direction: rtl;          /* لأن العنوان عربي */
}

.panel-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);

    text-align: center;      /* نفس المحاذاة */
    direction: ltr;          /* لأن الوصف إنجليزي */
}


/* Page 2 Styles (Initially Hidden) */
.page2-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
}

.page2-content * {
    pointer-events: auto;
}

.page2-header {
    padding: 40px;
    text-align: center;
}

.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    background: rgba(0, 249, 255, 0.1);
    border: 1px solid rgba(0, 249, 255, 0.5);
    border-radius: 25px;
    padding: 10px 25px;
    color: #00f9ff;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background: rgba(0, 249, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 249, 255, 0.4);
}

.gallery-container {
    padding: 0 40px 80px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 25px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tab:hover {
    border-color: #00f9ff;
    color: #00f9ff;
}

.category-tab.active {
    background: rgba(0, 249, 255, 0.15);
    border-color: #00f9ff;
    color: #00f9ff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-card {
    background: rgba(10, 15, 31, 0.8);
    border: 1px solid rgba(0, 249, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.gallery-card:hover {
    transform: translateY(-10px);
    border-color: #00f9ff;
    box-shadow: 0 15px 40px rgba(0, 249, 255, 0.2);
}

.card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0f1f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 249, 255, 0.2), transparent);
    transition: left 0.6s ease;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card:hover .card-image::before {
    left: 100%;
}

.card-icon {
    width: 60px;
    height: 60px;
    stroke: #00f9ff;
    stroke-width: 1;
    fill: none;
    opacity: 0.7;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.card-category {
    font-size: 12px;
    color: #00f9ff;
    margin-bottom: 12px;
}

.card-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 31, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.contact-section.active {
    opacity: 1;
    pointer-events: auto;
}

.contact-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-close:hover {
    border-color: #00f9ff;
    color: #00f9ff;
    transform: rotate(90deg);
}

.contact-title {
    font-size: 42px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
}

.contact-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 50px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(0, 249, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 249, 255, 0.05);
}

.social-link:hover {
    transform: scale(1.1) rotate(10deg);
    border-color: #00f9ff;
    box-shadow: 0 0 30px rgba(0, 249, 255, 0.5);
    background: rgba(0, 249, 255, 0.1);
}

.social-link svg {
    width: 30px;
    height: 30px;
    stroke: #00f9ff;
    stroke-width: 1.5;
    fill: none;
}

.email-link {
    font-size: 18px;
    color: #00f9ff;
    text-decoration: none;
    margin-bottom: 40px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-link:hover {
    text-shadow: 0 0 20px rgba(0, 249, 255, 0.8);
}

.footer {
    position: absolute;
    bottom: 30px;
    text-align: center;
}

.footer-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f9ff, transparent);
    margin: 0 auto 15px;
}

.footer-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    /* ===== HEADER ===== */
    .page1-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    justify-content: flex-start;  /* أهم سطر */
    align-items: center;

    padding-top: 50px;   /* ← هذا الذي يرفع النص */
    padding-left: 20px;
    padding-right: 20px;

    z-index: 20;
    pointer-events: none;
}

    .main-title {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 15px;
    }

    /* ===== PANELS (تحويلها لكروت موبايل حقيقية) ===== */
    .nav-panels {
        position: fixed;
        top: 140px;
        bottom: auto;
        flex-direction: column;
        gap: 12px;
        padding: 0 15px;
    }

    .nav-panel {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 18px;
        border-radius: 18px;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

        backdrop-filter: blur(6px);
    }

    .panel-icon {
        width: 38px;
        height: 38px;
    }

    .panel-title {
        font-size: 16px;
    }

    .panel-description {
        font-size: 11px;
    }

    /* ===== زر التواصل (مهم) ===== */
    .contact-button {
        width: calc(100% - 30px);
        left: 15px;
        right: auto;
        transform: none;

        bottom: 15px;
        border-radius: 12px;

        font-size: 14px;
        padding: 14px;
    }

    .contact-button:hover {
        transform: translateY(-2px);
    }

    /* ===== indicator ===== */
    .page-indicator {
        left: 8px;
        top: 45%;
    }

}
