/* 
 * Merlin 2 - New Design
 * Mobile-first responsive design based on Figma mockup
 */

/* ========================
   GLOBAL STYLES & RESET
   ======================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors from Figma */
    --color-cream: #FDF7F1;
    --color-black: #000000;
    --color-gray: #363636;
    --color-light-gray: #717171;
    --color-border: rgba(0, 0, 0, 0.6);
    --color-overlay: rgba(0, 0, 0, 0.5);
    
    /* Spacing */
    --container-padding: 20px;
    --section-spacing: 100px;
    
    /* Typography */
    --font-primary: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-cream);
    color: var(--color-black);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a:hover {
    color: inherit !important;
}

.page-container {
    width: 100%;
    min-height: 100vh;
}

.section-container {
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    margin: 0 auto;
}

/* Section Headers with Brackets */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.section-bracket {
    font-size: 23px;
    font-weight: 400;
    color: var(--color-black);
}

.section-label {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.18px;
    text-transform: uppercase;
    color: var(--color-black);
    white-space: nowrap;
}

/* Followers Visibility Button - Editor Only */
.followers-visibility-btn {
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-black);
    font-size: 12px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.followers-visibility-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Hidden state styling in editor mode */
.section-header.followers-hidden {
    opacity: 0.4;
    position: relative;
}

.section-header.followers-hidden::after {
    content: 'Hidden on published site';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #ffc107;
    white-space: nowrap;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.section-header.followers-hidden .followers-visibility-btn {
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.5);
}

/* ========================
   MERLIN 2 - HERO LOCATION
   ======================== */

.m2-hero-location {
    position: absolute;
    bottom: 14%;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 15;
    mix-blend-mode: difference;
}

/* Hide location when empty, show when has value */
.m2-hero-location:not(:has(.m2-hero-location-label[data-has-value="true"])):not(.editor-visible) {
    display: none;
}

/* In editor mode, always show location for editing */
body.editor-active .m2-hero-location {
    display: flex;
}

.m2-hero-location-bracket {
    font-size: 18px;
    font-weight: 500;
    color: #FDF7F1;
    mix-blend-mode: difference;
}

.m2-hero-location-label {
    color: #FDF7F1;
    text-align: center;
    font-family: Switzer, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0.18px;
    text-transform: uppercase;
    mix-blend-mode: difference;
}

/* ========================
   MERLIN 2 - HERO NAVIGATION
   ======================== */

.m2-hero-navigation {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Username in hero navigation */
.m2-hero-nav-left {
    display: flex;
    align-items: center;
    color: #FFF8F1;
    width: 100%;
    font-size: 18px;
}

.m2-hero-username {
    font-family: 'neue-haas-grotesk-display', Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #FFF8F1;
    letter-spacing: 0.02em;
    text-transform: none;
    transition: color 0.3s ease;
}

/* Remove mix-blend-mode when mobile menu is open */
.m2-hero-navigation.menu-open {
    mix-blend-mode: normal !important;
}

.m2-hero-navigation.top-20 {
    top: 20px;
}

/* In edit mode, change to absolute positioning (M6 main page only, not subpage) */
body:not(.m2-subpage).editor-active .m2-hero-navigation {
    position: absolute;
    top: 60px;
}

.m2-menu-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: filter 0.4s ease;
}

