@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;800;900&display=swap');

:root {
    --bg-color: #0B0B0C;
    --surface-color: #161618;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #fca311;
    --accent-gradient: linear-gradient(135deg, #fca311, #ff6b6b);
    --accent-glow: rgba(252, 163, 17, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

::selection {
    background: var(--accent-color);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    display: inline-block;
}

.section-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-family: inherit;
    border: none;
    gap: 10px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(252, 163, 17, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    background: rgba(252, 163, 17, 0.1);
    transform: translateY(-4px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(11, 11, 12, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 8%;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
}

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

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

.nav-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 6px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 80% 20%, rgba(252, 163, 17, 0.05) 0%, transparent 40%);
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-top: 80px;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.title {
    font-size: 5rem;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 650px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-image {
    flex: 1;
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-shape {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(252, 163, 17, 0.3), rgba(255, 107, 107, 0.2));
    border-radius: 50%;
    filter: blur(100px);
    position: absolute;
    animation: pulse 6s infinite alternate;
}

.float-img {
    position: relative;
    z-index: 2;
    width: 380px;
    height: 500px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(-3deg);
    animation: float 8s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.float-img::before {
    content: 'التصميم';
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.float-img::after {
    content: 'البصري';
    font-size: 4rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(-3deg);
    }

    50% {
        transform: translateY(-25px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(-3deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1) translate(-20px, 20px);
        opacity: 1;
    }
}

/* Services */
.services {
    padding: 120px 8%;
    background-color: var(--surface-color);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card i {
    font-size: 3.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Portfolio */
.portfolio {
    padding: 120px 8%;
    background: var(--bg-color);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 30px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px var(--accent-glow);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    position: relative;
    background: #222;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 12, 0.95) 0%, rgba(11, 11, 12, 0.4) 60%, transparent 100%);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.portfolio-overlay p {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

.view-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    /* RTL Layout left side */
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    /* Arrow angle for RTL */
}

.portfolio-item:hover .view-btn {
    opacity: 1;
    transform: scale(1) rotate(0);
    transition-delay: 0.3s;
}

.view-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Contact Section */
.contact {
    padding: 120px 8%;
    background-color: var(--surface-color);
}

.contact-container {
    display: flex;
    gap: 5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
}

.contact-info .section-title {
    text-align: right;
    /* RTL right */
}

.contact-info .section-title::after {
    left: auto;
    right: 0;
    transform: none;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

.contact-list {
    list-style: none;
    margin-bottom: 3.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-list i {
    width: 60px;
    height: 60px;
    background: rgba(252, 163, 17, 0.1);
    border: 1px solid rgba(252, 163, 17, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.4rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
}

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

.social-links a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.contact-form {
    flex: 1.2;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.input-group {
    margin-bottom: 1.8rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    transition: var(--transition);
    resize: none;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-secondary);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(252, 163, 17, 0.1);
}

.submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 18px;
    font-size: 1.2rem;
    border-radius: 12px;
}

/* Footer */
footer {
    text-align: center;
    padding: 35px;
    background: #000;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* WhatsApp Floating Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* or left: 30px based on preference, right is standard even in RTL usually */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #128C7E;
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.6);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .title {
        font-size: 4rem;
    }

    .hero-image {
        height: 500px;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        padding-top: 140px;
        text-align: center;
        padding-bottom: 60px;
    }

    .subtitle {
        justify-content: center;
    }

    .subtitle::before,
    .subtitle::after {
        display: none;
    }

    .description {
        margin: 0 auto 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        margin-top: 50px;
        height: 400px;
        width: 100%;
    }

    .contact-container {
        flex-direction: column;
        gap: 3rem;
    }

    .contact-info .section-title {
        text-align: center;
    }

    .contact-info .section-title::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .contact-list li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px 5%;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        height: 100vh;
        top: 0;
        background: rgba(11, 11, 12, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        justify-content: center;
        transition: right 0.4s ease-in-out;
        z-index: -1;
    }

    .nav-active {
        right: 0;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-6px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-6px, -6px);
    }

    .title {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .contact-form {
        padding: 2.5rem 1.5rem;
    }
}