/* File: portal.css */

/* --- THEME DEFINITIONS --- */
body.dark-theme {
    --bg-color: #1a1d21;
    --surface-color: #2c2f33;
    --primary-text: #e0e0e0;
    --secondary-text: #a9a9a9;
    --border-color: #4f545c;
    --accent-color: #3b82f6; /* Blue accent */
}
body.light-theme {
    --bg-color: #f4f7f9;
    --surface-color: #ffffff;
    --primary-text: #1f2937;
    --secondary-text: #6b7280;
    --border-color: #e5e7eb;
    --accent-color: #2563eb; /* Blue accent */
}

/* --- Base Styling --- */
body {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    transition: background-color 0.3s, color 0.3s;
}

/* --- Theme Toggle Button --- */
#theme-toggle {
    position: fixed; top: 20px; right: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer; font-size: 18px;
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
    transition: all 0.3s;
}
#theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Layout --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Header --- */
.portal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.portal-header h1 {
    font-size: 2.5rem; /* 40px */
    font-weight: 700;
    color: var(--accent-color);
}
.portal-header p {
    margin-top: 0.5rem;
    font-size: 1.125rem; /* 18px */
    color: var(--secondary-text);
}

/* --- Service Grid --- */
.service-grid {
    display: grid;
    /* Responsive grid: min 140px width, max 1fr. Auto-fit columns. */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

/* --- Service Card --- */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: 0.75rem; /* 12px */
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}
body.dark-theme .service-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.icon-wrapper {
    width: 4rem; /* 64px */
    height: 4rem; /* 64px */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px; /* full */
    transition: background-color 0.3s;
}
.icon-wrapper i {
    font-size: 1.75rem; /* 28px */
}

.service-label {
    font-weight: 500;
    color: var(--primary-text);
}

/* --- Icon Color Styles --- */
/* (These replace the multi-colored Tailwind classes) */
.style-blue { background-color: #eff6ff; color: #3b82f6; }
body.dark-theme .style-blue { background-color: #1e293b; color: #60a5fa; }

.style-green { background-color: #f0fdf4; color: #22c55e; }
body.dark-theme .style-green { background-color: #162a22; color: #4ade80; }

.style-purple { background-color: #f5f3ff; color: #8b5cf6; }
body.dark-theme .style-purple { background-color: #28233e; color: #a78bfa; }

.style-yellow { background-color: #fefce8; color: #eab308; }
body.dark-theme .style-yellow { background-color: #312c19; color: #facc15; }

.style-red { background-color: #fef2f2; color: #ef4444; }
body.dark-theme .style-red { background-color: #341e1e; color: #f87171; }

.style-indigo { background-color: #eef2ff; color: #6366f1; }
body.dark-theme .style-indigo { background-color: #24243e; color: #818cf8; }

.style-pink { background-color: #fdf2f8; color: #ec4899; }
body.dark-theme .style-pink { background-color: #34202d; color: #f472b6; }

.style-teal { background-color: #f0fdfa; color: #14b8a6; }
body.dark-theme .style-teal { background-color: #192e2b; color: #2dd4bf; }

.style-orange { background-color: #fff7ed; color: #f97316; }
body.dark-theme .style-orange { background-color: #34261b; color: #fb923c; }

.style-gray { background-color: #f3f4f6; color: #6b7280; }
body.dark-theme .style-gray { background-color: #374151; color: #9ca3af; }


/* --- Footer --- */
.portal-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.portal-footer p {
    color: var(--secondary-text);
}

.footer-link { text-align: center; }
.footer-link a { color: var(--secondary-text); text-decoration: none; font-size: 0.875rem; }
.footer-link a:hover { text-decoration: underline; }

/* --- Responsive Font Sizes --- */
@media (max-width: 640px) {
    .portal-header h1 {
        font-size: 2rem; /* 32px */
    }
    .portal-header p {
        font-size: 1rem; /* 16px */
    }
}

