.menu-toggle {
    display: none;
}

.menu-btn {
    cursor: pointer;
    padding: 1rem;
    z-index: 1000;
    display: none;
}

.hamburger,
.hamburger::after,
.hamburger::before {
    display: block;
    background: var(--dark-gray);
    height: 5px;
    width: 45px;
    border-radius: 5px;
    transition: all 0.5s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: relative;
}

.hamburger::before {
    top: -15px;
}

.hamburger::after {
    top: 10px;
}

/* Animation Hamburger */
.menu-toggle:checked+.menu-btn .hamburger {
    background: transparent;
}

.menu-toggle:checked+.menu-btn .hamburger::before {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle:checked+.menu-btn .hamburger::after {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Responsive for large ipad */
@media (max-width: 992px) {
    #container #menu {
        padding: 0 var(--spacing-lg);
        flex-direction: column;
        height: auto;
        position: relative;
    }

    .menu-btn {
        display: flex;
        position: absolute;
        right: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
    }

    /* switched by JS class due to general sibling limitation */
    #container #menu .link,
    #container #menu .region {
        max-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        justify-content: center;
        padding: 0;
        opacity: 0;
        border-top: 1px solid var(--btn-gray);
        transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
    }

    #container #menu.open .link,
    #container #menu.open .region {
        max-height: 400px;
        opacity: 1;
        padding: var(--spacing-sm) 0;
    }

    .menu-toggle:checked+.menu-btn .hamburger {
        background: transparent;
    }

    .menu-toggle:checked+.menu-btn .hamburger::before {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .menu-toggle:checked+.menu-btn .hamburger::after {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    #container #menu .link ul {
        flex-direction: column;
        text-align: center;
    }

    #container #menu .link ul li {
        padding: 0.5rem 0;
    }

    #container #menu .region {
        flex-direction: column;
        text-align: center;
    }

    #container #menu .region p {
        padding: 0.25rem 0;
    }

    /* Landing */
    #container #landing {
        height: auto;
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: var(--spacing-lg) var(--spacing-sm);
        position: static;
    }

    #container #landing h1 {
        position: static;
        font-size: 2.5rem;
        text-align: center;
        margin: 0;
        width: 100%;
    }

    #container #landing .text-box {
        position: static;
        margin-top: var(--spacing-lg);
        text-align: center;
        width: 100%;
    }

    #container #landing .text-box p:first-child {
        font-size: 1.1rem;
    }

    /* About */
    #container #about {
        padding: var(--spacing-lg) var(--spacing-sm);
        height: auto;
    }

    #container #about .about_content {
        height: auto;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    #container #about .about_content .about_img,
    #container #about .about_content .about_text {
        width: 100%;
        height: auto;
    }

    #container #about .about_content .about_img img {
        width: 100%;
        border-radius: var(--radius-sm);
    }

    #container #about .about_content .about_text p {
        text-align: center;
        padding: 0.5rem var(--spacing-sm);
        width: 100%;
    }

    /* Projects */
    #container #projects {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    #container #projects .project_body {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: var(--spacing-sm);
    }

    #container #projects .project_body .prod_card {
        width: calc(50% - var(--spacing-sm));
        height: auto;
        min-height: 35vh;
    }

    /* Services */
    #container #services {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    #container #services .services_body {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: var(--spacing-sm);
    }

    #container #services .services_body .design,
    #container #services .services_body .framer,
    #container #services .services_body .branding,
    #container #services .services_body .seo {
        width: calc(50% - var(--spacing-sm));
        height: auto;
        min-height: 30vh;
    }

    .services_cta {
        height: auto;
        min-height: 40vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    /* Testimonials */
    .testimonials-section {
        height: auto;
        min-height: 50vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .slider-container {
        height: auto;
        padding: 0 20px;
    }

    /* Footer */
    #container #footer {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .footer_cta {
        height: auto;
        min-height: 30vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    #container #footer .block {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
    }

    #container #footer .block .address,
    #container #footer .block .link {
        width: 100%;
        text-align: center;
    }

    #container #footer .block .link {
        flex-direction: row;
        justify-content: space-around;
    }
}

/* Responsive for tablet (768px) */
@media (max-width: 768px) {

    /* Services */
    #container #services {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    #container #services .services_head {
        margin-bottom: var(--spacing-lg);
    }

    #container #services .services_body {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        padding: var(--spacing-sm) var(--spacing-xs);
    }

    #container #services .services_body .design,
    #container #services .services_body .framer,
    #container #services .services_body .branding,
    #container #services .services_body .seo {
        width: 95%;
        height: auto;
        min-height: 35vh;
        margin: 0 auto;
    }

    #container #services .services_body .card {
        height: 100%;
        min-height: 35vh;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.5rem;
    }

    #container #services .services_body .card h3 {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    #container #services .services_body .card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    #container #services .services_body .card ul {
        margin: 0.75rem var(--spacing-md);
        padding-left: var(--spacing-sm);
    }

    #container #services .services_body .card ul li {
        padding: 0.35rem 0;
        font-size: 0.95rem;
    }

    #container #services .services_body .card p:last-of-type {
        margin-top: auto;
        padding-top: var(--spacing-xs);
    }

    .services_cta {
        width: 95%;
        height: auto;
        min-height: 30vh;
        padding: var(--spacing-lg) 1.5rem;
        margin: var(--spacing-lg) auto;
    }
}

