.carousell-container {
    width: 100%;
    height: 110vh;
    max-height: 110vh;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.carousell-container img,
.hero-slider .slide video {
    width: 100%;
    height: 110vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.carousell-container .hero-text {
    position: absolute;
    left: calc(212 / 1920 * 100%);
    bottom: calc(110vh - 96vh);
    color: var(--white);
    z-index: 2;
    padding-bottom: 40px;
}

.slider-arrow {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.slider-arrow:focus {
    outline: none;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 110vh;
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: 0;
}

.hero-slider .slide.active {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

.slide-out-left {
    animation: slideOutLeft 0.6s forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s forwards;
}

.slide-out-right {
    animation: slideOutRight 0.6s forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}


.hero-text h2 {
    font-size: clamp(20px, 2.4vw, 56px);
    color: var(--color-white);
    font-weight: normal;
    text-shadow: var(--shadow-text);
}

.hero-text h1 {
    font-size: clamp(48px, 5.7vw, 128px);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
    line-height: normal;
    margin-top: -10px;
}

.hero-text p {
    font-size: clamp(12px, 1vw, 24px);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
}

.slider-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 36px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-arrow {
    left: 48px;
}

.next-arrow {
    right: 48px;
}

.slider-arrow img {
    width: 36px;
    height: 60px;
    position: static;
}

.slider-dots {
    position: absolute;
    bottom: calc(110vh - 100vh);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--color-white);
    transform: scale(1.2);
}

.trust-works {
    width: 100%;
    padding: 180px;
}

.hero {
    width: 100%;
    height: 110vh;
    position: relative;
    background: url('../../assets/images/film-bg.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.hero-content {
    width: 50%;
    position: relative;
}

.content {
    position: absolute;
    color: var(--color-white);
    left: calc(212 / 1920 * 100%);
    bottom: calc(110vh - 92vh);
}

.hero-img {
    width: 110%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(110vh - 100vh);
    left: 56%;
}

.hero-img img {
    width: 33%;
    height: auto;
}

.hero-content h1 {
    font-size: clamp(20px, 2.92vw, 56px);
    text-shadow: var(--shadow-text);
}

.hero-content p {
    font-size: clamp(48px, 5.7vw, 128px);
    line-height: normal;
    font-weight: bold;
    text-shadow: var(--shadow-text);
}

.hero-badge {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 80px;
    font-weight: 900;
    line-height: 1.2;
}

.pet-memorial {
    width: 100%;
    padding: 180px;
}

.memorial-content {
    width: 100%;
    display: flex;
}

.memorial-image {
    width: 50%;
    height: auto;
}

.memorial-image img {
    width: 100%;
    height: 100%;
}

.memorial-text {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--color-primary);
    min-width: 280px;
    margin-left: 150px;
}

.memorial-title {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 50px;
}

.memorial-title h2 {
    font-size: clamp(36px, 3vw, 72px);
    font-weight: 900;
}

.trust-works .title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 80px;
}

.trust-works .title .icon {
    width: 56px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
}

.trust-works .title .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trust-works .title h2,
.services .title h2,
.brand-cases .title h2,
.contact-section .title h2 {
    font-size: var(--font-size-6xl);
    line-height: 1;
    color: var(--color-primary);
}


.trust-works .content-wrapper {
    width: 100%;
    background-image: url('../../assets/images/film-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: stretch;
}

.trust-works .left-content {
    padding: 100px 3%;
    max-width: 50%;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2%;
}

.trust-works .subtitle h3 {
    font-size: var(--font-size-5xl);
    color: var(--color-white);
    line-height: 1;
    text-shadow: var(--shadow-text);
}

.trust-works .story-content {
    font-size: var(--font-size-2xl);
    color: var(--color-white);
    margin: 25px 0 50px 0;
}

.trust-works .story-content p {
    font-size: var(--font-size-2xl);
    color: var(--color-white);
    text-shadow: var(--shadow-text);
    font-size: 24px;
    color: var(--color-light-gray);
}

.trust-works .buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}

.right-content {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.showcase-image {
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.services,
.brand-cases {
    padding: 0 180px;
    width: 100%;
}

.services .title {
    display: flex;
    flex-wrap: wrap;
}

.services .title h2 {
    font-style: italic;
    width: 100%;
}

.services .title h3 {
    font-size: 24px;
    width: 650px;
    margin: 25px 0 80px;
    font-weight: normal;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
}

.card-item {
    width: calc((100% - 48px) / 3);
    box-shadow: 0px 0px 12px rgba(14, 10, 23, 0.3);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 5px;
}

.card-item:hover {
    box-shadow: 0 0 25px rgba(14, 10, 23, 0.3);
    transform: scale(1.02);
}

.card-icon {
    width: 100px;
    height: 100px;
}

.card-icon img {
    width: 100%;
    height: 100%;
}

.card-item h3 {
    font-weight: bold;
    color: var(--color-black);
    margin: 15px 0;
    font-size: clamp(20px, 2.5vw, 36px);
}

.card-item p {
    color: var(--color-gray);
}

.card-container .more-services {
    justify-content: center !important;
    background: linear-gradient(to right, #021F5C 0%, #005096 100%);
    min-height: 300px;
    cursor: pointer;
}

.card-container .more-services h3 {
    color: var(--color-white);
}

.professional-service {
    width: 100%;
    height: auto;
    background-image: url('../../assets/images/service-bg.png');
    background-repeat: no-repeat;
    background-position: 80% center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 180px 0;
    padding: 90px 0;
}

.service-content {
    width: 50%;
    max-width: 800px;
    padding: 0 180px 0 0;
}

.service-content h2 {
    font-size: var(--font-size-4xl);
    color: var(--color-white);
    margin-bottom: 20px;
    text-shadow: var(--shadow-text);
}

.service-content p {
    font-size: var(--font-size-xl);
    color: var(--color-white);
    line-height: normal;
    margin-bottom: 30px;
    text-shadow: var(--shadow-text);
}

.cases-grid {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.case-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0px 0px 12px rgba(14, 10, 23, 0.3);
}

.case-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-item .case-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
    pointer-events: none;
}


.case-item .case-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
    background: linear-gradient(to top, #063A5E 5%, transparent);
    transform: translateY(100%);
    z-index: 2;
}

.case-info h3 {
    font-size: 28px;
    margin-bottom: 10px;

}

.case-info p {
    font-size: 20px;
    font-weight: 900;
}

.case-item:hover .overlay,
.case-item:hover .case-info {
    transform: translateY(0);
}

.contact-section .title {
    margin-top: 180px;
    padding: 0 180px;
    margin-bottom: 50px;
}


.contact-section .title h2 {
    margin-bottom: 5px;
}

.form {
    padding: 88px 180px;
    background-color: var(--color-light-gray);
}

.form-section {
    margin-bottom: 159px;
}

.form-section h3 {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    width: 100%;
    margin-bottom: 36px;
    font-size: var(--font-size-4xl);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 24px;
}

.form-group {
    width: calc(33.333% - 16px);
    min-width: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* 確保下拉選單容器的寬度 */
.form-group.select {
    width: 60% !important;
}

/* 確保 MDC 下拉選單組件的寬度 */
.form-group.select .mdc-select {
    width: 100% !important;
}

/* 確保下拉選單的錨點(顯示區域)寬度 */
.form-group.select .mdc-select__anchor {
    width: 100% !important;
}

/* 確保下拉菜單面板的寬度 */
.form-group.select .mdc-select__menu {
    width: 100% !important;
    max-width: 100% !important;
}

.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text {
    color: rgba(0, 0, 0, 0.87);
    top: 5px;
    position: relative;
}

.textarea {
    width: 100%;
}

.radio-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: auto;
    padding: 0;
}

.checkbox-group {
    width: 85%;
}

.checkbox-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px 24px;
    margin-top: 8px;
}

.mdc-text-field {
    width: 100%;
    margin-bottom: 16px;
}

.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor {
    background-color: transparent !important;
}

.mdc-text-field--filled:not(.mdc-text-field--disabled) {
    background-color: transparent !important;
}

.mdc-text-field .mdc-floating-label {
    color: var(--color-primary);
}

.mdc-text-field--focused .mdc-floating-label {
    color: var(--color-primary);
}

.mdc-select {
    width: 100%;
    margin-bottom: 16px;
}

.form-field {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.mdc-form-field {
    display: flex;
    gap: 24px;
}

.form-submit {
    width: 100%;
    display: flex;
    justify-content: center;
}

.mdc-text-field:hover .mdc-line-ripple::before,
.mdc-text-field:hover .mdc-line-ripple::after {
    border-bottom-color: var(--color-primary);
    background-color: var(--color-primary);
}

.mdc-text-field:hover .mdc-floating-label {
    color: var(--color-primary);
    font-weight: 500;
}

.mdc-text-field--focused .mdc-floating-label {
    color: var(--color-primary) !important;
}

.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
    color: var(--color-primary);
}

.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-line-ripple::after {
    border-bottom-color: var(--color-primary);
}

.mdc-select:hover .mdc-line-ripple::before,
.mdc-select:hover .mdc-line-ripple::after {
    border-bottom-color: var(--color-primary);
    background-color: var(--color-primary);
}

.mdc-select:hover .mdc-floating-label {
    color: var(--color-primary);
}

.mdc-select--focused .mdc-floating-label {
    color: var(--color-primary) !important;
}

.mdc-select--focused:not(.mdc-select--disabled) .mdc-floating-label {
    color: var(--color-primary);
}

.mdc-select--focused:not(.mdc-select--disabled) .mdc-line-ripple::after {
    border-bottom-color: var(--color-primary);
}

.mdc-select:hover .mdc-select__dropdown-icon-graphic {
    fill: var(--color-primary);
}

.mdc-select--focused .mdc-select__dropdown-icon-graphic {
    fill: var(--color-primary);
}

.mdc-radio .mdc-radio__outer-circle {
    border-color: var(--color-gray-600);
}

.mdc-radio .mdc-radio__native-control:checked+.mdc-radio__background {
    .mdc-radio__inner-circle {
        border-color: var(--color-primary);
        transform: scale(1);
    }

    .mdc-radio__outer-circle {
        border-color: var(--color-primary);
    }
}

.mdc-radio .mdc-radio__background .mdc-radio__inner-circle {
    background-color: var(--color-primary);
}


.mdc-radio:hover .mdc-radio__outer-circle {
    border-color: var(--color-primary);
}

.mdc-radio .mdc-radio__background .mdc-radio__inner-circle {
    transform-origin: center;
    transition: transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1), border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
}

.mb .gender .mdc-form-field label {
    color: #6c6c6c;
    font-family: "Noto Sans TC", sans-serif;
    /* font-size: 1rem; */
    font-weight: ;
    line-height: 1.5;
}

.checkbox-group>label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin-bottom: 16px;
    display: block;
}

.checkbox-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px 24px;
    margin-top: 16px;
}

