/*
Theme Name: Aiman Khaled Portfolio
Theme URI: https://aimankhaled.com
Author: Aiman Khaled
Description: ثيم ووردبريس احترافي داكن وأنيق لمعرض أعمال التصوير الفوتوغرافي والأفلام الوثائقية
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: aiman-theme
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --accent: #c9a84c;
    --accent-dim: #a68a3a;
    --text-primary: #f0f0f0;
    --text-secondary: #999999;
    --text-muted: #666666;
    --border: #2a2a2a;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    padding: 0.8rem 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}

.logo span { color: var(--text-primary); font-weight: 300; }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 28px; height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    display: block;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.05) 0%, transparent 50%);
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-dim);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero h1 .accent { color: var(--accent); }

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: float 2.5s ease-in-out infinite;
}

.scroll-indicator .line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

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

/* ===== BUTTONS ===== */
.btn {
    padding: 0.85rem 2.5rem;
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 168, 76, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

/* ===== SECTIONS ===== */
.section {
    padding: 6rem 3rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .label {
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 0.8rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.divider {
    width: 60px; height: 3px;
    background: var(--accent);
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-section { background: var(--bg-secondary); padding: 6rem 3rem; }

.about-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image { position: relative; }

.about-image img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 8px;
}

.about-image .img-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border);
    text-align: center;
    padding: 1rem;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 20px; right: -20px;
    width: 100%; height: 100%;
    border: 2px solid var(--accent-dim);
    border-radius: 8px;
    z-index: -1;
}

.about-content h3 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.about-content h3 span { color: var(--accent); }

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-weight: 300;
    line-height: 2;
}

.stats-row {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat h4 { font-size: 2.2rem; color: var(--accent); font-weight: 700; }
.stat p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* ===== GALLERY ===== */
.gallery-section { padding: 6rem 3rem; }
.gallery-section.alt-bg { background: var(--bg-secondary); }

.gallery-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-card);
    transition: var(--transition);
}

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

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .overlay { transform: translateY(0); }
.overlay h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.overlay p { font-size: 0.8rem; color: var(--text-secondary); }

.gallery-grid.featured .gallery-item:first-child {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.no-posts-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    grid-column: 1 / -1;
}

/* ===== CONTACT ===== */
.contact-section { background: var(--bg-secondary); padding: 6rem 3rem; }

.contact-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 { font-size: 1.6rem; margin-bottom: 1.5rem; }
.contact-info p { color: var(--text-secondary); margin-bottom: 2rem; font-weight: 300; }

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-detail .icon {
    width: 48px; height: 48px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.contact-detail .info span { display: block; font-size: 0.8rem; color: var(--text-muted); }
.contact-detail .info a, .contact-detail .info p { color: var(--text-primary); font-weight: 500; margin: 0; }

.social-links { display: flex; gap: 1rem; margin-top: 2.5rem; }

.social-links a {
    width: 44px; height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: flex; gap: 1.2rem; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form .btn-primary { align-self: flex-start; padding: 1rem 3rem; }

.form-message { padding: 1rem; border-radius: 6px; margin-top: 0.5rem; }
.form-message.success { background: rgba(76, 175, 80, 0.15); color: #4caf50; }
.form-message.error { background: rgba(244, 67, 54, 0.15); color: #f44336; }

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 3rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer span { color: var(--accent); }

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: 4px; }

.lightbox .close-btn {
    position: absolute;
    top: 2rem; left: 2rem;
    color: white; font-size: 2rem;
    cursor: pointer;
    background: none; border: none;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== SINGLE PORTFOLIO ===== */
.single-portfolio {
    padding: 8rem 3rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.single-portfolio h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-portfolio .meta {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.single-portfolio .featured-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.single-portfolio .content {
    color: var(--text-secondary);
    line-height: 2;
}

.single-portfolio .content p { margin-bottom: 1.5rem; }

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-image { max-width: 400px; margin: 0 auto; }
    .gallery-grid.featured .gallery-item:first-child { grid-column: span 1; aspect-ratio: 4/3; }
    .stats-row { gap: 2rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem 1.5rem; }

    .nav-links {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.3rem; }
    .menu-toggle { display: flex; }

    .section, .gallery-section, .about-section, .contact-section { padding: 4rem 1.5rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .hero h1 { font-size: 2.2rem; }
    .stats-row { flex-wrap: wrap; gap: 1.5rem; }
}