/* Responsive for Mobile Devices (480px and below) */
@media (max-width: 480px) {

    /* Menu */
    #container #menu {
        padding: 0 var(--spacing-sm);
        height: auto;
    }

    #container #menu .logo img {
        width: 80px;
    }

    #container #menu .link ul li {
        padding: 0.75rem 0;
    }

    #container #menu .region p {
        font-size: 0.9rem;
    }

    /* Landing */
    #container #landing {
        min-height: 70vh;
        padding: 1.5rem 0.75rem;
    }

    #container #landing h1 {
        font-size: 1.75rem;
        margin: 0.5rem;
        line-height: 1.4;
    }

    #container #landing .text-box {
        margin-top: 1.5rem;
    }

    #container #landing .text-box p {
        font-size: 1rem;
        line-height: 1.5;
    }

    #container #landing .text-box p:last-child {
        margin-top: 1.5rem;
    }

    /* About */
    #container #about h2 {
        font-size: 1.5rem;
    }

    #container #about h3 {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    #container #about .about_content {
        padding: 0 var(--spacing-xs);
    }

    #container #about .about_content .about_img img {
        margin: 0.5rem 0;
        width: 100%;
    }

    #container #about .about_content .about_text p {
        padding: var(--spacing-xs) 0;
        width: 100%;
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: left;
    }

    /* Projects */
    #container #projects {
        padding: 1.5rem 0.75rem;
    }

    #container #projects .project_head {
        margin: 0;
        padding: 1.5rem 0.75rem;
        left: 0;
    }

    #container #projects .project_head h2 {
        font-size: 1.75rem;
        margin: 0 0 var(--spacing-sm) 0;
    }

    #container #projects .project_head h3 {
        font-size: 0.95rem;
        margin: 0 0 1.5rem 0;
        line-height: 1.5;
    }

    #container #projects .project_body {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-lg);
        padding: 0.75rem;
        width: 100%;
    }

    #container #projects .project_body .prod_card {
        width: 95%;
        display: block;
        height: auto;
        min-height: 45vh;
        margin: 0 auto;
    }

    #container #projects .project_body .prod_card .prod_card_img {
        height: 40vh;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    #container #projects .project_body .prod_card .prod_card_img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: var(--radius-sm);
    }

    #container #projects .project_body .prod_card .prod_card_text {
        height: auto;
        padding: 0.75rem 0;
    }

    #container #projects .project_body .prod_card .prod_card_text h3 {
        font-size: 1.25rem;
        margin: 0.5rem 0;
    }

    #container #projects .project_body .prod_card .prod_card_text h4 {
        font-size: 0.85rem;
        margin: 0.25rem 0 0 0;
    }

    /* Services */
    #container #services {
        padding: 1.5rem 0.75rem;
    }

    #container #services .services_head {
        margin: 0;
        padding: 1.5rem 0.75rem;
    }

    #container #services .services_head h2 {
        font-size: 1.75rem;
        margin: 0 0 var(--spacing-sm) 0;
    }

    #container #services .services_head h3 {
        font-size: 0.95rem;
        margin: 0 0 1.5rem 0;
        line-height: 1.5;
    }

    #container #services .services_body {
        gap: 1.25rem;
        padding: 0.75rem;
    }

    #container #services .services_body .design,
    #container #services .services_body .framer,
    #container #services .services_body .branding,
    #container #services .services_body .seo {
        width: 100%;
        min-height: auto;
    }

    #container #services .services_body .card {
        padding: 1.25rem;
        min-height: 28vh;
    }

    #container #services .services_body .card h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    #container #services .services_body .card p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    #container #services .services_body .card ul {
        margin: 0.75rem 1.25rem;
        padding-left: var(--spacing-xs);
    }

    #container #services .services_body .card ul li {
        padding: 0.3rem 0;
        font-size: 0.9rem;
    }

    .services_cta {
        width: 95%;
        margin: var(--spacing-lg) auto;
        padding: 1.75rem var(--spacing-sm);
        min-height: 25vh;
    }

    .services_cta h3 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .services_cta p {
        font-size: 0.95rem;
    }

    /* Footer */
    #container #footer {
        padding: 1.5rem 0.75rem;
    }

    .footer_cta {
        width: 95%;
        margin: 1.5rem auto;
        padding: 1.75rem var(--spacing-sm);
        min-height: 20vh;
    }

    .footer_cta h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .footer_cta p {
        font-size: 0.95rem;
    }

    #container #footer .block {
        margin: 1.5rem 0;
        gap: 1.5rem;
    }

    #container #footer .block .address h3 {
        font-size: 1.25rem;
    }

    #container #footer .block .address h2 {
        font-size: 1.1rem;
    }

    #container #footer .block .address p {
        font-size: 0.9rem;
        margin-top: var(--spacing-sm);
    }

    #container #footer .block .link {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    #container #footer .block .link ul {
        width: 100%;
    }

    #container #footer .block .link ul li {
        padding: 0.5rem;
    }

    /* Button Optimization for Touch Devices */
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 50px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn .icon {
        width: 20px;
        height: 20px;
    }

    /* Text Improvements for Mobile Readability */
    body {
        font-size: 16px;
    }

    /* Eliminate double tap delay on buttons */
    a,
    button {
        touch-action: manipulation;
    }
}

/* ========================================
   MODAL GALLERY RESPONSIVE - TABLETS
   ======================================== */

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }

    .modal-header h2 {
        font-size: 18px;
        font-family: gamba;
        font-weight: 400;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-item img {
        max-height: 350px;
        border-radius: 5px;
    }

    .close-btn {
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   MODAL GALLERY RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 480px) {
    .modal-gallery {
        padding: 10px;
    }

    .modal-content {
        padding: 15px;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 4px;
    }

    .modal-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .modal-header h2 {
        font-size: 16px;
        font-family: gamba;
        font-weight: 400;
        order: 1;
    }

    .close-btn {
        align-self: flex-end;
        font-size: 28px;
        width: 35px;
        height: 35px;
        order: -1;
        margin-bottom: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item img {
        max-height: 300px;
        border-radius: 5px;
    }
}