.m2-menu-btn svg {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.m2-menu-btn svg:first-child {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    pointer-events: auto;
}

.m2-menu-btn svg.m2-menu-btn-close {
    opacity: 0;
    transform: rotate(90deg) scale(0);
    pointer-events: none;
}

.m2-menu-btn:hover svg:first-child {
    transform: rotate(0deg) scale(1.05);
}

body.m2-menu-open .m2-menu-btn {
    filter: none;
}

body.m2-menu-open .m2-menu-btn svg:first-child {
    opacity: 0;
    transform: rotate(90deg) scale(0);
    pointer-events: none;
}

body.m2-menu-open .m2-menu-btn svg.m2-menu-btn-close {
    opacity: 1;
    transform: rotate(90deg) scale(1);
    pointer-events: auto;
}

body.m2-menu-open .m2-menu-btn svg.m2-menu-btn-close path {
    fill: #000;
}

body.m2-menu-open .m2-menu-btn:hover svg.m2-menu-btn-close {
    transform: rotate(180deg) scale(1.05);
}

/* Hide username/hero-name when menu is open */
body.m2-menu-open .m2-nav-username,
body.m2-menu-open .hero-name-static {
    opacity: 0;
    pointer-events: none;
}

/* ========================
   MERLIN 2 - MOBILE MENU OVERLAY
   ======================== */

.m2-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.m2-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================
   MERLIN 2 - MOBILE MENU DRAWER
   ======================== */

.m2-mobile-menu {
    position: fixed;
    top: 60px;
    right: -440px;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    background: var(--color-cream);
    z-index: 999;
    padding-top: 32px;
    overflow-y: auto;
    transition: right 0.4s ease;
    padding: 20px var(--container-padding);
}

.m2-mobile-menu.active {
    right: 0;
}

.m2-menu-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* height: 100%; */
    padding-top: 60px;
}

.m2-menu-section-link {
    display: block;
    text-decoration: none;
    color: #000;
    transition: opacity 0.3s ease;
    position: relative;
    padding: 12px 0;
}

.m2-menu-section-link:hover {
    opacity: 0.6;
}

.m2-menu-section-text {
    font-family: Switzer, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0.18px;
    text-transform: uppercase;
}

/* Services Accordion */
.m2-menu-section-accordion {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    margin-left: -22px;
}

.m2-menu-accordion-toggle {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.m2-menu-accordion-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: -1;
     width: 16px;
    height: 16px;
    margin-right: 6px;
}

.m2-menu-accordion-icon::before,
.m2-menu-accordion-icon::after {
    content: '';
    position: absolute;
    background-color: #000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.m2-menu-accordion-icon::before {
    width: 12px;
    height: 2px;
}

.m2-menu-accordion-icon::after {
    width: 2px;
    height: 12px;
    opacity: 0;
}

.m2-menu-accordion-icon.fa-minus::after {
    opacity: 0;
}

.m2-menu-accordion-icon.fa-plus::after {
    opacity: 1;
}

.m2-menu-accordion-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-left: 23.5px;
    margin-top: 0;
    padding-top: 24px;
    max-height: 200px;
    overflow: scroll;
    /* No CSS transitions - GSAP handles animation */
}

.m2-menu-accordion-content.collapsed {
    height: 0;
    padding-top: 0;
}

.m2-menu-service-link {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.16px;
    color: var(--color-black);
    text-decoration: none;
    margin-bottom: 24px;
    /* No transitions - GSAP handles animation */
}

.m2-menu-service-link:last-child {
    margin-bottom: 0;
}

.m2-menu-service-link:hover {
    opacity: 0.6;
}

/* Language Toggle */
.m2-menu-language {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 40px;
    margin-top: auto;
}

.m2-language-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.m2-language-toggle-item.disabled {
    opacity: 0.5; /* Keep visible with opacity in editor */
}

/* In preview mode (visitor view), hide language toggle completely when disabled */
body:not(.edit-mode-active) .m2-language-toggle-item.disabled {
    display: none !important;
}

.m2-language-toggle-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-black);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.18px;
    transition: opacity 0.3s ease;
}

.m2-language-toggle-link:hover {
    opacity: 0.6;
}

.m2-language-icon {
    font-size: 22px;
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.m2-language-text {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.18px;
    color: var(--color-black);
    text-transform: uppercase;
}

/* Prevent body scroll when menu is open */
body.m2-menu-open {
    overflow: hidden;
}

/* ========================
   HERO SECTION
   ======================== */

.hero-section {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 700px;
    overflow: hidden;
}

.hero-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.edit-cover-btn {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    mix-blend-mode: difference;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    pointer-events: none;
}

/* Remove mix-blend-mode in edit mode */
body.editor-active .hero-content {
    mix-blend-mode: normal;
}

.hero-content * {
    pointer-events: auto;
}

/* Hero content is above media layer */

.hero-instagram-handle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: var(--container-padding);
    margin-bottom: 40px;
}

.hero-instagram-icon {
    font-size: 18px;
    color: var(--color-cream);
}

.hero-instagram-text {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: var(--color-cream);
}

.hero-name-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--container-padding);
}

.hero-name-box {
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    padding: 20px 30px;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.hero-name {
    font-size: 71px;
    font-weight: 400;
    letter-spacing: 1.42px;
    line-height: 1.32;
    text-align: center;
    color: var(--color-cream);
    text-transform: uppercase;
}

/* Hero Name Static */
.hero-name-static {
    width: 100%;
    padding: 30px 20px;
    padding-bottom: 0;
    margin-bottom: 40%;
    background: transparent;
}

.hero-name-text {
    font-family: "apparat-extracond", sans-serif;
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--color-cream);
    text-transform: uppercase;
    margin: 0;
}

/* Only apply nowrap when fixed */
.hero-name-static.is-fixed {
    width: max-content;
}

.hero-name-static.is-fixed .hero-name-text {
    text-align: left;
    font-size: 20px;
}

/* ========================
   DESCRIPTION SECTION
   ======================== */

.description-section {
    padding: var(--section-spacing) 0;
}

.description-text {
    font-size: 33px;
    font-weight: 400;
    line-height: 1.32;
    color: var(--color-black);
    max-width: 100%;
    text-align: center;
}

/* ========================
   CTA BUTTON SECTION
   ======================== */

.cta-section {
    padding: var(--section-spacing) 0;
}

.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 22px 40px;
    background: var(--color-cream);
    border: 1px solid var(--color-black);
    border-radius: 68px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-text {
    font-size: 33px;
    font-weight: 500;
    letter-spacing: 0.33px;
    color: var(--color-gray);
    margin-right: 15px;
}

.cta-button:hover .cta-text {
    color: var(--color-cream);
}

.cta-icon {
    font-size: 24px;
    color: var(--color-gray);
}

.cta-button:hover .cta-icon {
    color: var(--color-cream);
}

/* ========================
   NEW ANIMATED SVG CTA BUTTON
   ======================== */

.m2-svg-cta-section {
    padding: var(--section-spacing) 0;
}

.m2-svg-cta-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.m2-svg-cta-icon {
    width: 58px;
    height: 58px;
    cursor: pointer;
    transition: transform 0.3s ease;
    overflow: visible;
}

.m2-svg-cta-icon:hover {
    transform: scale(1.05);
}

.svg-cta-text {
    font-family: Switzer, var(--font-primary);
    font-size: 33px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: -3px;
}

.svg-letter {
    opacity: 0;
}

/* Initial state - Plus sign morphs to L shapes, rectangle expands */
/* Note: Initial states are set by GSAP */

/* Responsive */
@media (max-width: 1280px) {
    .m2-svg-cta-icon {
        width: 48px;
        height: 48px;
    }
}

/* ========================
   PROJECTS SECTION
   ======================== */

.projects-section {
    padding: var(--section-spacing) 0;
}

.projects-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    margin-top: 30px;
}

.projects-carousel {
    display: flex;
    gap: 16px;
    margin-left: -60px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: none; /* Disabled for auto-scroll */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 var(--container-padding);
    cursor: grab;
    transition: margin-left 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
}


.projects-carousel.scrolled {
    margin-left: 8px;
    margin-right: 8px;
}

.projects-carousel::-webkit-scrollbar {
    display: none;
}

.projects-carousel:active {
    cursor: grabbing;
}

.project-card {
    position: relative;
    flex: 0 0 auto;
    width: 100vw;
    height: 100%;
    scroll-snap-align: start;
    border-radius: 4px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--color-black);
}

.project-media {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.project-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-light-gray);
}

.project-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Error states for media loading */
.video-error,
.image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--color-light-gray);
    background: #1a1a1a;
}

.video-error i,
.image-error i {
    font-size: 36px;
    margin-bottom: 12px;
    color: #ff6b6b;
}

.video-error p,
.image-error p {
    font-size: 14px;
    font-weight: 500;
}

/* ========================
   ABOUT SECTION
   ======================== */
/* soho-axis-bio-text-glitter for template merlin6 (unchanged here for now) */
.about-section {
    padding: 40px 0;
}

.about-content {
    margin-top: 30px;
}

.about-text {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.32;
    letter-spacing: 0.28px;
    color: var(--color-black);
    margin-bottom: 40px;
}

.about-profile-image {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.about-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================
   SERVICES SECTION
   ======================== */

.m2-services-section {
    padding-top: 80px;

};

.services-section {
    padding: var(--section-spacing) 0;
}

.services-list {
    margin-top: 30px;
}

.service-featured {
    position: relative;
    width: 100%;
    height: 247px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.service-featured-image {
    width: 100%;
    height: 100%;
}

.service-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.service-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-cream);
}

.service-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

.service-featured-info {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

.service-featured-icon {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cream);
    font-size: 16px;
}

.service-featured-title {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.28px;
    color: var(--color-cream);
}

.service-item {
    margin-bottom: 20px;
}

.service-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.service-item-title {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.32px;
    color: var(--color-gray);
}

.service-item-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
    font-size: 20px;
}

.service-divider {
    height: 1px;
    background: #6b727f;
    width: 100%;
}

/* Services Grid */
.m2-services-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 60px;
}

/* Featured Service Card (with image) */
.m2-service-card {
    position: relative;
    height: auto;
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: var(--color-black);
}

.m2-service-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.m2-service-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.m2-service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m2-service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.m2-service-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    color: var(--color-cream);
}

.m2-service-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

.m2-service-placeholder p {
    font-size: 16px;
    margin: 0;
}

.m2-service-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.m2-service-icon {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.m2-service-icon i {
    font-size: 16px;
    color: #FDF7F1;
}

.m2-service-title {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.28px;
    line-height: 28px;
    color: var(--color-cream);
    margin: 0;
    text-transform: uppercase;
}

/* Mobile click indication - temporary highlight */
@media (max-width: 767px) {
    .m2-service-card.clicked {
        transform: scale(0.98);
        transition: transform 0.2s ease;
    }
}

/* Hover effects for desktop */
@media (min-width: 1280px) {
    .m2-service-card-link:hover .m2-service-image {
        transform: scale(1.05);
        transition: transform 0.4s ease;
    }
}

/* ========================
   TESTIMONIALS SECTION
   ======================== */

.testimonials-section {
    padding: 40px 0;
    padding-bottom: 120px;
    background: var(--color-cream);
}

.testimonials-section .section-header {
    margin-bottom: 36px;
    justify-content: center;
}

.testimonials-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.testimonials-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    width: 100%;
}

.testimonials-carousel::-webkit-scrollbar {
    display: none;
}

.testimonials-carousel:active {
    cursor: grabbing;
}

.testimonial-card {
    flex: 0 0 auto;
    width: 100vw;
    min-height: 192px;
    padding: 24px 50px;
    background: var(--color-cream);
    border-radius: 4px;
    scroll-snap-align: start;
}

@media (min-width: 1280px) {
    .testimonial-card {
        width: 280px;
        flex-shrink: 0;
    }
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #31443D;
    opacity: 0.7;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #31443D;
    opacity: 0.7;
}

.testimonial-author-name {
    font-size: 16px;
    font-weight: 400;
    color: #31443D;
    opacity: 0.7;
    text-align: center;
}

.testimonial-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    color: var(--color-black);
}

/* Testimonials Dots */
.testimonials-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
    padding: 0 var(--container-padding);
}

.testimonials-dots .dot {
    width: 7px;
    height: 7px;
    background-color: #d9d9d9;
    border-radius: 0; /* Square dots like Figma design */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.testimonials-dots .dot.active {
    background-color: #7d7d7d;
}

/* ========================
   GALLERY SECTION - SIMPLE 2 COLUMN GRID
   ======================== */

.gallery-section {
    padding: var(--section-spacing) 0 0;
}

.gallery-section .gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 8px;
    width: 100%;
    padding: 0;
}

