/* Custom CSS for ElectroTech Services - Single Page */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --success-color: #198754;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Dark theme variables */
[data-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #e9ecef;
    --bs-card-bg: #242323;
    --bs-border-color: #404040;
}

/* Global Styles */
body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Smooth scrolling offset for fixed navbar */
section {
    scroll-margin-top: 80px;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.min-vh-100 {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .navbar.scrolled {
        background-color: rgba(13, 110, 253, 0.95) !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--warning-color) !important;
    }

    .navbar-nav .nav-link::after {
        content: "";
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--warning-color);
        transition: all 0.3s ease;
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        width: 100%;
        left: 0;
    }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out 0.3s both;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

    .animate-on-scroll.animate-in {
        opacity: 1;
        transform: translateY(0);
    }

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    }

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .hover-lift:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    }

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.price-tag {
    transition: transform 0.3s ease;
}

.service-card:hover .price-tag {
    transform: scale(1.05);
}

/* Feature Boxes */
.feature-box {
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    height: 100%;
}

    .feature-box:hover {
        background-color: rgba(13, 110, 253, 0.05);
        transform: translateY(-5px);
    }

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon {
    transform: scale(1.1);
}

/* Contact Form */
.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

    .contact-item:last-child {
        border-bottom: none;
    }

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Emergency Banner */
.emergency-banner {
    animation: slideUp 0.5s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control,
.form-select {
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .btn:hover::before {
        left: 100%;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
    }

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
    border: none;
    color: #000;
}

    .btn-warning:hover {
        background: linear-gradient(135deg, #e0a800 0%, #cc9a00 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
        color: #000;
    }

/* Smooth scroll behavior */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
}

    .modal-header .btn-close {
        filter: invert(1);
    }

/* Footer */
footer {
    background: linear-gradient(135deg, #212529 0%, #1a1a1a 100%);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .social-links a:hover {
        background-color: var(--primary-color);
        transform: translateY(-3px);
    }

/* Section Spacing */
section {
    padding: 80px 0;
}

    section:first-child {
        padding-top: 0;
    }

/* Dark Theme */
[data-theme="dark"] {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

    [data-theme="dark"] .card {
        background-color: var(--bs-card-bg);
        border-color: var(--bs-border-color);
    }

    [data-theme="dark"] .bg-light {
        background-color: #2d2d2d !important;
    }

    [data-theme="dark"] .text-muted {
        color: #adb5bd !important;
    }

    [data-theme="dark"] .border {
        border-color: var(--bs-border-color) !important;
    }

    [data-theme="dark"] .modal-content {
        background-color: var(--bs-card-bg);
        color: var(--bs-body-color);
    }

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

    .btn.loading::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid #ffffff;
        border-radius: 50%;
        border-top-color: transparent;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }

    .display-4 {
        font-size: 2rem;
    }

    .emergency-banner {
        position: relative;
    }

        .emergency-banner .row {
            text-align: center;
        }

        .emergency-banner .col-md-4 {
            margin-top: 1rem;
        }

    section {
        padding: 60px 0;
    }

    .min-vh-100 {
        min-height: 80vh;
    }
}

@media (max-width: 576px) {
    .hero-features {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-item {
        margin-bottom: 0.5rem;
    }

    section {
        padding: 40px 0;
    }
}

/* Accessibility Improvements */
.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 indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 2px;
    }

    .card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Parallax effect for hero section */
@media (min-width: 768px) {
    .hero-section {
        background-attachment: fixed;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #0056b3;
    }
