html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: #fff;
}

body {
    color: #50535B;
    font-family: "Montserrat", sans-serif;
    min-height: 100vh;
    margin: 0;
}

.content {
    width: 70vw;
    margin: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

nav {
    color: #50535B;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: #c45640;
    text-decoration: none;
}

.logo img {
    width: 2rem;
    height: auto;
}

nav .nav-sections a {
    text-decoration: none;
    color: #50535B;
    transition: all 0.3s ease-in-out;
    position: relative;
}

nav .nav-sections a:before {
    content: '';
    background: #c45640;
    display: block;
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    transition: all 0.3s ease-in-out;
}

nav .nav-sections a:hover {
   background-position: 0;
}

nav .nav-sections a:hover::before {
    width: 100%;
}

nav ul li {
    text-decoration: none;
    list-style: none;
    font-weight: 600;
}

.nav-content {
    display: flex;
    flex-direction: column-reverse;
}

.nav-sections, ul.icon-links {
    display: flex;
    gap: 20px;
}

ul.icon-links li{
    text-decoration: none;
    list-style: none;
}

ul.icon-links li a{
    text-decoration: none;
    color: #8D9A9C;
    font-size: 1.5rem;
    transition: ease-in 0.2s;
}

ul.icon-links a:hover{
    color: #50535B;
    transition: ease-in 0.2s;
}

ul.icon-links {
    padding: 0;
}

.top-content {
    display: flex;
    flex-direction: column;
    min-height: 85vh;
    position: relative;
}

.about {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 5.5em;

}

.about-img {
    text-align: center;
}

.about-img img {
    width: 100%;
}

h1 {
    color: #8D9A9C;
    font-size: 4rem;
    margin-bottom: 0px;
    font-family: "Alegreya Sans", sans-serif;
}

h2 {
    color: #8D9A9C;
    font-size: 3rem;
    margin: auto;
    font-family: "Alegreya Sans", sans-serif;

}

.graphic-design h1 {
    margin-top: 7.5rem;
}

.tech-stack {
    font-size: .8rem;
    color: #8d9a9c;
}

.projects {
    display: flex;
    gap: 8em;
    flex-direction: column;
    margin-bottom: 10em;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.site-footer {
    background-color: #50535B;
    color: white;
    width: 100%;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    width: 90vw;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
}

.footer-project-details {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0;
    margin: 0;
    line-height: 1.5rem;
}

.project-links li {
    list-style: none;
    font-size: 0.85rem;
}

.site-footer .nav-links {
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.site-footer .nav-links li {
    list-style: none;
}

.site-footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #c45640;
}

.site-footer .icon-links {
    margin: 0;
}

.site-footer .icon-links li a {
    color: white;
}

.site-footer .icon-links li a:hover {
    color: #c45640;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        width: 90vw;
    }

    .footer-icons {
        align-self: flex-start;
    }
}


.interactive-demo {
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.demo-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 1.5rem 0;
}

.scrollable-demo {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.demo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0;
}

.demo-table th {
    background-color: #5a9eab;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    border-right: 4px solid white;
}

.demo-table th:last-child {
    border-right: none;
}

.demo-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    vertical-align: middle;
    border-right: 4px solid white;
}

.demo-table td:last-child {
    border-right: none;
}

.demo-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.demo-btn {
    width: 70px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    margin: 0;
    height: 30px;
}

.view-btn {
    background-color: #8AC2CD;
    color: white;
}

.edit-btn {
    background-color: #94E0A5;
    color: white;
}

.demo-btn i {
    font-size: 12px;
}




.project-item:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    .project-img {
    order: 2;
    }

    .project-text {
        order: 1;
    }

}
  
  button{
    width:110px;
    height:40px;
    background-color: #c45640;
    color: #fff;
    position:relative;
    text-transform:uppercase;
    letter-spacing:1px;
    border:none;
    font-size:12px;
    outline:none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
    border-radius: 10px;
    transition: 300ms;
    margin-top: 15px;
  }

  
  #btn a:nth-child(2) button {
    margin-left: 15px;
}

  button:hover {
    background: #f0664a;
    color: #fff;
  }
  
.project-item img {
    width: 100%;
    border-radius: 5px;
}

