* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}


html {
  scroll-behavior:smooth
}

body {
  background-color: #fff;
  font-family: 'Open Sans', sans-serif;
  margin:0
}

header {
    background-color: #151515;
    padding: 1rem;
    min-height: 180px;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
     width: 500px;
	max-width: 100%;
	height: 200px;
    max-height: 100%; 
    object-fit: contain;
}

nav {
    align-self: flex-end;
    padding-bottom: 0px;
    margin-bottom: -16px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: stretch;
}

nav ul li {
    position: relative;
    text-align: center;
    font-family: Arial;
    flex: 1;
    font-size: large;
    line-height: normal;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    display: flex;              /* Make the anchor a flex container */
    align-items: center;        /* Vertically center the text */
    justify-content: center;    /* Horizontally center the text */
    height: 80px;               /* Keep your height */
    padding-top: 0;
    padding-right: 3.9rem;
    padding-left: 3.9rem;
    padding-bottom: 0;
}

nav ul li:hover {
    background-color: #2a2a2a;
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #434343;
    flex-direction: column;
    font-family: Arial;
    max-width: 100%;
    font-size: medium;
}
.submenu.open{
	display: block;
}
.submenu li a {
    display: flex;
    white-space: nowrap;
	justify-content: center
}
hero {
  width: 100%;
  display: block;
}

.hero img {
  width: 100%;
  height: auto; /* Keeps image responsive */
  object-fit: cover; /* Ensures no distortion */
  display: block; /* Removes white space between hero and article*/
}


/* Base reset for form elements */
form, label, input, select, textarea, button {
  box-sizing: border-box;
}


legend {
  display: block;
  text-align: center;       /* Centers the text horizontally */
  width: 100%;              /* Ensures it spans the card width */
  font-size: 1.5rem;        /* Slightly larger for emphasis */
  font-weight: 700;         /* Bold for prominence */
  margin-bottom: 1rem;      /* Space below the title */
}

/* Container layout */
#service-form {
  width: 100%;
  max-width: 760px;          /* keeps form from stretching too wide on desktops */
  margin: 2rem auto;         /* center horizontally */
  padding: 0 1rem;           /* small side padding for mobile */
}

/* Card look */
.form-card {
  border: 1px solid #e0e6eb;
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

legend {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0 .5rem;
}

/* Grid: mobile-first (one column) */
.form-row {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

/* Make specific rows span full width */
.form-row.full {
  grid-column: 1 / -1;
}

/* Label & inputs */
label {
  font-weight: 600;
  color: #1f2937; /* dark gray */
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea{
  width: 100%;
  padding: .75rem .875rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  color: #111827;
  background: #fff;
}

input::placeholder, textarea::placeholder {
  
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #6b7280;
}

/* For date inputs, some browsers ignore placeholder styling, so force font */
input[type="date"] {
  font-family: 'Open Sans', sans-serif;
}


/* Focus states for accessibility */
input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid #2563eb;       /* accessible blue outline */
  outline-offset: 2px;
  border-color: #2563eb;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: #2563eb;   /* blue */
  border-color: #2563eb;
  color: #fff;
}

.btn:hover { filter: brightness(1.03); }
.btn.primary:hover { filter: brightness(1.08); }

/* Actions row */
.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}

footer {
  background-color: #151515;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}


	
/* Responsive Breakpoints */
@media (max-width : 769px ){
	
	html,body{
		overflow-x: hidden /* Prevent horizontal scroll */
	}
	
	header {
    display: flex;
    flex-direction: column; /* Stack logo and nav vertically */
    align-items: center;
    padding: 0.5rem;
    box-sizing: border-box;
	position: relative;
	
  }
 .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;              /* prevent flex shrinking */
  position: relative;
  z-index: 2;                  /* sit above nav if nav overlaps */
  order: 0;
}

 .logo img {
  display: block;
  width: clamp(120px, 40vw, 220px); /* Smaller minimum */
  height: auto;
  max-width: 100%;
}
  
  nav {
		background-color: rgba(21,21,21,1.00);
	    width: 100%;
	    z-index: 1;
	    order: 1;
	}

  nav ul {
    flex-direction: column; /* Vertical nav */
    gap: 0.5rem;
    margin: 0;
	  
  }
	nav ul li{
	position: relative;
}
	 nav ul li:hover > .submenu {
    display: flex;
  }
nav ul li.active > a {
    background-color: var(--tab-active);
  }

nav ul li.submenu.open > a {
  background-color: var(tab-active);
}
  nav ul li a {
    padding: 0.5rem 3.2rem; /* Reduce padding for mobile */
    height: auto;
    font-size: 1rem;
	position:relative; /* Anchor for submenu */
  }
nav ul li.active > a {
  background-color: #2a2a2a;   /* <- pick the highlight color you want */
  color: #ffffff;
}
.submenu {
   display: none; /*Hide by defult(No hover)*/
  position: relative; /* Keep it in flow so it stacks below */
  width: 100%;
  flex-direction: column;
  z-index: 999;
  background: #151515;
  max-height: 0; /* Start collapsed */
  overflow: hidden; /* Hide content when collapsed */
  transition: max-height 280ms ease; /* Smooth slide */
  background-color: #434343;
  pointer-events: none;
}

  .submenu li a {
	}
    
.submenu.open {
  max-height: 500px; /* Enough to fit submenu items */
  display: flex;
  pointer-events: auto;
}
  

  #article1 p {
    max-width: 90%;
    font-size: 1rem;
  }

.form-card {
    padding: 1.5rem;
  }

  /* Switch to CSS Grid for cleaner alignment */
  .form-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem; /* row gap then column gap */
  }

  /* Make specific items span across both columns */
  #service-type.form-row,
  .form-row.full,
  .form-actions {
    grid-column: 1 / -1;
  }
}

/* Optional: dark mode (if you plan to add a class to <body>) */
body.dark .form-card {
  background: #0b1220;
  border-color: #1f2430;
}
body.dark label { color: #e5e7eb; }
body.dark input, body.dark select, body.dark textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e5e7eb;
}

 



@media (min-width: 769px) {
    header {
        height: auto; /* Let height adjust naturally */
		display: flex;
        padding: 1rem 2rem; /* Add horizontal padding for large screens */
        flex-wrap:nowrap!important;/* Avoid wrapping unless needed */
    }
	nav{
		
	}
    
.logo img {
    width: clamp(200px, 25vw, 500px); /* Responsive scaling */
    height: auto;
    max-width: 100%; /* Prevent overflow */
    margin-left: 0; /* Avoid negative positioning */
    }

    nav ul li a {
        padding: 0 3.5em; /* padding responds to txt size change*, use clamp if you want it based on vw (view point) */
        font-size: clamp(.5rem, 1.5vw, 1.5rem); /* Responsive font size */
		
    }
	nav ul li:hover > .submenu,
    nav ul li:focus-within > .submenu {
    display: block;
	animation: dropdownFade 160ms ease forwards;
  }
	
submenu {
    background-color: #434343; /* ensure background applies on desktop */
    z-index: 1001;             /* in case it tucks under header */
  }
	}
