/* 
IMG Medical Directory - Professional UI Enhancement
Transforms ListingPro from blog-style to medical directory-style layout
*/

/* ================================
   DIRECTORY ARCHIVE PAGE STYLING
   ================================ */

/* Main archive container */
.post-type-archive-lp_institution .site-content {
    background: #f8f9fa;
    padding: 40px 0;
}

/* Directory header */
.archive-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
}

.archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.archive-header .archive-description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Search and filter bar */
.directory-search-bar {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: -30px 20px 40px 20px;
    position: relative;
    z-index: 10;
}

.directory-search-bar .search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.directory-search-bar input[type="search"] {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.directory-search-bar select {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    min-width: 150px;
}

.directory-search-bar button {
    background: #2c5aa0;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.directory-search-bar button:hover {
    background: #1e3d72;
    transform: translateY(-2px);
}

/* ================================
   INSTITUTION CARD STYLING
   ================================ */

/* Grid layout for institution cards */
.archive-institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual institution card */
.institution-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.institution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Card header with hospital info */
.institution-card-header {
    padding: 25px;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
}

.institution-card-header h3 {
    font-size: 1.4rem;
    color: #2c5aa0;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.institution-card-header h3 a {
    color: inherit;
    text-decoration: none;
}

.institution-card-header h3 a:hover {
    color: #1e3d72;
}

.institution-location {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.institution-location i {
    margin-right: 8px;
    color: #2c5aa0;
}

.institution-type-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* Card body with key information */
.institution-card-body {
    padding: 25px;
}

.institution-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Key features grid */
.institution-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.feature-item i {
    margin-right: 8px;
    color: #28a745;
    width: 16px;
}

/* Specialties tags */
.institution-specialties {
    margin-bottom: 20px;
}

.institution-specialties .specialty-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 2px;
    display: inline-block;
    border: 1px solid #e9ecef;
}

/* Visa sponsorship indicators */
.visa-sponsorship {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.visa-badge {
    background: #d4edda;
    color: #155724;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #c3e6cb;
}

.visa-badge.h1b {
    background: #cce5ff;
    color: #004085;
    border-color: #99d1ff;
}

.visa-badge.j1 {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Card footer with action buttons */
.institution-card-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-button {
    background: #2c5aa0;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.contact-button:hover {
    background: #1e3d72;
    transform: translateY(-1px);
    color: white;
}

.view-details-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.view-details-link:hover {
    color: #1e3d72;
    text-decoration: underline;
}

/* ================================
   SINGLE INSTITUTION PAGE STYLING
   ================================ */

/* Single institution header */
.single-lp_institution .entry-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d72 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 0;
}

.single-lp_institution .entry-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.institution-meta-header {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
}

.meta-item i {
    margin-right: 8px;
}

/* Institution content sections */
.institution-content-section {
    background: white;
    margin: 30px 0;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.institution-content-section h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e9ecef;
}

.institution-content-section h3 {
    color: #1e3d72;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
}

/* Info grid layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2c5aa0;
}

.info-card h4 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    padding: 5px 0;
    color: #666;
}

.info-card ul li:before {
    content: "✓";
    color: #28a745;
    margin-right: 10px;
    font-weight: bold;
}

/* Contact section styling */
.contact-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
}

.contact-section h3 {
    color: #2c5aa0;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.contact-item i {
    color: #2c5aa0;
}

.contact-cta {
    background: #2c5aa0;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s;
}

.contact-cta:hover {
    background: #1e3d72;
    transform: translateY(-2px);
    color: white;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .archive-institutions-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .institution-features {
        grid-template-columns: 1fr;
    }
    
    .directory-search-bar .search-form {
        flex-direction: column;
    }
    
    .directory-search-bar input[type="search"] {
        min-width: 100%;
    }
    
    .institution-meta-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .institution-content-section {
        padding: 25px;
        margin: 20px 0;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */

.img-friendly-badge {
    background: #d4edda;
    color: #155724;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.img-friendly-badge:before {
    content: "🌟";
}

.loading-state {
    text-align: center;
    padding: 60px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 60px;
    color: #666;
    background: white;
    border-radius: 15px;
    margin: 30px 0;
}

.back-to-directory {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.back-to-directory:hover {
    color: #1e3d72;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Hide default blog-style elements */
.post-type-archive-lp_institution .entry-meta,
.post-type-archive-lp_institution .entry-footer,
.single-lp_institution .entry-meta.below-entry-meta {
    display: none;
}

/* Override BuddyBoss theme styles for cleaner directory look */
.post-type-archive-lp_institution .bb-grid,
.single-lp_institution .bb-grid {
    background: transparent;
    padding: 0;
    box-shadow: none;
}
