/* Add Montserrat font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

/* Ensure body and html fill the entire screen and remove unnecessary space */
html, body {
    height: 100%;  /* Ensure the body takes up the full height */
    margin: 0;     /* Remove default margin */
    padding: 0;    /* Remove default padding */
    font-family: 'Montserrat', sans-serif;  /* Apply Montserrat to body */
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;  /* Full viewport height */
    background-image: url('/assets/images/WPParis1.JPEG'); /* Ensure path is from the root */
    background-size: cover;  /* Make the image cover the whole screen */
    background-position: center;  /* Keep the image centered */
    background-repeat: no-repeat; /* Prevent repetition of the image */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;  /* Ensure text stands out on image */
    text-align: center;
    margin-top: 0; /* Remove any default margin */
}

/* Title Section (On top of the image) */
.hero-text {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-family: 'Montserrat', sans-serif; /* Change to Montserrat */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);  /* Adds a subtle black outline */
    text-transform: uppercase;  /* Make title text uppercase */
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 93, 61, 0.8) !important; /* Semi-transparent background */
    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    font-family: 'Montserrat', sans-serif; /* Apply Montserrat */
}

/* Navbar Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: inline;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif; /* Apply Montserrat */
    text-transform: uppercase;  /* Make navbar links uppercase */
}

.nav-links a:hover {
    background-color: white;
    color: #2a5d3d;
}

/* Title and Footer */
footer {
    display: block; /* Ensure footer stays visible */
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(42, 93, 61, 0.8); /* Semi-transparent background */
    color: white;
    text-align: center;
    font-family: 'Montserrat', sans-serif; /* Apply Montserrat */
    text-transform: uppercase;  /* Make footer text uppercase */
}

.site-title {
    display: none; /* Hide the site title to prevent unnecessary space */
}

/* Remove unnecessary space at the top caused by the header */
header {
    display: none;  /* Hide the header element */
}

/* Mobile / Small Screen Adjustments */
@media (max-width: 768px) {
    /* Adjustments for Navbar */
    .navbar {
        padding: 10px;
    }
    
    .nav-links {
        flex-wrap: wrap;  /* Allow items to wrap to next line */
        justify-content: center;  /* Center the items */
    }

    .nav-links a {
        font-size: 16px;  /* Reduce font size for smaller screens */
        padding: 10px 15px;  /* Adjust padding for smaller screen */
    }

    /* Adjust the About and Contact Section */
    .about-contact {
        flex-direction: column;
        gap: 20px;
        padding-top: 80px;  /* Add space to top of the section to avoid overlap with the navbar */
        padding-bottom: 80px;  /* Add space to bottom of the section to avoid overlap with the footer */
    }
    
    .about, .contact {
        max-width: 100%;  /* Allow sections to take up full width on mobile */
        margin-top: 20px;  /* Add margin-top to avoid any content touching the navbar or footer */
    }

    /* Adjust the Hero Section */
    .hero {
        height: auto;  /* Allow the hero section to adjust its height based on content */
    }
}

/* About and Contact Sections - Scoped for this page only */
.about-contact {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.about {
    flex: 1;
    max-width: 45%;
}

.contact {
    flex: 1;
    max-width: 45%;
}

/* Contact Form Styling */
.contact form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact label {
    font-size: 18px;
    font-weight: bold;
    color: #2a5d3d; /* Green color */
}

.contact input, .contact textarea {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.contact button {
    background-color: #2a5d3d; /* Green color */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.contact button:hover {
    background-color: #1e4d31; /* Darker green on hover */
}

/* Styling the "Contact Me" section title */
.contact h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2a5d3d; /* Green color */
}

/* Adjusting the About section */
.about h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2a5d3d; /* Green color to match Contact section */
}

.about p {
    font-size: 16px;
    line-height: 1.6;
}

/* Make sections more mobile-responsive */
 @media (max-width: 768px) {
     .about-contact {
         flex-direction: column;
         gap: 20px;
     }
 
     .about, .contact {
         max-width: 100%;
     }
 }

/* Photography Page */
body, html {
  height: 100%;
  margin: 0;
  overflow: hidden; /* Hide the scrollbar */
}

.photo-category {
  display: flex;
  justify-content: space-between;
  align-items: stretch;  /* Ensure images stretch vertically */
  padding: 0;
  height: 100vh;  /* Full viewport height */
}

