/* =========================================================
   RD DIGITAL
   PROJECTS PAGE
   FULLY RESPONSIVE CSS
   Desktop • Laptop • Tablet • Mobile
   ========================================================= */


/* =========================================================
   GLOBAL SAFETY
   ========================================================= */

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

.projects-hero,
.projects-section,
.projects-cta,
.section {
    overflow: hidden;
}


/* =========================================================
   HERO
   ========================================================= */

.projects-hero {
    padding: 80px 0 90px;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(99, 91, 255, 0.15),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #ffffff,
            #f7f8ff
        );
}

.projects-hero-content {
    max-width: 900px;
}

.projects-hero h1 {
    max-width: 850px;
    margin: 12px 0 20px;

    font-size: clamp(
        2.4rem,
        5.5vw,
        5rem
    );

    line-height: 1.03;
    letter-spacing: -0.055em;
}

.projects-hero-content > p:not(.eyebrow) {
    max-width: 760px;

    color: #646b79;

    font-size: clamp(
        0.9rem,
        1.3vw,
        1.05rem
    );

    line-height: 1.75;
}

.projects-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 30px;
}

.projects-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 25px;
}

.projects-badges span {
    padding: 8px 12px;

    border: 1px solid rgba(99, 91, 255, 0.13);
    border-radius: 50px;

    background: rgba(99, 91, 255, 0.045);

    color: #625c9d;

    font-size: 0.67rem;
    font-weight: 750;
}


/* =========================================================
   INTRO
   ========================================================= */

.projects-intro {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: clamp(30px, 6vw, 80px);

    align-items: end;
}

.projects-intro h2 {
    max-width: 600px;
    margin: 10px 0 0;
}

.projects-intro > p {
    max-width: 620px;
    margin: 0;

    line-height: 1.75;
}


/* =========================================================
   SECTION HEADING
   ========================================================= */

.section-heading {
    max-width: 800px;
    margin-bottom: 45px;
}

.section-heading h2 {
    margin: 10px 0 14px;
}

.section-heading .muted {
    line-height: 1.7;
}


/* =========================================================
   PROJECT SECTION
   ========================================================= */

.projects-section {
    background: #f8f9fc;
}

.projects-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: clamp(18px, 2.5vw, 28px);

    width: 100%;
}


/* =========================================================
   PROJECT CARD
   ========================================================= */

.project-card {
    min-width: 0;

    overflow: hidden;

    border:
        1px solid
        rgba(30, 35, 65, 0.08);

    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 15px 45px
        rgba(30, 35, 65, 0.055);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* -----------------------------------------------------------
   FIX: style.css (loaded before this file) defines a global
   .project-card rule with `display:flex; gap:18px;` meant for
   the homepage's project cards. Since this file never resets
   `display`, that flex layout still applies here and forces
   .project-preview + .project-body to sit side-by-side and
   squeeze — causing the browser-url text to truncate and the
   heading text to wrap letter-by-letter. Force block layout so
   the preview stacks above the body as designed.
   ----------------------------------------------------------- */
.project-card {
    display: block;
}

.project-preview,
.project-body {
    width: 100%;
}

.project-card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 25px 65px
        rgba(30, 35, 65, 0.10);
}


/* =========================================================
   PROJECT PREVIEW
   ========================================================= */

.project-preview {
    padding: clamp(10px, 1.5vw, 18px);

    background: #f0f1f7;
}

.browser-bar {
    display: flex;
    align-items: center;

    gap: 6px;

    min-width: 0;
    height: 34px;

    padding: 0 12px;

    border-radius: 10px 10px 0 0;

    background: #ffffff;

    border:
        1px solid
        rgba(30, 35, 65, 0.07);
}

.browser-bar > span {
    flex: 0 0 auto;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #c8cbd5;
}

.browser-url {
    overflow: hidden;

    flex: 1;

    min-width: 0;

    margin-left: 8px;

    padding: 5px 10px;

    border-radius: 6px;

    background: #f5f6fa;

    color: #858a96;

    font-size: 0.56rem;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.project-screen {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: clamp(
        250px,
        25vw,
        330px
    );

    overflow: hidden;

    border-radius: 0 0 13px 13px;
}

.project-screen::before {
    content: "";

    position: absolute;

    width: clamp(
        180px,
        25vw,
        300px
    );

    height: clamp(
        180px,
        25vw,
        300px
    );

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);
}

.tirupati-screen {
    background:
        linear-gradient(
            135deg,
            #24213f,
            #635bff
        );
}

.mauli-screen {
    background:
        linear-gradient(
            135deg,
            #1b2935,
            #437b82
        );
}

