/* HTTL Hải Đăng - Main Styles */

body {
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
}

/* Define primary color as a CSS variable */
:root {
    --primary-color: rgba(126,36,34,1);
    --primary-color-light-hover: rgba(126,36,34,0.1);
    --primary-color-dark-hover: rgba(126,36,34,0.9);
}

/* Custom styles for the mobile menu transition */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.mobile-menu.open {
    max-height: 500px; /* Adjust as needed to fit content */
    transition: max-height 0.5s ease-in;
}

/* Styles for mobile submenu (accordion) */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #f8f8f8; /* Slightly different background for sub-items */
    border-radius: 0.375rem; /* rounded-md */
}
.mobile-submenu.open {
    max-height: 300px; /* Adjust as needed for submenu content */
    transition: max-height 0.5s ease-in;
}
.mobile-submenu-item {
    padding-left: 2.5rem; /* Indent sub-items */
}

/* Aspect ratio for map embed */
.aspect-w-16 {
    position: relative;
    width: 100%;
}
.aspect-w-16.aspect-h-9::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 9 / 16 * 100 */
}
.aspect-w-16 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Custom scrollbar for video list */
.video-list-scroll {
    /* max-height removed, will use flex-grow */
    overflow-y: auto;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: var(--primary-color) #f1f1f1; /* For Firefox */
}
.video-list-scroll::-webkit-scrollbar {
    width: 8px;
}
.video-list-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.video-list-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}
.video-list-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color-dark-hover);
}

/* Styles for truncated video description with scrollbar */
.video-description-scroll {
    max-height: 200px; /* Limit height and enable scrolling */
    overflow-y: auto;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: var(--primary-color) #f1f1f1; /* For Firefox */
    padding-right: 8px; /* Add some padding to prevent scrollbar from touching text */
}
.video-description-scroll::-webkit-scrollbar {
    width: 8px;
}
.video-description-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.video-description-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}
.video-description-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color-dark-hover);
}

/* Desktop Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0.375rem; /* rounded-md */
    overflow: hidden; /* Ensures rounded corners apply to children */
}

/* Apply flexbox to dropdown content buttons for alignment */
.dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: flex; /* Changed from block */
    align-items: center; /* Vertically align icon and text */
    gap: 8px; /* Add space between icon and text */
    text-align: left;
    width: 100%;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content button:hover {
    background-color: var(--primary-color-light-hover);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Page Transition Styles */
.page-transition-container {
    transition: opacity 0.5s ease-in-out;
}

.page-exit-active {
    opacity: 0;
}

.page-enter-active {
    opacity: 1;
}