/* Custom Properties (Variables) for Colors */
:root {
  --brand-red: #DA291C;
  --brand-dark-grey: #2C2A29;
  --light-grey-background: #f5f5f5;
  --off-white-section: #e9ecef;
  --white: #ffffff;
  --brand-blue: #007bff; /* Added this variable to fix the language switcher error */
}

/* General Body & Typography */
body {
  font-family: 'Open Sans', sans-serif; /* Aptos alternative */
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--brand-dark-grey);
  background-color: var(--light-grey-background);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

h1, h2, h3, h4 {
  font-family: 'Oswald', sans-serif; /* MorganBig alternative for bold headings */
  color: var(--brand-dark-grey);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.05em; /* Adds a bit of minimalist spacing */
}

h2 { font-size: 2.8em; } /* Slightly larger for impact */
h3 { font-size: 2.2em; }
h4 { font-size: 1.6em; }

p {
  margin-bottom: 10px;
}

a {
  color: var(--brand-red); /* Your brand red for links */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.text-center {
  text-align: center;
}

/* Header & Navigation */
header {
  background: var(--brand-dark-grey); /* Your brand dark grey for header */
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
  display: flex; /* Makes immediate children flex items */
  justify-content: space-between; /* Distributes space between items */
  align-items: center; /* Vertically aligns items in the center */
  padding: 20px; /* Example padding, adjust as needed */
  /* Ensure a max-width and margin: auto; if you want it centered */
  max-width: 1200px; /* Or your desired container width */
  margin: 0 auto;
}

/* NEW CSS FOR THE WRAPPER DIV */
.header-right-group {
  display: flex;
  align-items: center; /* Vertically align nav and language switcher within this group */
  gap: 30px; /* Adjust this value for desired spacing between nav and language switcher */
}

header h1 {
  color: var(--white);
  margin: 0; /* Remove default margin */
  font-size: 1.8em;
}

header nav ul {
  list-style: none;
  margin: 0; /* Remove default margin */
  padding: 0;
  display: flex; /* Make nav items horizontal within the ul */
}

header nav ul li {
  /* Removed 'display: inline;' because 'ul' is now flex, 'margin-left' works fine */
  margin-left: 20px; /* Space between navigation items */
}

header nav ul li a {
  color: var(--white);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 5px 0; /* Add a little vertical padding for clickability */
}

header nav ul li a:hover {
  color: var(--brand-red); /* Highlight navigation with brand red */
  text-decoration: none;
}

/* --- Dropdown Menu Styles --- */

/* Parent list item for the dropdown */
.dropdown {
  position: relative; /* Essential for positioning the dropdown menu */
  display: inline-block; /* Allows the dropdown to sit next to other nav items */
}

/* Style for the dropdown arrow */
.dropdown-arrow {
  display: none; /* This line hides the arrow */
}

/* Dropdown menu container */
.dropdown-menu {
  display: none; /* Hidden by default */
  position: absolute;
  background-color: var(--brand-dark-grey); /* Same as header background */
  min-width: 250px; /* Adjust width as needed */
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1; /* Ensure it appears above other content */
  list-style: none; /* Remove bullet points */
  padding: 10px 0; /* Vertical padding for menu items */
  margin: 0;
  border-radius: 0 0 8px 8px; /* Rounded bottom corners */
  top: 100%; /* Position directly below the parent nav item */
  left: 0;
}

/* Dropdown menu items */
.dropdown-menu li {
  display: block; /* Make each item take full width */
  margin: 0; /* Remove default margin */
}

.dropdown-menu li a {
  color: var(--white); /* Text color for dropdown links */
  padding: 12px 20px; /* Padding for click area */
  text-decoration: none;
  display: block; /* Make the whole area clickable */
  text-align: left; /* Align text to the left */
  font-weight: bold; /* Override bold from main nav if needed */
  font-size: 0.9em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: var(--brand-red); /* Highlight on hover */
  color: var(--white); /* Ensure text stays white on hover */
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* --- Mobile responsiveness for dropdown --- */
@media (max-width: 768px) {
  .dropdown .dropdown-menu {
    position: static; /* Let it flow in the document */
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background-color: transparent; /* No background on mobile when expanded */
    padding: 0;
    margin-top: 5px; /* Space from parent link */
  }

  .dropdown-menu li a {
    padding-left: 40px; /* Indent sub-items on mobile */
    color: var(--white); /* Ensure text color is still white */
  }

  /* Ensure dropdown is initially hidden on mobile and toggled by JS if you have a mobile menu toggle */
  nav ul.active .dropdown-menu {
    display: block; /* Show when mobile menu is active */
  }

  /* Hide arrow on mobile, or adjust its display as needed */
  .dropdown-arrow {
    display: none;
  }
}

/* Responsive Navigation Toggle (Hamburger Icon) - Desktop Default State */
.menu-toggle {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
  padding: 5px; /* Add padding for easier clicking */
  position: relative; /* For positioning bars */
  z-index: 1001; /* Ensure it's above the menu when open */
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--white); /* White bars against dark header */
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}

/* Styles for when the menu is open (optional, for animation) */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0; /* Hide the middle bar */
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Language Switcher Styling */
.language-switcher {
  display: flex; /* or inline-flex */
  align-items: center;
  gap: 5px; /* Space between EN | PT */
  font-size: 0.9em; /* Slightly smaller text */
  z-index: 1000; /* Ensure it's above other elements if needed */
}

.language-switcher a {
  color: var(--white); /* Or a color that suits your header */
  text-decoration: none;
  padding: 3px 5px;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.language-switcher a:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Slight hover effect */
}

.language-switcher a.active-lang {
  font-weight: bold;
  background-color: var(--brand-red); /* A distinct color for the active language */
  color: var(--white);
  cursor: default; /* No pointer cursor for active language */
}

/* Adjust for mobile if needed, e.g., move it below the logo on small screens */
@media (max-width: 768px) {
  .language-switcher {
    position: static; /* Let it flow with the header content */
    margin-left: auto; /* Push to the right if in a flex container */
    margin-right: 10px; /* Some spacing */
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  overflow: hidden;
}

.hero-image-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--brand-dark-grey);
}

