/* --- Global Styles & Variables (NEW LIGHT THEME) --- */
:root {
    --primary-color: #0056b3;      /* Main Blue from teched.rmutt.ac.th */
    --secondary-color: #daa520;    /* Gold/Yellow from RMUTT logo */
    --bg-light: #f4f7f9;          /* Light gray page background */
    --bg-white: #ffffff;          /* White for cards, header, footer */
    --text-dark: #343a40;         /* Dark charcoal for text */
    --text-muted: #6c757d;        /* Muted gray for secondary text */
    --border-color: #dee2e6;       /* Light gray for borders */
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Prompt', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-light);
    color: var(--text-dark);
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary-color); text-decoration: none; }
h1, h2, h3 { color: var(--text-dark); margin-bottom: 1rem; font-weight: 500;}

/* --- Header & Navigation --- */
header {
    background-color: var(--bg-white);
    padding: 1rem 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow);
}
header .container { display: flex; justify-content: space-between; align-items: center; }

.text-logo { text-decoration: none; }
.text-logo .logo-main {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}
.text-logo .logo-sub {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

nav ul { list-style: none; display: flex; gap: 2.5rem; }
nav a {
    color: var(--text-muted);
    font-size: 1rem;
    padding-bottom: 8px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
nav a:hover { color: var(--text-dark); }
nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

/* --- Hero Section (Home Page) --- */
.hero {
    position: relative;
    padding: 5rem 0;
    text-align: center;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.pexels.com/photos/392018/pexels-photo-392018.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center/cover;
    color: var(--bg-white); /* White text on dark background */
}
.hero h1 { font-size: 2.5rem; line-height: 1.4; color: var(--bg-white); }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.btn-primary {
    display: inline-block; padding: 12px 30px; background-color: var(--primary-color);
    color: var(--bg-white); border-radius: 5px; font-weight: 500; transition: background-color 0.3s;
    border: 1px solid var(--primary-color);
}
.btn-primary:hover { background-color: #004a99; }

/* --- Feature Cards (Home Page) --- */
.main-content { padding: 3rem 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.feature-link { text-decoration: none; color: inherit; display: block; }
.feature-card { 
    background: var(--bg-white); 
    padding: 2rem; 
    border-radius: 8px; 
    height: 100%;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.feature-card i { font-size: 3rem; margin-bottom: 1rem; color: var(--primary-color); }

/* --- General Page Styles (About, Contact, News etc.) --- */
.page-header {
    background-color: var(--bg-white);
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}
.page-header p { color: var(--text-muted); }

/* Document & News Cards */
.document-card, .news-article-card, .content-block {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.document-list, .news-container, .content-grid { display: grid; gap: 1.5rem; }

.document-card { display: flex; align-items: center; gap: 1.5rem; transition: box-shadow 0.3s; }
.document-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.file-icon i { font-size: 2.5rem; color: var(--primary-color); }
.card-content { flex-grow: 1; }
.download-btn {
    padding: 8px 16px; background-color: var(--primary-color); color: var(--bg-white); border-radius: 5px;
    white-space: nowrap; transition: background-color 0.3s;
}
.download-btn:hover { background-color: #004a99; }

/* Search Bar */
.search-bar { display: flex; margin-bottom: 2rem; }
.search-bar input {
    flex-grow: 1; padding: 12px 15px; font-size: 1rem; font-family: 'Prompt', sans-serif;
    border: 1px solid var(--border-color); border-radius: 5px 0 0 5px; 
    background-color: var(--bg-white); color: var(--text-dark); border-right: none;
    outline: none;
}
.search-bar input:focus { border-color: var(--primary-color); }
.search-btn {
    display: flex; align-items: center; padding: 0 20px; border: 1px solid var(--primary-color);
    background-color: var(--primary-color); color: var(--bg-white); border-radius: 0 5px 5px 0;
    cursor: pointer; font-size: 1rem; font-family: 'Prompt', sans-serif; transition: background-color 0.3s ease;
}
.search-btn:hover { background-color: #004a99; border-color: #004a99; }
.search-btn i { margin-right: 8px; }

/* --- Footer --- */
footer {
    background-color: var(--bg-white);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* --- News Page Specific --- */
.news-article-card h3 {
    border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; margin-bottom: 1rem;
}
.news-article-card h3 i { margin-right: 10px; color: var(--primary-color); }
.news-list { list-style: none; margin-top: 1rem; padding-left: 0; }
.news-list li { margin-bottom: 0.5rem; }
.news-list li a { color: var(--text-muted); transition: color 0.3s ease; }
.news-list li a:hover { color: var(--primary-color); }
.news-list li a::before {
    content: '\f0da'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    margin-right: 10px; color: var(--primary-color);
}
.card-links { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.btn-card {
    display: block; padding: 8px 12px; background-color: #e9ecef; color: var(--text-dark);
    border-radius: 4px; text-align: center; font-size: 0.9rem; transition: background-color 0.3s ease;
}
.btn-card:hover { background-color: var(--primary-color); color: var(--bg-white); }
.card-contact { margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.card-contact i { margin-right: 5px; color: var(--primary-color); }
.stats-list { list-style: none; padding-left: 0; margin: 1rem 0; }
.stats-list li { margin-bottom: 0.25rem; padding-left: 1.5rem; position: relative; font-size: 0.9rem; }
.stats-list li::before {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: #28a745; position: absolute; left: 0;
}

/* --- About & Contact Page Specific --- */
.content-grid { grid-template-columns: 1fr 1fr; }
.content-block h3 i { margin-right: 10px; color: var(--primary-color); }
.content-block ul { list-style: none; margin-top: 1rem; }
.content-block ul li { margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; }
.content-block ul li::before {
    content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: var(--primary-color); position: absolute; left: 0;
}
.contact-details li { padding-left: 2rem; line-height: 1.8; }
.contact-details li::before { content: ''; display: none; }
.contact-details i { margin-right: 1rem; color: var(--primary-color); width: 20px; text-align: center; }

/* --- Responsive --- */
@media (max-width: 992px) {
    header .container { flex-direction: column; gap: 1.5rem; }
}
@media (max-width: 768px) {
    .features, .content-grid { grid-template-columns: 1fr; }
    .document-card { flex-direction: column; text-align: center; }
}
/* --- Additional Styles for Call-to-Action Block --- */

.cta-block {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.cta-block h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.cta-block p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-large {
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: 500;
}

.btn-large i {
    margin-right: 10px;
}

/* Style for section titles */
.section-title {
    text-align: center;
    font-weight: 500;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
}
/* --- Additional Styles for Call-to-Action Block --- */

.cta-block {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.cta-block h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.cta-block p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-large {
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: 500;
}

.btn-large i {
    margin-right: 10px;
}

/* Style for section titles */
.section-title {
    text-align: center;
    font-weight: 500;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
}