/* 
* Privateer Marine Survey Website Styles
* A clean, modern design for a professional marine surveying service
*/

/* ---------- Base Styles & Variables ---------- */
:root {
    --primary-color: #1a5276; /* Deep blue */
    --secondary-color: #2e86c1; /* Medium blue */
    --accent-color: #f39c12; /* Golden accent */
    --light-color: #ecf0f1; /* Off-white */
    --dark-color: #2c3e50; /* Dark blue-gray */
    --text-color: #333333;
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

.bg-light {
    background-color: var(--light-color);
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
}

.btn-primary.loading .spinner {
    display: inline-block;
}

.btn-primary.loading .button-text {
    visibility: hidden;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.btn-primary:hover {
    background-color: #e67e22;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background-color: transparent;
    padding: 20px 30px;
}

.navbar.scrolled {
    background-color: white;
    box-shadow: var(--shadow);
    padding: 15px 30px;
}

.logo img {
    height: 40px;
}

.nav-brand {
    font-weight: 700;
    color: white;
}

.navbar.scrolled .nav-brand {
    color: var(--dark-color);
}

.navbar.scrolled .logo img {
    filter: none;
}

.nav-links {
    margin-left: auto;
}

.nav-links ul {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.navbar.scrolled .nav-links a {
    color: var(--dark-color);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-left: auto;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: var(--transition);
}

.navbar.scrolled .bar {
    background-color: var(--dark-color);
}

/* ---------- Hero Section ---------- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/MarinaSurvey_151306561.jpeg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-logo {
    width: 250px;
    margin: 0 auto 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ---------- Process Section ---------- */
.process-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.process-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.process-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

/* ---------- About Section ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/images/Marina.jpeg');
    background-size: cover;
    background-position: center;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ---------- Certifications Section ---------- */
.cert-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cert-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}
.cert-card img {
    display: block;
    margin: 0 auto;
}

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

.cert-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cert-card p {
    margin-bottom: 0;
    color: var(--dark-color);
}

/* ---------- Contact Section ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.contact-info {
    background-color: var(--primary-color);
    color: white;
    padding: 40px;
    border-radius: 8px;
    height: fit-content;
}

.contact-info a {
    color: white;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.info-item {
    margin-bottom: 30px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-item p {
    margin-bottom: 0;
}

/* ---------- Footer ---------- */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 10px;
}

.footer-logo p {
    margin-bottom: 0;
    color: #bbb;
}

.footer-links ul {
    display: flex;
}

.footer-links li {
    margin-right: 30px;
}

.footer-links li:last-child {
    margin-right: 0;
}

.footer-links a {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
}

/* ---------- Image Optimization ---------- */
.optimized-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* For background images */
.bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Lazy loading placeholder */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: 2;
    }
    
    .about-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        width: 100%;
        background-color: white;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links ul {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-links a {
        color: var(--dark-color);
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        margin-bottom: 20px;
    }
    
    .footer-links ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-links li {
        margin: 5px 15px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .process-container,
    .cert-container {
        grid-template-columns: 1fr;
    }
}
