/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Gothic A1', sans-serif;
    overflow-x: hidden;
}

/* Main Container */
.portfolio-page {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    position: relative;
    background: #ad86bc;
}


/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    gap: 40px;
    width: max-content;
    padding-right: 40px;
    box-sizing: content-box;
    margin-bottom: 40px;
}


/* Header Navigation */
.navigation {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    z-index: 100;
}
.header-nav {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px;
}

.nav-container {
    position: relative;
    width: 1220px;
    height: 88px;
    background: white;
    border-radius: 40px;
    box-shadow: 0px 4px 7px 12.2px rgba(0, 0, 0, 0.25);
    display: grid;
    grid-template-columns: 56px 1fr 240px 20px;
    align-items: center;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 150px;
    height: 60px;
    object-fit: contain;
}

.nav-buttons {
    display: grid;
    grid-template-columns: auto auto;
    gap: 20px;
    justify-content: end;
    align-items: flex-start;
}

.nav-button {
    padding: 15px 30px;
    border-radius: 20px;
    border: 4px solid black;
    background: transparent;
    font-family: 'JMH Typewriter', monospace;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-button.active {
    background: black;
    color: white;
}

.nav-button:hover {
    transform: translateY(-2px);
}

/* Page Navigation Arrow to other*/
.page-nav-home {
    grid-row: auto;
    grid-column: auto;
    position: absolute;
    top: 170px;
    left: 25px;
    z-index: 100;
    cursor: pointer;
}

.nav-icon {
    width: 48px;
    height: 50px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.page-nav-contact {
    grid-row: auto;
    grid-column: auto;
    position: absolute;
    top: 170px;
    left: 1200px;
    z-index: 100;
    cursor: pointer;
    transform: rotate(180deg);
}

.nav-icon {
    width: 48px;
    height: 50px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Main Body */

/* Fix overall layout scaling */ 

.body {
    font-family: 'Gothic A1', sans-serif; 
    overflow-x: hidden; 
    max-width: 100vw; 
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto 1fr;
    padding-top: 40px;
    position: relative;
    min-height: 100vh;
    max-width: 100vw;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Background Title */
.background-title {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;        /* NEW */
    max-width: 900px;   /* NEW */
    pointer-events: none;
    z-index: 0;
}

.bg-ellipses {
    width: 100%;        /* NEW */
    height: auto;       /* NEW */
}


/* Main Title */
.main-title {
    display: grid;
    grid-template-rows: auto auto;
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    font-family: 'JMH Typewriter', monospace;
    font-weight: 100;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    letter-spacing: 0.5px;
    color: black;
}

.title-line-1 {
    text-align: right;
    margin-bottom: 40px;
}

.title-line-2 {
    text-align: left;
}

/* Products Sections */
.products-section {
    display: grid;
    grid-template-rows: auto 1fr;
    padding: 40px 40px;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Gothic A1', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.2;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0px 4px 5.5px rgba(0, 0, 0, 0.25);
    margin-bottom: 40px;
}

/* Scroll Section */
.scroll-section {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 550px;
    padding: 20px 0;
}

.scroll-section::-webkit-scrollbar {
    height: 12px;
}

.scroll-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.scroll-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.scroll-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    gap: 60px;
    width: fit-content;
    padding-right: 60px;
    box-sizing: content-box;
    margin-bottom: 40px;
}


/* Portfolio Item */
.portfolio-item {
    width: 350px;
    height: auto;
    flex-shrink: 0;
}


.item-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    position: relative;
    background: white;
    border-radius: 40px;
    box-shadow: 0px 4px 13.4px 21px white;
    width: 100%;
    height: 100%;
    padding: 30px
}

.item-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    border-radius: 20px;
    height: 250px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.item-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.item-image-container.rotated {
    transform: rotate(89.804deg);
}

.item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.item-info {
    display: grid;
    grid-template-rows: auto auto;
    gap: 15px;
    padding: 40px 57px 20px;
}

.item-title {
    font-family: 'Gothic A1', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1.3;
    letter-spacing: 0.5px;
    color: black;
}

.item-description {
    font-family: 'Gothic A1', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.5px;
    color: black;
}

/* Read More Button */
.read-more-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: none;
    border-radius: 26px;
    padding: 20px 40px;
    font-family: 'JMH Typewriter', monospace;
    font-weight: bold;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0.5px;
    color: black;
    text-align: center;
    cursor: pointer;
    box-shadow: 0px 16px 36px -3px rgba(0, 0, 0, 0.35), 0px 4px 0.8px 0px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0px 20px 40px -3px rgba(0, 0, 0, 0.45), 0px 6px 1px 0px rgba(0, 0, 0, 0.3);
}

/* Footer Contact */
.footer-contact {
    display: grid;
    grid-template-rows: 1fr;
    background: linear-gradient(180deg, #ad86bc 3.365%, #3b2762 86.538%);
    padding: 40px 20px;
    box-shadow: 0px 4px 21.5px 22px #ad86bc;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 100px;
}

.contact-info {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 20px;
}

.footer-title {
    font-family: 'JMH Typewriter', monospace;
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 20px;
}

.contact-email,
.contact-phone {
    font-family: 'Gothic A1', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 39px;
    letter-spacing: 0.5px;
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-white {
    width: 148.544px;
    height: 175.682px;
    object-fit: contain;
}

/* --- CLEAN RESPONSIVE SECTION --- */

/* 1. Large Laptops (The "Catch-all" for scaling down) */
@media screen and (max-width: 1200px) {
    .main-title {
        font-size: 80px;
        line-height: 1.1;
        padding: 60px 40px;
    }

    .section-title {
        font-size: 50px;
        line-height: 1.2;
    }

    .portfolio-grid {
        gap: 30px;
        padding-right: 30px;
    }

    .portfolio-item {
        width: 380px; /* Much more reasonable size */
        height: auto;
    }

    .item-card {
        padding: 30px;
        border-radius: 60px;
    }

    .item-content {
        height: 280px;
        width: 100%; /* Important: prevents card overflow */
        border-radius: 40px;
    }
}

/* 2. Tablets & Small Laptops */
@media screen and (max-width: 1024px) {
    .main-title {
        text-align: center;
    }
    
    .title-line-1, .title-line-2 {
        text-align: center;
    }

    .footer-content {
        gap: 40px;
        padding: 0 40px;
    }
}

/* 3. Mobile Phones */
@media screen and (max-width: 768px) {
    .nav-container {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 10px;
    }

    .nav-buttons {
        justify-content: center;
    }

    .nav-button {
        padding: 10px 20px;
        font-size: 13px;
    }

    .main-title {
        font-size: 50px;
        padding: 40px 20px;
    }

    .section-title {
        font-size: 32px;
    }

    .portfolio-item {
        width: 290px; /* Fits perfectly on an iPhone/Android screen */
    }

    .item-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .footer-contact {
        padding: 40px 20px;
    }

    .footer-title {
        font-size: 28px;
        line-height: 1.2;
    }

    .contact-email, .contact-phone {
        font-size: 16px;
    }
}