.category {
  position: relative;
  flex: 1;
  min-width: 33.33%; /* Ensure images take equal space, 3 columns */
  height: 100vh; /* Make each category stretch the full height of the viewport */
  overflow: hidden; /* Prevents any image spilling over the edges */
}

.category img {
  width: 100%; /* Ensure the image stretches to fill its container */
  height: 100%; /* Make the image cover the entire space */
  object-fit: cover; /* Maintains aspect ratio and crops the image if necessary */
  transition: transform 0.3s ease-in-out;
}

.category:hover img {
  transform: scale(1.05); /* Hover effect */
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
}

body.photography-page {
  overflow: hidden; /* Remove scrollbars */
}

.urban-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  margin: auto;
  overflow-y: auto;
  min-height: calc(100vh - 120px); /* Ensures it always takes full space */
  padding-top: 60px;
  padding-bottom: 60px;
  box-sizing: border-box;
}

/* Adjust height of each image container */
.urban-category {
  flex: 1 1 calc(25% - 8px); /* Ensures 4 images per row, considering gap between images */
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.urban-category img {
  width: 100%;
  height: 250px; /* Fixed height for uniformity */
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s ease-in-out;
}

/* Ensure the gallery scrolls within its allocated space */
body.urban-page .urban-gallery {
  overflow-y: auto; /* Enables scroll within the gallery */
  height: calc(100vh - 60px - 60px); /* Maintain the height calculation for navbar/footer */
}

/* Fullscreen Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fullscreen image */
.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  margin: auto;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 60px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #ddd;
  text-decoration: none;
  cursor: pointer;
}

/* Watermark for fullscreen images */
.modal::after {
  content: "© William Pearson | Map Wall Ironies";
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 5px;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
}

/* Adjust grid for different screen sizes */
@media (max-width: 1200px) {
  .urban-category {
    flex: 1 1 calc(33.333%); /* 3 images per row (33% per image) */
  }
}

@media (max-width: 900px) {
  .urban-category {
    flex: 1 1 calc(50%); /* 2 images per row (50% per image) */
  }
}

@media (max-width: 600px) {
  .urban-category {
    flex: 1 1 calc(100%); /* 1 image per row (100% per image) */
  }
}

/* For the landing page image and text */
#landing-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Ensures the section takes the full height of the screen */
  padding: 0 15px; /* Optional: Add padding for smaller screens */
  text-align: center; /* Ensure text is centered */
}

#landing-page img {
  max-width: 100%;
  height: auto; /* Ensures the image scales correctly */
  object-fit: cover;
}

#landing-page .text-container {
  position: relative;
  z-index: 10; /* Keeps the text on top of the image */
  color: white; /* Optional: Adjust text color for visibility */
}

/* Hide scrollbars for the landing page */
body.landing-page {
  overflow: hidden;
}

/* Adjustments for mobile screens */
@media (max-width: 600px) {
  #landing-page {
    height: auto; /* Allow height to adjust */
    padding-top: 10px; /* Adds space above text for smaller screens */
  }
  
  #landing-page img {
    width: 100%; /* Ensure image fits the screen */
    height: auto; /* Image scales with screen size */
  }

  #landing-page .text-container {
    margin-top: 10px; /* Adds some space between the text and image */
  }
}

/* Ensure the image displays correctly on mobile */
#home-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;  /* Adjusts the image to cover the area without stretching */
  display: block;
  margin: 0 auto;
}

/* Ensure text is centered */
.home-text-container {
  text-align: center;
  padding: 20px;
  margin: 0 auto;
  max-width: 90%;  /* Adjusts the container width on mobile */
}

@media (max-width: 600px) {
  .home-text-container {
    padding: 10px;
    text-align: center;
  }
}

/* Allow scrolling on the about.md page */
body, html {
  height: 100%;
  overflow: auto;  /* Ensures scrolling is enabled */
}

.about-page {
  min-height: 100%;  /* Ensures the page stretches to full height */
  padding-bottom: 20px;  /* Adjust this value if necessary */
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;  /* Adjusts the height to fill the screen */
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* Ensures the image covers the area */
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* Centers text in the middle */
  text-align: center;
  color: white;
  padding: 20px;
}

.hero-text h1 {
  font-size: 3rem;
}

.hero-text p {
  font-size: 1.5rem;
}

/* Ensure everything looks good on mobile */
@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1.2rem;
  }
}

/* Fullscreen Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