.screen-content {
    position: relative;
    z-index: 2;

    width: min(
        78%,
        430px
    );

    padding: clamp(
        18px,
        3vw,
        30px
    );

    border:
        1px solid
        rgba(255, 255, 255, 0.18);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.09);

    backdrop-filter: blur(12px);

    color: #ffffff;
}

.screen-label {
    font-size: 0.55rem;
    font-weight: 900;

    letter-spacing: 0.1em;

    opacity: 0.8;
}

.screen-content h3 {
    margin: 10px 0 7px;

    font-size: clamp(
        1.1rem,
        2vw,
        1.45rem
    );
}

.screen-content p {
    margin: 0;

    color:
        rgba(255, 255, 255, 0.78);

    font-size: 0.72rem;

    line-height: 1.55;
}

.screen-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 20px;
}

.screen-buttons span {
    padding: 7px 10px;

    border:
        1px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 7px;

    background:
        rgba(255, 255, 255, 0.1);

    font-size: 0.58rem;
}


/* =========================================================
   PROJECT BODY
   ========================================================= */

.project-body {
    padding: clamp(
        20px,
        2.5vw,
        30px
    );
}

.project-meta {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 15px;
}

.project-number {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    border-radius: 10px;

    background:
        rgba(99, 91, 255, 0.08);

    color: #635bff;

    font-size: 0.65rem;
    font-weight: 900;
}

.project-category {
    min-width: 0;

    color: #777d8a;

    font-size: 0.59rem;
    font-weight: 900;

    letter-spacing: 0.08em;

    overflow-wrap: anywhere;
}

.project-body h3 {
    margin: 0 0 10px;

    font-size: clamp(
        1.2rem,
        2vw,
        1.45rem
    );

    line-height: 1.25;
}

.project-body > p {
    margin: 0;

    color: #69707d;

    font-size: 0.8rem;

    line-height: 1.75;
}


/* =========================================================
   TAGS
   ========================================================= */

.project-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 20px;
}

.project-tags span {
    max-width: 100%;

    padding: 7px 10px;

    border:
        1px solid
        rgba(30, 35, 65, 0.08);

    border-radius: 50px;

    background: #fafafe;

    color: #636977;

    font-size: 0.6rem;
    font-weight: 700;
}


/* =========================================================
   PROJECT FEATURES
   ========================================================= */

.project-features {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;

    margin-top: 22px;
}

.project-features div {
    min-width: 0;

    color: #626976;

    font-size: 0.67rem;

    line-height: 1.45;
}

.project-features span {
    color: #635bff;

    font-weight: 900;

    margin-right: 4px;
}


/* =========================================================
   PROJECT ACTIONS
   ========================================================= */

.project-actions {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 16px;

    margin-top: 25px;
}

.project-link {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: #635bff;

    font-size: 0.72rem;
    font-weight: 850;

    text-decoration: none;
}

.project-link span {
    font-size: 1rem;

    transition:
        transform 0.2s ease;
}

.project-link:hover span {
    transform:
        translate(
            3px,
            -3px
        );
}

.project-secondary {
    color: #737987;

    font-size: 0.7rem;
    font-weight: 750;

    text-decoration: none;
}

.project-secondary:hover {
    color: #635bff;
}


/* =========================================================
   SERVICES GRID
   ========================================================= */

.project-services-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.project-services-grid article {
    min-width: 0;

    padding: clamp(
        20px,
        2.5vw,
        28px
    );

    border:
        1px solid
        rgba(30, 35, 65, 0.08);

    border-radius: 19px;

    background: #ffffff;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.project-services-grid article:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 40px
        rgba(30, 35, 65, 0.07);
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin-bottom: 17px;

    border-radius: 10px;

    background:
        rgba(99, 91, 255, 0.08);

    color: #635bff;

    font-size: 0.63rem;
    font-weight: 900;
}

.project-services-grid h3 {
    margin: 0 0 8px;

    font-size: 1rem;
}

.project-services-grid p {
    margin: 0;

    color: #6d7380;

    font-size: 0.73rem;

    line-height: 1.65;
}


/* =========================================================
   APPROACH
   ========================================================= */

.approach-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);

    gap: clamp(
        35px,
        7vw,
        80px
    );

    align-items: start;
}

.approach-content h2 {
    max-width: 600px;

    margin: 10px 0 15px;
}

.approach-content > p {
    max-width: 580px;

    margin-bottom: 25px;

    line-height: 1.75;
}

.approach-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.approach-list > div {
    display: grid;

    grid-template-columns:
        44px minmax(0, 1fr);

    gap: 15px;

    padding: 18px;

    border:
        1px solid
        rgba(30, 35, 65, 0.08);

    border-radius: 15px;

    background: #ffffff;
}

.approach-list > div > span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border-radius: 11px;

    background:
        rgba(99, 91, 255, 0.08);

    color: #635bff;

    font-size: 0.63rem;
    font-weight: 900;
}

