/* นำเข้าฟอนต์ Kanit: ทันสมัย คมชัด และนิยมในงาน UI/UX */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;700&display=swap');

/* ======================================= */
/* 0. การตั้งค่าพื้นฐาน (Base Styles) */
/* ======================================= */
body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    color: #333333;
    background-color: #fcfcfc;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    color: #5d4037; /* สีน้ำตาลเข้ม/โกโก้ */
    font-weight: 700;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: #9c6e31; /* สีทองแดง */
    transition: color 0.3s;
}

a:hover {
    color: #5d4037;
}

/* ======================================= */
/* 1. ส่วนหัว (Header) */
/* ======================================= */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.dhammajakra-logo {
    /* ขนาดโลโก้ที่ปรับให้เหมาะสม */
    height: 38px; 
    width: auto;
    margin-right: 10px;
    filter: drop-shadow(0 0 1px rgba(92, 63, 0, 0.4));
}

.logo h1 {
    font-size: 1.5em;
    margin: 0;
    font-weight: 500;
    color: #5d4037;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    font-size: 1.1em;
    padding: 5px 10px;
    transition: background-color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    background-color: #fff8e1;
    border-radius: 5px;
}

/* ======================================= */
/* 2. ภาพสไลด์หลัก (Hero Section) */
/* ======================================= */
.hero-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 240, 0.9) 100%), url('hero-bg-placeholder.jpg') center/cover no-repeat;
    color: #5d4037;
    text-align: center;
    padding: 120px 20px;
    border-bottom: 8px solid #9c6e31;
}

.hero-content h2 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #5d4037;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-button {
    background-color: #9c6e31;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    display: inline-block;
    transition: background-color 0.3s;
    text-transform: uppercase;
    border: none; /* เพิ่มเติมสำหรับปุ่ม PHP */
}

.cta-button:hover {
    background-color: #795548;
}

/* ======================================= */
/* 3. ระบบบริการหลัก (Quick Links / System Links) */
/* ======================================= */
.system-links {
    padding: 60px 0;
    background-color: #fcfcfc;
}

.system-links .container {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* 4 คอลัมน์บนจอใหญ่ */
    gap: 25px;
    text-align: center;
}

.system-links .link-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.system-links .link-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.system-links .link-item i {
    font-size: 2.5em;
    color: #e67e22; /* สีส้มสำหรับไอคอนระบบ */
    margin-bottom: 15px;
}

/* Icon Placeholder Styles (สำหรับหน้า index.html) */
.icon-cash-register::before { content: '💵'; }
.icon-user-tie::before { content: '🧑‍💼'; }
.icon-gavel::before { content: '⚖️'; }
.icon-id-card::before { content: '🆔'; }

.system-links .link-item h3 {
    color: #5d4037;
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* ======================================= */
/* 4. ส่วนท้าย (Footer) */
/* ======================================= */
.main-footer {
    background-color: #5d4037;
    color: #e0c99f;
    padding: 40px 0 10px;
}

.main-footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #795548;
}

.footer-info h4 {
    color: #ffffff;
    margin-bottom: 10px;
}

.footer-info p {
    margin: 5px 0;
}

.footer-links {
    text-align: right;
    align-self: center;
}

.footer-links a {
    color: #e0c99f;
    margin-left: 15px;
}

.copyright {
    text-align: center;
    padding-top: 15px;
    color: #795548;
}

/* ======================================= */
/* 5. สไตล์ส่วนหัวเรื่องสำหรับหน้าย่อย (Page Header) */
/* ======================================= */
.page-header {
    background-color: #f7f3ed; 
    padding: 60px 0;
    text-align: center;
    border-bottom: 3px solid #9c6e31;
}

.page-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #5d4037;
}

/* ======================================= */
/* 6. สไตล์สำหรับหน้า Application (ordination/index.html) */
/* ======================================= */
.application-section {
    padding: 60px 0;
    background-color: #fcfcfc; 
}

.app-steps-grid {
    display: grid;
    grid-template-columns: 40% 60%; 
    gap: 40px;
    align-items: flex-start;
}

.step-guide-card, .application-form-card {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.step-title {
    font-size: 1.8em;
    color: #5d4037;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.step-list {
    padding-left: 20px;
    line-height: 1.6;
}

.note {
    background-color: #fff3e0; 
    color: #d35400;
    padding: 15px;
    border-left: 5px solid #e67e22;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 0.95em;
}

/* สไตล์แบบฟอร์ม */
.application-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #5d4037;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea,
.form-group input[type="file"],
.form-group select { 
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    font-size: 1em;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-3-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

.submit-button {
    margin-top: 20px;
    padding: 12px;
    font-size: 1.2em;
    background-color: #e67e22; 
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.submit-button:hover {
    background-color: #d35400;
}

.form-group-radio {
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 8px;
    background-color: #fcfcfc;
    line-height: 1.4;
}

.form-group-radio label {
    display: inline; 
    font-weight: 400;
    margin-right: 20px;
    color: #333;
}

.form-group-radio input[type="radio"] {
    margin-left: 10px;
    margin-right: 5px;
    width: auto; 
}


/* ======================================= */
/* 7. Media Queries */
/* ======================================= */
@media (max-width: 1200px) {
    .system-links .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .main-header .container {
        flex-wrap: wrap; 
        justify-content: center;
    }
    .main-nav { 
        margin-top: 10px;
        flex-basis: 100%;
        text-align: center;
    }
    .app-steps-grid {
        grid-template-columns: 1fr; 
    }
    .form-group.grid-2-col, .form-group.grid-3-col {
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 600px) {
    .system-links .container {
        grid-template-columns: 1fr;
    }
}