/* Layout chính */

.page-layout {
    display: flex;
    min-height: calc(100vh - 60px); /* trừ chiều cao navbar */
}

.header{
	background-color: #2D3F53;	
}

.logo{
	position: relative;
	display: inline-block;
}

.logo img{
	height: 130px;
	width: auto;
	padding-left: 50px;
	transition: opacity 0.5s ease;
}

.logo .hover{
	position: absolute;
	top: 0;
	left: 4px;
	opacity: 0;
}

.logo:hover .normal{
	opacity: 0;
}

.logo:hover .hover{
	opacity: 1;
}

.button{
	font-size: 20px;
	display: flex;
	gap: 35px;
	margin: auto 70px auto auto;
	align-items: center;
}

.button p{
	margin: 0;
}

.button p{
	margin: 0;
}

.button a, .button p{
	color: #25C08D;	
	text-decoration: none;
}

.button a:hover{
	color: #1df7a0;	
}

.vertical{
	border-left: 2px solid gray;
	height: 40px;
}

/* Logout button is styled to look like a normal navbar link */
.logout-form {
    margin: 0;
}

.logout{
    background: #2D3F53;
    border: none;
    padding: 0;
    color: #25C08D;
    cursor: pointer;
    font: inherit;
}

.logout:hover{
    color: #1df7a0;
}


/* Main navbar with hamburger + dropdown category menu */
.main-menu {
    background-color: #1e2936;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.container-fluid{
	background-color: #1e2936;	
	padding: 8px;
}

.custom-nav .nav-item {
	font-size: 17px;
	font-weight: 500;
    text-align: center;
	margin: 0; 
}

.custom-nav .nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 16px;
}

.custom-nav .nav-link:hover,
.custom-nav .nav-link:focus {
    color: #1df7a0;
}


/* Dropdown menu colors override Bootstrap's default white background and dark text. */
.dropdown-menu {
    background-color: #243447;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px;
	display: block;
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    pointer-events: none;
	margin-top: 0;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.dropdown-item {
    color: white;
    border-radius: 8px;
    padding: 10px 14px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #2D3F53;
    color: #1df7a0;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #25C08D;
    color: #10202a;
    font-weight: 600;
}


/* Makes Bootstrap's hamburger icon visible on the dark navbar. */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    filter: invert(1);
}


/* Content area */
.content {
	width: 100%;
    flex: 1;
    padding: 24px;
}

.content .label { 
	margin-bottom: 16px; 
	font-size: 28px;
}

.label {
    font-size: 20px;
    color: #C72B2B;
    text-transform: uppercase;
    margin-bottom: 20px;
}


/* Grid cards */
.res-grid {
    display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 50px;
}


.res-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.res-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.res-img {
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
	cursor: pointer;
}

.res-img img {
    max-width: 200px;
    max-height: 150px;
}

.res-info { 
	padding: 20px;
	text-align: center;
}

.res-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #222;
}

.res-qty {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.available, .unavailable {
    font-size: 12px;
	font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.available{
	background: #d4edda;
    color: #155724 !important;
}

.unavailable
 {
    background: #f8d7da;
    color: #721c24 !important;
}

.booking {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #1a56db;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

.booking:hover {
    background: #0D3388;
	color: white;
}


/* Lightbox hidden by default, .active  when the user clicks an image. */
.lightbox {
    display: none;        
    position: fixed;      			/* Stays in place, not scroll with the page. */
    inset: 0;             			/* Full screen coverage */
    background: rgba(0,0,0,0.85); 
    align-items: center;        
    justify-content: center;    
    cursor: pointer;      
}

.lightbox.active {
    display: flex;       
}

.lightbox-content {
    cursor: default;      
}

#lightbox-img {
	width: auto;
	height: auto;
    max-width: 90vw;      
    max-height: 80vh;        				
}


/* Below lg, the navbar collapses into hamburger mode. */
@media (max-width: 990px) {
    .main-menu .navbar-collapse {
        margin-top: 10px;
        padding: 12px;
        background-color: #1e2936;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }
	
    .custom-nav {
        gap: 0 !important;
        align-items: stretch !important;
    }

    .custom-nav .nav-item {
        width: 100%;
    }

    .custom-nav .nav-link {
        display: block;
        padding: 12px;
    }

    .dropdown-menu {
        border: 0;
        box-shadow: none;
        margin-top: 4px;
    }
	
	  .dropdown-menu {
       	display: block;
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		transform: translateY(-4px);
		transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
		margin-top: 0;
		padding-top: 0;
		padding-bottom: 0;
		border: 0;
    }

    .dropdown-menu.show {
       	max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 8px;
        padding-bottom: 8px;
    }
}


@media (max-width: 767px) {
	.top-bar {
        display: flex;
        flex-wrap: wrap;
        padding: 10px 12px;
    }
	
    .logo img {
        height: 80px;
        padding-left: 0;
    }

    .search-form {
        order: 3;
        width: 100%;
        margin: 10px 0 0;
    }

    .button {
        margin: 0 0 0 auto;
        gap: 15px;
        font-size: 16px;
    }

    .content {
        padding: 16px;
    }

    .res-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 30px;
    }
	
	  .dropdown-menu {
       	display: block;
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		transform: translateY(-4px);
		transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
		margin-top: 0;
		padding-top: 0;
		padding-bottom: 0;
		border: 0;
    }

    .dropdown-menu.show {
       	max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 8px;
        padding-bottom: 8px;
    }
}
