/**
 * UNISPAZE - Main Stylesheet
 * Path: /public/css/style.css
 * Updated: Modern Blue Theme Design System
 */

/* ========================================
   CSS Variables - Blue & Sky Blue Theme
   ======================================== */

:root {
    /* Primary Colors - Blue Palette (ปรับจากเดิม) */
    --primary-color: #163362;
    --primary-light: #566b8d;
    --primary-dark: #1d4ed8;
    --primary-darker: #1e3a8a;
    
    /* Accent Colors - Sky Blue (ใหม่) */
    --accent-color: #0ea5e9;
    --accent-light: #274c89;
    --accent-dark: #0284c7;
    
    /* Secondary Color - เก็บไว้แต่ใช้น้อยลง */
    --secondary-color: #0369a1;
    
    /* Semantic Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    /* Neutral Colors */
    --white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f3f3f3;
    --bg-gray: #f3f4f6;
    --border: #e5e7eb;
    --border-light: #d1d5db;
    
    /* Gradients */
    --gradient-primary: #163362;
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ========================================
   Global Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*font-family: 'Sarabun', sans-serif;*/
	font-family: 'Poppins', "Noto Sans Thai", sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ========================================
   Navbar Styles (ใหม่)
   ======================================== */

.navbar {
    background: var(--gradient-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    
}

.navbar-secondary {
    background: var(--primary-light);
    padding: 0.75rem 0;
    
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    transition: transform var(--transition-fast);
}

.navbar-logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.logo-icon i {
    color: var(--primary-color);
    font-size: 24px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* User Info in Navbar */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.user-email {
    font-size: 0.8rem;
    opacity: 0.9;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    
    border: 0px solid rgba(255, 255, 255, 0.3);
}

/* Navigation Menu */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar-menu li a {
    color: white;
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 30px;
    transition: all var(--transition-fast);
}

.navbar-menu li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-menu li a.active {
    background: rgba(255, 255, 255, 0.2);
    
}

.mobile-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   Card Components (ใหม่)
   ======================================== */

.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--bg-gray);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

/* ========================================
   Button Styles (ใหม่)
   ======================================== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-family: 'Poppins', "Noto Sans Thai", sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-search {
	font-family: 'Poppins', "Noto Sans Thai", sans-serif;
}

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

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gradient-accent);
    color: white;
    
}

.btn-secondary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-login {
    background: white;
    color: var(--primary-color);
    padding: 0.625rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* ========================================
   Form Elements (ใหม่)
   ======================================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Poppins', "Noto Sans Thai", sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-gray);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
}

/* ========================================
   Alert Messages (ใหม่)
   ======================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert.show {
    display: flex;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    color: #075985;
    border-left: 4px solid var(--info);
}

/* ========================================
   Room Cards (ใหม่)
   ======================================== */

.room-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    
    transition: all var(--transition-normal);
    cursor: pointer;
}

.room-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.room-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.room-card-body {
    padding: 1.5rem;
}

.room-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.room-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.room-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1rem;
}

/* ========================================
   Footer - Modern Design
   ======================================== */

.footer {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}



.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Footer Top Section */
.footer-top {
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

/* Footer Column */
.footer-col {
    display: flex;
    flex-direction: column;
}

/* About Section */
.footer-about {
    padding-right: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.footer-logo-icon i {
    font-size: 24px;
    color: white;
}

.footer-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* Footer Titles */
.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-title i {
    color: var(--accent-light);
    font-size: 1rem;
}

/* Footer Links */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.footer-links li a i {
    font-size: 0.75rem;
    color: var(--accent-color);
    transition: transform var(--transition-fast);
}

.footer-links li a:hover {
    color: var(--accent-light);
    padding-left: 0.5rem;
}

.footer-links li a:hover i {
    transform: translateX(3px);
}

/* Contact Info */
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-contact li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.footer-contact li > i {
    width: 36px;
    height: 36px;
    background: rgba(14, 165, 233, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-info strong {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.contact-info span,
.contact-info a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-info a {
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-info a:hover {
    color: var(--accent-light);
}

/* Footer Bottom */
.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-copyright strong {
    color: white;
    font-weight: 600;
}

.footer-subtitle {
    font-size: 0.85rem !important;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--accent-light);
}

.footer-legal .separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4); */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 998;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}

.back-to-top i {
    font-size: 1.25rem;
}

/* ========================================
   AI Chatbot Button (ปรับสีใหม่)
   ======================================== */

.ai-chatbot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-normal);
    z-index: 999;
}

.ai-chatbot:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
}

.ai-chatbot i {
    font-size: 24px;
}

.ai-chatbot span {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}

/* ========================================
   Loading States (ใหม่)
   ======================================== */

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Page Header (ใหม่)
   ======================================== */

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
}

/* ========================================
   Grid Layouts (ใหม่)
   ======================================== */

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   Utility Classes (ใหม่)
   ======================================== */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.text-primary { color: var(--primary-color); }
.text-accent { color: var(--accent-color); }
.text-success { color: var(--success); }
.text-error { color: var(--danger); }
.text-gray { color: var(--text-gray); }

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    /* Navbar Mobile */
    .navbar-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    .main-content {
		min-height: calc(100vh - 200px);
		padding: 0;
	}
    .navbar-menu {
        position: fixed;
        top: 74px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--primary-color);
        flex-direction: column;
        padding: 1.5rem;
        transition: left var(--transition-normal);
        align-items: stretch;
        z-index: 999;
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu li a {
        width: 100%;
        text-align: left;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        display: none;
    }
    
    .user-details {
        text-align: center;
    }
    
    /* Cards */
    .card {
        padding: 1.5rem;
    }
    
    /* Footer Mobile */
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-top {
        padding: 2.5rem 0 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-about {
        padding-right: 0;
    }
    
    .footer-logo-text {
        font-size: 1.5rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .back-to-top {
        right: 20px;
        bottom: 80px;
    }
    
    /* AI Chatbot */
    .ai-chatbot {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .ai-chatbot i {
        font-size: 20px;
    }
    
    .ai-chatbot span {
        font-size: 8px;
    }
    
    /* Grid */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .footer-social {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
        font-size: 1.125rem;
    }
    
    .footer-contact li {
        flex-direction: column;
        gap: 0.5rem;
    }
}


@media (min-width: 1200px) {
	.navbar-container {
		max-width: 95%;
	}
	.rooms-container {
		max-width: 95% !important;
	}
	.search-box {
		max-width: 95% !important;
	}
	.search-container {
		padding:0 !important; 
		margin-bottom:30px;
	}
}