/* Define Kodchasan Font Locally */
@font-face {
    font-family: 'Kodchasan';
    src: url('/classroom/assets/fonts/Kodchasan-Regular.ttf') format('truetype');
    font-weight: 400; /* Regular */
    font-style: normal;
}

@font-face {
    font-family: 'Kodchasan';
    src: url('/classroom/assets/fonts/Kodchasan-Bold.ttf') format('truetype');
    font-weight: 700; /* Bold */
    font-style: normal;
}

/* General Styles */
body {
    font-family: 'Kodchasan', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
}

/* Ensure Kodchasan applies to text elements */
.navbar-brand,
.navbar-nav .nav-link,
.dropdown-item,
.hero-title,
.hero-subtitle,
.btn-hero,
.login-title,
.form-control,
.btn-login-full,
.btn-register,
.btn-register-full,
.modal-title {
    font-family: 'Kodchasan', sans-serif !important; /* บังคับใช้ Kodchasan */
}

/* Prevent Font Awesome from overriding text elements */
:not(.fa):not(.fas):not(.far):not(.fab) {
    font-family: 'Kodchasan', sans-serif !important; /* ใช้ Kodchasan เฉพาะ element ที่ไม่ใช่ไอคอน */
}

/* Banner */
.banner {
    width: 100%;
    max-height: 88px;
    object-fit: cover;
    display: block;
    background-color: #e9f7ef;
}

/* Navbar */
.navbar {
    background-color: #e9f7ef;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 26px;
    font-weight: 700;
    color: #2d6a4f !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #40916c !important;
}

.navbar-nav .nav-link {
    color: #2d6a4f !important;
    font-size: 18px;
    background-color: #d4edda;
    border-radius: 5px;
    padding: 8px 15px;
    margin: 0 5px;
    transition: all 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover {
    background-color: #40916c;
    color: #ffffff !important;
}

.navbar-toggler {
    border-color: #2d6a4f;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(45, 106, 79, 0.8)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown Menu */
.dropdown-menu {
    background-color: #e9f7ef;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    color: #2d6a4f;
    font-size: 16px;
    padding: 8px 20px;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #40916c;
    color: #ffffff;
}

/* Hero Section (Left - 9 parts) */
.hero-section {
    padding: 40px;
    background-color: #e9f7ef;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #2d6a4f;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

.btn-hero {
    background-color: #2d6a4f;
    color: #ffffff;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background-color: #40916c;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(64, 145, 108, 0.4);
}

.hero-image {
    border-radius: 15px;
    max-width: 100%;
    height: auto;
}

/* Login Section (Right - 3 parts) */
.login-section {
    padding: 10px;
}

.login-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.login-title {
    font-size: 28px;
    color: #2d6a4f;
    text-align: center;
    margin-bottom: 20px;
}

.form-control {
    border: 2px solid #2d6a4f;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 16px;
}

.form-control:focus {
    border-color: #40916c;
    box-shadow: 0 0 5px rgba(64, 145, 108, 0.5);
}

.btn-login-full {
    background-color: #2d6a4f;
    color: #ffffff;
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}

.btn-login-full:hover {
    background-color: #40916c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 145, 108, 0.4);
}

/* Register Button (สีน้ำเงิน) */
.btn-register {
    background-color: #0b89d7;
    color: #ffffff;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-register:hover {
    background-color: #0709a4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(7, 9, 164, 0.4);
    color: #ffffff;
}

/* Register Button in Modal (สีน้ำเงินเข้ม) */
.btn-register-full {
    background-color: #0c90d7;
    color: #ffffff;
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}

.btn-register-full:hover {
    background-color: #2d6a4f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 77, 55, 0.4);
}

/* Modal Adjustments */
.modal-content {
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #e9f7ef;
    border-bottom: none;
}

.modal-title {
    color: #2d6a4f;
    font-size: 24px;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 20px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .btn-hero {
        padding: 10px 20px;
    }

    .login-section {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 10px;
    }

    .modal-title {
        font-size: 20px;
    }

    .btn-register-full {
        padding: 10px;
        font-size: 16px;
    }

    .btn-register {
        padding: 8px 10px;
        font-size: 14px;
    }
}