@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

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

:root {
    --site-bg: #ffffff;
}

body {
    font-family: "Noto Serif TC", serif;
    line-height: 1.6;
    color: #333;
    background: var(--site-bg);
}

button,
input,
textarea,
select {
    font-family: inherit;
}

header {
    background: var(--site-bg);
    color: #333333;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    max-width: none;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: auto;
    height: 54px;
    flex: 0 0 auto;
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #333333;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    overflow: visible;
    text-indent: 0;
    text-decoration: none;
    white-space: nowrap;
}

.nav-brand::before {
    content: "";
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    background: url('A.Q. webdesign logo展示2.png') center / contain no-repeat;
}

@media (min-width: 993px) {
    nav {
        justify-content: center;
    }

    .nav-menu {
        justify-content: center;
        width: auto;
    }
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333333;
    border-radius: 999px;
    margin-bottom: 6px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle span:last-child {
    margin-bottom: 0;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #4a90e2;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: #333333;
    font: inherit;
    cursor: pointer;
    transition: color 0.3s;
}

.dropdown-toggle:hover {
    color: #4a90e2;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-left: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.15rem) rotate(45deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #e8e8e8;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 0.5rem;
}

.dropdown-content a {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.dropdown.open .dropdown-content {
    display: block;
}

main {
    margin-top: 60px;
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 首頁 hero 背景圖片 */
body:has(#hero:not(.with-bg-image):not(.government-hero):not(.website-hero)) #hero {
    background-image: url('Gemini_Generated_Image_oruxtcoruxtcorux.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body:has(#hero:not(.with-bg-image):not(.government-hero):not(.website-hero)) #hero .hero-content {
    position: relative;
    z-index: 2;
}

body:has(#hero:not(.with-bg-image):not(.government-hero):not(.website-hero)) #hero h1,
body:has(#hero:not(.with-bg-image):not(.government-hero):not(.website-hero)) #hero .subtitle {
    color: #333333;
}

#hero.with-bg-image {
    background-image: url('Gemini_Generated_Image_84jw5d84jw5d84jw.png');
    background-size: cover;
    background-position: center;
}

#hero.with-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

#hero .hero-content {
    position: relative;
    z-index: 2;
}

#hero.with-bg-image .hero-content h1,
#hero.with-bg-image .hero-content .hero-tagline {
    color: #333333;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

#about p {
    font-size: 1.1rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.3s;
}

.skill-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.skill-item h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.click-hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.skill-item .certificate {
    margin-top: 1rem;
}

.skill-item .certificate img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#contact {
    background: #f8f9fa;
    text-align: center;
}

#contact p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

footer {
    background: #f9f9f9;
    color: #111111;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid #eeeeee;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    margin: 0 0 1.8rem;
    color: #111111;
    font-size: 1.35rem;
    font-weight: 700;
}

.footer-column h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 1rem;
    background: #e2e2e2;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    border-bottom: 1px solid #ececec;
}

.footer-links li:last-child {
    border-bottom-width: 4px;
}

.footer-links a {
    display: block;
    padding: 0.85rem 0;
    color: #111111;
    text-decoration: none;
    font-size: 1.05rem;
}

.footer-contact-col p {
    margin: 0 0 1.6rem;
    color: #222222;
    font-size: 1.05rem;
    line-height: 1.8;
}

.footer-copy {
    max-width: 1200px;
    margin: 3rem auto 0;
    color: #666666;
    font-size: 0.9rem;
    text-align: center;
}

.contact-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    z-index: 3000;
}

.contact-modal-backdrop.is-open {
    display: flex;
}

.contact-modal {
    position: relative;
    width: min(920px, 100%);
    padding: 2.2rem;
    color: #ffffff;
    background: rgba(61, 76, 68, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.contact-modal-kicker {
    margin: 0 0 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.contact-modal h2 {
    margin: 0 0 1.8rem;
    color: #ffffff;
    text-align: left;
    font-size: 2rem;
    font-weight: 500;
}

.contact-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.contact-modal-body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.4rem;
}

.contact-methods {
    display: grid;
    gap: 0.8rem;
}

.contact-method {
    display: flex;
    align-items: center;
    min-height: 74px;
    padding: 1rem 1.2rem;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
}

.contact-method.is-active {
    background: #ffffff;
    color: #111111;
}

.contact-form-panel,
.contact-link-panel {
    position: relative;
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.14);
}

.contact-form-panel h3,
.contact-link-panel h3 {
    margin: 0 0 1.1rem;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    text-align: center;
}

.contact-link-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 390px;
}

