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

html {
    scroll-behavior: smooth;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #00f3ff;
    color: #000;
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 5px 5px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body {
    min-height: 100vh;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    background: #000;
}

/* Background Elements */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/victoria-harbour.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

@media (max-width: 768px) {
    .background {
        background-attachment: scroll; /* Better performance on mobile */
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: -1;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
}


/* Content Layout */
.content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 0;
}

/* Hide all sections except home */
.section {
    display: none;
    min-height: 100vh;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.section.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Home section specific styling */
#home.section {
    display: flex;
    min-height: 0;
    padding: 0;
    position: static;
    background: transparent;
    transform: none; /* Prevent creating a new containing block for fixed elements */
    transition: none;
}

#home.section.active {
    display: flex;
    transform: none;
}

.section-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 100%;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    text-decoration: none;
    display: inline-block;
}

.hero-buttons .btn-secondary {
    margin-top: 0;
}

/* Typography */
.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: white;
    text-shadow: 
        0 0 10px rgba(0, 243, 255, 0.8),
        0 0 20px rgba(0, 243, 255, 0.6),
        0 0 30px rgba(0, 243, 255, 0.4);
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 1.5rem;
}


.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(0, 243, 255, 0.6),
        0 0 20px rgba(0, 243, 255, 0.4);
}

.section-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Buttons */
.btn {
    border: none;
    color: #000;
    padding: 16px 45px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.btn-primary {
    background: rgba(0, 243, 255, 0.9);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.btn-primary:hover {
    background: #00f3ff;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.8);
    transform: translateY(-3px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 12px 35px;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

.btn.success {
    background: #00cc66;
    box-shadow: 0 0 15px rgba(0, 204, 102, 0.5);
}

.btn.error {
    background: #ff3333;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Form Styles */
.form-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 2.5rem;
    border: 1px solid rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    color: rgba(0, 243, 255, 0.9);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 2px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: rgba(0, 243, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(255, 51, 51, 0.6);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: rgba(0, 204, 102, 0.6);
}

.error-message {
    color: #ff3333;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
    display: block;
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(0, 243, 255, 0.3);
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.close {
    color: rgba(255, 255, 255, 0.6);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    z-index: 2001;
}

.close:hover,
.close:focus {
    color: #00f3ff;
    text-decoration: none;
}

/* Modal form styles */
.modal .form-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 2rem;
    margin: 0;
}

.modal .form-title {
    margin-top: 0;
}

.modal .btn-submit {
    width: 100%;
}

/* Animations */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slide-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-pop-in {
    animation: pop-in 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fade-in 1s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slide-up 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        border-top: 1px solid rgba(0, 243, 255, 0.2);
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .title {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .tagline {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .section-text {
        font-size: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.7rem;
    }
    
    .btn {
        padding: 14px 35px;
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .about-features,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .tagline {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 1.2rem;
    }
    
    input, textarea {
        padding: 12px;
        font-size: 1rem;
    }

    .feature-card,
    .service-card {
        padding: 1.5rem;
    }
}

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

    .animate-pop-in,
    .animate-fade-in,
    .animate-slide-up {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .feature-card:hover,
    .service-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }

    #particles-js {
        display: none;
    }
}
