/* ============================================
   Layout Custom Styles
   ============================================ */

/* Logo responsive sizing with aspect ratio preservation */
#logo {
    display: flex;
    align-items: center;
}

#logo a {
    display: block;
    line-height: 0; /* Remove any extra space */
}

#logo img {
    height: 50px; /* Fixed height for better control */
    width: auto; /* Auto width preserves aspect ratio */
    max-width: 100%;
    object-fit: contain; /* Ensures image is not distorted */
    transition: all 0.3s ease;
}

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
    #logo img {
        height: 45px;
    }
}

/* Tablets in portrait mode */
@media (max-width: 768px) {
    #logo img {
        height: 40px;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    #logo img {
        height: 35px;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    #logo img {
        height: 30px;
    }
}

/* ============================================
       Navigation Menu Styles
   ============================================ */

/* Increase navigation menu text size */
.nav-menu a {
    font-size: 14px !important; /* Increased from 12px */
    font-weight: 500 !important; /* Make it slightly bolder */
    letter-spacing: 0.5px; /* Better readability */
}

.nav-menu > li {
    margin-left: 15px; /* Slightly more spacing between items */
}

/* Dropdown menu items */
.nav-menu ul li a {
    font-size: 13px !important; /* Increased from 12px */
    padding: 12px 15px !important; /* More padding for better clickability */
}

/* Mobile navigation */
#mobile-nav ul li a {
    font-size: 15px !important; /* Increased from 13px */
    padding: 12px 22px 12px 15px !important;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
    .nav-menu a {
        font-size: 13px !important;
    }
}

@media (max-width: 960px) {
    #mobile-nav ul li a {
        font-size: 14px !important;
    }
}

/* ============================================
   Partners/Employers Card Styles
   ============================================ */

/* Fix for employer cards to maintain aspect ratio */
.feature-cat-area .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-cat-area .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Card image container with aspect ratio preservation */
.feature-cat-area .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Fits entire image without cropping */
    object-position: center;
    padding: 15px; /* Add padding so logos don't touch edges */
    background-color: #fff; /* White background for consistency */
}

.feature-cat-area .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.feature-cat-area .card-body h5 {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 10px;
}

.feature-cat-area .card-text {
    margin-top: auto;
}

/* Responsive grid for employer cards */
.feature-cat-area .col-3 {
    padding: 15px;
}

@media (max-width: 1200px) {
    .feature-cat-area .col-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 992px) {
    .feature-cat-area .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .feature-cat-area .card-img-top {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .feature-cat-area .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .feature-cat-area .card-img-top {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .feature-cat-area .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .feature-cat-area .card-img-top {
        height: 220px;
    }
}

/* ============================================
   Nice Select Dropdown Styles
   ============================================ */

/* Global styles for nice-select dropdowns */
.nice-select {
    width: 100% !important;
    line-height: 40px;
    border-radius: 5px;
    float: none;
}

.nice-select .list {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    padding: 5px 0;
}

.nice-select .option {
    white-space: normal !important;
    min-height: 32px !important;
    height: auto !important;
    line-height: 1.6 !important;
    padding: 10px 12px !important;
    margin-bottom: 4px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
}

.nice-select .option:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
}

.nice-select .current {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ensure dropdown items remain visible */
.nice-select .option:hover, 
.nice-select .option.selected, 
.nice-select .option.focus {
    background-color: #f8f9fa;
}

/* Add additional spacing for multi-line text */
.nice-select .option span,
.nice-select .option a {
    display: inline-block;
    line-height: 1.5;
    margin: 2px 0;
}

/* Improve responsive behavior */
@media (max-width: 768px) {
    .form-cols {
        margin-bottom: 10px;
    }
    
    .nice-select {
        margin-bottom: 10px;
    }
    
    .nice-select .list {
        max-height: 250px;
    }
    
    .nice-select .option {
        padding: 8px 10px !important;
    }
}

/* Fix for Safari browser */
@supports (-webkit-overflow-scrolling: touch) {
    .nice-select .list {
        width: 100% !important;
    }
}

/* ============================================
   Modal Styles
   ============================================ */

.modal-title {
    font-weight: bold;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    background-color: #f5f5f5;
}

/* Background color */
.modal-content {
    background-color: #f8f9fa;
}

/* Modal header */
.modal-header {
    background-color: #007bff;
    color: #fff;
    border-bottom: none;
    padding: 1rem;
    text-align: center;
}

.modal-title {
    font-size: 1.2rem;
}

/* Modal body */
.modal-body {
    padding: 2rem;
}

.modal-body hr {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.modal-body strong {
    font-weight: bold;
}

.modal-body label.control-label {
    font-weight: bold;
}

/* Modal footer */
.modal-footer {
    border-top: none;
    padding: 1rem;
    justify-content: center;
}

/* Close button */
.modal-header .close {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 1;
}

/* Apply button */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-primary:focus {
    box-shadow: none;
}

/* Employer information */
.modal-body .form-group {
    margin-bottom: 0;
}

.modal-body .form-group div:not(:last-child) {
    margin-bottom: 0.5rem;
}