.hero-image-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h2 {
  color: var(--white);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 42, 41, 0.7);
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand-red);
  color: var(--white);
  padding: 14px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn:hover {
  background: #b52016;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Sections */
.section-padding {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--off-white-section);
}

.bg-dark {
  background-color: var(--brand-dark-grey);
  color: var(--white);
}

.bg-dark h3, .bg-dark p, .bg-dark a {
  color: var(--white);
}

.bg-dark a:hover {
  color: var(--brand-red);
}

/* Services Grid */
/* --- SERVICES GRID on Index & Services pages (Simplified) --- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
  gap: 30px; /* Space between grid items */
  margin-top: 40px; /* Space below section heading */
}

.services-grid .service-item {
  background-color: var(--white); /* Light background for the box */
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 250px; /* Adjusted height, you can fine-tune this */
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Subtle shadow */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */
  color: var(--brand-dark-grey);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Styling for the service icons */
.services-grid .service-item .service-icon {
  width: 60px; /* Adjusted icon size to a consistent value */
  height: 60px; /* Adjusted icon size to a consistent value */
  margin-bottom: 0px; /* Space between icon and title */
  object-fit: contain; /* Ensures the whole icon is visible */
}

/* Ensure text is standard color */
.services-grid .service-item h4,
.services-grid .service-item p {
  color: var(--brand-dark-grey);
  text-shadow: none; /* Remove text shadow */
}

/* Adjust heading size within service items if needed */
.services-grid .service-item h4 {
  font-size: 1.5em; /* Adjust as needed */
  margin-bottom: 10px; /* Space between title and description */
}

.services-grid .service-item p {
  font-size: 0.95em; /* Adjust as needed */
  line-height: 1.5;
  margin-bottom: 0;
}

/* Hover effect for the grid items */
.services-grid .service-item:hover {
  transform: translateY(-5px); /* Lift effect */
  box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* More prominent shadow on hover */
}

/* --- Responsive adjustments for smaller screens (for grid) --- */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .services-grid .service-item {
    min-height: 200px;
    padding: 20px;
  }
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.portfolio-item {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.portfolio-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: row;
  justify-content: center;     /* center the row within the container */
  align-items: flex-start;     /* align icons/text blocks at top of their boxes */
  gap: 60px;                   /* space between the three items */
  margin-top: 40px;
  flex-wrap: wrap;             /* allows items to wrap on small screens */
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 200px;            /* keeps each column reasonably wide */
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  display: block;
}

.contact-info-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  word-break: break-word;
}

