/* 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;
}


/* Header buttons / language switch */
.top-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px 0 0;
}

.top-actions{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    margin-right: 25px;
}

.lang-switch{
    display: flex;
	margin-right: 5px;
    gap: 18px;
}

.lang-switch a{
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.lang-switch a:hover{
    color: #1df7a0;
    background: rgba(255,255,255,0.14);
}


/* greet + logout nằm ngang trong header */
.header .button p{
    margin: 0;
    color: #25C08D;
    white-space: nowrap;
}

.header .logout-form{
    margin: 0;
}

.header .logout{
    background: transparent;
    border: none;
    padding: 0;
    color: #25C08D;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.header .logout:hover{
    color: #1df7a0;
}


.header-actions{
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 18px;
}

.header-actions p{
    margin: 0;
    color: #25C08D;
}

.header-actions .logout{
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.header-actions a,
.header-actions .logout{
    color: #25C08D;
    text-decoration: none;
    font: inherit;
}

.header-actions a:hover,
.header-actions .logout:hover{
    color: #1df7a0;
}

.logout{
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.vertical{
	border-left: 2px solid gray;
	height: 40px;
}

/* Logout button is styled to look like a normal navbar link */
.logout-form {
    margin: 0;
}


/* Header actions - dùng chung cho index, student, teacher */

.custom-nav .nav-link.active{
    color: #25C08D;;
}

.custom-nav .nav-link.active: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);
}

.main-menu .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: 5px 0;
}

.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: white;
    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;        				
}



/* Image slider */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    min-height: 360px;
    overflow: hidden;
    border-radius: 12px;
    background: #1a2a3a;
}

.slider-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    transition: background 0.5s ease;
}

.slider-track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 60px;
}

.slide-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.4s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.slide-card.active {
    width: 500px;
	height: 400px;
    opacity: 1;
    cursor: default;
}

.slide-card.side {
    flex: 0 0 150px;
    height: 210px;
    opacity: 0.55;
}

.slider-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    z-index: 5;
}

.slider-title {
    color: white;
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 4px;
}

.slider-sub {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.slider-btn:hover { background: rgba(255,255,255,0.3); }

.slider-prev { left: 12px; }

.slider-next { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}
.slider-dot.active { background: white; }



/* Footer */
footer{
    background-color: #1e2936;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 20px;
    text-align: center;
}

footer p{
    margin: 0;
    color: white;
    font-size: 18px;
    letter-spacing: 0.5px;
}

footer:hover p{
    color: #1df7a0;
}



/* 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;
    }

}


@media (max-width: 767px) {
	.top-bar {
        display: flex;
        flex-wrap: nowrap;
        padding: 10px 12px;
    }	
	
    .top-actions{
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 20px;
		margin-right: 15px;
    }

    .header-actions{
        gap: 10px;
        font-size: 15px;
    }

	.lang-switch{
		display: flex;
		margin-right: 5px;
		gap: 15px;
	}
	
    .lang-switch a{
        font-size: 13px;
        padding: 3px 8px;
    }

    .vertical{
        height: 22px;
    }
	
    .logo img {
        height: 95px;
        padding-left: 0;
    }

    .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;
    }
	
	
	 .slider-wrapper {
        height: 700px;
        min-height: 300px;
        border-radius: 10px;
    }

    .slider-track {
        gap: 8px;
        padding: 0 36px;
    }

    .slide-card.active {
        width: 250px;
        height: 280px;
    }

    .slide-card.side {
        flex: 0 0 70px;
        height: 130px;
        opacity: 0.45;
    }

    .slider-info {
        padding: 14px 16px;
    }

    .slider-title {
        font-size: 16px;
    }

    .slider-btn {
        width: 32px;
        height: 32px;
		margin-top: 50px;
        font-size: 18px;
    }
}


/* Extra small mobile: iPhone 14 / around 417px */
@media (max-width: 500px) {

    .top-bar{
        padding: 8px 10px;
        display: flex;
        flex-wrap: nowrap;
    }

    .logo img{
        height: 68px;
        padding-left: 0;
    }

    
   .top-actions{
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 10px;
		margin-right: 15px;
    }

    .header-actions{
        gap: 10px;
        font-size: 15px;
    }

	.lang-switch{
		display: flex;
		margin: 0 5px 0 0;
		gap: 10px;
	}


    .lang-switch a{
        font-size: 12px;
    }

    .header-actions p{
        max-width: 95px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vertical{
        height: 18px;
    }

    .header-actions .logout{
        font-size: 13px;
        white-space: nowrap;
    }
}
