/* Custom Stylesheet for Ju-Tai Network Technology
  Replaces Bootstrap and jutai.css for a lightweight, dependency-free design.
*/

/* --- Base & Typography --- */
:root {
    --primary-color: #F05F40;
    --dark-color: #333;
    --text-color: #222;
    --light-text-color: #fff;
    --font-family: '微軟正黑體', 'Helvetica Neue', Arial, sans-serif;
    --transition-speed: 0.35s;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2.section-heading {
    font-size: 2.5rem;
    margin-top: 0;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: #eb3812;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Fixes bottom margin issue */
}

hr {
    border: 0;
    height: 3px;
    background-color: var(--primary-color);
    max-width: 50px;
    margin: 25px auto;
}

hr.light {
    background-color: var(--light-text-color);
}

/* --- Layout & Containers --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
}

section {
    padding: 85px 0;
}

/* --- Reusable Classes --- */
.bg-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.bg-dark {
    background-color: var(--dark-color);
    color: var(--light-text-color);
}

.text-center {
    text-align: center;
}

.text-left-align {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: #6c757d;
    text-align: left;
}


/* --- Navigation Bar --- */
.main-nav {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

.main-nav.scrolled {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Context for absolute positioning */
}

.nav-brand .logo {
    max-height: 40px;
    transition: max-height var(--transition-speed);
}

.main-nav.scrolled .nav-brand .logo {
    max-height: 35px;
}

.nav-links ul {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--light-text-color);
}

.main-nav.scrolled .nav-links a {
    color: var(--text-color);
}

.main-nav.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
}

/* --- Header --- */
header {
    min-height: 100vh;
    background: url('../img/header.jpg') no-repeat center center/cover;
    color: var(--light-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header-content .logobanner {
    max-width: 90%;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 300px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    background-color: #fff;
    border: 1px solid #fff;
    transition: all var(--transition-speed);
}

.btn:hover {
    background-color: #f2f2f2;
    border-color: #ededed;
    color: var(--text-color);
}

.btn-xl {
    padding: 15px 30px;
    font-size: 1rem;
}

/* --- Grid System (Flexbox) --- */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.three-column > * {
    flex: 1 1 calc(33.333% - 30px);
    min-width: 280px;
}

.four-column > * {
    flex: 1 1 calc(25% - 30px);
    min-width: 250px;
}

.two-column > * {
    flex: 1 1 calc(50% - 30px);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* --- Specific Section Styles --- */
.service-box {
    margin-top: 30px;
}

.service-box i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.case-item h4 {
    min-height: 48px; /* Give some space for multi-line titles */
}

.case-item img {
    border-radius: 8px;
    margin-top: 10px;
}

.welfare-list {
    list-style: decimal;
    display: inline-block;
    text-align: left;
    font-size: 1.1rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}
.contact-info i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

/* --- Footer --- */
.site-footer {
    padding: 25px 0;
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-size: 0.9rem;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        /* MODIFICATION START: Ensures the menu spans the full screen width */
        left: 0;
        right: 0; 
        /* MODIFICATION END */
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: block;
    }
    .nav-links ul {
        flex-direction: column;
        width: 100%;
    }
    .nav-links li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-links a {
        color: var(--text-color);
        display: block;
        padding: 15px;
    }
    .nav-links a:hover {
        background-color: #f8f8f8;
        color: var(--primary-color);
    }
    .nav-toggle {
        display: block;
    }
    .main-nav {
      background-color: #fff; /* Always white on mobile */
    }
    .main-nav .nav-toggle { /* Make sure toggle button has correct color */
        color: var(--text-color);
        border-color: var(--text-color);
    }
    
    header {
      min-height: 60vh;
    }

    h2.section-heading {
      font-size: 2rem;
    }

    .grid.two-column {
      flex-direction: column;
    }
    
    .contact-info {
        margin-top: 30px;
    }
}

@media (max-width: 500px) {
    .logobanner {
        display: none;
    }
}