.approach-list strong {
    display: block;

    margin-top: 2px;

    font-size: 0.8rem;
}

.approach-list p {
    margin: 5px 0 0;

    color: #707784;

    font-size: 0.7rem;

    line-height: 1.55;
}


/* =========================================================
   PROJECT TYPES
   ========================================================= */

.project-types {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.project-types article {
    min-width: 0;

    padding: clamp(
        20px,
        2.5vw,
        27px
    );

    border:
        1px solid
        rgba(30, 35, 65, 0.08);

    border-radius: 18px;

    background: #ffffff;
}

.project-types span {
    color: #635bff;

    font-size: 0.62rem;
    font-weight: 900;
}

.project-types h3 {
    margin: 10px 0 8px;

    font-size: 1rem;
}

.project-types p {
    margin: 0;

    color: #6d7380;

    font-size: 0.72rem;

    line-height: 1.65;
}


/* =========================================================
   FUTURE PROJECTS
   ========================================================= */

.future-projects {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;

    padding: clamp(
        25px,
        4vw,
        40px
    );

    border:
        1px solid
        rgba(99, 91, 255, 0.12);

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #fafaff,
            #ffffff
        );
}

.future-projects h2 {
    margin: 10px 0;
}

.future-projects p {
    max-width: 650px;

    line-height: 1.7;
}

.future-number {
    flex: 0 0 180px;

    padding: 25px;

    border:
        1px solid
        rgba(99, 91, 255, 0.1);

    border-radius: 18px;

    background:
        rgba(99, 91, 255, 0.04);

    text-align: center;
}

.future-number strong {
    display: block;

    color: #635bff;

    font-size: 2.5rem;

    line-height: 1;
}

.future-number span {
    display: block;

    margin-top: 7px;

    color: #747a88;

    font-size: 0.65rem;
    font-weight: 750;
}


/* =========================================================
   CTA
   ========================================================= */

.projects-cta {
    padding: clamp(
        65px,
        8vw,
        95px
    ) 0;

    background:
        linear-gradient(
            135deg,
            #171a2b,
            #292c4d
        );

    color: #ffffff;
}

.projects-cta-inner {
    max-width: 850px;

    margin: auto;

    text-align: center;
}

.projects-cta-inner h2 {
    margin: 10px 0 15px;

    font-size: clamp(
        2rem,
        4vw,
        3.4rem
    );

    line-height: 1.08;
}

.projects-cta-inner > p:not(.eyebrow) {
    max-width: 650px;

    margin: 0 auto;

    color: #c9ccda;

    line-height: 1.7;
}

.projects-cta-actions {
    display: flex;
    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 28px;
}


/* =========================================================
   LARGE LAPTOP
   1200px
   ========================================================= */

@media (max-width: 1200px) {

    .projects-hero {
        padding-top: 115px;
    }

    .projects-grid {
        gap: 20px;
    }

    .project-body {
        padding: 25px;
    }

}


/* =========================================================
   LAPTOP / TABLET
   1024px
   ========================================================= */

