/* Custom Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Font Settings */
body {
    font-family: 'Sarabun', sans-serif;
}

/* แก้ไขปัญหาไอคอน Font Awesome */
.fas, .far, .fab, .fa, .fal, .fad {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
}

.nav-link i, .btn i, .card-header i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* Apply Sarabun font to all elements */
* {
    font-family: 'Sarabun', sans-serif;
}

/* Ensure all Bootstrap components use Sarabun */
.btn, .form-control, .form-select, .nav-link, .dropdown-item,
.modal-title, .modal-body, .card-title, .card-text,
.table, .badge, .alert, .breadcrumb, .pagination {
    font-family: 'Sarabun', sans-serif !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 123, 255, 0.8)), 
                url('../images/hero-bg.jpg') center/cover;
    min-height: 400px;
    display: flex;
    align-items: center;
}

/* Room Cards */
.room-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.room-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.room-features .badge {
    font-size: 0.75rem;
}

.price h4 {
    font-weight: bold;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Cards */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Admin Styles */
.admin-sidebar {
    background-color: var(--dark-color);
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link.active {
    color: white;
    background-color: var(--primary-color);
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 12px;
}

.stats-card .card-body {
    padding: 2rem;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: var(--light-color);
}

/* Status Badges */
.status-pending {
    background-color: var(--warning-color);
}

.status-confirmed {
    background-color: var(--success-color);
}

.status-cancelled {
    background-color: var(--danger-color);
}

.status-available {
    background-color: var(--success-color);
}

.status-occupied {
    background-color: var(--danger-color);
}

.status-maintenance {
    background-color: var(--secondary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .room-card .card-img-top {
        height: 180px;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

footer h5, footer h6 {
    position: relative;
    padding-bottom: 10px;
}

footer h5::after, footer h6::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.hover-underline:hover {
    text-decoration: underline !important;
}

.social-links .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links .btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.newsletter-signup .input-group .form-control {
    border-radius: 20px 0 0 20px;
}

.newsletter-signup .input-group .btn {
    border-radius: 0 20px 20px 0;
}

.contact-info a:hover {
    color: var(--primary-color) !important;
}

footer .border-secondary {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
