/* Custom styles to enhance the Bootstrap theme */

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(13, 17, 23, 0.7), rgba(13, 17, 23, 0.7)), url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Drone Air Show */
.drone-show {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.drone {
    position: absolute;
    z-index: 2;
}

.clickable-drone {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clickable-drone:hover {
    transform: scale(1.1);
}

.drone-animation {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
    transition: transform 0.1s ease;
}

/* Formation Flying - All drones work together in V-Formation */
/* Lead Drone - Center Formation Leader */
.drone-1 {
    top: 25%;
    left: -120px;
    animation: formationLeader 20s linear infinite;
}

@keyframes formationLeader {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 1; }
    15% {
        transform: translateX(200px) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(400px) translateY(-20px) rotate(3deg);
    }
    35% {
        transform: translateX(600px) translateY(-30px) rotate(0deg);
    }
    50% {
        transform: translateX(800px) translateY(-20px) rotate(-2deg);
    }
    65% {
        transform: translateX(1000px) translateY(0) rotate(0deg);
    }
    85% {
        transform: translateX(1200px) translateY(10px) rotate(2deg);
    }
    95% { opacity: 1; }
    100% {
        transform: translateX(calc(100vw + 120px)) translateY(0) rotate(0deg);
        opacity: 0;
    }
}

/* Left Wing Drone - Follows Leader */
.drone-2 {
    top: 30%;
    left: -120px;
    animation: leftWing 20s linear infinite;
    animation-delay: 0.8s;
}

@keyframes leftWing {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 1; }
    15% {
        transform: translateX(150px) translateY(30px) rotate(-5deg);
    }
    25% {
        transform: translateX(350px) translateY(10px) rotate(2deg);
    }
    35% {
        transform: translateX(550px) translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateX(750px) translateY(10px) rotate(-2deg);
    }
    65% {
        transform: translateX(950px) translateY(30px) rotate(-5deg);
    }
    85% {
        transform: translateX(1150px) translateY(40px) rotate(-3deg);
    }
    95% { opacity: 1; }
    100% {
        transform: translateX(calc(100vw + 120px)) translateY(30px) rotate(0deg);
        opacity: 0;
    }
}

/* Right Wing Drone - Mirror Formation */
.drone-3 {
    top: 20%;
    left: -120px;
    animation: rightWing 20s linear infinite;
    animation-delay: 0.8s;
}

@keyframes rightWing {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 1; }
    15% {
        transform: translateX(150px) translateY(-30px) rotate(5deg);
    }
    25% {
        transform: translateX(350px) translateY(-10px) rotate(-2deg);
    }
    35% {
        transform: translateX(550px) translateY(0) rotate(3deg);
    }
    50% {
        transform: translateX(750px) translateY(-10px) rotate(2deg);
    }
    65% {
        transform: translateX(950px) translateY(-30px) rotate(5deg);
    }
    85% {
        transform: translateX(1150px) translateY(-40px) rotate(3deg);
    }
    95% { opacity: 1; }
    100% {
        transform: translateX(calc(100vw + 120px)) translateY(-30px) rotate(0deg);
        opacity: 0;
    }
}

/* Support Drone - Left Rear */
.drone-4 {
    top: 35%;
    left: -120px;
    animation: supportLeft 20s linear infinite;
    animation-delay: 1.5s;
}

@keyframes supportLeft {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 1; }
    15% {
        transform: translateX(100px) translateY(50px) rotate(-8deg);
    }
    25% {
        transform: translateX(300px) translateY(30px) rotate(-5deg);
    }
    35% {
        transform: translateX(500px) translateY(20px) rotate(-3deg);
    }
    50% {
        transform: translateX(700px) translateY(30px) rotate(-5deg);
    }
    65% {
        transform: translateX(900px) translateY(50px) rotate(-8deg);
    }
    85% {
        transform: translateX(1100px) translateY(60px) rotate(-6deg);
    }
    95% { opacity: 1; }
    100% {
        transform: translateX(calc(100vw + 120px)) translateY(50px) rotate(0deg);
        opacity: 0;
    }
}

/* Support Drone - Right Rear */
.drone-5 {
    top: 15%;
    left: -120px;
    animation: supportRight 20s linear infinite;
    animation-delay: 1.5s;
}

@keyframes supportRight {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% { opacity: 1; }
    15% {
        transform: translateX(100px) translateY(-50px) rotate(8deg);
    }
    25% {
        transform: translateX(300px) translateY(-30px) rotate(5deg);
    }
    35% {
        transform: translateX(500px) translateY(-20px) rotate(3deg);
    }
    50% {
        transform: translateX(700px) translateY(-30px) rotate(5deg);
    }
    65% {
        transform: translateX(900px) translateY(-50px) rotate(8deg);
    }
    85% {
        transform: translateX(1100px) translateY(-60px) rotate(6deg);
    }
    95% { opacity: 1; }
    100% {
        transform: translateX(calc(100vw + 120px)) translateY(-50px) rotate(0deg);
        opacity: 0;
    }
}

/* Hover effect for all drones */
.drone:hover .drone-animation {
    transform: scale(1.2);
}

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

/* Navigation */
.navbar {
    background: rgba(13, 17, 23, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--bs-dark) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Portfolio */
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
}

.portfolio-card img,
.portfolio-card video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 10px;
}

.portfolio-video {
    outline: none;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-card:hover img,
.portfolio-card:hover video {
    transform: scale(1.1);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.portfolio-card:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Portfolio Filter Animation */
.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

/* Service Cards */
.service-icon {
    margin-bottom: 1rem;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash-messages .alert {
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease;
}

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

/* Contact Form */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .portfolio-card img,
    .portfolio-card video {
        height: 200px;
    }
    
    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
}

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

/* Footer */
footer a:hover {
    color: var(--bs-primary) !important;
    transition: color 0.3s ease;
}

/* Loading Animation for Portfolio Filter */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Testimonial Modal */
.testimonial-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.testimonial-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-content {
    background: linear-gradient(135deg, var(--bs-dark) 0%, var(--bs-secondary) 100%);
    margin: 20px;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.8);
    animation: modalSlideIn 0.4s ease forwards;
}

.testimonial-close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.testimonial-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.testimonial-body {
    padding: 40px;
    text-align: center;
    color: white;
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.testimonial-quote {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.8;
    margin: 25px 0;
    border: none;
    position: relative;
}


.testimonial-author {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-author strong {
    display: block;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 5px;
    font-weight: 600;
}

.testimonial-author span {
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

@keyframes modalSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Pause animations when modal is open */
.drones-paused .drone {
    animation-play-state: paused !important;
}

/* Crown Drop Effects */
.crown-drop {
    position: absolute;
    font-size: 24px;
    z-index: 1;
    pointer-events: none;
    animation: crownFall 4s linear forwards;
    opacity: 0.8;
}

@keyframes crownFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Pause crown drops when modal is open */
.drones-paused .crown-drop {
    animation-play-state: paused !important;
}

/* Regal DroneKings Branding */
.navbar-brand {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.5rem !important;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
}

.navbar-brand i {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Hero Video Styling */
.hero-video .embed-responsive {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.hero-video .embed-responsive-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
