/* Main Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px; /* Account for fixed navbar */
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* Navbar Styles */
.navbar {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.navbar-brand img {
    width: 50px;
    height: 50px;
}

.navbar-nav {
    gap: 0.5rem;
}

/* Dropdown menu styles */
.dropdown-menu {
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    min-width: 200px;
}

/* Phone numbers dropdown specific styles */
#phoneDropdown + .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #333;
    white-space: normal;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* Phone number dropdown specific styles */
.dropdown-item span.fw-bold {
    display: block;
    margin-bottom: 0.25rem;
}

.dropdown-item small.text-muted {
    display: block;
    font-family: monospace;
}

.dropdown-divider {
    margin: 0.25rem 0;
}

/* Phone number menu item style */
.phone-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.phone-menu-item .title {
    font-weight: bold;
    margin: 0;
}

.phone-menu-item .number {
    font-family: monospace;
    color: #666;
}

/* Sort arrows */
.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 1.5rem;
}

.sortable:before,
.sortable:after {
    content: '';
    position: absolute;
    right: 4px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.sortable:before {
    top: 40%;
    border-bottom: 6px solid #ccc;
}

.sortable:after {
    bottom: 40%;
    border-top: 6px solid #ccc;
}

.sortable.asc:before {
    border-bottom-color: #0d6efd;
}

.sortable.desc:after {
    border-top-color: #0d6efd;
}

/* Mobile responsiveness */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-item {
        padding: 0.25rem 0;
    }

    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
    }
}

/* Make sure dropdown menu is scrollable on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* Section Styles */
section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

section h2 {
    color: #0068B3;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.75rem;
    font-weight: 600;
}

/* Tile Grid Styles */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.object {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.object:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 104, 179, 0.12);
    border-color: rgba(0, 104, 179, 0.2);
}

.icon {
    margin-bottom: 1rem;
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.info {
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.title {
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1.1rem;
}

.description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex: 1;
}

.link, .linkfolder {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    color: white !important;
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    border: 1px solid transparent;
}

.link {
    background-color: #0068B3;
    border-color: #0068B3;
}

.linkfolder {
    background-color: #198754;
    border-color: #198754;
}

.link:hover, .linkfolder:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.link:focus, .linkfolder:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 104, 179, 0.35);
}

/* Container */
.container {
    max-width: 1400px;
    padding: 0 1rem;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 1rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

footer p {
    margin: 0;
    color: #6c757d;
}

/* Phone Numbers Dropdown */
.dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    transition: background-color 0.2s;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-menu .dropdown-item .fw-bold {
    color: #0d6efd;
    margin-bottom: 0.25rem;
}

.dropdown-menu .dropdown-item small {
    font-size: 0.875rem;
}

.dropdown-menu .dropdown-item:hover small {
    color: #495057 !important;
}

.dropdown-menu .dropdown-divider {
    margin: 0.25rem 0;
}
