@import url("../font.css");

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

html,
body {
    width: 100%;
    height: 100%;
}

/* RTL Typography Adjustments */
html[dir="rtl"] * {
    font-family: "din-next-regular", sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
    font-family: "TheYearOfHandicrafts", sans-serif !important;
    /* letter-spacing: 0; */
}


/* ========== PAGE BASE ========== */
#main {
    width: 100%;
    min-height: 100vh;
    background-color: var(--green-color);
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.projects-container {
    width: min(1200px, 100% - 3rem);
    margin: 0 auto;
}

/* ======================
   HERO
   ====================== */

   
/* --- Hero Section --- */
#services-hero {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: url(../images/home/hero-bg-green.webp) no-repeat center center/cover;
    mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 90%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.services-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-hero-content .tag {
    margin-bottom: 2.5rem;
}

.services-hero-content h1 {
    font-family: "didot-bold", serif;
    font-size: clamp(2rem, 4vw, 4rem);
    color: var(--secondary-golden-color);
    width: 80%;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.services-hero-content > p {
    /* font-family: "TheYearOfHandicrafts", serif; */
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 750px;
    margin: 0 auto;
}



.projects-hero {
    padding: 7rem 0 3rem;
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
    gap: 3rem;
    align-items: center;
}

.projects-hero-left h1 {
    font-size: clamp(2.4rem, 3.2vw, 3rem);
    margin-bottom: 0.75rem;
    font-family: "didot-bold", serif;
    font-weight: 500;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.hero-subtitle {
    max-width: 32rem;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
}

.hero-cta-row {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.projects-hero-right {
    position: relative;
    min-height: 220px;
}

.projects-hero-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ======================
   PROJECTS SECTION 
   ====================== */
.projects-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 6vw, 5.5rem);
}

/* Break the 1200px limit ONLY here */
.projects-section .projects-container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 clamp(12px, 2vw, 24px); /* small padding from edges */
}

/* GRID */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.25vw, 1.3rem);
    row-gap: clamp(0.75rem, 3vw, 3rem);
}

/* ======================
   PROJECT CARD 
   ====================== */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
}

.project-media {
    order: 0;
}
.project-meta {
    order: 1;
}

/* BIG image tile */
.project-media {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;

    /* Desktop big visual like your reference */
    aspect-ratio: auto;
    /* height: clamp(420px, 74vh, 860px); */

    transition: transform 0.45s ease;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.6s ease;
}

/* Text block */
.project-meta {
    max-width: unset;
}

/* Title style like screenshot (bigger + elegant) */
.project-title {
    font-family: "didot-bold", serif;
    font-weight: 500;
    font-size: clamp(1.35rem, 1.6vw, 2.05rem);
    line-height: 1.15;
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
    color: var(--secondary-golden-color);
    word-break: break-word;
}

/* Hide long description to match the reference layout */
.project-lead {
    display: none;
}

/* Tags become one clean line (comma separated) */
.project-tags {
    display: block;
    margin-top: 0.1rem;
}

.project-tag {
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    font-size: 1.05rem;
    opacity: 0.7;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.5;
}

.project-tag:not(:last-child)::after {
    content: ", ";
    opacity: 0.8;
}

/* hover (subtle like reference) */
@media (hover: hover) {
    .project-card:hover .project-media {
        transform: translateY(-4px);
    }
    .project-card:hover .project-media img {
        transform: scale(1.05);
    }
}

/* ======================
   RESPONSIVE 
   ====================== */


@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-media {
        height: clamp(340px, 56vh, 620px);
        border-radius: 24px;
    }
}

/* iPad Pro / tablets: reduce big vh height */
@media (min-width: 900px) and (max-width: 1100px) {
  .project-media{
    height: clamp(320px, 48vh, 560px);
  }

  /* optional: adjust focal point */
  .project-media img{
    object-position: center;
  }
}


@media (max-width: 880px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .project-media {
        height: auto;           
        aspect-ratio: 16 / 10; 
        border-radius: 22px;
    }
    #services-hero {
        height: 55vh;
    }
    
    .services-hero-content {
        padding: 0 1.5rem;
    }
    
}

/* Small phones */
@media (max-width: 600px) {
    .projects-container {
        width: calc(100% - 2rem);
    }

    .projects-hero {
        padding-top: 6rem;
    }

    .project-media {
        aspect-ratio: 4 / 3;
        border-radius: 18px;
    }

    .project-title {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .project-tag {
        font-size: 0.95rem;
    }
    html[dir="rtl"] .hero-cta-row {
        justify-content: flex-start !important;
    }

    html[dir="rtl"] .hero-subtitle {
        direction: rtl;
        text-align: right;
        font-size: 1.1rem !important;
    }

    html[dir="rtl"] .project-title {
        direction: rtl;
        text-align: right;
        font-size: 1.3rem !important;
    }

    html[dir="rtl"] .project-tags {
        direction: rtl;
        text-align: right;
        font-size: 1.1rem !important;
    }

}

/* ======================
   CUSTOM CURSOR 
   ====================== */
#main.custom-cursor-active,
#main.custom-cursor-active * {
    cursor: none !important;
}

.work-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-radius: 999px;

    background: rgba(12, 24, 19, 0.78);
    border: 1px solid rgba(236, 207, 156, 0.75);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f8ecd0;
    font-family: "didot-medium", system-ui, sans-serif;

    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 0 16px rgba(236, 207, 156, 0.28),
        0 0 26px rgba(145, 239, 24, 0.18);

    transform: translate3d(-50%, -50%, 0) scale(0);
    opacity: 0;
    transition:
        opacity 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    z-index: 9999;
}

.work-cursor span {
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}


.work-cursor::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    border: 1px solid transparent;
    background: radial-gradient(
        circle,
        rgba(236, 207, 156, 0.45),
        rgba(145, 239, 24, 0.2),
        transparent 70%
    );
    opacity: 0.55;
}

.work-cursor.is-visible {
    opacity: 1;
}

/* ======================
   RTL SUPPORT
   ====================== */
html[dir="rtl"] .projects-hero-left {
    text-align: right;
}

html[dir="rtl"] .eyebrow {
    direction: rtl;
    font-size: 1rem;
}

html[dir="rtl"] .hero-subtitle {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .project-title {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .project-tags {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .project-tag:not(:last-child)::after {
    content: "، ";
}

html[dir="rtl"] .work-cursor span{
    font-size: 1.1rem;
}