/* Base Styles */
:root {
    --primary-color: #e32726; /* Red from RPM logo */
    --secondary-color: #333333; /* Dark grey */
    --light-grey: #f5f5f5;
    --medium-grey: #e0e0e0;
    --dark-grey: #555555;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--white);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.section-header .underline {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 15px auto;
}

.section-header p {
    font-size: 18px;
    color: var(--dark-grey);
}

.left-align {
    text-align: left;
}

.left-align .underline {
    margin-left: 0;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
}

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

.nav-menu a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    padding: 10px 0;
    position: relative;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover:after,
.nav-menu a.active:after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 90px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-logo {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.3;
}

.overlay-logo {
    width: 300px;
    height: auto;
    border-radius: 15px; /* Rounded corners for the logo */
}
 /* Improve readability of hero text */
.hero-content {
  max-width: 600px;
  z-index: 1;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* semi-transparent dark background */
  border-radius: 8px; /* optional rounded corners */
}

.hero-content h1,
.hero-content p {
  color: #fff; /* white text for contrast */
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* add shadow for better contrast */
}
/* Additional CSS for mobile positioning of the RPM logo */
@media (max-width: 768px) {
  .hero {
    position: relative; /* Ensure hero is positioned relatively for absolute children */
  }
  .hero-logo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px; /* Smaller size for mobile */
    opacity: 1;
    transform: none;
  }
  .hero-logo img {
    width: 100%;
    height: auto;
    border-radius: 15px;
  }
}

/* Services Section */
.services {
    background-color: var(--light-grey);
}

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

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.service-card p {
    margin-bottom: 25px;
    color: var(--dark-grey);
    flex-grow: 1;
}

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

.about-image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content p {
    margin-bottom: 20px;
    color: var(--dark-grey);
}

/* Contact Section */
.contact {
    background-color: var(--light-grey);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-grey);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

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

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

.info-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
}

.info-content h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.info-content p {
    color: var(--dark-grey);
    margin-bottom: 5px;
}

.contact-image {
    margin-top: 30px;
}

.contact-image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

.footer-links h3,
.footer-social h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3:after,
.footer-social h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--medium-grey);
}

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

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--white);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

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

.footer-bottom p {
    color: var(--medium-grey);
    font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 50px;
    width: 50px;
    font-size: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: none;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Netlify Form Specific Styles */
.hidden {
    display: none;
}

.form-success-message {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #d6e9c6;
    border-radius: 4px;
    display: none;
}

.form-error-message {
    background-color: #f2dede;
    color: #a94442;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    display: none;
}

/* Project Page Styles */
.project-overview {
    background-color: var(--white);
}

.project-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.project-info-item {
    display: flex;
    align-items: flex-start;
    width: 300px;
}

.project-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.before-after {
    background-color: var(--light-grey);
}

.comparison-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.comparison-item {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.comparison-title {
    text-align: center;
    margin-bottom: 20px;
}

.comparison-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.before, .after {
    position: relative;
}

.before img, .after img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.comparison-description {
    text-align: center;
}

.work-list {
    background-color: var(--white);
}

.work-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.work-category {
    background-color: var(--light-grey);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.category-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.work-category h3 {
    margin-bottom: 20px;
}

.work-category ul {
    list-style-position: inside;
    text-align: left;
}

.work-category li {
    margin-bottom: 10px;
    color: var(--dark-grey);
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.cta {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta p {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    background-color: var(--white);
    color: var(--primary-color);
}

.cta .btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Responsive Styles */
@media (min-width: 1201px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .work-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: 2;
    }
    
    .about-content {
        order: 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-logo {
        grid-column: span 2;
        text-align: center;
    }
    
    .footer-logo img {
        margin: 0 auto 20px;
    }
    
    .comparison-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .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);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        font-size: 18px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-logo {
        grid-column: span 1;
    }
    
    .work-categories {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-logo {
        right: 5%;
    }
    
    .overlay-logo {
        width: 200px;
    }
    
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .project-info {
        flex-direction: column;
        align-items: center;
    }
}

/* Boats Listing Styles */
.boats-listing {
    background-color: var(--light-grey);
    padding: 80px 0;
}

.boats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.boat-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.boat-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.boat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.boat-card:hover .boat-image img {
    transform: scale(1.05);
}

.boat-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.boat-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.boat-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.boat-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.boat-details {
    margin-bottom: 20px;
    flex-grow: 1;
}

.boat-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.boat-spec {
    display: flex;
    align-items: center;
}

.boat-spec i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 16px;
}

.boat-description {
    color: var(--dark-grey);
    margin-bottom: 20px;
    /* Ensure text doesn't overflow and is readable */
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.boat-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--dark-grey);
    grid-column: span 3;
}

.no-boats {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--dark-grey);
    grid-column: span 3;
}

/* Responsive styles for boats grid */
@media (max-width: 1200px) {
    .boats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .loading, .no-boats {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .boats-grid {
        grid-template-columns: 1fr;
    }
    
    .loading, .no-boats {
        grid-column: span 1;
    }
}
.boat-gallery {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.boat-gallery img.gallery-image {
  width: 150px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.boat-gallery img.gallery-image:hover {
  transform: scale(1.05);
}

/* Lightbox overlay styles */
.lightbox {
  display: none; /* Hidden by default, shown on click */
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 30px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
  padding: 10px;
}

#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }
