/*
by bishoy
*/
.hero-content .btn-primary {
    margin-top: 30px;
}

/*
by bishoy
*/

:root {
    --primary: #4A3728;
    /* Deep Walnut */
    --accent: #C5A059;
    /* Antique Gold */
    --bg: #F9F7F2;
    /* Alabaster */
    --text: #2C241E;
    /* Dark Espresso */
    --white: #ffffff;
    --transition: 0.3s ease;
    --font-main: system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    color: var(--accent);
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: #fff;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: var(--white);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-text {
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary);
    font-size: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(249, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    /* Fallback */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Transition Effects */
.slide.fx-fade {
    animation: fadeIn 1.5s ease-in-out;
}

.slide.fx-slide-left {
    animation: slideLeft 1s ease-out;
}

.slide.fx-slide-right {
    animation: slideRight 1s ease-out;
}

.slide.fx-zoom {
    animation: zoomIn 5s linear;
}

.slide.fx-wipe {
    animation: wipeIn 1s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.slide.fx-blur {
    animation: blurIn 1.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
        opacity: 1;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-100%);
        opacity: 1;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes wipeIn {
    from {
        clip-path: circle(0% at 50% 50%);
        opacity: 1;
    }

    to {
        clip-path: circle(150% at 50% 50%);
        opacity: 1;
    }
}

@keyframes blurIn {
    from {
        filter: blur(20px);
        opacity: 0;
    }

    to {
        filter: blur(0);
        opacity: 1;
    }
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    /* Overlay for readability */
    border-radius: 8px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-bottom: 3px solid var(--accent);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    height: 250px;
    background-color: #ddd;
    /* Placeholder */
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s, filter 0.5s, opacity 0.5s;
}

/* Default Hover (Zoom) */
.project-card:hover img {
    transform: scale(1.1);
}

/* Random Hover Effects */
.project-card.hover-rotate:hover img {
    transform: rotate(3deg) scale(1.1);
}

.project-card.hover-sepia:hover img {
    filter: sepia(1);
    transform: scale(1.1);
}

.project-card.hover-flash:hover img {
    opacity: 0.8;
    filter: brightness(1.2);
    transform: scale(1.05);
}

.project-card.hover-blur:hover img {
    filter: blur(2px);
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.project-card:hover .project-info {
    transform: translateY(0);
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .nav-links {
    padding-right: 0;
}

/* Section Divider Styles */
.section-divider {
    position: relative;
    height: 350px;
    /* User requested height */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    perspective: 1000px;
}

.wood-plank {
    width: 100%;
    height: 60px;
    background: url('../images/wood_texture.png') repeat-x;
    background-size: contain;
    position: absolute;
    transform: translateY(100px) rotateX(90deg);
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.hammer {
    width: 100px;
    height: 100px;
    background: url('../images/hammer.png') no-repeat center;
    background-size: contain;
    position: absolute;
    top: -150px;
    right: 40px;
    transform-origin: bottom right;
    transition: top 0.5s ease-in, transform 0.3s ease-in;
    z-index: 2;
    mix-blend-mode: lighten;
}

.nail {
    width: 20px;
    height: 60px;
    background: url('../images/nail.png') no-repeat center;
    background-size: contain;
    position: absolute;
    top: 0;
    /* Start off-screen above the plank */
    right: 120px;
    z-index: 1;
    mix-blend-mode: lighten;
    opacity: 0;
    /* Start invisible */
}



/* Animation States */
.section-divider.animate .wood-plank {
    transform: translateY(0) rotateX(0);
}

.section-divider.animate .hammer {
    animation: hammerHit 2s forwards 0.5s;
    animation-iteration-count: 3;
}

.section-divider.animate .nail {
    animation: nailDown 7s forwards 0.5s;
}

@keyframes hammerHit {
    0% {
        top: -150px;
        transform: rotate(0deg);
    }

    40% {
        top: 10px;
        /* Higher position (User Request) */
        transform: rotate(45deg);
    }

    50% {
        top: 10px;
        /* Higher position (User Request) */
        transform: rotate(-10deg);
    }

    60% {
        top: 10px;
        /* Higher position (User Request) */
        transform: rotate(0deg);
    }

    100% {
        top: -150px;
        transform: rotate(0deg);
    }
}

@keyframes nailDown {
    0% {
        top: -100px;
        /* Start above the plank */
        opacity: 0;
        /* Start invisible */
    }

    25% {
        top: 100px;
        /* Move to plank */
        opacity: 1;
        /* Become visible */
    }

    50% {
        top: 105px;
        /* Move to plank */
        opacity: 1;
        /* Become visible */
    }

    75% {
        top: 110px;
        /* Driven into 10px (User Request) */
        opacity: 1;
        /* Remains visible */
    }

    100% {
        top: 115px;
        /* Driven into 10px (User Request) */
        opacity: 0;
        /* Remains visible */
    }
}


/* --- Jobs Section --- */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.job-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.job-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.job-card p {
    color: #555;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* --- Responsive --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 250px;
    /* Fixed height! */
    object-fit: cover;
    /* Crop nicely */
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #4A3728;
}

.news-content p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-more-btn {
    font-weight: 600;
    color: #C5A059;
    text-decoration: none;
    cursor: pointer;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: 0.3s;
}

.nav-links.active .close-menu {

    opacity: 1;
    transition: opacity 1s ease-in-out;
    transition-delay: 0.3s;
    /* Wait for menu to slide in */
}

.close-menu {

    opacity: 0;
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 24px;
    color: var(--primary);
    z-index: 1001;
    /* Ensure on top */
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: 0.4s ease-in-out;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        overflow-y: auto;
        padding-top: 60px;
        padding-bottom: 20px;
    }

    .nav-links.active {
        right: 0 !important;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    h1 {
        font-size: 2rem;
    }
}

/* --- Project Modal & Slider --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation: slideUp 0.3s;
    overflow: hidden;
}

.modal-text {
    text-align: center;
    margin-top: 10px;
}

.close-modal {
    color: #fff;
    position: absolute;
    top: -10px;
    right: 14px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Adjust as needed */
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
    /* Hide non-active slides */
    scroll-behavior: smooth;
    /* For smooth programmatic index changes if simplified */
    position: relative;
}

.album-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    /* Center image */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    /* Stack them */
    top: 0;
    left: 0;
}

.album-slide.active {
    opacity: 1;
    z-index: 2;
}

.album-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slider-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 10;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}