/**
 * Author: Shadow Themes
 * Author URL: https://shadow-themes.com
 */

/* TABLET: Landscape 
   ================= */
@media only screen and (max-width: 1200px) {

    /* === PSWP === */
    .pswp__button,
    .pswp__ui--fit .pswp__top-bar button.pswp__button {
        width: 48px;
        height: 48px;
    }

    /* === Grid === */
    .stg-row>div[class*='amd-t-grid'],
    [class*='amd-t-grid'] {
        display: grid;
        grid-column-gap: var(--stg-gap);
        grid-row-gap: var(--stg-gap);
    }

    .amd-t-grid-1col {
        grid-template-columns: repeat(1, 1fr);
    }

    .amd-t-grid-2cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .amd-t-grid-3cols {
        grid-template-columns: repeat(3, 1fr);
    }

    .amd-t-grid-4cols {
        grid-template-columns: repeat(4, 1fr);
    }

    .amd-t-grid-5cols {
        grid-template-columns: repeat(5, 1fr);
    }

    .amd-t-grid-6cols {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Fullwidth Sections */
    section.t-is-fullwidth {
        max-width: 100svw;
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        margin-left: calc(-1 * var(--amd-fw-spacing));
        margin-right: calc(-1 * var(--amd-fw-spacing));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    section.t-is-fullwidth.t-is-stretched {
        padding-left: 0;
        padding-right: 0;
    }

    section.t-is-fullwidth.t-is-stretched>.t-is-boxed {
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    /* Sections Spacing */
    section[data-tp-padding="none"] {
        padding-top: 0;
        padding-bottom: 0;
    }

    section[data-tp-padding="top"] {
        padding-bottom: 0;
    }

    section[data-tp-padding="bottom"] {
        padding-top: 0;
    }

    section[data-tp-padding="small"] {
        padding: calc(0.5 * var(--amd-section-gap)) 0;
    }

    /* === CTA BLOCKS === */
    .amd-masked-cta .amd-masked-content {
        max-width: 30%;
    }

    .amd-masked-cta .amd-cta-title {
        max-width: 80%;
    }

    .stg-cta-with-image {
        --this-spacing: var(--stg-large-gap);
    }

    [class*='stg-col-']>div.amd-offset-image {
        width: calc(100% - var(--this-offset) - var(--this-spacing));
    }

    /* === CONTACTS PAGE === */
    .amd-framed-socials a {
        width: 36px;
        height: 36px;
    }

    iframe.amd-google-map {
        max-height: 309px;
    }

    /* === PORTFOLIO === */
    .amd-slider-nav.on-sides {
        top: calc(50% - 36px)
    }

    .amd-slider-nav.on-sides a {
        width: 48px;
        height: 72px;
    }

    .amd-next-post.amd-icon-link .amd-icon-wrap {
        width: 128px;
        height: 128px;
    }

    .amd-next-post .amd-icon {
        width: 36px;
        height: 36px;
    }

    /* === PSWP === */
    button.pswp__button.pswp__button--close,
    .pswp__top-bar button.pswp__button,
    .pswp__ui--fit .pswp__top-bar button.pswp__button {
        right: var(--stg-small-gap);
        top: var(--stg-small-gap);
        position: absolute;
    }
}

/* MOBILE MENU
   =========== */
/* Default: Hidden on Desktop */
.amd-mobile-drawer,
.amd-mobile-overlay {
    display: none;
}

@media only screen and (max-width: 960px) {

    .amd-active-menu-ind,
    .amd-header-inner {
        display: none;
    }

    .amd-mobile-header-inner {
        display: flex;
        min-height: 44px;
        justify-content: space-between;
        align-items: center;
        padding: var(--amd-header-spacing) var(--stg-gap);
        width: 100%;
    }

    /* Toggle Button */
    .amd-mobile-menu-toggler {
        width: 44px;
        height: 44px;
        background: var(--amd-s-accent);
        transition: background-color 0.2s;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
    }

    .amd-mobile-menu-toggler i {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 20px;
    }

    .amd-mobile-menu-toggler i span {
        background: var(--amd-s-accented-text);
        width: 100%;
        height: 2px;
        border-radius: 2px;
        display: block;
    }

    /* === GLASS DRAWER STYLES === */

    /* Overlay Backdrop */
    .amd-mobile-overlay {
        display: block;
        /* Visible in mobile view context if class is added */
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 900;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .amd-mobile-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

    /* The Drawer Itself */
    .amd-mobile-drawer {
        display: flex;
        /* Visible in mobile view */
        position: fixed;
        top: 12px;
        right: 12px;
        bottom: 12px;
        width: 90%;
        max-width: 360px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-radius: 20px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transform: translateX(110%);
        /* Off screen */
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        flex-direction: column;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .amd-mobile-drawer.is-open {
        transform: translateX(0);
    }

    /* Brand Tint Override */
    .amd-mobile-drawer.is-frosted {
        background: rgba(255, 255, 255, 0.85);
        /* Inner card feel */
    }

    /* Header */
    .amd-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .amd-drawer-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--amd-s-heading);
    }

    .amd-drawer-close {
        background: rgba(0, 0, 0, 0.05);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--amd-s-heading);
        cursor: pointer;
        transition: background 0.2s;
    }

    .amd-drawer-close:active {
        background: rgba(0, 0, 0, 0.1);
    }

    /* Content Area */
    .amd-drawer-content {
        flex: 1;
        overflow-y: auto;
        padding: 16px 24px;
        display: flex;
        flex-direction: column;
    }

    /* Menu Items */
    .amd-mobile-menu {
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .amd-mobile-menu li {
        margin-bottom: 2px;
        list-style: none;
    }

    .amd-mobile-menu a,
    .amd-menu-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        /* Increased padding */
        font-size: 18px;
        /* Larger font for main items */
        font-weight: 600;
        /* Bold for main items */
        color: var(--amd-s-heading);
        /* Heading color */
        text-decoration: none;
        cursor: pointer;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        /* Subtle separator */
    }

    .amd-mobile-menu li:last-child>a {
        border-bottom: none;
    }

    .amd-mobile-menu li.current-menu-item>a {
        color: var(--amd-s-accent);
    }

    /* Submenus (Distinct Style) */
    .amd-submenu {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease;
    }

    .amd-submenu.is-open {
        grid-template-rows: 1fr;
        padding-bottom: 8px;
    }

    .amd-submenu>ul {
        overflow: hidden;
        margin: 0;
        padding: 0;
        list-style: none;
        background: rgba(0, 0, 0, 0.02);
        /* Slight background for nested area */
        border-radius: 8px;
        margin-top: 4px;
    }

    .amd-submenu li {
        margin: 0;
    }

    .amd-submenu a {
        font-size: 15px;
        /* Smaller font */
        font-weight: 500;
        padding: 10px 12px;
        /* Indented padding */
        color: var(--amd-s-text);
        opacity: 0.8;
        border-bottom: none;
        position: relative;
        display: flex;
        justify-content: flex-start;
        /* FIX: Force left alignment */
        align-items: center;
        gap: 12px;
        /* Space between Dash and Text */
    }

    /* Submenu Dash Indicator */
    .amd-submenu a::before {
        content: '';
        display: block;
        width: 12px;
        /* Dash length */
        height: 1px;
        /* Thin line */
        background: currentColor;
        border-radius: 0;
        opacity: 0.4;
        transition: width 0.2s, background-color 0.2s, opacity 0.2s;
    }

    /* Interactive Hover State */
    .amd-submenu a:hover::before {
        width: 18px;
        /* Expand on hover */
        background: var(--amd-s-accent);
        opacity: 1;
    }

    /* Active State (if current) */
    .amd-submenu li.current-menu-item>a::before {
        width: 18px;
        background: var(--amd-s-accent);
        opacity: 1;
    }

    /* Footer / CTA */
    .amd-drawer-footer {
        margin-top: auto;
        padding-top: 24px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .amd-mobile-contact-info {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 8px;
    }

    .amd-mobile-contact-info a {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--amd-s-text);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        opacity: 0.8;
        transition: opacity 0.2s;
    }

    .amd-mobile-contact-info a:hover {
        opacity: 1;
        color: var(--amd-s-accent);
    }

    .amd-mobile-cta {
        display: block;
        text-align: center;
        background: var(--amd-s-accent);
        color: #ffffff !important;
        /* Forced white for visibility */
        padding: 14px;
        border-radius: 12px;
        font-weight: 600;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(var(--amd-s-accent-rgb), 0.2);
    }

    /* Divider */
    .amd-menu-divider {
        height: 1px;
        background: rgba(0, 0, 0, 0.1);
        margin: 8px 0;
    }

    /* Improved Close Button (Centered) */
    .amd-drawer-close {
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        background: transparent;
        border: 1px solid rgba(0, 0, 0, 0.1);
        width: 40px !important;
        height: 40px !important;
        border-radius: 12px;
        display: flex !important;
        justify-content: center !important;
        /* Force center */
        align-items: center !important;
        /* Force center */
        color: var(--amd-s-heading);
        cursor: pointer;
        padding: 0 !important;
        /* Nuke global padding */
        margin: 0 !important;
        /* Nuke global margin */
        line-height: normal;
        transition: all 0.2s;
    }

    .amd-drawer-close svg {
        display: block;
        /* Remove inline spacing */
        width: 24px;
        height: 24px;
        pointer-events: none;
        margin: auto;
    }

    .amd-drawer-close:hover,
    .amd-drawer-close:active {
        background: var(--amd-s-accent);
        color: #ffffff;
        border-color: var(--amd-s-accent);
    }
}

/* MOBILE GRID
   =========== */
@media only screen and (max-width: 960px) {
    .amd-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        grid-gap: var(--stg-gap);
        grid-auto-flow: row;
    }

    .amd-bento-grid .is-medium {
        overflow: hidden;
    }

    /* Type 01 */
    .amd-bento-grid .is-large:first-child {
        grid-area: 1 / 1 / 3 / 3;
    }

    .amd-bento-grid .is-medium:nth-child(2) {
        grid-area: 3 / 1 / 4 / 3;
    }

    /* Type 02 */
    .amd-bento-grid .is-medium:last-child {
        grid-area: 4 / 1 / 5 / 3;
    }

    /* Type 03 */
    .amd-bento-grid .is-medium:first-child {
        grid-area: 1 / 1 / 2 / 3;
    }

    .amd-bento-grid .is-large:last-child {
        grid-area: 3 / 1 / 5 / 3;
    }

    /* Type 04 */
    .amd-bento-grid .is-medium:nth-child(3) {
        grid-area: 2 / 1 / 3 / 3;
    }

}

/* TABLET: Portrait Only
   ===================== */
@media only screen and (min-width: 740px) and (max-width: 960px) {
    .amd-large-text.amd-tp-normal-text {
        font-size: var(--amd-t-content-fs);
        line-height: var(--amd-t-content-lh);
        letter-spacing: var(--amd-t-content-ls);
        font-weight: var(--amd-t-content-fw);
    }

    /* Fullwidth Sections */
    section.tp-is-fullwidth {
        max-width: 100svw;
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        margin-left: calc(-1 * var(--amd-fw-spacing));
        margin-right: calc(-1 * var(--amd-fw-spacing));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    section.tp-is-fullwidth.tp-is-stretched {
        padding-left: 0;
        padding-right: 0;
    }

    section.tp-is-fullwidth.tp-is-stretched>.tp-is-boxed {
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    /* Grid Portfolio */
    .amd-tp-centered-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child {
        transform: translateX(calc(50% + 0.5 * var(--stg-gap)));
    }

    /* Icon Boxes */
    .amd-icon-box .amd-box-icon {
        width: 48px;
        height: 48px;
    }

    .amd-icon-box i {
        width: 24px;
        height: 24px;
    }

    .amd-icon-box h4 {
        padding-right: calc(48px + var(--stg-small-gap));
    }
}

/* TABLET: Portrait
   ================ */
@media only screen and (max-width: 960px) {

    /* === Grid === */
    .stg-row>div[class*='amd-tp-grid'],
    [class*='amd-tp-grid'] {
        display: grid;
        grid-column-gap: var(--stg-gap);
        grid-row-gap: var(--stg-gap);
    }

    .amd-tp-grid-1col {
        grid-template-columns: repeat(1, 1fr);
    }

    .amd-tp-grid-2cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .amd-tp-grid-3cols {
        grid-template-columns: repeat(3, 1fr);
    }

    .amd-tp-grid-4cols {
        grid-template-columns: repeat(4, 1fr);
    }

    .amd-tp-grid-5cols {
        grid-template-columns: repeat(5, 1fr);
    }

    .amd-tp-grid-6cols {
        grid-template-columns: repeat(6, 1fr);
    }

    .amd-tp-stretch-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child {
        grid-column: 1 / -1;
    }

    .amd-tp-stretch-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child.stg-aspect-square,
    .amd-tp-stretch-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child .stg-aspect-square {
        aspect-ratio: 2/1;
    }

    /* Sections Spacing */
    section[data-tp-padding="none"] {
        padding-top: 0;
        padding-bottom: 0;
    }

    section[data-tp-padding="top"] {
        padding-bottom: 0;
    }

    section[data-tp-padding="bottom"] {
        padding-top: 0;
    }

    section[data-tp-padding="small"] {
        padding: calc(0.5 * var(--amd-section-gap)) 0;
    }

    /* === Home Hero Sections === */
    /* Type 01 */
    .amd-hero-type01 h1.amd-page-title {
        font-size: var(--amd-t-h2-fs);
        letter-spacing: var(--amd-t-h2-ls);
        line-height: var(--amd-t-h2-lh);
    }

    .amd-hero-type01 .amd-masked-content {
        width: 80px;
        height: 80px;
    }

    .amd-hero-type01 .amd-masked-content a.amd-square-button {
        width: 68px;
        height: 68px;
    }

    .amd-hero-type01 .amd-masked-content a span {
        width: 24px;
        height: 24px;
    }

    /* Type 02 */
    .amd-hero-type02>.stg-row>.stg-col-6:first-child {
        position: relative;
        z-index: 5;
    }

    .amd-hero-type02 .amd-page-title {
        padding: 0;
        margin-bottom: var(--stg-gap);
    }

    .amd-hero-type02 .stg-row.stg-no-gap>div.stg-tp-offset-6 {
        margin: -70% 0 0 50%;
        position: relative;
        z-index: 3;
    }

    .amd-hero-type02 .stg-col-4>img {
        margin-left: var(--stg-gap);
    }

    /* Type 03 */
    .amd-hero-type03 .amd-hero-title-wrap {
        flex-direction: column;
    }

    .amd-hero-type03 .amd-hero-title-wrap h1.amd-page-title {
        max-width: 100%;
        margin-bottom: var(--stg-gap);
    }

    .amd-hero-type03 .amd-hero-title-wrap>div {
        max-width: 45%;
        align-self: flex-end;
    }

    .amd-hero-type03 .amd-hero-media-content {
        max-width: 45%;
    }

    .amd-hero-type03 .amd-tags-list {
        max-width: 50%;
    }

    /* Type 04 */
    .amd-hero-type04 .amd-large-text {
        max-width: 100%;
    }

    .amd-hero-type04 .amd-hero-info-line {
        margin-bottom: var(--stg-large-gap);
    }

    /* Type 07 */
    .amd-hero-type07 .amd-page-title {
        font-size: var(--amd-t-h2-fs);
        letter-spacing: var(--amd-t-h2-ls);
        line-height: var(--amd-t-h2-lh);
        padding: 0;
    }

    .amd-hero-type07 .amd-hero-social-proof {
        margin-top: calc(var(--stg-gap) + var(--stg-xs-gap));
    }

    .amd-hero-type07 .amd-hero-social-proof a,
    .amd-hero-type07 .amd-hero-social-proof img {
        width: 64px;
        height: 64px;
    }

    .amd-hero-type07 .amd-hero-social-proof a span {
        display: none;
    }

    .amd-hero-type07 .amd-hero-social-proof>div {
        flex-wrap: wrap;
    }

    .amd-hero-type07 .amd-large-text {
        font-size: var(--amd-t-content-fs);
        line-height: var(--amd-t-content-lh);
        letter-spacing: var(--amd-t-content-ls);
    }

    /* Type 08 */
    .amd-hero-form {
        padding: 0;
    }

    .amd-hero-type08 h1 {
        padding: 0;
    }

    .amd-hero-type08 .stg-row>div.stg-tp-col-12 p {
        max-width: 80%;
        margin: 0 10% var(--stg-gap) 10%;
    }

    /* === CTA Sections === */
    .amd-masked-cta .amd-masked-content {
        max-width: 50%;
    }

    .amd-masked-cta .amd-cta-title {
        font-size: var(--amd-t-h2-fs);
        letter-spacing: var(--amd-t-h2-ls);
        line-height: var(--amd-t-h2-lh);
        max-width: 100%;
        margin: var(--stg-large-gap) 0;
    }

    .amd-masked-cta input {
        font-size: var(--amd-t-h4-fs);
        letter-spacing: var(--amd-t-h4-ls);
    }

    .amd-masked-cta button {
        padding: var(--stg-gap);
    }

    .amd-masked-cta button span {
        width: 28px;
        height: 28px;
    }

    .stg-cta-with-image {
        padding: 0;
    }

    .amd-cta-form-title {
        font-size: var(--amd-t-h2-fs);
        letter-spacing: var(--amd-t-h2-ls);
        line-height: var(--amd-t-h2-lh);
    }

    .amd-cta-text {
        padding: var(--stg-large-gap) 0;
    }

    div[class*='stg-col']:has(.amd-offset-image) {
        margin-top: calc(2 * var(--stg-large-gap));
        margin-bottom: calc(-1 * var(--stg-large-gap));
    }

    [class*='stg-col-']:first-child>div.amd-offset-image,
    [class*='stg-col-']>div.amd-offset-image {
        border-radius: 0 var(--amd-large-br) 0 0;
    }

    [class*='stg-col-']:last-child>div.amd-offset-image {
        border-radius: var(--amd-large-br) 0 0 0;
    }

    /* === Elements === */
    .amd-section-title p.is-short {
        max-width: calc(0.8 * var(--stg-container-width));
    }

    .amd-masked-content {
        max-width: 50%;
    }

    .amd-grid-cta .amd-masked-content {
        max-width: 33.33%;
    }

    iframe.amd-google-map {
        aspect-ratio: 1/1;
        height: auto;
        max-height: unset;
    }

    /* List with Preview */
    .amd-list-with-preview {
        flex-direction: column;
    }

    .amd-lwp-media {
        display: none;
    }

    .amd-list-with-preview>div.amd-lwp-roster {
        width: 100%;
    }

    .amd-lwp-item {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: var(--stg-gap);
    }

    .amd-lwp-item>img {
        display: block;
        min-width: 64px;
        max-width: 64px;
        border-radius: calc(1.5 * var(--amd-xs-br));
    }

    .amd-lwp-item h5 {
        min-width: calc(50% - 64px - 2 * var(--stg-gap));
    }

    .amd-lwp-item-content {
        width: 100%;
    }

    .amd-lwp-roster .align-right:nth-child(odd) {
        text-align: left;
    }

    /* List with Details */
    .amd-detailed-list-title {
        min-width: calc(25% - var(--stg-gap));
        max-width: calc(25% - var(--stg-gap));
    }

    .amd-detailed-list-description {
        min-width: calc(75% - 2 * var(--stg-gap) - 64px);
        max-width: calc(75% - 2 * var(--stg-gap) - 64px);
    }

    .amd-detailed-list-button {
        width: 64px;
        height: 64px;
    }

    /* Slider */
    .amd-slider-nav.amd-masked-content {
        width: 128px;
        height: 64px;
    }

    .amd-slider-nav.amd-masked-content a {
        width: 56px;
        height: 56px;
        margin: 8px 0 0 8px;
    }

    .amd-slider-nav.on-sides a span.amd-icon {
        width: 20px;
        height: 20px;
    }

    /* FAQ */
    .amd-toggles-item--title h4 {
        font-size: var(--amd-t-h6-fs);
        letter-spacing: var(--amd-t-h6-ls);
        line-height: var(--amd-t-h6-lh);
    }

    .amd-toggles-item--title i.amd-icon {
        transform: rotate(-90deg) translate(-3px, 0px);
    }

    .is-active .amd-toggles-item--title .amd-icon {
        transform: rotate(0deg) translate(0, 8px);
    }

    /* === Portfolio === */
    .amd-infinite-list-title h2 {
        font-size: var(--amd-t-h3-fs);
        letter-spacing: var(--amd-t-h3-ls);
        line-height: var(--amd-t-h3-lh);
    }

    .amd-fullscreen-page .amd-slider img,
    .amd-fullscreen-page .amd-slider video {
        height: calc(100svh - var(--st-header-height) - var(--st-footer-height));
        width: auto;
    }

    .amd-column-item .amd-masked-content {
        max-width: 85%;
    }

    .amd-column-item h4 {
        font-size: var(--amd-t-h5-fs);
        letter-spacing: var(--amd-t-h5-ls);
        line-height: var(--amd-t-h5-lh);
    }

    .amd-column-item-title span {
        margin-bottom: 4px;
    }

    .amd-column-item-content .amd-icon-wrap {
        width: 64px;
        height: 64px;
    }

    .amd-column-item .amd-icon {
        width: 16px;
        height: 16px;
    }

    .amd-next-post h2 {
        font-size: var(--amd-t-h2-fs);
        letter-spacing: var(--amd-t-h2-ls);
        line-height: var(--amd-t-h2-lh);
    }

    .amd-next-post .amd-icon {
        width: 24px;
        height: 24px;
    }

    .amd-next-post.amd-icon-link .amd-icon-wrap {
        width: 96px;
        height: 96px;
    }

    .amd-next-post .amd-icon-wrap::before {
        border-width: 2px;
    }

    /* === Footer === */
    .amd-footer-widgets div[class*='stg-tp-col']:has(.amd-info-widget) {
        padding: 0 calc(0.2 * var(--stg-container-width)) 0 0;
    }

    .amd-info-widget .amd-label {
        margin-bottom: 8px;
    }
}

/* MOBILE PHONES
   ============= */
@media only screen and (max-width: 739px) {
    .amd-mobile-nav::after {
        background: linear-gradient(180deg, transparent 0%, var(--amd-s-body-bg) 100%);
        opacity: 0.85;
    }

    section.is-fullwidth {
        margin-left: calc(-1 * var(--stg-gap));
        margin-right: calc(-1 * var(--stg-gap));
        padding-left: var(--stg-gap);
        padding-right: var(--stg-gap);
    }

    section.is-fullwidth.is-stretched>.is-boxed {
        padding-left: var(--stg-gap);
        padding-right: var(--stg-gap);
    }

    /* === Mobile Menu === */
    .amd-mobile-nav {
        max-width: 100%;
    }

    .amd-mobile-header-inner {
        padding: var(--amd-header-spacing) var(--stg-gap);
    }

    /* === Grid === */
    .amd-grid-1col,
    .amd-grid-2cols,
    .amd-grid-3cols,
    .amd-grid-4cols,
    .amd-grid-5cols,
    .amd-grid-6cols {
        grid-template-columns: repeat(1, 1fr);
    }

    .stg-row>div[class*='amd-m-grid'],
    [class*='amd-m-grid'] {
        display: grid;
        grid-column-gap: var(--stg-gap);
        grid-row-gap: var(--stg-gap);
    }

    .amd-m-grid-1col {
        grid-template-columns: repeat(1, 1fr);
    }

    .amd-m-grid-2cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .amd-m-grid-3cols {
        grid-template-columns: repeat(3, 1fr);
    }

    .amd-m-grid-4cols {
        grid-template-columns: repeat(4, 1fr);
    }

    .amd-m-grid-5cols {
        grid-template-columns: repeat(5, 1fr);
    }

    .amd-m-grid-6cols {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Fullwidth Sections */
    section.m-is-fullwidth {
        max-width: 100svw;
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        margin-left: calc(-1 * var(--amd-fw-spacing));
        margin-right: calc(-1 * var(--amd-fw-spacing));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    section.m-is-fullwidth.m-is-stretched {
        padding-left: 0;
        padding-right: 0;
    }

    section.m-is-fullwidth.m-is-stretched>.m-is-boxed {
        --amd-fw-spacing: calc(0.5 * (100vw - var(--stg-container-width)));
        padding-left: var(--amd-fw-spacing);
        padding-right: var(--amd-fw-spacing);
    }

    /* Sections Spacing */
    section[data-tp-padding="none"] {
        padding-top: 0;
        padding-bottom: 0;
    }

    section[data-tp-padding="top"] {
        padding-bottom: 0;
    }

    section[data-tp-padding="bottom"] {
        padding-top: 0;
    }

    section[data-tp-padding="small"] {
        padding: calc(0.5 * var(--amd-section-gap)) 0;
    }

    /* === Home Hero Sections === */
    .amd-hero-info-line {
        font-size: var(--amd-t-meta-fs);
    }

    /* Type 01 */
    .amd-hero-type01 .amd-hero-social-proof {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
        padding-top: var(--stg-gap);
    }

    .amd-hero-type01 .amd-hero-social-proof>p {
        text-align: left;
    }

    .amd-hero-type01 .amd-hero-social-proof>div {
        margin: 0 0 0 28px;
    }

    .amd-hero-type01 .amd-masked-block {
        --masked-inner-radius: var(--amd-default-br);
        --masked-border-radius: var(--amd-small-br);
    }

    .amd-hero-type01 .amd-masked-content a.amd-square-button {
        width: 44px;
        height: 44px;
        border-radius: var(--amd-small-br);
    }

    .amd-hero-type01 .amd-masked-content a span {
        width: 16px;
        height: 16px;
    }

    .amd-hero-type01 .amd-masked-content {
        width: 56px;
        height: 56px;
    }

    .amd-hero-type01 .amd-masked-content.at-bottom-right .amd-square-button {
        margin: var(--stg-small-gap) 0 0 var(--stg-small-gap);
    }

    .amd-hero-type01 .amd-masked-media img {
        border-radius: var(--amd-small-br);
    }

    /* Type 02 */
    .stg-row.amd-hero02-row {
        width: 100%;
    }

    .amd-hero-type02 .stg-col-4>img {
        margin-left: 0;
    }

    .amd-hero-type02 .stg-row.stg-no-gap>div.stg-tp-offset-6 {
        margin: 0;
        position: absolute;
        right: 0;
        top: calc(-0.25 * var(--stg-gap));
        width: calc(50% - 0.5 * var(--stg-gap));
    }

    .stg-row.amd-hero02-row {
        padding-bottom: 0;
    }

    /* Type 03 */
    .amd-hero-type03 .amd-hero-title-wrap h1.amd-page-title {
        margin-bottom: 0;
    }

    .amd-hero-type03 .amd-tags-list,
    .amd-hero-type03 .amd-hero-media-content {
        position: static;
    }

    .amd-hero-type03 .amd-tags-list {
        max-width: 100%;
    }

    .amd-hero-type03 .amd-hero-media-content {
        margin: var(--stg-gap) 0;
        max-width: 80%;
        margin-left: 10%;
    }

    .amd-hero-type03 .amd-hero-title-wrap>div {
        max-width: 50%;
        margin: 0 25%;
    }

    .amd-hero-type03 .amd-masked-content.at-top-right>div {
        padding: 0;
    }

    .amd-hero-type03 .amd-tags-list {
        justify-content: center;
    }

    /* Type 05 */
    .amd-hero-type05 a.amd-square-button span.amd-icon {
        width: 32px;
        height: 32px;
    }

    /* Type 06 */
    .amd-hero-type06 .amd-masked-content.at-bottom-right {
        width: 88px;
        height: 88px;
    }

    .amd-hero-type06 .amd-masked-content.at-bottom-right a.amd-square-button {
        margin: var(--stg-small-gap) 0 0 var(--stg-small-gap);
    }

    .amd-hero-type06 .amd-square-button {
        width: calc(100% - var(--stg-small-gap));
        height: calc(100% - var(--stg-small-gap));
    }

    .amd-hero-type06 .is-large .amd-bento-hero-media p {
        max-width: calc(100% - 88px - var(--stg-small-gap));
    }

    /* Type 07 */
    .amd-hero-type07 .amd-hero-social-proof>div {
        justify-content: center;
    }

    /* Type 08 */
    .amd-hero-type08 .stg-row>div.stg-tp-col-12 p {
        max-width: 100%;
        margin: 0 0 var(--stg-gap) 0;
    }

    .amd-hero-form {
        padding-bottom: 0;
    }

    /* === Elements === */
    .amd-page-title.is-large {
        font-size: var(--amd-t-h1-fs);
        line-height: var(--amd-t-h1-lh);
    }

    .amd-section-title p.is-short {
        max-width: calc(0.9 * var(--stg-container-width));
    }

    .amd-image-box:not(:last-child) {
        margin: unset;
    }

    .amd-bento-grid:not(.amd-grid-cta) .is-small .amd-square-button {
        width: 48px;
        height: 48px;
    }

    .amd-bento-grid:not(.amd-grid-cta) .is-small .amd-square-button .amd-icon {
        width: 16px;
        height: 16px;
    }

    .amd-member-contacts .amd-socials-list a {
        width: 48px;
        height: 48px;
    }

    .amd-member-contacts .amd-socials-list a i {
        width: 24px;
        height: 24px;
    }

    .amd-icon-link .amd-icon-wrap {
        width: 64px;
        height: 64px;
    }

    .amd-tp-stretch-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child.stg-aspect-square,
    .amd-tp-stretch-last-item.amd-tp-grid-2cols>div:nth-child(odd):last-child .stg-aspect-square {
        aspect-ratio: 1/1;
    }

    .amd-masked-content[class*='stg-m-top-'],
    .amd-masked-content[class*='stg-m-bottom-'] {
        position: static;
        max-width: 100%;
        padding: 0;
    }

    .amd-masked-content[class*='stg-m-top-']>div,
    .amd-masked-content[class*='stg-m-bottom-']>div {
        padding: 0;
    }

    /* List with Preview */
    .amd-lwp-item {
        flex-direction: column;
        contain: paint;
    }

    .amd-lwp-item h5 {
        width: 100%;
    }

    .amd-lwp-item:not(.is-active) a {
        pointer-events: none;
    }

    .amd-lwp-item>img {
        display: none;
    }

    /* FAQ */
    .amd-toggles-item--title sup {
        display: none;
    }

    .amd-toggles-item--title h4 {
        font-size: var(--amd-t-h6-fs);
        letter-spacing: var(--amd-t-h6-ls);
        line-height: var(--amd-t-h6-lh);
        padding-right: 0;
    }

    .amd-toggles-item--title i.amd-icon {
        display: none;
    }

    /* Detailed List */
    .amd-detailed-list li {
        align-items: center;
    }

    .amd-detailed-list-title {
        min-width: calc(100% - 2 * var(--stg-gap) - 48px);
        max-width: calc(100% - 2 * var(--stg-gap) - 48px);
    }

    .amd-detailed-list-description {
        display: none;
    }

    .amd-detailed-list-button {
        width: 48px;
        height: 48px;
    }

    .amd-detailed-list-button span.amd-icon {
        width: 16px;
        height: 16px;
    }

    /* Slider */
    .amd-slider-nav.amd-masked-content a {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .amd-slider-nav.amd-masked-content a::before {
        border-width: 1px;
    }

    .amd-slider-nav.amd-masked-content span.amd-icon {
        width: 12px;
        height: 12px;
    }

    .amd-slider-nav.amd-masked-content {
        width: 100px;
        height: 52px;
    }

    .amd-list-with-preview>div.amd-lwp-roster {
        grid-template-columns: repeat(1, 1fr);
    }

    /* === CTA === */
    .amd-masked-cta .amd-masked-content {
        display: none;
    }

    .amd-masked-cta .amd-cta-form {
        padding: var(--stg-gap);
        flex-direction: column;
        gap: var(--stg-small-gap);
    }

    .amd-masked-cta .amd-cta-title {
        margin: 0 0 var(--stg-gap) 0;
    }

    .amd-masked-cta .amd-cta-form-button {
        width: 100%;
    }

    .amd-masked-cta button {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .amd-masked-cta input {
        font-size: var(--amd-t-h6-fs);
        letter-spacing: var(--amd-t-h5-ls);
    }

    .amd-grid-cta .amd-square-button span {
        width: 48px;
        height: 48px;
    }

    .amd-bento-grid {
        grid-auto-flow: column;
        grid-template-columns: repeat(2, minmax(auto, calc(50% - 0.5 * var(--stg-gap))));
        grid-template-rows: repeat(4, auto);
    }

    .amd-bento-grid .is-large {
        min-height: var(--stg-container-width);
    }

    .amd-grid-cta .is-medium {
        aspect-ratio: 2;
    }

    .amd-bento-grid .is-small:has(.amd-meta-list) {
        max-height: fit-content;
    }

    /* === Portfolio === */
    /* Infinite List */
    .amd-infinite-list-item .amd-meta {
        margin-bottom: 4px;
    }

    .amd-infinite-list-title h2 {
        font-size: var(--amd-t-h6-fs);
        letter-spacing: var(--amd-t-h6-ls);
        line-height: var(--amd-t-h6-lh);
    }

    .amd-infinite-list-icon {
        width: 48px;
        height: 48px;
    }

    .amd-infinite-list-icon .amd-icon {
        width: 16px;
        height: 16px;
    }

    .amd-infinite-list-preview {
        width: 64px;
        height: 64px;
        top: calc(50% - 32px);
    }

    .amd-infinite-list-item {
        padding-left: calc(64px + var(--stg-gap));
    }

    /* Slider */
    .amd-slider-nav.on-sides a {
        height: 64px;
    }

    .amd-slider-nav.on-sides {
        top: calc(50% - 32px);
    }

    .amd-slider-nav.on-sides a.amd-slider-prev span.amd-icon {
        transform: translateX(-4px);
    }

    .amd-slider-nav.on-sides a.amd-slider-next span.amd-icon {
        transform: translateX(4px);
    }

    .amd-slider .amd-slide-content-inner {
        padding: calc(1.5 * var(--stg-small-gap)) calc(1.5 * var(--stg-gap));
    }

    .amd-slider .amd-slide-content-inner h4 {
        font-size: var(--amd-t-h5-fs);
        letter-spacing: var(--amd-t-h5-ls);
        line-height: var(--amd-t-h5-lh);
    }

    /* Column */
    .amd-column-item.amd-masked-block {
        --masked-inner-radius: var(--amd-default-br)
    }

    .amd-column-item h4 {
        font-size: var(--amd-t-h6-fs);
        letter-spacing: var(--amd-t-h6-ls);
        line-height: var(--amd-t-h6-lh);
    }

    .amd-column-item-content .amd-icon-wrap {
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        max-height: 48px;
    }

    .amd-column-item .amd-masked-content {
        max-width: calc(100% - var(--stg-gap));
    }

    /* Posts */
    .amd-hero-info-line .amd-meta {
        display: flex;
        flex-direction: column;
    }

    .amd-next-post.amd-icon-link .amd-icon-wrap {
        width: 64px;
        height: 64px;
        border-radius: var(--amd-default-br);
    }

    .amd-next-post .amd-icon {
        width: 20px;
        height: 20px;
    }

    .amd-bento-grid>div>ul.amd-meta-list .amd-meta {
        margin-bottom: -2px;
    }

    /* === Footer === */
    .amd-footer-widgets div[class*='stg-tp-col']:has(.amd-info-widget) {
        padding: 0;
    }

    .amd-menu-widget {
        font-size: 12px;
    }
}