/* KMA Business Directory - Frontend Styles */
.kma-business-directory {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Section */
.kma-business-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 30px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.kma-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.kma-main-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.kma-subtitle {
    font-size: 1.3em;
    opacity: 0.95;
    font-weight: 300;
}

/* Section Common Styles */
.kma-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.kma-section-title {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.kma-section-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Introduction Section */
.kma-business-intro {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 5px solid #667eea;
}

/* Categories Section */
.kma-categories-section {
    margin-bottom: 50px;
}

.kma-business-stats {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #bbdefb;
}

.kma-stats-text {
    font-size: 1.1em;
    color: #1565c0;
    margin: 0;
    font-weight: 500;
}

/* Category Sections */
.kma-category-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kma-category-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.kma-category-title {
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

/* Business Cards Grid */
.kma-business-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.kma-business-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.kma-business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.kma-business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.kma-business-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.kma-business-logo {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 20px;
    border: 2px solid #e8e8e8;
    padding: 3px;
    background: white;
}

.kma-business-icon {
    font-size: 3em;
    margin-right: 20px;
    min-width: 70px;
    text-align: center;
}

.kma-business-info {
    flex: 1;
}

.kma-business-name {
    font-size: 1.3em;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
}

.kma-contact-person {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

.kma-business-card-body {
    margin-top: 15px;
}

.kma-service-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.kma-contact-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.kma-contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
}

.kma-contact-item:last-child {
    margin-bottom: 0;
}

.kma-contact-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.kma-contact-value {
    color: #666;
    font-size: 0.9em;
    word-break: break-all;
    text-align: right;
}

/* Add Business Section */
.kma-add-business-section {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px dashed #4caf50;
    margin-top: 40px;
}

.kma-form-info {
    margin: 25px 0;
}

.kma-form-title {
    font-size: 1.4em;
    color: #2e7d32;
    margin-bottom: 20px;
    font-weight: 600;
}

.kma-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-block;
    text-align: left;
}

.kma-requirement-item {
    padding: 8px 0;
    font-size: 1.05em;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.kma-requirement-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.kma-action-button {
    margin-top: 25px;
}

.kma-add-business-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 16px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    border: none;
    cursor: pointer;
}

.kma-add-business-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    color: white;
    text-decoration: none;
}

/* No Businesses State */
.kma-no-businesses {
    text-align: center;
    padding: 60px 30px;
    background: #fafafa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.kma-empty-state {
    max-width: 500px;
    margin: 0 auto;
}

.kma-empty-title {
    font-size: 1.8em;
    color: #666;
    margin-bottom: 15px;
}

.kma-empty-description {
    color: #888;
    font-size: 1.1em;
    margin-bottom: 25px;
}

/* Add Business Form Styles */
.kma-add-business-section .kma-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.kma-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.kma-form-main-title {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.kma-form-subtitle {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

.kma-business-form {
    text-align: left;
}

.kma-form-section {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    background: #fafafa;
}

.kma-section-legend {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: 600;
    padding: 0 15px;
    margin-bottom: 20px;
    background: white;
    border-radius: 6px;
    display: inline-block;
}

.kma-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.kma-form-group {
    margin-bottom: 20px;
}

.kma-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.kma-form-input,
.kma-form-select,
.kma-form-textarea,
.kma-form-file {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.kma-form-input:focus,
.kma-form-select:focus,
.kma-form-textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fafbff;
}

.kma-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.kma-form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

.kma-form-actions {
    text-align: center;
    margin-top: 30px;
}

.kma-submit-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.kma-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.kma-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.kma-button-loader {
    display: none;
}

.kma-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.kma-form-message:empty {
    display: none;
}

/* Success and Error States */
.kma-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kma-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kma-business-directory {
        padding: 15px;
    }
    
    .kma-main-title {
        font-size: 2em;
    }
    
    .kma-subtitle {
        font-size: 1.1em;
    }
    
    .kma-business-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .kma-form-row {
        grid-template-columns: 1fr;
    }
    
    .kma-business-header {
        padding: 40px 20px;
    }
    
    .kma-business-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .kma-business-logo,
    .kma-business-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .kma-add-business-section .kma-form-container {
        padding: 25px 20px;
    }
    
    .kma-contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .kma-contact-value {
        text-align: left;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .kma-main-title {
        font-size: 1.6em;
    }
    
    .kma-section-title {
        font-size: 1.5em;
    }
    
    .kma-category-section {
        padding: 20px 15px;
    }
    
    .kma-business-card {
        padding: 20px 15px;
    }
}

/* Animation for new items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kma-business-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading state for form */
.kma-loading .kma-button-text {
    display: none;
}

.kma-loading .kma-button-loader {
    display: inline-block;
}

/* Print Styles */
@media print {
    .kma-add-business-section,
    .kma-add-business-btn {
        display: none;
    }
    
    .kma-business-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}