@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

:root {
    --primary: #00c896;
    --primary-dark: #00a37a;
    --primary-light: #e0f9f3;
    --accent: #1a73e8;
    --accent-dark: #1558b0;
    --red: #e53935;
    --bg: #f5f5f5;
    --bg-dark: #1a2e2a;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --card-bg: #00c896;
    --shadow: rgba(0, 200, 150, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Poppins', serif;
}

body {
    background-color: var(--bg);
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* --- الهيدر --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 15px 30px;
    background: #c8ece4;
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(0, 200, 150, 0.2);
    box-shadow: 0 4px 20px rgba(0, 200, 150, 0.1);
}

#logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: 0.5s;
}

#logo:hover { transform: rotate(360deg); }

.navigation { margin: auto; }

.navigation ul {
    display: flex;
    list-style: none;
    gap: 160px;
    margin-left: 100px;
}

.navigation a {
    text-decoration: none;
    color: var(--text);
    font-weight: 400;
    font-size: 0.9rem;
    transition: 0.3s;
    letter-spacing: 1px;
}

.navigation a:hover { color: var(--primary); }

/* --- Hero --- */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #00c896 0%, #1a73e8 100%);
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-line {
    width: 80px;
    height: 4px;
    background: var(--white);
    margin: 25px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.hero-content { animation: fadeInUp 1.5s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- شريط التصنيفات --- */
.category-bar {
    background: var(--primary);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 7px 22px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cat-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--white);
}

.cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    box-shadow: 0 0 14px rgba(26,115,232,0.5);
}

/* --- Container & Cards --- */
.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.card-content {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 15px;
    padding: 20px;
}

.card {
    position: relative;
    background: var(--primary);
    max-width: 380px;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0,200,150,0.2);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 15px 35px var(--shadow);
}

.card:hover {
    transform: translateY(-15px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(26,115,232,0.2);
}

/* ✅ FREE — أعلى يسار ثابت */
.free-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    background: var(--accent);
    color: var(--white);
    padding: 8px 20px 8px 10px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    clip-path: polygon(0 0, 100% 0, 85% 50%, 100% 100%, 0 100%);
}

/* ✅ Downloads — أعلى يمين ثابت */
.download-count {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 0 0 0 12px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(26,115,232,0.4);
}

/* ✅ الصورة */
.card-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: visible;
    background: #ffffff;
    position: relative; /* مهم */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.card:hover .card-image img {
    transform: scale(1.1) rotate(1deg);
}

/* ✅ شارات DXF DWG SVG — أسفل يسار الصورة ثابت */
.formats {
    position: absolute;
    bottom: 0px;
    left: 0px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.format-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: rgba(255, 255, 255, 0.203);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #06c767;
}

/* ✅ اللوغو الواترمارك — أسفل يمين الصورة ثابت */
.watermark {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 80px !important;
    height: 80px !important;
    pointer-events: none;
    z-index: 10;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.6));
}

/* ✅ النص والزر */
.card-info {
    padding: 30px;
    text-align: center;
    background: linear-gradient(to top, #00a37a, transparent);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-description {
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.6;
}
.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.btn {
    display: inline-block;
    text-decoration: none;
    color: var(--white);
    background: transparent;
    border: 2px solid var(--white);
    padding: 12px 40px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 50px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn:hover {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* --- Pagination --- */
.pagination {
    align-self: center;
    text-align: center;
    margin: 30px auto 60px;
    user-select: none;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline-block;
    margin: 5px;
    box-shadow: 0 5px 25px rgb(1 1 1/10%);
}

.pagination li a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2em;
    line-height: 45px;
}

.previous-page, .next-page {
    background: var(--primary);
    width: 80px;
    border-radius: 45px;
    cursor: pointer;
    transition: 0.3s ease;
}

.previous-page:hover { transform: translateX(-10px); }
.next-page:hover     { transform: translateX(10px); }

.current-page, .dots {
    background: #ccc;
    width: 45px;
    border-radius: 50%;
    cursor: pointer;
}

.active  { background: var(--primary); }
.disable { background: #ccc; }

/* --- About --- */
.about-section {
    background: var(--bg-dark);
    padding: 60px 20px;
    margin-top: 40px;
    text-align: center;
}

.about-content h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.about-content > p {
    color: #a0c4b8;
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.about-card {
    background: #1e3a32;
    border: 1px solid rgba(0,200,150,0.3);
    border-radius: 16px;
    padding: 25px;
}

.about-card h3 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.about-card p {
    color: #a0c4b8;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* --- Footer --- */
footer {
    background: var(--bg-dark);
    padding: 40px 20px;
    text-align: center;
    border-top: 2px solid var(--primary);
}

.footer-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    margin-bottom: 10px;
}

.footer-desc {
    color: #a0c4b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.footer-links a:hover { color: var(--white); }

.footer-copy {
    color: #4a7a6a;
    font-size: 0.75rem;
}

/* --- Contact --- */
.contact-section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: var(--bg-dark);
}

.contact-box {
    background: #1e3a32;
    border: 1px solid rgba(0,200,150,0.3);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.contact-box h2 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.contact-box p {
    color: #a0c4b8;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.contact-box input,
.contact-box textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid rgba(0,200,150,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 15px;
    outline: none;
    font-family: 'Poppins', serif;
}

.contact-box input:focus,
.contact-box textarea:focus { border-color: var(--primary); }

.contact-box button {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 14px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

.contact-box button:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 20px var(--shadow);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .card-content { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 2rem; }
    .navigation ul { gap: 30px; margin-left: 0; }
}

@media (max-width: 480px) {
    .card-content { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 1.3rem !important; word-break: break-word; letter-spacing: 2px; }
    .hero-content p { font-size: 0.8rem; }
    header { padding: 10px 15px; border-radius: 20px; flex-wrap: wrap; gap: 10px; }
    .navigation ul { gap: 15px; margin-left: 0; }
    #logo { width: 55px; height: 55px; }
    .format-badge { width: 32px; height: 32px; min-width: 32px; font-size: 0.5rem; }
    .watermark { width: 55px !important; height: 55px !important; }
    .download-count { padding: 3px 10px; font-size: 0.6rem; }
    .free-badge { padding: 4px 15px 4px 8px; font-size: 0.65rem; }
    .card-info { padding: 15px; }
    .card-description { font-size: 0.8rem; margin-bottom: 15px; }
    .about-grid { grid-template-columns: 1fr; }
    .about-content h2 { font-size: 1.3rem; }
    .cat-btn { padding: 5px 14px; font-size: 0.72rem; }
}