/* Root Variables */
:root {
    --primary-color: #0d47a1;
    --secondary-color: #1976d2;
    --accent-color: #ff6f00;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --support-bg: #e8eaf0;
    --gradient-start: #0d47a1;
    --gradient-end: #1565c0;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,128C672,128,768,160,864,165.3C960,171,1056,149,1152,128C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 30rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Service Cards */
.service-card {
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.service-icon {
    color: var(--primary-color);
}

.service-card h3 {
    color: var(--dark-color);
    font-weight: 700;
}

/* About Section */
.about-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.feature-icon {
    min-width: 50px;
}

/* Training Cards */
.training-card {
    background: white;
    transition: all 0.3s ease;
}

.training-card:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(13, 71, 161, 0.1);
    transform: translateY(-5px);
}

.training-icon {
    height: 60px;
    display: flex;
    align-items: center;
}

/* Contact Form */
.contact-form {
    border-top: 4px solid var(--primary-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(13, 71, 161, 0.3);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Footer */
footer a {
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
}

footer a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* Utility Classes */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.bg-support {
    background-color: var(--support-bg) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .service-card,
    .contact-form {
        padding: 2rem !important;
    }
}

/* Smooth Scrolling Offset for Fixed Navbar */
section {
    scroll-margin-top: 80px;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.training-card {
    animation: fadeIn 0.6s ease-out;
}

/* Testimonials */
.testimonials-masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (max-width: 992px) {
    .testimonials-masonry {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .testimonials-masonry {
        column-count: 1;
    }
}

.testimonial-card {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

/* Image Optimizations */
.powerwire-logo {
    max-width: 400px;
}

.afc-logo {
    max-width: 500px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}