/* All gallery items default: 2 per row with 1:2 aspect ratio (vertical rectangles) */
.gallery-section .gallery-item {
    position: relative;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 2 !important;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    grid-row: auto !important;
    grid-column: auto !important;
}

/* Last item if odd number: full viewport width square (1:1) */
.gallery-section .gallery-item:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Override ALL other classes from shared component with higher specificity */
.gallery-section .gallery-grid .gallery-item.tall-left,
.gallery-section .gallery-grid .gallery-item.tall-right,
.gallery-section .gallery-grid .gallery-item.square,
.gallery-section .gallery-grid .gallery-item.square-half,
.gallery-section .gallery-grid .gallery-item.wide-horizontal {
    height: auto !important;
    aspect-ratio: 1 / 2 !important;
    grid-row: auto !important;
    grid-column: auto !important;
}

/* Last item override for odd number with higher specificity */
.gallery-section .gallery-grid .gallery-item.tall-left:last-child:nth-child(odd),
.gallery-section .gallery-grid .gallery-item.tall-right:last-child:nth-child(odd),
.gallery-section .gallery-grid .gallery-item.square:last-child:nth-child(odd),
.gallery-section .gallery-grid .gallery-item.square-half:last-child:nth-child(odd),
.gallery-section .gallery-grid .gallery-item.wide-horizontal:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    aspect-ratio: 1 / 1 !important;
}

.gallery-section .gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-light-gray);
}

.gallery-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ========================
   CONTACT SECTION
   ======================== */

.contact-section {
    position: relative;
    padding: var(--section-spacing) 0;
    margin-top: var(--section-spacing);
}

.contact-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.contact-background-video,
.contact-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
}

.contact-section .section-container {
    position: relative;
    z-index: 1;
}

.contact-section .section-header {
    margin-bottom: 40px;
}

.contact-section .section-bracket,
.contact-section .section-label {
    color: var(--color-black);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.form-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--color-cream);
    border: 1px solid rgba(0, 0, 0, 0.60) !important;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.36px;
    color: var(--color-gray);
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--color-gray);
}

.form-input:focus {
    border-color: var(--color-black);
}

.form-textarea {
    resize: vertical;
    min-height: 127px;
}

