/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 160px);
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: #fff;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #007bff;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0;
}

.auth-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
}

.auth-card p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.auth-form {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-control[rows] {
    resize: vertical;
    min-height: 100px;
}

.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.stat-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-weight: 500;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.action-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.action-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Profile */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Cards */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.current-media {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.current-media img {
    border-radius: 4px;
}

/* Listings */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.listing-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
}

.listing-logo {
    height: 150px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.listing-content {
    padding: 1.5rem;
}

.listing-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.listing-category {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.listing-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.listing-details p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.listing-details a {
    color: #007bff;
    text-decoration: none;
}

.listing-details a:hover {
    text-decoration: underline;
}

.listing-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Directories */
.directories-header {
    text-align: center;
    margin-bottom: 2rem;
}

.directories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.directory-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.directory-logo {
    height: 120px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directory-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.directory-content {
    padding: 1.5rem;
}

.directory-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.directory-category {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.directory-details p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.directory-details a {
    color: #007bff;
    text-decoration: none;
}

.directory-details a:hover {
    text-decoration: underline;
}

.directory-documents {
    margin-top: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #666;
}

.empty-state p {
    color: #999;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .listings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .listings-header .btn {
        align-self: center;
    }

    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .directories-grid {
        grid-template-columns: 1fr;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* AI Bot Styles */
.ai-bot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.ai-bot-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.bot-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.ai-bot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: flex-end;
    align-items: center;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

.ai-bot-modal.show {
    display: flex;
}

.ai-bot-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 850px;
    max-width: 97vw;
    max-height: 95vh;
    margin: 10px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.05);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.ai-bot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

.ai-bot-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

.ai-bot-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.ai-bot-header-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    position: relative;
    z-index: 1;
}

.ai-bot-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.ai-bot-modal-close {
    font-size: 2.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-bot-modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.ai-bot-modal-body {
    padding: 0;
    height: 720px;
    background: #ffffff;
}

.ai-bot-modal-body iframe {
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    margin: 0;
    padding: 0;
    display: block;
}

/* Mobile responsiveness for AI bot */
@media (max-width: 768px) {
    .ai-bot-icon {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .bot-icon {
        width: 25px;
        height: 25px;
    }

    .ai-bot-modal-content {
        width: 98vw;
        margin: 5px;
        max-height: 97vh;
        border-radius: 8px;
    }

    .ai-bot-modal-body {
        height: 600px;
    }

    .ai-bot-modal-body iframe {
        height: 600px;
    }

    .ai-bot-modal-header {
        padding: 1rem;
    }

    .ai-bot-modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .ai-bot-modal-content {
        width: 100vw;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .ai-bot-modal-body {
        height: 500px;
    }

    .ai-bot-modal-body iframe {
        height: 500px;
    }

    .ai-bot-modal-header {
        padding: 0.75rem;
    }

    .ai-bot-modal-header h3 {
        font-size: 1rem;
    }

    .ai-bot-header-content {
        gap: 0.5rem;
    }

    .ai-bot-header-logo {
        width: 24px;
        height: 24px;
    }

    .ai-bot-modal-close {
        font-size: 1.5rem;
        padding: 0.25rem;
    }

    .ai-bot-header-content {
        gap: 0.4rem;
    }

    .ai-bot-header-logo {
        width: 20px;
        height: 20px;
    }

    .ai-bot-modal-header h3 {
        font-size: 0.9rem;
    }
}