.mdc-form-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdc-form-field label {
    color: #565761;
    font-size: 1rem;
    font-weight: 450;
    line-height: 1.5;
    opacity: 0.9;
}

.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label {
    color: var(--color-gray);
    font-weight: 500;
    text-shadow: none;
}

.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input {
    color: rgba(0, 0, 0, 0.87);
    padding: 0;
    position: absolute;
    top: 25px;
}

.mdc-form-field:hover label {
    color: rgba(0, 0, 0, 0.87);
}

.mdc-radio .mdc-radio__native-control:checked~.mdc-form-field label {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    
}

.mdc-select:not(.mdc-select--disabled) .mdc-floating-label {
    color: var(--color-gray);
    font-weight: 500;
    text-shadow: none;
}


.floating-field {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.floating-field__input {
    width: 100%;
    /* ✅ 讓底線延伸到底 */
    border: none;
    border-bottom: 1px solid var(--color-gray);
    padding: 12px 8px 12px;
    font-size: 32px;
    background: transparent;
    outline: none;
}

.floating-field__label {
    position: absolute;
    left: 8px;
    top: 12px;
    font-size: 16px;
    color: var(--color-gray);
    pointer-events: none;
    transition: all 0.2s ease;
}

.floating-field__input:focus+.floating-field__label,
.floating-field__input:not(:placeholder-shown)+.floating-field__label {
    top: -10px;
    font-size: 14px;
    color: var(--astronaut-blue);
}


@media screen and (max-width: 768px) {
    .carousell-container {
        padding: 0;
        height: 80vh;
        margin-top: 0;
    }

    .carousell-container .hero-text {

        padding-bottom: 0;
        left: calc(11 / 375* 100%);
        bottom: calc(110vh - 79vh);
    }

    .slider-arrow img {
        position: absolute;
        top: 150%;
        transform: translateY(-50%);
        width: 16px;
        height: 21px;
    }

    .prev-arrow {
        left: 12px;
    }

    .next-arrow {
        right: 24px;
    }

    .slider-dots {
        bottom: 0;
        top: calc(110vh - 99.5vh);
    }

    .trust-works {
        padding: 40px 0;
    }

    .trust-works .title {
        padding-left: 10px;
        margin-bottom: 20px;
    }

    .trust-works .title .icon {
        width: 28px;
        height: 30px;
    }

    .trust-works .title h2,
    .services .title h2,
    .brand-cases .title h2,
    .contact-section .title h2 {
        font-size: var(--font-size-3xl);
    }

    .trust-works .content-wrapper {
        flex-direction: column-reverse
    }

    .trust-works .left-content {
        max-width: 100%;
        padding: 30px 10px 80px;
    }

    .trust-works .subtitle {
        display: flex;
    }

    .trust-works .subtitle h3 {
        font-size: var(--font-size-2xl);
    }

    .trust-works .story-content {
        font-size: var(--font-size-2xl);
        color: var(--color-white);
        margin: 2% 0 7%;
    }

    .trust-works .story-content p {
        font-size: var(--font-size-sm);
        width: 100%;
    }

    .trust-works .buttons {
        /* flex-direction: column; */
        width: 80%;
        gap: 15px;
    }

    .btn-main {
        width: 42%;
        padding: 5px 15px;
        font-size: 16px;
    }

    .services,
    .brand-cases,
    .contact-section {
        padding: 0;
        width: 100%;
    }

    .services .title,
    .brand-cases .title,
    .contact-section .title {
        padding: 0 0 0 10px;
        width: 100%;
    }

    .services .title h3,
    .contact-section .title h3 {
        font-size: var(--font-size-sm);
        margin: 15px 0 40px;
        width: 100%;
    }

    .card-container {
        padding: 0 40px;
    }

    .card-item {
        width: 100%
    }

    .professional-service {
        background: url('../../assets/images/service-bg-mb.png') no-repeat center center;
        background-size: cover;
        padding: 50px 10px;
    }

    .professional-service {
        margin: 40px 0;
    }

    .service-content {
        width: 100%;
        padding: 0;
    }

    .service-content h2 {
        font-size: var(--font-size-2xl);
    }

    .service-content p {
        font-size: var(--font-size-base);
    }

    .cases-grid {
        margin-top: 40px;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }

    .case-item {
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }

    .case-item img {
        border-radius: 5px;
        cursor: pointer;
        box-shadow: var(--shadow-text)
    }

    .case-item .case-info {
        position: relative;
        /* height: auto; */
        transform: none;
        background: transparent;
        padding: 10px 0;
        pointer-events: auto;
        color: var(--color-gray);
        justify-content: flex-start
    }

    .case-item:hover .case-info {
        transform: none;
    }

    .case-info h3 {
        font-size: 18px;
    }

    .case-info p {
        font-size: 12px;
    }

    .contact-section .title {
        margin-top: 80px;
    }

    .contact-section .title {
        margin-top: 80px;
    }

    .form {
        padding: 10px;
        position: relative;
    }

    .form-group {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
    }

    .name {
        width: 60% !important;
        position: relative;
    }

    .form-group.select {
        width: 100% !important;
    }

    .checkbox-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkbox-group {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-row {
        gap: 0;
    }

    .form-section {
        margin-bottom: 40px;
    }

    .form-section h3 {
        font-size: var(--font-size-2xl);
    }

    .form-submit {
        margin-bottom: 5px;
    }

    .next-arrow {
        right: -8px;
    }

    .hero {
        flex-direction: column-reverse;
        padding: 0;
    }

    .hero-content {
        width: 100%;
        display: flex;
        align-items: flex-end;
        height: 100%;
        position: relative;
    }

    .hero-content .content {
        position: absolute;
        width: 100%;
        left: calc(29 / 390 * 100%);
        bottom: calc(110vh - 79vh);
    }

    .hero-img {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-top: 32px;
    }

    .hero-img img {
        position: relative;
        max-width: 400px;
        width: 100%;
        height: auto;
        transform: translate(-117%, 0%);
        top: 0;
        
    }

    .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;

    } 
}




/* ✅ 處理手機寬度 > 375px（例如 iPhone 12 Pro） */
@media screen and (min-width: 376px) and (max-width: 767px) {
    .hero {
        flex-direction: column-reverse;
        padding: 40px;
    }

    .hero-content {
        width: 100%;
        display: flex;
        align-items: flex-end;
        height: 100%;
        position: relative;
    }

    .hero-content .content {
        position: absolute;
        width: 100%;
        left: calc(8 / 390 * 100%);
        bottom: calc(110vh - 80vh);
    }

    .hero-img {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding-top: 32px;
        top: 0;
        margin: 0 auto;
    }

    .hero-img img {

        position: relative;
        width: 100%;
        height: auto;
        max-width: 400px;
        transform: translate(-50%, -50%);
        margin-right: auto;
        margin-bottom: auto;
        margin-top: 250px;
        margin-left: -5.5% ;
    }
    

}
@media screen and (max-width: 375px){
    .hero-img img {
        position: relative;
        max-width: 325px;
        width: 100%;
        height: auto;
        top: 0;

        transform: translate(-70%, 0%);
        margin-right: 2px;
        
        
    }
}