.contact-info-text a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 720px) {
  .contact-info {
    gap: 24px;
  }
  .contact-info-item {
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .contact-info {
  flex-direction: column;
  align-items: center;
  gap: 30px;
  }
  .contact-info-item {
  min-width: 0;
  }
}

/*CONTACT PAGE INFO*/
.contact-page-info {
    /* Main flexbox container for the two contact items */
    display: flex;
    flex-direction: row;
    justify-content: center; /* Centers the items horizontally */
    gap: 50px; /* Adjust the spacing between the items as needed */
    flex-wrap: wrap; /* Allows items to wrap to a new line on smaller screens */
    margin-top: 30px; /* Optional: Adds some space below the text */
}

.contact-page-info-item {
    display: flex; /* This keeps the icon and text aligned within the item */
    align-items: center;
    gap: 10px; /* Space between the icon and the text */
    min-width: 150px;
}

.contact-page-info-icon {
    width: 36px;
    height: 36px;
    color: var(--white);
    flex-shrink: 0;
}

.contact-page-info-text {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--white);
}

/* Updated rule to style the links */
.contact-page-info-text a {
    font-weight: bold;
    color: var(--white);
    text-decoration: none; /* Removes the default underline */
    /* Add a transition for a smooth hover effect */
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* New rule for the hover effect */
.contact-page-info-text a:hover {
    color: var(--brand-red); /* Replace with your actual red color variable */
    text-decoration: underline;
}

/*CONTACT PAGE - LOCATION SECTION*/
#location-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.location-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.location-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.location-info-item .contact-info-icon {
    margin-bottom: 10px;
}

.location-info-item .location-info-text {
    line-height: 1.5;
    font-weight: bold;
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    justify-content: center;     /* Center the content vertically */
    align-items: center;         /* Center the content horizontally */
    background: var(--brand-dark-grey);
    color: var(--white);
    padding: 0;
    min-height: 150px;           /* Maintain a reasonable height */
    margin-top: 25px;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;         /* Aligns items vertically */
    padding: 20px 0;
    flex-wrap: wrap;
    width: 100%;                 /* Ensure it takes full width */
}

.footer-icons-left,
.footer-icons-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
    margin: 0; 
}

.footer-center-text {
    text-align: center;
    font-weight: normal;
    flex-grow: 1;
    display: flex;               
    flex-direction: column;      
    justify-content: center;     
    align-items: center;         
    gap: 0px;                    /* Adjust the gap to reduce spacing between paragraphs */
}

/* * FIX: This rule targets all direct children of the center text block (like 
 * your paragraph/div elements holding the text) and removes any default 
 * top/bottom margins, ensuring the content is perfectly centered vertically 
 * within the flex column layout.
 */
.footer-center-text > * {
    margin: 0;
    padding: 0;
}

.footer-center-text .privacy-link {
    margin-top: 0; /* Adjust margin as needed */
}

/* Style the link */
.footer-center-text .privacy-link a {
    color: var(--white);
    text-decoration: underline;
    font-weight: normal;
}

.footer-center-text .privacy-link a:hover {
    opacity: 0.8;
}

/* Media query for responsiveness */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;  /* Stacks items on small screens */
        text-align: center;      /* Center align text */
    }
    
    .footer-icons-left,
    .footer-icons-right {
        margin-bottom: 10px; 
        margin-top: 10px;
    }
}

/* New style for service item links */
.service-item-link {
  text-decoration: none;
  color: inherit;
}

/* Ensure hover effects still work on the service item itself */
.service-item-link .service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  cursor: pointer;
}

/* Logo Styling */
.header-logo {
  height: 60px;
  width: auto;
  display: block;
  padding-top: 5px;
}

