/* ============================================================================
   RESPONSIVE DESIGN - ORGANIZED & CONSOLIDATED
   ============================================================================ */

/* =============================================================================
   LARGE SCREENS - 1440px and above
   ============================================================================= */
@media (min-width: 1440px) {
    .contact-container {
        max-width: 1800px;
        gap: 120px;
    }

    .contact-letter {
        font-size: clamp(500px, 40vw, 700px);
    }

    .hero-content {
        gap: 80px;
    }

    .hero-image {
        max-width: 750px;
    }
}

/* =============================================================================
   DESKTOP - 1024px and above
   ============================================================================= */
@media (min-width: 1024px) {
    /* SERVICE SECTION - HORIZONTAL SCROLLING */
    .d-service-section {
        height: 100dvh;
    }

    .d-service-container {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        height: 100%;
        padding: 50px 30px;
    }

    .d-service-scroll-wrapper {
        overflow-x: hidden;
        width: 100%;
    }

    .d-service-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 40px;
        width: 100%;
        height: 100%;
        padding-bottom: 20px;
    }

    .d-service-item {
        flex-shrink: 0;
        width: 505px;
        height: 477px;
    }
}

/* =============================================================================
   LARGE TABLET - 1024px and below
   ============================================================================= */
@media (max-width: 1024px) {
    /* GENERAL LAYOUT */
    .d-body-active-menu {
        overflow: hidden;
    }

    .d_container {
        padding: 15px;
    }

    .d-section-title {
        line-height: 75%;
    }

    /* HEADER STYLES */
    header .d_container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
    }

    header .cta-container {
        display: none;
    }

    header .logo-container {
        max-width: 162px;
    }

    header .logo-container img {
        width: 100%;
        height: auto;
    }

    /* NAVIGATION MENU */
    .d-slide-menu {
        top: 15px;
        right: 15px;
        border-radius: 25px;
    }

    .d-slide-menu-active {
        width: 100%;
        height: 100vh;
        top: 0;
        right: 0;
        border-radius: 0;
        background: var(--primary-color);
        z-index: 9;
        align-items: center;
        position: fixed;
        justify-content: space-evenly;
        padding: 0;
    }

    .d-menu-list {
        align-items: center;
    }

    .d-slide-menu-active .d-menu-list .d-menu-item .d-menu-item-link {
        color: var(--secondary-color);
        text-decoration: none;
        font-size: 32px;
        line-height: 100%;
        font-style: normal;
        font-weight: 400;
        transition: 
            font-size 0.5s var(--transition-ease) 0.1s, 
            color 0.3s ease;
    }

    .d-icon.d-menu-list-icon {
        width: 33px;
        height: 35px;
        padding: 4px 6px;
        aspect-ratio: 1/1;
        background: var(--secondary-color);
        color: var(--white);
    }

    /* TYPOGRAPHY */
    .d-primary-heading {
        color: var(--primary-color);
        font-family: var(--font-family);
        font-size: clamp(2.5rem, 11vw, 15.125rem);
        font-style: normal;
        font-weight: 700;
        line-height: normal;
    }

    /* BUTTONS */
    .d-primary-btn {
        font-size: var(--font-size-p-mb);
    }

    .d-btn-icon {
        padding: 7px;
        width: 25px;
        height: 25px;
    }

    .d-menu-button .d-btn-icon {
        padding: 7px;
        width: 25px;
        height: 25px;
    }

    /* ICONS */
    .d-icon {
        padding: 5px;
        width: 35px;
        height: 35px;
    }

    /* HERO SECTION */
    .d-hero-container {
        flex-wrap: wrap;
        height: fit-content;
        padding: 100px 20px;
    }

    .d-hero-content {
        height: fit-content;
        width: 100%;
        gap: 30px;
    }

    .d-hero-portfoliio {
        width: 100%;
        display: flex;
        flex-direction: column-reverse;
        justify-content: space-between;
    }

    .d-hero-portfoliio .d-portfolio-item-wrapper:nth-child(1) {
        width: 100%;
        justify-content: flex-start;
    }

    .d-hero-portfoliio .d-portfolio-item-wrapper:nth-child(2) {
        width: 100%;
        justify-content: flex-end;
    }

    .hero-portfolio-item {
        display: flex;
        width: 155px;
        gap: 7px;
        position: relative;
    }

    .hero-portfolio-item-top {
        top: unset;
        right: unset;
        justify-content: flex-start;
    }

    .hero-portfolio-item-bottom {
        bottom: unset;
        left: unset;
        align-items: flex-end;
    }

    /* SECTION HEADERS */
    .d-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        align-self: stretch;
        flex-wrap: wrap;
    }

    .d-section-subheading {
        display: flex;
        max-width: 100%;
        gap: 20px;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
    }

    .d-section-subheading-text {
        text-align: left;
        width: 100%;
    }

    /* TESTIMONIALS */
    .mySwiper {
        width: 100%;
        min-height: fit-content;
    }

    .d-testimonial-content {
        max-width: 100%;
        height: fit-content;
    }

    .d-testimonial-bg-circle,
    .d-testimonial-bg-circle-2 {
        display: none;
    }

    .d-testimonial-container {
        justify-content: space-between;
        gap: 0;
    }

    .d-testimonial-item {
        background: #000;
    }

    .d-testimonial-item .testimonial-title,
    .d-testimonial-item .testimonial-role,
    .d-testimonial-item .d-testimonial-quote {
        color: var(--white);
    }

    .d-testimonial-item .d-testimonial-content {
        z-index: 5;
    }

    .d-testimonial-item .d-star {
        fill: var(--white);
    }

    /* TESTIMONIAL SLIDER PAGINATION */
    .d-testimonial-container .swiper-pagination-bullet {
        background: var(--white) !important;
        opacity: 0.3 !important;
        transition: opacity 0.3s ease, background 0.3s ease;
    }

    .d-testimonial-container .swiper-pagination-bullet-active {
        background: var(--white) !important;
        opacity: 1 !important;
    }

    /* PORTFOLIO PAGE */
    .d-portfolio-main .d-portfolio-wrapper {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex-direction: row;
        flex-wrap: wrap;
        overflow: auto;
        gap: 30px;
        justify-content: space-between;
    }

    .d-portfolio-main .portfolio-item {
        width: 100%;
        height: fit-content;
    }

    .d-portfolio-main .portfolio-item.item-even {
        border-radius: 30px 120px 30px 30px;
    }

    .d-portfolio-main .portfolio-item.item-odd {
        border-radius: 30px 30px 30px 120px;
    }

    /* CONTACT SECTION */
    .contact-container {
        flex-direction: column;
        gap: 60px;
        padding: 0 30px;
    }

    .contact-left {
        order: 1;
        gap: 20px;
        max-width: 100%;
        width: 80%;
    }

    .contact-right {
        order: 2;
        max-width: 100%;
        width: 80%;
    }

    .contact-letter {
        font-size: clamp(200px, 25vw, 300px);
    }

    /* HERO SECTION - ABOUT PAGE */
    .hero-section {
        min-height: fit-content;
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
        overflow: hidden;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        min-height: 50dvh;
        align-items: center;
        justify-content: center;
        gap: 30px;
    }

    .hero-text-container {
        display: flex;
        align-items: center;
    }

    .hero-image-container {
        display: none;
    }
}