.contact-link-panel[hidden],
.contact-form-panel[hidden] {
    display: none;
}

.contact-qr {
    display: block;
    width: min(320px, 80%);
    aspect-ratio: 1;
    padding: 1rem;
    border-radius: 22px;
    background: #ffffff;
}

.contact-link-panel p {
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.contact-open-link {
    position: absolute;
    right: 1.4rem;
    bottom: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.8rem;
}

.contact-form-panel label {
    display: block;
    margin: 1rem 0 0.45rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-form-panel input,
.contact-form-panel textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
}

.contact-form-panel textarea {
    min-height: 140px;
    border-radius: 24px;
    resize: vertical;
}

.contact-form-panel input::placeholder,
.contact-form-panel textarea::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.contact-submit {
    width: 100%;
    margin-top: 1.2rem;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    padding: 0.95rem 1.4rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 992px) {
    nav {
        padding: 0 1rem 0.75rem;
        justify-content: flex-start;
        position: relative;
        flex-direction: column;
        align-items: center;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        width: 40px;
        height: 32px;
        padding: 0;
        position: absolute;
        right: 1rem;
        top: 1rem;
        transform: none;
        margin-left: 0;
        z-index: 1002;
    }

    .nav-toggle span {
        background: #333333;
    }

    .nav-brand {
        align-self: flex-start;
        width: auto;
        height: 48px;
        flex-basis: auto;
        position: static;
        transform: none;
        padding: 0;
        font-size: 0.95rem;
        gap: 0.6rem;
    }

    .nav-brand::before {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .nav-menu {
        display: flex;
        position: static;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
        box-shadow: 0 18px 45px rgba(15,23,42,0.14);
        z-index: 999;
        pointer-events: none;
        visibility: hidden;
    }

    .nav-menu.active {
        max-height: 1000px;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a,
    .nav-menu .dropdown-toggle {
        display: block;
        width: 100%;
        padding: 1.1rem 1.5rem;
        border-top: 1px solid #f0f0f0;
        color: #111827;
        font-size: 1.05rem;
        font-weight: 500;
        text-align: left;
        transition: background 0.2s ease;
    }

    .nav-menu a:hover,
    .nav-menu .dropdown-toggle:hover {
        background: #f8fafc;
    }

    .nav-menu li:first-child a {
        border-top: none;
    }

    .nav-menu .dropdown-content {
        display: none;
        position: static;
        min-width: 0;
        padding: 0;
        background: #f8f9fa;
        box-shadow: none;
    }

    .nav-menu .dropdown-content a {
        padding: 0.85rem 1.5rem 0.85rem 2.5rem;
        font-size: 0.95rem;
        font-weight: 400;
    }

    .nav-menu .dropdown.open .dropdown-content {
        display: block;
    }
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }

    .footer-copy {
        text-align: center;
    }

    .contact-modal-backdrop {
        padding: 1rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    .contact-modal {
        padding: 1.5rem;
        border-radius: 18px;
    }

    .contact-modal h2 {
        padding-right: 3rem;
        font-size: 1.55rem;
    }

    .contact-modal-body {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-method {
        min-height: 58px;
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    #hero h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    nav {
        padding: 0 1rem;
    }

    .nav-menu {
        position: static;
        box-shadow: none;
        gap: 0.5rem;
        padding: 0;
    }

    section {
        padding: 2rem 1rem;
    }
    
    .process-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .process-section h2, .features-section h2, .credential-section h2, .contact-cta h2 {
        font-size: 1.5rem;
    }

    .process-item,
    .feature-item,
    .notice-item,
    .faq-item,
    .review-card,
    .review-form-wrap {
        padding: 1.25rem;
    }

    .process-number {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .cta-button {
        display: inline-block;
        width: auto;
        padding: 0.9rem 1.75rem;
        margin: 0.5rem 0.25rem;
    }

    #reviews {
        padding: 2.5rem 1rem;
    }

    .review-form-wrap,
    .reviews-list {
        max-width: 100%;
        margin: 0 auto 1.5rem;
        padding: 1.25rem;
    }

    .star-rating {
        font-size: 1.8rem;
    }

    #reviewForm textarea {
        font-size: 0.95rem;
    }

    #reviewForm button {
        font-size: 1rem;
        padding: 0.95rem;
    }

    .review-card {
        padding: 1rem;
    }

    .review-stars {
        font-size: 1.15rem;
    }

    .review-content {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .review-date {
        display: none;
    }
    
    .review-card {
        padding: 1rem;
    }
    
    .contact-cta p {
        font-size: 1rem;
    }
    
    .certificate img {
        max-width: 100%;
    }
}

.certificate {
    margin-top: 2rem;
    text-align: center;
}

.certificate img {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.service-details {
    list-style: none;
    text-align: left;
    margin-top: 1rem;
    padding: 0 1rem;
}

.service-details li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid #e0e0e0;
}

.service-details li:last-child {
    border-bottom: none;
}

#reviews {
    background: #ffffff;
    max-width: 100%;
    padding: 4rem 2rem;
}

#reviews h2 {
    margin-bottom: 2.5rem;
}

.review-form-wrap {
    background: #f9f9f9;
    border: 1px solid #eeeeee;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem;
    max-width: 680px;
    margin: 0 auto 3rem;
}

.review-form-wrap h3 {
    font-size: 1.2rem;
    color: #333333;
    margin-bottom: 1.2rem;
    text-align: center;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    font-size: 2.2rem;
    cursor: pointer;
    margin-bottom: 0.4rem;
    color: #cccccc;
}

.star-rating span.hovered,
.star-rating span.selected {
    color: #f5a623;
}

.rating-label {
    text-align: center;
    font-size: 0.9rem;
    color: #888888;
    margin-bottom: 1rem;
}

#reviewForm textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dddddd;
    border-radius: 0;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

#reviewForm textarea:focus {
    border-color: #4a90e2;
}