/* Consolidated Responsive Design */
@media (max-width: 768px) {
  /* Header adjustments */
  header .container {
    justify-content: space-between; /* Ensures logo and toggle are spaced */
  }

  header h1 {
    text-align: left; /* Keep logo to the left on small screens */
    margin-bottom: 0;
  }

  /* BASE NAV STYLES FOR MOBILE: Hidden by default with transition properties */
  header nav {
    position: absolute;
    top: 80px; /* Adjust based on your header's actual height */
    left: 0;
    width: 100%;
    background: var(--brand-dark-grey);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
    /* Key changes for fluid animation: */
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    /* Define the transition properties and duration */
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, visibility 0.5s step-end;
    flex-direction: column;
    align-items: center;
    padding: 0;
    z-index: 999;
  }

  /* MOBILE NAV OPEN STATE: Shown when 'open' class is added by JavaScript */
  header nav.open {
    display: flex; /* Keep this to ensure flex layout of children */
    /* These values will be transitioned to when the menu opens */
    max-height: 500px; /* Set a value larger than your menu's actual max height */
    visibility: visible;
    opacity: 1;
    padding: 20px 0; /* Add padding here so it transitions in/out */
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, visibility 0.5s step-start;
  }

  /* Mobile Navigation UL Styles */
  header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
    display: flex; /* Make the UL a flex container */
    flex-direction: column; /* Stack the list items vertically */
  }

  /* Mobile Navigation LI Styles */
  header nav ul li {
    margin: 15px 0;
    display: block; /* Make list items block level for full width clicks */
  }

  /* Mobile Navigation A (Link) Styles */
  header nav ul li a {
    padding: 10px 0;
    display: block;
    color: var(--white); /* Ensure links are visible on dark background */
  }

  /* Show the hamburger icon on mobile */
  .menu-toggle {
    display: flex; /* Make the hamburger icon visible on mobile */
  }

  /* General section padding adjustments for mobile */
  .section-padding {
    padding: 40px 0; /* Less padding on smaller screens */
  }

  /* Hero section text size adjustments */
  .hero-content h2 {
    font-size: 2.2em;
  }
  .hero-content p {
    font-size: 1.1em;
  }

  /* Grid layout adjustments for mobile */
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr; /* Stack items vertically on mobile */
  }

  /* Logo size adjustment for mobile */
  .header-logo {
    height: 50px;
  }
}

/* --- New Service Detail Layout --- */
.service-detail-item {
  display: flex; /* Makes the image and text halves sit side-by-side */
  align-items: center; /* Vertically centers content within the item */
  margin-bottom: 80px; /* Space between each service item */
  gap: 40px; /* Space between the image and text halves */
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
  margin-top: 40px;
}

/* For alternating layout (image on right, text on left) */
.service-detail-item.reverse {
  flex-direction: row-reverse;
}

.service-image-half {
  flex: 1; /* Allows image half to grow and shrink */
  min-width: 300px; /* Minimum width before wrapping */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle shadow for images */
  border-radius: 8px; /* Slightly rounded corners for image container */
  overflow: hidden; /* Ensures image corners match container */
}

.service-image-half img {
  width: 100%; /* Makes image fill its container */
  height: 350px; /* Fixed height for consistency, adjust as needed */
  object-fit: cover; /* Ensures image covers the area without distortion */
  display: block; /* Removes extra space below image */
}

.service-text-half {
  flex: 1;
  min-width: 300px;
  padding: 20px;
  background-color: var(--light-grey-background);
  border-radius: 8px;
  display: flex;
  flex-direction: column;   /* Stack children vertically */
  justify-content: center;  /* Center items vertically within the column */
  align-items: center;      /* Center items horizontally within the column */
  text-align: center;       /* Center text within paragraphs/headings */
}

/* You might need to adjust margins on h4 and p to control spacing */
.service-text-half h4 {
  /* ... existing styles ... */
  margin: 0; /* Remove default margin */
  margin-bottom: 15px; /* Adjust as needed */
}

.service-text-half p {
  /* ... existing styles ... */
  margin-bottom: 25px; /* Adjust as needed */
}

.btn-small {
  display: inline-block;
  background-color: var(--brand-red); /* Your button primary color */
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-small:hover {
  background-color: var(--brand-dark-grey); /* Darken on hover */
}

/* --- Centering container for the button --- */
.btn-center-container {
  text-align: center;
  margin-top: 40px; /* Optional: Adds some space above the button */
}

.btn-contact {
  display: inline-block;
  background-color: var(--brand-red); /* Your button primary color */
  color: var(--white);
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-contact:hover {
  background-color: var(--brand-dark-grey); /* Darken on hover */
}

/* --- Responsive adjustments for smaller screens --- */
@media (max-width: 768px) {
  .service-detail-item {
    flex-direction: column; /* Stacks image and text vertically */
    gap: 20px; /* Smaller gap when stacked */
  }

  .service-detail-item.reverse {
    flex-direction: column; /* Ensure it also stacks, no reverse needed */
  }

  .service-image-half,
  .service-text-half {
    width: 100%; /* Take full width on small screens */
    min-width: unset; /* Remove min-width constraint */
  }

  .service-image-half img {
    height: 250px; /* Adjust height for smaller screens */
  }
}

/* --- Gallery & Lightbox Styles --- */

/* Base styling for gallery items to make them look clickable */
.portfolio-grid a.gallery-item-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 250px; /* This is the key fix: It gives each gallery item a fixed height */
  position: relative;
}

/* Style for the image inside the gallery item */
.portfolio-grid a.gallery-item-link img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This makes the image fill the container without distortion */
  object-position: center;
  display: block;
}