/* =============================================================================
   TABLET AND MOBILE - below 1024px (Service Section Stacking)
   ============================================================================= */
@media (max-width: 1023px) {
    .d-service-section {
        height: auto;
        min-height: 100vh;
    }

    .d-service-container {
        height: auto;
        padding: 50px 30px;
        gap: 40px;
    }

    .d-service-scroll-wrapper {
        overflow: visible;
    }

    .d-service-group {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 30px;
        width: 100%;
        height: auto;
        align-items: flex-start;
        padding-bottom: 0;
        position: relative;
    }

    .d-service-item {
        width: 100%;
        max-width: 505px;
        flex-shrink: 1;
        margin: 0 auto;
        height: 400px;
    }
}

/* =============================================================================
   MOBILE - 768px and below
   ============================================================================= */
@media (max-width: 768px) {
    /* GENERAL LAYOUT */
    .d_container {
        padding: 50px 15px;
    }

    /* TYPOGRAPHY */
    .d-primary-btn,
    .d-primary-paragraph {
        font-size: var(--font-size-p-mb);
    }

    /* SECTION HEADERS */
    .d-section-header {
        gap: 20px;
    }

    .d-section-header .d-primary-btn {
        display: none;
    }

    .d-section-footer {
        width: 100%;
        display: flex;
    }

    /* HERO SECTION */
    .d-hero-container {
        flex-wrap: wrap;
        height: fit-content;
        padding: 80px 15px;
    }

    .hero-section {
        min-height: fit-content;
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
        overflow: hidden;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        min-height: fit-content;
        gap: 30px;
    }

    .hero-image-container {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        height: 100%;
    }

    .hero-image {
        height: 500px;
        width: 140%;
        object-fit: cover;
        object-position: top;
        text-align: center;
    }

    .hero-main-text {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    /* PORTFOLIO */
    .portfolio-item {
        width: 380px;
        height: 360px;
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 30px;
        cursor: pointer;
    }

    .portfolio-details {
        width: 100%;
        height: 100%;
        padding: 30px;
        top: 0;
        right: 0;
        background: #111111;
        position: absolute;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: left;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
    }

    .portfolio-details .portfolio-title {
        color: var(--white);
        font-size: 32px;
        font-style: normal;
        font-weight: 500;
        line-height: normal;
    }

    .portfolio-details .portfolio-description {
        color: var(--white);
    }

    .portfolio-content {
        display: flex;
        gap: 20px;
        flex-direction: column;
    }

    /* SERVICES */
    .d-service-container {
        padding: 30px 20px;
    }

    .d-service-group {
        position: relative;
        align-items: flex-start;
    }

    .d-service-item {
        width: 380px;
        height: 380px;
        padding: 30px;
        position: sticky;
        top: 10px;
    }

    .service-title {
        font-size: 28px;
    }

    /* FOOTER */
    .d-footer .d-container {
        gap: 30px;
    }

    .d-footer-content {
        flex-wrap: wrap;
        gap: 30px;
    }

    .d-footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .d-form-content {
        width: 100%;
    }

    /* CONTACT PAGE */
    .contact-section {
        padding: 40px 0;
    }

    .contact-left {
        order: 1;
        gap: 20px;
        max-width: 100%;
        width: 90%;
    }

    .contact-right {
        order: 2;
        max-width: 100%;
        width: 90%;
    }

    .contact-container {
        padding: 0 20px;
        gap: 40px;
    }

    .contact-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .form-input {
        padding: 14px 16px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 14px 28px;
        font-size: 12px;
    }

    /* JOURNEY & EXPERTISE SECTIONS */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .journey-section,
    .expertise-section {
        padding: 0;
    }

    .d-bg {
        right: -50px;
        font-size: clamp(15rem, 25vw, 20rem);
    }
}

/* =============================================================================
   SMALL MOBILE - 580px and below
   ============================================================================= */
@media (max-width: 580px) {
    /* PORTFOLIO PAGE */
    .d-portfolio-main .d-portfolio-wrapper {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        flex-direction: row;
        flex-wrap: wrap;
        overflow: auto;
        gap: 30px;
        justify-content: space-between;
    }

    .d-portfolio-main .portfolio-item {
        width: 100%;
        height: fit-content;
    }

    .d-portfolio-main .d-portfolio-container {
        padding: 180px 15px;
    }
}

/* =============================================================================
   SMALL MOBILE - 480px and below
   ============================================================================= */
@media (max-width: 480px) {
    .d-section-title {
        line-height: 100%;
    }

    /* FOOTER */
    .d-footer-container {
        padding: 40px 15px 15px;
    }

    .d-footer-content {
        gap: 30px;
    }

    /* CONTACT OPTIMIZATIONS */
    .contact-left,
    .contact-right {
        width: 95%;
    }

    .contact-container {
        padding: 0 15px;
    }

    .section-heading {
        font-size: clamp(60px, 15vw, 90px);
    }
}