#reviewForm textarea::placeholder {
    color: #999999;
}

#reviewForm button {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#reviewForm button:hover {
    background: #357abd;
}

.form-msg {
    text-align: center;
    margin-top: 0.7rem;
    font-size: 0.95rem;
    min-height: 1.2rem;
}

.form-msg.success { color: #27ae60; }
.form-msg.error   { color: #e74c3c; }

.reviews-list {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.review-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.review-stars {
    font-size: 1.3rem;
    color: #f5a623;
    margin-bottom: 0.5rem;
}

.review-content {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    white-space: pre-wrap;
}

.review-date {
    font-size: 0.82rem;
    color: #aaa;
}

.no-reviews, .loading-msg {
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    padding: 1rem 0;
}

#reviewForm button {
    background: transparent !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
}

#reviewForm button:hover {
    background: #111111 !important;
    color: #d2b45f !important;
}

.contact-method,
.contact-open-link,
.contact-modal-close,
.contact-submit {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.contact-method:hover,
.contact-method.is-active,
.contact-open-link:hover,
.contact-modal-close:hover,
.contact-submit:hover {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

button:not(.nav-toggle):not(.dropdown-toggle),
input[type="submit"],
input[type="button"] {
    background: transparent !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
}

button:not(.nav-toggle):not(.dropdown-toggle):hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: #111111 !important;
    color: #d2b45f !important;
    border-color: #111111 !important;
}

.contact-modal button:not(.nav-toggle):not(.dropdown-toggle),
.contact-modal .contact-method,
.contact-modal .contact-open-link,
.contact-modal .contact-submit {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.contact-modal button:not(.nav-toggle):not(.dropdown-toggle):hover,
.contact-modal .contact-method:hover,
.contact-modal .contact-method.is-active,
.contact-modal .contact-open-link:hover,
.contact-modal .contact-submit:hover {
    background: #111111 !important;
    color: #d2b45f !important;
    border-color: #111111 !important;
}

.portfolio-filter-bar {
    max-width: 1200px;
    margin: 1.6rem auto 0;
}

.portfolio-filter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.portfolio-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.portfolio-filter-label svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: currentColor;
}

.portfolio-filter-count {
    white-space: nowrap;
}

.portfolio-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portfolio-filter-pill {
    min-width: 5.6rem;
    padding: 0.72rem 1.45rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portfolio-filter-pill:hover,
.portfolio-filter-pill.is-active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.portfolio-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2.5rem auto 0;
}

.portfolio-preview a {
    display: block;
}

.portfolio-preview img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    transition: transform 240ms ease, box-shadow 240ms ease;
}

.portfolio-preview a:hover img {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
    .portfolio-filter-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .portfolio-filter-list {
        gap: 0.55rem;
    }

    .portfolio-filter-pill {
        min-width: auto;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .portfolio-preview {
        grid-template-columns: 1fr;
    }
}