.portfolio-grid a.gallery-item-link:hover {
  transform: translateY(-5px); /* Lift effect on hover */
}

/* --- Lightbox Modal Styles --- */

/* This is the final, simplified lightbox design that should work universally. */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none; /* Hidden by default, JavaScript changes to 'flex' */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* This is the new logic: it allows the image to scale, but with an absolute upper limit. */
.lightbox img {
  max-width: 1200px;
  max-height: 1200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* We still need a media query for mobile to ensure it scales up nicely. */
@media (max-width: 768px) {
  .lightbox img {
    max-width: 90vw;
    max-height: 90vh;
  }
}

/* The close button is positioned independently of the image. */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  color: var(--white);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
  background: var(--brand-red);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* On smaller screens, adjust close button position and remove background */
@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 10px;
    background: transparent;
    color: var(--white);
    font-size: 30px;
  }
}

/* About Page - Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: center;
}

.values-grid h4 {
  color: var(--brand-dark-grey);
  margin-bottom: 10px;
}

.values-grid .value-item {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .values-grid {
    gap: 20px;
  }
}

/* --- Contact Page Styles --- */
#contact-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('contact_hero.webp') no-repeat center center/cover;
  height: 40vh;
}

.contact-page-info-section {
  background-color: var(--white);
  padding: 40px 20px;
  margin-top: -80px;
  position: relative;
  z-index: 10;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.contact-info-section .contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 0;
  padding: 0;
}

/*CONTACT FORM SECTION*/
.contact-form-section {
    padding: 80px 0;
}

.contact-form-section h3 {
    text-align: left;
    margin-bottom: 20px;
}

.contact-form-container {
    background: var(--off-white-section);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.contact-form-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Added to handle wrapping on small screens */
}

/* Corrected style for the form group to ensure two-column layout */
.form-group {
    flex: 1;
    min-width: calc(50% - 10px); /* This makes the columns work correctly */
}

/* Style to make elements take full width, used for Subject and Message fields */
.form-group.full-width {
    min-width: 100%;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* Updated styles for the contact form inputs to make them more rounded */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px; /* Increased radius for rounded corners */
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* This is the fix for padding breaking the width */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.2);
}

/* Updated styles for the contact form button to make it more rounded */
.contact-form-container button {
    background: var(--brand-red);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 10px; /* Increased radius for rounded corners */
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    align-self: center; /* Center the button */
    margin-top: 10px; /* Add some space above the button */
}

.contact-form-container button:hover {
    background: var(--brand-dark-grey);
}

/* New media query for responsive form layout */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    /* Added this to remove horizontal gap on smaller screens */
    .form-row .form-group {
        min-width: 100%;
    }
}


/* --- New styles for the About Us page --- */

/* The main section already uses .section-padding for consistent spacing. */
.about-content-grid {
  display: flex;
  align-items: center; /* Vertically aligns text and image */
  gap: 40px; /* Spacing between text and image */
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
  margin-top: 40px;
}

.about-text {
  flex: 1; /* Allows the text to occupy available space */
  min-width: 300px; /* Minimum width before breaking to the next line */
}

.about-image {
  flex: 1; /* Allows the image to occupy available space */
  min-width: 300px;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Rounded corners for the image */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Subtle shadow */
}

/* Responsiveness adjustments for the About Us page */
@media (max-width: 768px) {
  .about-content-grid {
    flex-direction: column; /* Stacks image and text vertically */
    gap: 20px; /* Reduces spacing on smaller screens */
  }
}

/* Privacy Policy Section */
#privacy-policy {
    padding: 40px 20px; /* Adjust padding as needed */
    background-color: var(--light-grey); /* Optional: Set a background color */
    color: var(--dark-grey); /* Optional: Set text color */
}

#privacy-policy h2 {
    font-size: 2em; /* Adjust font size for the main heading */
    margin-bottom: 40px; /* Space below the main heading */
}

#privacy-policy h3 {
    font-size: 1.5em; /* Adjust font size for subheadings */
    text-align: left;
    margin-top: 50px; /* Space above subheadings */
    margin-bottom: 20px; /* Space below subheadings */
}

#privacy-policy p {
    line-height: 1.6; /* Improve readability with line height */
    margin-bottom: 15px; /* Space below paragraphs */
}

#privacy-policy ul {
    margin-left: 20px; /* Indent unordered lists */
    margin-bottom: 15px; /* Space below lists */
}

#privacy-policy li {
    margin-bottom: 5px; /* Space between list items */
}