/* Variables */
:root {
    --primary-color: #001F3F;
    --secondary-color: #003366;
    --accent-color: #FF4136;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --font-primary: 'Open Sans', sans-serif;
    --font-heading: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 120px;
}

/* Header Styles */
.navbar {
    background-color: var(--primary-color) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand .logo-img {
    height: 60px;
    width: auto;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 600;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #FFD700 !important;
}

.navbar-toggler {
    border-color: white;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Emergency Banner */
.emergency-banner {
    background-color: var(--light-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.emergency-banner a {
    color: var(--accent-color);
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #FFD700;
}

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

.hero-buttons .btn {
    margin: 0 10px 10px 0;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.trust-indicators .badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    margin: 5px;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Services Section */
.services-section {
    padding: 80px 0;
}

.service-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
}

.calculator-widget {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.calculator-widget .form-control,
.calculator-widget .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1.1rem;
}

.calculator-widget .form-control:focus,
.calculator-widget .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 65, 54, 0.25);
}

#calculatorResult {
    animation: fadeInUp 0.5s ease;
}

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

/* Locations Section */
.locations-section {
    padding: 80px 0;
}

.location-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.location-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.location-card h5 {
    margin-bottom: 10px;
}

.location-card h5 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.location-card h5 a:hover {
    color: var(--accent-color);
}

.location-card p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-card .stars {
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
}

.testimonial-card footer {
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e63946 100%);
    padding: 80px 0;
}

.cta-buttons .btn {
    margin: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal-header {
    border-bottom: 2px solid var(--accent-color);
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 65, 54, 0.25);
}

/* Signature Pad */
.signature-pad-container {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.signature-pad {
    width: 100%;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: crosshair;
}

.signature-actions {
    text-align: right;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer h6 {
    color: #FFD700;
    font-weight: 600;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #FFD700;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.contact-info i {
    color: var(--accent-color);
}

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

.chat-toggle {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 65, 54, 0.3);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-content {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    font-weight: 600;
    position: relative;
}

.chat-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
}

.chat-message {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .calculator-widget {
        padding: 20px;
    }
    
    .service-card,
    .testimonial-card {
        margin-bottom: 30px;
    }
    
    .chat-content {
        width: 280px;
        right: -10px;
    }
    
    .navbar-brand .logo-img {
        height: 50px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .emergency-banner,
    .chat-widget,
    .modal {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --accent-color: #ff0000;
        --text-color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
