/* ===== assets/css/style.css ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
    padding-top: 70px;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.animated-bg span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(194, 170, 121, 0.08);
    animation: float 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 60px;
    border: 1px solid rgba(194, 170, 121, 0.3);
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -50px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: rgba(194, 170, 121, 0.2);
    border-color: #c2aa79;
}

.nav-link.active {
    background: #c2aa79;
    color: white;
}

/* Back Button */
.back-btn-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    animation: slideInLeft 0.5s ease-out;
}

.back-btn {
    cursor:pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: 1.5px solid rgba(194, 170, 121, 0.4);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #c2aa79;
    border-color: white;
    transform: translateX(-5px);
}

/* Entrance Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(194, 170, 121, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(194, 170, 121, 0.7);
    }
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeInScale 0.8s ease-out, glowPulse 3s ease-in-out infinite;
}

/* Project Types Grid (للصفحة الرئيسية) */
.project-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

@media (max-width: 1000px) {
    .project-types { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .project-types { grid-template-columns: 1fr; }
}

/* Project Type Card */
.project-type {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(194, 170, 121, 0.2);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    animation: slideInUp 0.6s ease-out backwards;
}

.project-type:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 40px rgba(194, 170, 121, 0.25);
    border-color: #c2aa79;
}

.project-type:nth-child(1) { animation-delay: 0.2s; }
.project-type:nth-child(2) { animation-delay: 0.4s; }
.project-type:nth-child(3) { animation-delay: 0.6s; }

.type-title {
    color: #1a1a2e;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 3px solid #c2aa79;
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.type-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(194, 170, 121, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

.type-stats {
    text-align: center;
    color: #c2aa79;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
}

.type-description {
    color: #4a4a5e;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
}

.type-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Projects Grid (لصفحات الأنواع) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    animation: fadeInScale 0.5s ease-out backwards;
}

.project-card:nth-child(n) {
    animation-delay: calc(0.1s * var(--card-index, 1));
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(194, 170, 121, 0.2);
    border-color: #c2aa79;
}

.project-header {
    background: linear-gradient(135deg, #c2aa79 0%, #a58b5c 100%);
    color: white;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    animation: glowPulse 3s ease-in-out infinite;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.project-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.project-card:hover .project-meta span {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Image Gallery Preview */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    position: relative;
}

.image-gallery::before {
    content: '📸 ' attr(data-count) ' photos';
    position: absolute;
    top: 8px;
    right: 12px;
    background: #c2aa79;
    color: white;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .gallery-item img {
    transform: scale(1.08);
}

/* Modal Gallery */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-container {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
}

.modal-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    border: 3px solid #c2aa79;
    box-shadow: 0 0 50px rgba(194, 170, 121, 0.3);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.modal-image.fade-out {
    animation: modalFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) rotate(2deg);
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    border: 2px solid #c2aa79;
    z-index: 2100;
    transition: all 0.3s ease;
    animation: fadeInScale 0.3s ease-out;
}

.close:hover {
    background: #c2aa79;
    transform: rotate(90deg) scale(1.1);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(194, 170, 121, 0.2);
    border: 2px solid #c2aa79;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 35px;
    cursor: pointer;
    z-index: 2100;
    transition: all 0.3s ease;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(194, 170, 121, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(194, 170, 121, 0.7);
    }
}

.nav-arrow:hover {
    background: #c2aa79;
    transform: translateY(-50%) scale(1.1);
    animation: none;
}

.prev { left: 30px; }
.next { right: 30px; }

.image-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 25px;
    border-radius: 50px;
    border: 1px solid #c2aa79;
    font-size: 1rem;
    z-index: 2100;
    backdrop-filter: blur(5px);
    animation: slideInUp 0.3s ease-out;
}

.project-info-modal {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    border-left: 5px solid #c2aa79;
    backdrop-filter: blur(10px);
    max-width: 350px;
    z-index: 2100;
    animation: slideInLeft 0.3s ease-out;
}

.project-info-modal h3 {
    color: #c2aa79;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.project-info-modal p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .main-nav {
        top: 10px;
        padding: 8px 15px;
    }
    
    .nav-link {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    
    .nav-arrow { width: 45px; height: 45px; font-size: 28px; }
    .prev { left: 10px; }
    .next { right: 10px; }
    .project-info-modal { 
        top: 15px; 
        left: 15px; 
        padding: 12px 18px;
        max-width: 250px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}