.back-to-top {
    padding-bottom: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.back-to-top a {
    text-decoration: none;
    transition: 300ms;
    font-size: 2em;
    color: #8d9a9c;
}

.back-to-top a:hover {
    color: #50535B;
}

.scroll-downs {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    
    width :34px;
    height: 55px;
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    color: white;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-text {
    margin-top: 1rem;
    text-align: center;
}

.lightbox-text h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    padding: 0;
}

.lightbox-text p {
    margin: 0.5rem 0;
}


.nav-button {
    position: fixed; /* Change from absolute to fixed */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 4rem;
    font-weight: light;
    font-family: monospace;
    z-index: 1001; /* Ensure buttons are above lightbox content */
}

.prev {
    left: 2rem; /* Fixed distance from left edge of viewport */
}

.next {
    right: 2rem; /* Fixed distance from right edge of viewport */
}

.nav-button:hover {
    background: none;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

.details img {
    max-width: 90%;
}



@media (width <= 1200px) {
    .content {
        width: 85vw;
    }
    .about {
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: column-reverse;
        margin-bottom: 8rem;
    }
    h1 {
        font-size: 2.5rem;
        margin-top: 20px;
    }

    h2 {
        font-size: 2rem;
    }
    .about h1 {
    line-height: 1em;
    }
    .about-text {
        text-align: center;
    }
    .about-img {
        margin-top: 20px;
        width: 80%;
        max-width: 400px;
    }
    ul.icon-links {
        text-align: center;
        justify-content: center;
    }

    .divider {
        padding-bottom: 0;
        height: 200px;
    }
    .projects {
        display: block;
    }
    .project-item {
        display: block;
        text-align: center;
        min-height: 60vh;
        margin-bottom: 4rem;
    }
    .project-links {
        display: block;
    }
    
  }
  @media (width <= 670px) {
    nav {
        display: block;
        padding-top: 30px;
        padding-bottom: 20px;
        padding-right: 0;
        padding-left: 0;
    }
    .logo {
        text-align: center;
        margin-bottom: 15px;
    }

    .nav-sections {
        display: block;
        text-align: center;
    }

    ul.nav-sections {
        padding: 0;
        margin: 0;
    }

    nav ul li {
        padding-bottom: 10px;
        padding-top: 15px;
        border-bottom: solid 1px rgba(0, 0, 0, 0.1);
        padding-bottom: 15px;
    }

    nav ul li:first-child {
        border-top: solid 1px rgba(0, 0, 0, 0.1);
    }

    .about {
        padding-top: 20px;
    }
    .gallery {
        display: block;
    }
    .gallery-item {
        margin-bottom: 20px;
    }
    .lightbox-content {
        max-width: 70%;
    }
    .projects {
        gap: 4em;
    }
    .next {
        right: -0.3rem;
    }
    .prev {
        left: 0rem;
    }
  }
  
 
/* Case Study Specific Styles */
.details {
    max-width: 1200px;
    margin: 0 auto;
}

.case-study {
    margin-bottom: 4rem;
}

.case-study section {
    margin: 4rem 0; 
}

.case-study h1 {
    color: #8D9A9C;
    margin-bottom: 2rem;
    margin-top: 0;
}

.case-study h2 {
    color: #50535B;
    font-size: 3rem;
    margin: 2rem 0 1rem;
}

.case-study h3 {
    color: #8D9A9C;
    font-size: 2rem;
    margin: 1.5rem 0 1rem;
}

.case-study h4 {
    color: #50535B;
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
}

.case-study p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.disclaimer {
    background: rgba(141, 154, 156, 0.1);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid #8D9A9C;
}

.case-study figure {
    margin: 3rem 0;
}

.case-study figure img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.case-study figcaption {
    margin-top: 1rem;
    color: #8D9A9C;
    font-size: 0.9rem;
}

.class-diagram img {
    max-width: 100%;
    width: auto;
    margin: 2rem auto;
    display: block;
}

.wireframe-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin: 3rem 0 4rem 0;
}

.wireframe {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.wireframe:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wireframe img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.wireframe-gallery figure img {
    border-radius: 0;
    box-shadow: none;
}

.wireframe figcaption {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.case-study ul {
    margin: 1rem 0 2rem 1.5rem;
}

.case-study li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.call-out {
    background: rgba(141, 154, 156, 0.1);
    padding: 3rem;
    border-radius: 8px;
    margin: 3rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quality-assurance ul {
    list-style-type: none;
    margin-left: 0;
}

.quality-assurance li {
    padding-left: 1.5rem;
    position: relative;
}

.quality-assurance li::before {
    content: "•";
    color: #c45640;
    position: absolute;
    left: 0;
}

.demo-link {
    margin: 3rem 0 0 0;
}

.demo-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #c45640;
    font-weight: 600;
    transition: all 0.3s ease;
}

.demo-link a:hover {
    color: #f0664a;
}

.demo-link i {
    font-size: 0.9rem;
}

.results-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.metric {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.metric h3 {
    color: #2A4E6E;
    margin-top: 0;
    font-size: 1.25rem;
    border-bottom: 2px solid #c45640;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .results-metrics {
        grid-template-columns: 1fr;
    }
}


/* Back to main styling */

.back-link {
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #8D9A9C;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #50535B;
}

.back-link i {
    font-size: 0.9rem;
}



.subtitle {
    font-size: 1.5rem;
    margin: -1rem 0 1rem 0;
}

/* Media queries */
@media (width <= 1000px) {
    .case-study h1 {
        font-size: 3rem;
    }

    .case-study h2 {
        font-size: 2.5rem;
    }

    .case-study h3 {
        font-size: 1.8rem;
    }

    .core-features {
        padding: 2rem;
    }
}

@media (width <= 575px) {
    .case-study h1 {
        font-size: 2rem;
    }

    .case-study h2 {
        font-size: 1.8rem;
    }

    .case-study h3 {
        font-size: 1.5rem;
    }

    .wireframe-gallery {
        grid-template-columns: 1fr;
    }

    .core-features {
        padding: 1.5rem;
    }

    .demo-link a {
        padding: 0.5rem 1rem;
    }
}
