/* assets/css/style.css */

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", system-ui, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f7f7f7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f9, #06c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.logo-text {
    font-size: 1.1rem;
}

/* Nav */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 16px;
}

.main-nav a {
    padding: 6px 8px;
    border-radius: 999px;
    font-size: 0.95rem;
}

.main-nav li.active a,
.main-nav a:hover {
    background-color: #0c8ce9;
    color: #fff;
}

/* Mobile menu button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 420px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0,0,0,0.55), rgba(0,0,0,0.2));
}

.hero-content {
    position: relative;
    color: #fff;
    max-width: 640px;
}

.hero-content h1,
.hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0,0,0,0.35);
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 2;
}

.hero-nav.prev { left: 10px; }
.hero-nav.next { right: 10px; }

.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.hero-dots button.active {
    background: #fff;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-muted {
    background-color: #f0f3f7;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.center {
    text-align: center;
}

/* Grid */
.grid-3,
.grid-4 {
    display: grid;
    gap: 20px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 32px;
}

/* Cards / Image Blocks */
.card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.card-image-bg {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 16px 18px 18px;
}

.image-block {
    border-radius: 16px;
    min-height: 260px;
    background-size: cover;
    background-position: center;
}

/* Services */
.service-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

/* Project Slider */
.project-slider {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.project-slide {
    position: relative;
    min-width: 260px;
    height: 200px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    scroll-snap-align: start;
    overflow: hidden;
}

.project-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.1));
    color: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Page hero */
.page-hero {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #0c8ce9, #04c8a8);
    color: #fff;
}

.page-hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn.primary {
    background-color: #0c8ce9;
    color: #fff;
}

.btn.primary:hover {
    background-color: #0869aa;
}

.btn.secondary {
    background-color: #fff;
    border-color: #0c8ce9;
    color: #0c8ce9;
}

.btn.secondary:hover {
    background-color: #0c8ce9;
    color: #fff;
}

/* Footer */
.site-footer {
    background-color: #121418;
    color: #ccc;
    padding-top: 40px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 24px;
}

.site-footer h4 {
    margin-bottom: 10px;
    color: #fff;
}

.site-footer a {
    color: #ccc;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding: 12px 0 16px;
    font-size: 0.9rem;
}

/* Lists */
.bullet-list {
    list-style: disc;
    padding-left: 20px;
}

/* Forms */
.form-grid {
    display: grid;
    gap: 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 8px 10px;
    font-size: 0.95rem;
    width: 100%;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Blog list */
.blog-list {
    display: grid;
    gap: 20px;
}

.blog-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.blog-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 60vh;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 1.8rem;
    }

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

@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .main-nav {
        display: none;
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
        padding: 8px 0 12px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 60vh;
        min-height: 360px;
    }

    .hero-content {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