.form-submit {
    width: 100%;
    padding: 16px;
    background: var(--color-black);
    border: 1px solid rgba(0, 0, 0, 0.60);
    border-radius: 12px;
    font-family: Switzer, var(--font-primary);
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.48px;
    color: #FDF7F1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: #333;
    color: #FDF7F1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-tools {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.contact-tool {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid black;
    padding: 8px !important;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-tool svg {
    width: 50px;
    height: 50px;
}

.contact-tool:hover {
    transform: scale(1.1);
}

/* ========================
   FOOTER SECTION
   ======================== */

.footer-section {
    padding: 60px 0 40px;
    background: var(--color-cream);
    overflow: hidden;
}

.footer-name {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.22px;
    color: var(--color-black);
    margin-bottom: 30px;
    word-break: break-all;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.footer-text {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-black);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;

    color: var(--color-black);
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    color: var(--color-light-gray);
    transform: scale(1.2);
}

/* ========================
   EDITOR STYLES
   ======================== */

.show-on-editor {
    display: none;
}

.editable-text-field:empty:not([data-has-value="true"]):before {
    content: attr(data-placeholder);
    color: rgba(0, 0, 0, 0.3);
}

.editable-container {
    position: relative;
}

/* ========================
   RESPONSIVE DESIGN
   ======================== */


@media (min-width: 1280px) {
    :root {
        --container-padding: 60px;
        --section-spacing: 120px;
    }
    
    /* Hero name static - reduced margin on desktop */
    .hero-name-static {
        margin-bottom: 20%;
    }
    
    /* Hide hero overlay on desktop */
    .hero-overlay {
        display: none;
    }
    
    /* Menu button - black color on desktop */
    .m2-menu-btn {
        filter: none;
    }
    
    .m2-menu-btn svg path {
        fill: #000000;
        stroke: #000000;
    }
    
    /* Hero section padding */
    .hero-media-container {
        padding-left: 64px;
        padding-right: 64px;
        height: auto;
    }
    
    .hero-content {
        padding-left: 0px;
        padding-right: 0px;
    }
    
    .hero-name {
        font-size: 110px;
    }
    
    /* Description section */
    .description-section {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        padding-top: 50px;
    }
    
    .description-text {
        font-size: 36px;
        text-align: center;
    }
    
    .cta-button {
        max-width: 400px;
    }
    
    /* About section - centered column layout */
    .about-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .about-title {
        text-align: center;
    }
    
    .about-profile-container {
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
    }
    
    .about-text {
        width: 100%;
        margin-bottom: 0;
    }
    
    .about-profile-image {
        width: 200px;
        height: 200px;
        margin-top: 70px;
        }
    
    /* Projects section padding */
    .projects-section {
        padding-left: 64px;
        padding-right: 64px;
    }
    
    .project-card {
        width: 560px;
        height: 840px;
    }
    
    /* Section container */
    .section-container {
        width: 100%;
        text-align: center;
    }
    
    /* All section headers centered */
    .section-header {
        justify-content: center;
        margin-bottom: 50px;
    }
    
    /* Section labels - Desktop font size */
    .section-label {
        font-size: 22px;
    }
    
    /* All sections padding */
    .about-section,
    .m2-services-section,
    .testimonials-section,
    .contact-section,
    .footer-section {
        padding-left: 64px;
        padding-right: 64px;
    }
    
    .m2-services-section {
        padding-top: 120px;
    }
    
    .m2-service-card {
        aspect-ratio: 4 / 1;
    }
    
    .m2-services-grid {
        padding-bottom: 100px;
    }
    
    .testimonials-section .section-header {
        margin-bottom: 64px;
    }
    
    .testimonials-section {
        padding-bottom: 150px;
    }

    .about-text { 
        font-size: 30px;
    }
    
    .service-featured {
        height: 320px;
    }
    
    /* Testimonials - show only one in viewport */
    .testimonials-carousel {
        justify-content: center;
    }
    
    .testimonial-card {
        width: 350px;
        flex-shrink: 0;
    }
    
    /* Gallery padding */
    .gallery-section {
        padding-left: 64px;
        padding-right: 64px;
    }
    
    .gallery-grid {
        gap: 40px;
    }
    
    /* Contact and footer centered with max width */
    .contact-section .section-container {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .contact-form {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-section .footer-content {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    .footer-social {
        display: flex;
        justify-content: center;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    :root {
        --container-padding: 80px;
    }
    
    /* Hero section padding */
    .hero-media-container {
        padding-left: 200px;
        padding-right: 200px;
        height: auto;
    }
    
    .hero-content {
        padding-left: 0px;
        padding-right: 0px;
    }
    
    .hero-name {
        font-size: 130px;
    }
    
    .description-text {
        font-size: 36px;
    }
    
    /* Projects section padding */
    .projects-section {
        padding-left: 200px;
        padding-right: 200px;
    }
    
    /* All sections padding */
    .about-section,
    .m2-services-section,
    .testimonials-section,
    .contact-section,
    .footer-section {
        padding-left: 200px;
        padding-right: 200px;
    }
    
    /* Gallery padding */
    .gallery-section {
        padding-left: 200px;
        padding-right: 200px;
    }
}

/* Extra Large Desktop */
@media (min-width: 1920px) {
    /* Hero section padding */
    .hero-media-container {
        padding-left: 365px;
        padding-right: 365px;
        height: auto;
    }
    
    .hero-content {
        padding-left: 0px;
        padding-right: 0px
    }
    
    /* Projects section padding */
    .projects-section {
        padding-left: 365px;
        padding-right: 365px;
    }
    
    /* All sections padding */
    .about-section,
    .m2-services-section,
    .testimonials-section,
    .contact-section,
    .footer-section {
        padding-left: 365px;
        padding-right: 365px;
    }
    
    /* Gallery padding */
    .gallery-section {
        padding-left: 365px;
        padding-right: 365px;
    }
}

/* Print Styles */
@media print {
    .edit-cover-btn,
    .show-on-editor {
        display: none !important;
    }
}

/* ========================
   MERLIN 2 - SUBPAGE STYLES
   ======================== */

.m2-subpage-body {
    font-family: var(--font-primary);
    background-color: var(--color-cream);
    color: var(--color-black);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.m2-page-container {
    width: 100%;
    min-height: 100vh;
}

/* Subpage Hero Section */
.m2-subpage-hero {
    position: relative;
    width: 100%;
    height: 41vh;
    margin-top: 130px;
    overflow: hidden;
    background-color: var(--color-cream);
}

/* Navigation on subpage - positioned over cover media */
.m2-subpage-nav {
    position: fixed !important; /* Always fixed, even in edit mode */
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 20px var(--container-padding);
    background: #FFF8F1;
}

/* Cover Media Container */
.m2-subpage-cover-media {
    position: relative;
    width: 100%;
    height: 41vh;
    overflow: hidden;
}

.m2-subpage-cover-image,
.m2-subpage-cover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Editor mode - make media clickable */
body.editor-active .m2-subpage-cover-image,
body.editor-active .m2-subpage-cover-video {
    cursor: pointer;
}

/* Dark overlay over cover media */
.m2-subpage-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* Edit button for cover media */
.m2-edit-cover-btn {
    position: absolute;
    top: 170px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #3b82f6;
    color: white;
    border: none;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.m2-edit-cover-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(-50%) scale(1.1);
}

/* Hide editor buttons by default */
.show-on-editor {
    display: none !important;
}

body.editor-active .show-on-editor {
    display: flex !important;
}

/* Placeholder for missing cover media */
.m2-subpage-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
}

.m2-subpage-cover-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.m2-subpage-cover-placeholder p {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.7;
}

/* Tablet Styles */
@media (min-width: 1280px) {
    .m2-subpage-nav {
        padding: 30px 40px;
    }
    
    .m2-edit-cover-btn {
        top: 100px;
        right: 40px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

/* Desktop Styles */
@media (min-width: 1280px) {
    .m2-subpage-hero {
        height: 50vh;
    }
    
    .m2-subpage-cover-media {
        height: 50vh;
    }
    
    .m2-subpage-nav {
        padding: 40px 80px;
    }
    
    .m2-edit-cover-btn {
        top: 120px;
        right: 80px;
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .m2-subpage-nav {
        padding: 40px 200px;
    }
    
    .m2-edit-cover-btn {
        right: 160px;
    }
}

/* Extra Large Desktop */
@media (min-width: 1920px) {
    .m2-subpage-nav {
        padding: 40px 365px;
    }
    
    .m2-edit-cover-btn {
        right: 365px;
    }
}

/* ========================
   SUBPAGE - SUMMARY SECTION
   ======================== */

.m2-subpage-summary-section {
    padding: 40px 0;
}

/* Title Header - Same as section header but centered */
.m2-subpage-title-header {
    margin-bottom: 40px;
}

.m2-subpage-title-header .section-label {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.18px;
    text-transform: uppercase;
    color: var(--color-black);
}

/* Summary Content */
.m2-subpage-summary-content {
    margin-top: 30px;
}

.m2-subpage-summary-text {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.32;
    letter-spacing: 0.28px;
    color: var(--color-black);
    text-align: left;
    word-break: break-word;
}

/* Tablet */
@media (min-width: 1280px) {
    .m2-subpage-title-header {
        justify-content: center;
    }
    
    .m2-subpage-summary-text {
        font-size: 26px;
    }
}

/* Desktop */
@media (min-width: 1280px) {
    .m2-subpage-summary-section {
        padding: 60px 0px;
        padding-left: 80px;
        padding-right: 80px;
        margin-bottom: 0;
    }
    
    .m2-subpage-summary-content {
        margin-top: 24px;
    }
    
    .m2-subpage-title-header {
        justify-content: center;
        margin-bottom: 24px;
    }
    
    .m2-subpage-summary-text {
        font-size: 30px;
        max-width: 900px;
        margin: 0 auto;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .m2-subpage-summary-section {
        padding-left: 200px;
        padding-right: 200px;
    }
}

/* Extra Large Desktop */
@media (min-width: 1920px) {
    .m2-subpage-summary-section {
        padding-left: 365px;
        padding-right: 365px;
    }
}

/* ========================
   SUBPAGE - GALLERY SECTION (Merlin 3 Style)
   ======================== */

.m2-subpage-gallery {
    width: 100%;
    padding: 2rem 20px;
    background-color: var(--color-cream);
}

.m2-subpage-gallery-inner {
    max-width: 100%;
    margin: 0 auto;
}

.m2-subpage-gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    width: 100%;
}

.m2-subpage-gallery-item {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: #f0f0f0;
    cursor: pointer;
}

.m2-subpage-gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.m2-subpage-gallery-item:hover .m2-subpage-gallery-media {
    transform: scale(1.05);
}

.m2-subpage-gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
    font-size: 2rem;
    background-color: #f0f0f0;
    border: 2px dashed rgba(0, 0, 0, 0.2);
}

/* Gallery Overlay (Editor Mode) */
.m2-subpage-gallery-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    gap: 0.5rem;
    z-index: 10;
}

.editor-active .m2-subpage-gallery-item:hover .m2-subpage-gallery-overlay {
    display: flex;
}

@media (max-width: 1280px) {
    .editor-active .m2-subpage-gallery-overlay {
        display: flex !important;
    }
}

.m2-subpage-gallery-overlay .btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.m2-subpage-gallery-overlay .btn-primary {
    background: #007bff;
    color: white;
}

.m2-subpage-gallery-overlay .btn-primary:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.m2-subpage-gallery-overlay .btn-secondary {
    background: #dc3545;
    color: white;
}

.m2-subpage-gallery-overlay .btn-secondary:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Tablet - 2 columns */
@media (min-width: 1280px) {
    .m2-subpage-gallery {
        padding: 3rem 0px;
    }
    
    .m2-subpage-gallery-grid {
        gap: 0.75rem;
    }
}

/* Desktop - 2 columns */
@media (min-width: 1280px) {
    .m2-subpage-gallery {
        padding: 4rem 0px;
    }
    
    .m2-subpage-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .m2-subpage-gallery {
        padding: 5rem 0px;
    }
    
    .m2-subpage-gallery-grid {
        gap: 1.5rem;
    }
}

/* Service Action Buttons */
.m2-service-action-buttons {
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.cta-button:hover .m2-service-action-buttons {
    opacity: 1 !important;
}

.service-action-btn {
    transition: all 0.2s ease, transform 0.1s ease !important;
}

.service-action-btn:hover {
    background-color: #0056b3 !important;
    transform: scale(1.05);
}

.service-action-btn:active {
    transform: scale(0.92) !important;
}

/* ========================
   MERLIN 2 - SUBPAGE SPECIFIC STYLES
   ======================== */

/* Only apply these styles on subpages (when #m2-menu-btn-subpage exists) */
body:has(#m2-menu-btn-subpage) .m2-menu-btn {
    filter: none;
}

body:has(#m2-menu-btn-subpage) .m2-menu-btn svg {
    filter: none;
}

body:has(#m2-menu-btn-subpage) .m2-menu-btn svg path {
    fill: #000000;
}

/* ========================
   MERLIN 2 - SERVICE ICON CLICK ANIMATION
   ======================== */

.m2-service-icon {
    transition: transform 0.2s ease-out;
}

.m2-service-icon.m2-service-icon-clicked {
    transform: translateX(8px);
}

/* ===== Visibility Toggle Styles ===== */
.field-content-wrapper {
    display: block;
}

.field-hidden {
    display: none !important;
}

body.editor-active .field-content-wrapper.field-hidden {
    display: block !important;
    opacity: 0.4;
}

.contact-visibility-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.contact-visibility-btn:hover {
    opacity: 0.8;
}

.show-on-editor {
    display: none !important;
}

body.editor-active .show-on-editor {
    gap: 6px;
    align-items: center;
}

.footer-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

