/* =======================
   VARIABLES
======================= */

:root {
    --primary: #ff4a17;
    --secondary: #1a1a1a;

    --bg: #ffffff;
    --bg-soft: #f9f9f9;

    --text: #111111;
    --text-muted: #777777;

    --card-bg: #ffffff;
    --border: #eaeaea;

    --transition: 0.3s ease-in-out;
}
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body[dir="ltr"] {
    direction: ltr;
    text-align: left;
}
/* DARK MODE */
.dark {
    --bg: #0c0c0c;
    --bg-soft: #121212;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --card-bg: #161616;
    --border: #222;
}

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

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

/* =======================
   CONTAINER
======================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =======================
   NAVBAR
======================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 700;
    font-size: 24px;
    color: var(--text);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-weight: 500;
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text);
}

/* =======================
   HERO SECTION
======================= */
.hero {
    padding: 160px 0 140px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero .hero-phone {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.hero h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 15px;
}

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

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 74, 23, 0.25);
}

/* =======================
   SECTION BASE
======================= */
section {
    padding: 140px 0;
}

.narrow {
    max-width: 700px;
    margin: auto;
    text-align: center;
}

/* =======================
   ABOUT
======================= */
.about p {
    font-size: 18px;
    color: var(--text-muted);
}

/* =======================
   SERVICES
======================= */
.services .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 48px 42px;
    border-radius: 20px;
    transition: all var(--transition);
    text-align: center;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.card p {
    color: var(--text-muted);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

/* =======================
   PORTFOLIO
======================= */
.portfolio .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.portfolio-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* control height */
    overflow: hidden;
    border-radius: 12px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 👈 THIS IS THE KEY */
    display: block;
}

.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity var(--transition);
}

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

.portfolio-item span {
    font-weight: 600;
}

/* =======================
   CONTACT
======================= */
.contact p {
    font-size: 18px;
    color: var(--text-muted);
}

/* =======================
   FOOTER
======================= */
.footer {
    text-align: center;
    padding: 50px 0;
    background: var(--bg-soft);
    color: var(--text-muted);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 48px;
    }
    .hero-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .theme-toggle {
        position: absolute;
        right: 20px;
    }

    .hero h1 {
        font-size: 36px;
    }
    .btn-primary {
        padding: 12px 28px;
    }
}

/* =======================
   FOOTER STYLES
======================= */
.footer {
    background: var(--bg-soft);
    color: var(--text-muted);
    padding: 60px 0 40px;
    transition: background var(--transition), color var(--transition);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a img {
    width: 24px;
    height: 24px;
    filter: brightness(0.3);
    transition: filter var(--transition);
}

.footer-social a:hover img {
    filter: brightness(1);
}

.footer-copy {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

/* =======================
   RESPONSIVE FOOTER
======================= */
@media (max-width: 768px) {
    .footer-links {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        gap: 15px;
    }
}

/* Initial state: element slightly below and invisible */
.scroll-up {
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* When element enters viewport */
.scroll-up.show {
    transform: translateY(0);
    opacity: 1;
}

.scroll-up.delay-1 {
    transition-delay: 0.2s;
}
.scroll-up.delay-2 {
    transition-delay: 0.4s;
}
.scroll-up.delay-3 {
    transition-delay: 0.6s;
}
