/* ========================================
   เทศบาลเมืองเขลางค์นคร - Smart City Style
   ======================================== */

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

:root {
    --primary: #0d47a1;
    --primary-light: #1976d2;
    --secondary: #00bcd4;
    --accent: #4caf50;
    --bg-gradient-start: #e3f2fd;
    --bg-gradient-end: #bbdefb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-dark: #1a237e;
    --text-body: #37474f;
    --shadow: 0 8px 32px rgba(13, 71, 161, 0.15);
    --shadow-hover: 0 12px 40px rgba(13, 71, 161, 0.25);
}

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

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-body);
    overflow-x: hidden;
}

/* Animated background particles */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 188, 212, 0.15);
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { width: 120px; height: 120px; left: 70%; top: 60%; animation-delay: -5s; background: rgba(76, 175, 80, 0.1); }
.particle:nth-child(3) { width: 60px; height: 60px; left: 40%; top: 80%; animation-delay: -10s; }
.particle:nth-child(4) { width: 100px; height: 100px; left: 85%; top: 10%; animation-delay: -15s; background: rgba(13, 71, 161, 0.1); }
.particle:nth-child(5) { width: 50px; height: 50px; left: 20%; top: 70%; animation-delay: -7s; background: rgba(0, 188, 212, 0.2); }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-30px) translateX(15px); }
    50% { transform: translateY(-15px) translateX(-15px); }
    75% { transform: translateY(-40px) translateX(10px); }
}

/* Header Section */
.header {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(13,71,161,0.3) 0%, rgba(13,71,161,0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.logo-container {
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 16px;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 50%;
}

.header-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.header-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 300;
    text-align: center;
    margin-top: 8px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Main Content */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: -60px auto 60px;
    padding: 0 20px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Maintenance Message */
.maintenance-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.maintenance-title {
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    font-weight: 600;
    margin-bottom: 16px;
}

.maintenance-text {
    font-size: 1.15rem;
    text-align: center;
    color: var(--text-body);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 30px;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
    margin: 0 auto 30px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.9);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-container {
    text-align: center;
    margin-top: 20px;
}

/* Systems Grid */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.system-card {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: var(--text-body);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.08);
    position: relative;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.system-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    background: rgba(255,255,255,0.95);
}

.system-card:hover::before {
    transform: scaleX(1);
}

.system-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.system-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.system-desc {
    font-size: 0.85rem;
    color: #78909c;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Page Title for systems page */
.page-title {
    font-size: 1.6rem;
    color: var(--primary);
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-subtitle {
    text-align: center;
    color: #78909c;
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Back button area */
.back-area {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #78909c;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        height: 260px;
    }
    .logo {
        width: 70px;
        height: 70px;
    }
    .header-title {
        font-size: 1.4rem;
    }
    .header-subtitle {
        font-size: 0.95rem;
    }
    .main-container {
        margin-top: -40px;
    }
    .glass-card {
        padding: 28px 20px;
    }
    .maintenance-title {
        font-size: 1.5rem;
    }
    .maintenance-text {
        font-size: 1rem;
    }
    .systems-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 220px;
    }
    .header-title {
        font-size: 1.2rem;
    }
    .maintenance-icon {
        font-size: 3rem;
    }
}