@media (max-width: 1024px) {

    .projects-hero {
        padding:
            105px 0 75px;
    }

    .projects-grid {
        grid-template-columns:
            1fr;
    }

    .project-card {
        max-width: 900px;
        width: 100%;
        margin-inline: auto;
    }

    .project-services-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .project-types {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .approach-grid {
        gap: 40px;
    }

}


/* =========================================================
   TABLET
   900px
   ========================================================= */

@media (max-width: 900px) {

    .projects-intro {
        grid-template-columns:
            1fr;

        gap: 25px;
    }

    .approach-grid {
        grid-template-columns:
            1fr;
    }

    .approach-content > p {
        max-width: 700px;
    }

    .future-projects {
        align-items: flex-start;
    }

}


/* =========================================================
   TABLET PORTRAIT
   768px
   ========================================================= */

@media (max-width: 768px) {

    .projects-hero {
        padding:
            90px 0 65px;
    }

    .projects-hero h1 {
        font-size:
            clamp(
                2.3rem,
                8vw,
                3.8rem
            );
    }

    .projects-hero-content > p:not(.eyebrow) {
        font-size: 0.92rem;
    }

    .projects-badges {
        gap: 7px;
    }

    .project-screen {
        min-height: 300px;
    }

    .project-services-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .project-types {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .future-projects {
        flex-direction: column;
        align-items: stretch;
    }

    .future-number {
        width: 100%;
        flex: none;
    }

}


/* =========================================================
   MOBILE
   600px
   ========================================================= */

@media (max-width: 600px) {

    .projects-hero {
        padding:
            80px 0 55px;
    }

    .projects-hero h1 {
        font-size:
            clamp(
                2rem,
                10vw,
                3rem
            );

        letter-spacing:
            -0.045em;
    }

    .projects-hero-actions {
        flex-direction:
            column;
    }

    .projects-hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .projects-badges {
        flex-direction:
            column;
    }

    .projects-badges span {
        width: 100%;
        text-align: center;
    }

    .project-preview {
        padding: 10px;
    }

    .browser-bar {
        height: 32px;
        padding: 0 9px;
    }

    .browser-url {
        font-size: 0.5rem;
        margin-left: 5px;
    }

    .project-screen {
        min-height:
            clamp(
                230px,
                65vw,
                280px
            );
    }

    .screen-content {
        width: 86%;
        padding: 20px;
    }

    .screen-content h3 {
        font-size: 1.15rem;
    }

    .project-body {
        padding:
            22px 18px;
    }

    .project-body h3 {
        font-size: 1.2rem;
    }

    .project-body > p {
        font-size: 0.76rem;
    }

    .project-features {
        grid-template-columns:
            1fr;
    }

    .project-actions {
        align-items: stretch;
        flex-direction:
            column;
        gap: 12px;
    }

    .project-link,
    .project-secondary {
        width: 100%;
    }

    .project-services-grid {
        grid-template-columns:
            1fr;
    }

    .project-types {
        grid-template-columns:
            1fr;
    }

    .approach-list > div {
        grid-template-columns:
            40px minmax(0, 1fr);

        gap: 12px;
        padding: 16px;
    }

    .approach-list > div > span {
        width: 40px;
        height: 40px;
    }

    .projects-cta-actions {
        flex-direction:
            column;
    }

    .projects-cta-actions .btn {
        width: 100%;
        text-align: center;
    }

}


/* =========================================================
   SMALL MOBILE
   480px
   ========================================================= */

@media (max-width: 480px) {

    .projects-hero {
        padding:
            75px 0 50px;
    }

    .projects-hero h1 {
        font-size:
            2.05rem;
    }

    .projects-hero-content > p:not(.eyebrow) {
        font-size:
            0.86rem;

        line-height:
            1.65;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size:
            1.65rem;
    }

    .projects-intro h2 {
        font-size:
            1.7rem;
    }

    .project-preview {
        padding: 8px;
    }

    .project-screen {
        min-height:
            225px;
    }

    .screen-content {
        width: 88%;
        padding: 17px;
    }

    .screen-label {
        font-size:
            0.48rem;
    }

    .screen-content h3 {
        font-size:
            1rem;
    }

    .screen-content p {
        font-size:
            0.64rem;
    }

    .screen-buttons {
        margin-top: 14px;
    }

    .screen-buttons span {
        padding:
            6px 8px;

        font-size:
            0.52rem;
    }

    .project-meta {
        gap: 8px;
    }

    .project-number {
        width: 30px;
        height: 30px;
    }

    .project-category {
        font-size:
            0.52rem;

        line-height:
            1.4;
    }

    .project-tags span {
        font-size:
            0.55rem;

        padding:
            6px 9px;
    }

    .project-features div {
        font-size:
            0.64rem;
    }

    .future-projects {
        padding:
            22px 18px;
    }

    .future-number strong {
        font-size:
            2.2rem;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   360px
   ========================================================= */

@media (max-width: 360px) {

    .projects-hero h1 {
        font-size:
            1.85rem;
    }

    .projects-hero-content > p:not(.eyebrow) {
        font-size:
            0.82rem;
    }

    .project-body {
        padding:
            19px 15px;
    }

    .project-body h3 {
        font-size:
            1.08rem;
    }

    .project-body > p {
        font-size:
            0.72rem;
    }

    .screen-content {
        width:
            91%;

        padding:
            15px;
    }

    .screen-content h3 {
        font-size:
            0.92rem;
    }

    .project-tags {
        gap:
            5px;
    }

    .project-tags span {
        font-size:
            0.51rem;
    }

}


/* =========================================================
   LANDSCAPE MOBILE
   ========================================================= */

@media (max-height: 500px)
       and (orientation: landscape)
       and (max-width: 900px) {

    .projects-hero {
        padding:
            70px 0 50px;
    }

    .project-screen {
        min-height:
            260px;
    }

    .projects-hero-actions {
        flex-direction:
            row;
    }

    .projects-hero-actions .btn {
        width:
            auto;
    }

}


/* =========================================================
   TOUCH DEVICES
   Remove hover movement on touch screens
   ========================================================= */

@media (hover: none) {

    .project-card:hover {
        transform:
            none;

        box-shadow:
            0 15px 45px
            rgba(30, 35, 65, 0.055);
    }

    .project-services-grid article:hover {
        transform:
            none;

        box-shadow:
            none;
    }

}


/* =========================================================
   REDUCED MOTION
   Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior:
            auto !important;

        transition:
            none !important;

        animation:
            none !important;
    }

}