/* ==========================================================================
   NHP Provider Directory - Shared Styles
   ========================================================================== */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* Common Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.header {
    color: #1e293b;
    padding: 30px 30px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header img {
    max-height: 80px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.header .subtitle,
.header-subtitle {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.header .nav-buttons {
    margin-top: 0;
}

/* Navigation Links */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.nav-links a {
    color: #1760a9;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid rgba(23, 96, 169, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-links a:hover {
    background: rgba(23, 96, 169, 0.1);
    border-color: #1760a9;
    transform: translateY(-1px);
}

/* Navigation Section (for switching between views) */
.navigation-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
}

.navigation-section > div:first-child {
    margin-bottom: 15px;
    color: #374151;
    font-weight: 600;
    font-size: 16px;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-button {
    background: linear-gradient(135deg, #1760a9 0%, #1e5026 100%);
    color: white !important;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: inline-block;
}

.nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white !important;
    text-decoration: none;
}

.nav-button.secondary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* ==========================================================================
   Page Heading Styles
   ========================================================================== */

.page-heading {
    text-align: center;
    padding: 0 30px 20px 30px;
}

.page-heading h1 {
    font-size: 2.5em;
    color: #1760a9;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.page-heading p {
    font-size: 1.2em;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .page-heading {
        padding: 30px 20px;
    }
    
    .page-heading h1 {
        font-size: 2em;
    }
    
    .page-heading p {
        font-size: 1.1em;
    }
}

/* ==========================================================================
   Location Search Styles
   ========================================================================== */

.location-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

.location-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 20px;
    justify-items: center;
}

.location-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.location-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.location-input-row input {
    flex: 1;
    min-width: 250px;
    padding: 10px 14px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.location-input-row button {
    padding: 10px 16px;
    background: #1760a9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-input-row button:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.or-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    height: 100%;
    min-height: 80px;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #cbd5e1 20%, #94a3b8 50%, #cbd5e1 80%, transparent 100%);
    margin: 8px 0;
}

.gps-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.gps-group button {
    width: 100%;
    max-width: 220px;
    white-space: nowrap;
}

.btn-secondary {
    background: #059669;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #047857;
    transform: translateY(-1px);
}

.distance-controls {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.8) 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
}

.distance-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.distance-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.distance-row select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.distance-row button {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.distance-row button:hover {
    background: #dc2626;
}

.current-location-display {
    text-align: center;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .location-controls {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .or-divider {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .or-divider::before,
    .or-divider::after {
        width: 50px;
        transform: rotate(-90deg);
    }
    
    .distance-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   Map Styles
   ========================================================================== */

.map-section,
.map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 20px 0 30px 0;
}

.map-header {
    background: linear-gradient(135deg, #1760a9 0%, #1e5026 100%);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.3s ease;
}

.map-header:hover {
    background: linear-gradient(135deg, #1e40af 0%, #166534 100%);
}

.map-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.map-content.expanded {
    max-height: 600px;
    transition: max-height 0.4s ease-in;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
    .map-header {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    #map {
        height: 400px;
    }
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

/* Login Form Styles */
.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 0 auto;
    margin-top: 10vh;
}

.login-container .logo {
    margin-bottom: 30px;
}

.login-container .logo img {
    max-width: 200px;
    height: auto;
}

.login-container h1 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1760a9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 96, 169, 0.1);
}

/* Error Messages */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Footer */
.footer {
    margin-top: 30px;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1760a9 0%, #1e5026 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(23, 96, 169, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1760a9 0%, #1e5026 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(23, 96, 169, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Filter Styles
   ========================================================================== */

.filters-section {
    padding: 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Modern Filter Section (map4.php style) */
.filter-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(23, 96, 169, 0.08);
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    flex: 1;
}

.filter-group label,
.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-bottom: 8px;
}

.filter-group select {
    width: 100%;
    max-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.filter-group select:focus {
    border-color: #1760a9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 96, 169, 0.1);
}

.search-input {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
    max-width: 200px;
}

.search-input:focus {
    border-color: #1760a9;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 96, 169, 0.1);
}

.filters-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.search-section {
    display: flex;
    gap: 15px;
    align-items: end;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    margin-top: 20px;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    gap: 12px;
    align-items: end;
}

/* ==========================================================================
   Results Styles
   ========================================================================== */

.results-section {
    padding: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.results-count {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* ==========================================================================
   Card Styles
   ========================================================================== */

.practitioners-grid,
.providers-grid {
    display: grid;
    gap: 20px;
}

.practitioner-card,
.provider-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.practitioner-card:hover,
.provider-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.practitioner-header,
.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.practitioner-name,
.provider-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.practitioner-degree {
    color: #1760a9;
    font-weight: 600;
    font-size: 14px;
}

.practitioner-type,
.provider-type {
    background: #e0f2fe;
    color: #0277bd;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.practitioner-details,
.provider-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.detail-section p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

/* Language Tags */
.languages {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.language-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Badges */
.accepting-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.accepting-yes {
    background: #dcfce7;
    color: #166534;
}

.accepting-no {
    background: #fef2f2;
    color: #dc2626;
}















/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        margin: 0;
    }

    .header h1 {
        font-size: 22px;
    }

    .header p {
        font-size: 14px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        flex-direction: column;
    }

    .practitioner-details,
    .provider-details {
        grid-template-columns: 1fr !important;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .login-container {
        padding: 30px 20px;
        margin: 5vh auto;
    }

    .login-container h1 {
        font-size: 20px;
    }

    .login-container .subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }

    .filters-section,
    .results-section {
        padding: 20px;
    }

    .practitioner-card,
    .provider-card {
        padding: 20px;
    }

    .btn,
    .nav-button {
        padding: 10px 16px;
        font-size: 12px;
    }

    .practitioner-details,
    .provider-details {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .practitioner-details .detail-section {
        width: 100%;
    }
}