/* Base Styles */
:root {
    --primary-color: #001D3D;  /* Deep blue from logo */
    --secondary-color: #FFD500; /* Yellow from logo */
    --accent-color: #0063DE;   /* Bright blue from logo */
    --text-color: #333;
    --light-text: #fff;
    --dark-text: #333;
    --gray-light: #e6e6e6;
    --gray: #e0e0e0;
    --gray-dark: #888;
}

/* Global image quality improvement */
img, 
[style*="background-image"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.separator {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 20px 0 40px;
}

.section-intro {
    text-align: center;
    margin-bottom: 60px;
}

.section-intro h2 {
    font-size: 36px;
    color: var(--primary-color);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    padding: 45px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

header.scrolled .nav-links a {
    color: var(--light-text);
}

header.scrolled .mobile-menu-btn i {
    color: var(--light-text);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 80px;
    transition: height 0.3s ease;
}

.logo img {
    height: 100%;
    width: auto;
    transition: all 0.3s ease; /* Smooth transition for resizing */
    opacity: 0.9; /* Add alpha transparency */
}

header.scrolled .logo {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--primary-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
}

.mobile-menu-btn i {
    color: var(--primary-color);
    font-size: 24px;
}

/* Hero Section */
#hero {
    background-image: url('./images/backshipatnight-CTLCk2kK.jpeg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    padding-left: 30px;
    image-rendering: -webkit-optimize-contrast; /* Improves image rendering in Chrome */
    image-rendering: crisp-edges; /* CSS standard property for better image rendering */
    -ms-interpolation-mode: nearest-neighbor; /* For IE */
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 29, 61, 0.5), rgba(0, 29, 61, 0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.logo {
    height: 100px; /* Adjust logo size */
    margin-right: 20px; /* Add spacing between logo and text */
    margin-left: 20px; /* Add left margin for spacing */
}

.logo img {
    height: 100%;
    width: auto;
    transition: all 0.3s ease; /* Smooth transition for resizing */
    opacity: 0.85; /* Add alpha transparency */
}

.tagline {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1;
    margin-top: -20px; /* Move tagline higher */
}

.subtitle {
    font-size: 1.12rem;
    margin: 60px 0;
    margin-top: -8px; /* Move subtitle higher */
}

.cta-button {
    background-color: transparent; /* Make the button background transparent */
    border: 2px solid var(--secondary-color); /* Add a yellow outline */
    color: var(--secondary-color); /* Change the text color to yellow */
    padding: 10px 20px; /* Adjust padding for better appearance */
    border-radius: 5px; /* Optional: Add rounded corners */
    font-size: 16px; /* Adjust font size */
    cursor: pointer; /* Add pointer cursor for hover effect */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

/* About Section */
#about {
    padding: 100px 0;
    background-color: var(--light-text);
}

.lead-text {
    font-size: 22px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-color);
}

/* Services Section */
#services {
    padding: 100px 0;
    background-color: var(--gray-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-text);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin-bottom: 20px;
}

.service-icon i {
    color: var(--light-text);
    stroke-width: 2px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 22px;
}

.service-card p {
    color: var(--text-color);
}

/* CTA Section */
#cta {
    padding: 100px 0;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
#contact {
    padding: 100px 0;
    background-color: var(--light-text);
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 900px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    background-color: var(--gray-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: var(--primary-color);
    margin-bottom: 15px;
    stroke-width: 2px;
}

.contact-item span {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    height: 80px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 100%;
    width: auto;
}

.footer-links {
    margin-bottom: 30px;
}

.footer-links ul {
    display: flex;
    gap: 30px;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-info {
    margin-top: 30px;
}

.footer-info p {
    color: var(--gray-dark);
    font-size: 14px;
}
/* Contact Form Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 29, 61, 0.8); /* Using brand colors for overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.25s, opacity 0.25s ease;
    padding: 20px;
}

.popup-overlay.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.popup-container {
    background-color: white;
    max-width: 500px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    opacity: 0;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
    opacity: 1;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray);
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.close-popup {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 24px;
    cursor: pointer;
    color: white;
    transition: color 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.close-popup:hover {
    color: var(--secondary-color);
}

/* Form Styling */
.contact-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group label .required {
    color: #ff4444;
    margin-left: 3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 99, 222, 0.2);
}

.error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.visible {
    display: block;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #ff4444;
    background-color: rgba(255, 68, 68, 0.05);
}

.g-recaptcha {
    margin-bottom: 20px;
}

.submit-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    width: 100%;
}

.submit-button:hover {
    background-color: var(--primary-color);
}

.submit-button:disabled {
    background-color: var(--gray-dark);
    cursor: not-allowed;
}

.button-loader {
    display: none;
    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;
    position: absolute;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
}

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

.submit-button.loading .button-text {
    visibility: hidden;
}

.submit-button.loading .button-loader {
    display: block;
}

.form-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(75, 181, 67, 0.2);
    color: #4bb543;
    border: 1px solid #4bb543;
}

.form-status.error {
    display: block;
    background-color: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Honeypot field (anti-spam) */
.honeypot-field {
    display: none;
    position: absolute;
    left: -9999px;
}

/* Contact CTA styles */
.contact-cta {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* 404 Error Page Styles */
.error-page {
    min-height: 100vh;
    background-image: url('./images/backshipatnight-CTLCk2kK.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.error-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 29, 61, 0.8), rgba(0, 29, 61, 0.6));
}

.error-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    padding: 40px 20px;
}

.error-number {
    font-size: 120px;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
}

.error-message {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* 404 Page Responsive Styles */
@media (max-width: 768px) {
    .error-number {
        font-size: 80px;
    }
    .error-title {
        font-size: 28px;
    }
    .error-message {
        font-size: 16px;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .tagline {
        font-size: 68px;
    }
    
    .subtitle {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo {
        height: 60px;
    }
    
    header.scrolled .logo {
        height: 40px;
    }
    
    .tagline {
        font-size: 48px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .section-intro h2 {
        font-size: 28px;
    }
    
    .lead-text {
        font-size: 18px;
    }
    
    #about, 
    #services, 
    #cta, 
    #contact {
        padding: 30px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .tagline {
        font-size: 40px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .footer-links ul {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 29, 61, 0.98); /* Set background color to alpha 0.8 */
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateX(0);
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--light-text);
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.mobile-nav-links a {
    color: var(--light-text);
    font-size: 24px;
    font-weight: 600;
}

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

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Section with background image */
.bg-image-section {
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--light-text);
}

.bg-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 29, 61, 0.8);
}

.bg-image-section .container {
    position: relative;
    z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}