/* Custom CSS for BusinessPro Website */

/* Root Variables */
:root {
    --primary-color: #000000;
    --secondary-color: #d1d5db;
    --success-color: #10b981;
    --warning-color: #000000;
    --danger-color: #ef4444;
    --dark-color: #000000;
    --light-color: #ffffff;
    --text-color: #374151;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-radius: 0.5rem;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Custom Bootstrap Overrides */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #000000;
}

.btn-warning:hover {
    background-color: #9ca3af;
    border-color: #9ca3af;
    color: #000000;
    transform: translateY(-1px);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #333333 100%);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* Navigation */
.navbar {
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item {
        margin-bottom: 0.25rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0;
        border-radius: var(--border-radius);
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: white !important;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    line-height: 1.2;
}

.hero-image {
    position: relative;
    height: 400px;
}

.hero-logo {
    transition: var(--transition);
    animation: fadeInScale 1s ease-out 0.5s both;
}

.hero-logo:hover {
    transform: scale(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.floating-elements {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.hero-icon:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.hero-icon:nth-child(2) {
    top: 50%;
    right: 20%;
    animation-delay: 2s;
}

.hero-icon:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Tiles */
.service-tile {
    position: relative;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
    margin-bottom: 1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.tile-front,
.tile-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: white;
    border: 1px solid var(--border-color);
}

.tile-front {
    transform: rotateY(0deg);
}

.tile-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-color) 0%, #333333 100%);
    color: white;
}

.service-tile.flipped .tile-front {
    transform: rotateY(-180deg);
}

.service-tile.flipped .tile-back {
    transform: rotateY(0deg);
}

.service-tile:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.service-icon img {
    color: var(--primary-color);
}

.service-icon img[src*="tires.png"], 
.service-icon img[src*="auto-salvage.png"] {
    filter: none;
    opacity: 0.8;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    padding: 8px;
}

/* Classic restoration icon circular styling */
.service-icon i.fas.fa-tools {
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    padding: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tile-back .service-icon {
    color: white;
}

.tile-back .service-icon img[src*="tires.png"], 
.tile-back .service-icon img[src*="auto-salvage.png"] {
    filter: none;
    opacity: 1;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    padding: 8px;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tile-back .service-title {
    color: white;
}

.service-description,
.service-full-description {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.tile-back .service-full-description {
    color: rgba(255, 255, 255, 0.9);
}

.tile-indicator {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.tile-back .tile-indicator {
    color: rgba(255, 255, 255, 0.8);
}

.service-tile:hover .tile-indicator {
    transform: translateX(5px);
}

/* Service Detail Page */
.service-hero {
    min-height: 40vh;
}

.service-icon-large {
    font-size: 4rem;
    color: white;
}

.min-vh-50 {
    min-height: 50vh;
}

.service-content h2,
.service-content h3 {
    color: var(--text-color);
}

.cta-section {
    border-left: 4px solid var(--secondary-color);
}

/* Feature Cards */
.feature-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.feature-icon {
    font-size: 3rem;
}

/* Sidebar */
.sidebar .card {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

.sidebar .card-header {
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.sidebar .list-unstyled li a {
    padding: 0.5rem 0;
    transition: var(--transition);
}

.sidebar .list-unstyled li a:hover {
    color: var(--primary-color) !important;
    padding-left: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--secondary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-section .row {
        min-height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .navbar-brand img {
        height: 32px !important;
    }
    
    .hero-logo {
        max-height: 200px !important;
    }
    
    .service-tile {
        height: 300px;
        margin-bottom: 2rem;
    }
    
    .tile-front,
    .tile-back {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    .floating-elements {
        display: none;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .service-tile {
        height: 280px;
    }
    
    .tile-front,
    .tile-back {
        padding: 1rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .navbar-brand img {
        height: 28px !important;
    }
    
    .hero-logo {
        max-height: 150px !important;
    }
}

/* Utility Classes */
.min-vh-100 {
    min-height: 100vh;
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.service-tile:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .floating-elements {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .service-tile {
        break-inside: avoid;
    }
}

/* Modal form styling improvements */
.modal-body {
    padding: 1.5rem;
}

.modal-body .mb-3 {
    margin-bottom: 1.5rem !important;
}

.modal-body .form-check {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.modal-body .form-check:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.modal-body .form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.125em;
    margin-right: 0.75rem;
    border: 2px solid #495057;
    background-color: #fff;
}

.modal-body .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-body .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.25);
}

.modal-body .form-check-label {
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    line-height: 1.5;
    margin-bottom: 0;
}

.modal-body .form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.chat-toggle i {
    color: white;
    font-size: 24px;
}

.chat-container {
    display: none;
    flex-direction: column;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-container.chat-open {
    opacity: 1;
    transform: translateY(0);
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h6 {
    margin: 0;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 12px;
}

.user-message {
    text-align: right;
}

.ai-message {
    text-align: left;
}

.message-content {
    display: inline-block;
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.user-message .message-content {
    background: #007bff;
    color: white;
}

.ai-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.chat-input-container .input-group {
    border-radius: 20px;
    overflow: hidden;
}

.chat-input-container .form-control {
    border: 1px solid #e9ecef;
    border-right: none;
    padding: 10px 16px;
}

.chat-input-container .btn {
    border-radius: 0 20px 20px 0;
    padding: 10px 16px;
}

.typing-indicator .message-content {
    background: white !important;
    border: 1px solid #e9ecef !important;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.escalation-notice {
    text-align: center;
    padding: 8px;
    margin: 8px 0;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #c3e6cb;
}

.submission-notice {
    text-align: center;
    padding: 8px;
    margin: 8px 0;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #b6d4d9;
}

/* Mobile Responsive Chat */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .chat-container {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
        right: 10px;
        left: auto;
    }
    
    .chat-toggle i {
        font-size: 20px;
    }
}

.modal-body .text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-left: 2rem;
}

.modal-body .form-control {
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
}

.modal-body .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
}
