/* Reset and Global Styles */
* {
  box-sizing: border-box; /* Ensure padding and borders are included in width/height */
}

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Roboto:wght@400;700&display=swap');

body {
  color: #333;
  background: #f4f4f4;
  margin: 0;
  padding: 40px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

#wrapper {
  width: 90%;
  max-width: 960px;
  background: #fff;
  margin: 0 auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#logo h1 {
  color: #4a7c59;
  font-family: 'Roboto', sans-serif;
  font-size: 2.5rem;
  padding: 15px 0;
  font-weight: 600;
}

h2 {
  color: #4a7c59;
  font-family: 'Roboto', sans-serif;
  font-size: 1.75rem;
  margin-bottom: 15px;
}

h3 {
  color: #4a7c59;
  font-family: 'Roboto', sans-serif;
  font-size: 1.25rem;
}

h3 a {
  color: #4a7c59;
  text-decoration: none;
}

h3 a:hover {
  text-decoration: underline;
}

p {
  color: #555;
  margin: 15px 0;
}

/* Navigation */
.invertedshiftdown ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: flex-end;
}

.invertedshiftdown li {
  margin: 0 10px;
}

.invertedshiftdown a {
  font-family: 'Poppins', sans-serif;
  color: #4a7c59;
  text-decoration: none;
  padding: 10px 20px;
  background: #fff;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.invertedshiftdown a:hover,
.invertedshiftdown .current a {
  background: #4a7c59;
  color: #fff;
}

/* Containers */
.content-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.top-box, .bottom-box, .top-box-left, .top-box-single {
  background: #e9ecef;
  border-radius: 15px;
  padding: 20px;
}

.top-box-left {
  flex: 1;
  background: #dee2d1 url(http://www.kaleidoscopestainedglass.co.uk/images/stained-glass.jpg) no-repeat scroll center;
  min-height: 250px;
  background-size: cover;
}

.top-box {
  flex: 2;
}

.box-inner, .box-inner-single {
  padding: 0;
}

.bottom-box {
  margin-bottom: 20px;
}

/* Gallery */
#gallery {
  list-style-type: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#gallery li {
  margin: 0;
}

#gallery img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

#gallery img:hover {
  transform: scale(1.1);
}

/* Gallery Icons */
.gallery-icons {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
}

.gallery-icons div {
  margin: 0;
}

.gallery-icons img {
  border-radius: 10px;
  border: none;
  transition: transform 0.3s ease;
  width: 100%;
  height: auto;
}

.gallery-icons img:hover {
  transform: scale(1.05);
}

/* Contact Icons */
.contact-icons {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.contact-icons div {
  margin: 0;
}

.contact-icons img {
  border-radius: 10px;
  border: none;
  transition: transform 0.3s ease;
}

.contact-icons img:hover {
  transform: scale(1.05);
}

/* Contact Form */
.contact-info {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#contact-form {
  max-width: 500px; /* Reduced from 600px to prevent overflow */
  margin: 20px auto;
  padding: 25px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Prevent content from overflowing */
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #4a7c59;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  background: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #4a7c59;
  box-shadow: 0 0 5px rgba(74, 124, 89, 0.3);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  background: #4a7c59;
  color: #fff;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

button:hover {
  background: #386c4a;
  transform: translateY(-2px);
}

/* Footer */
#footer {
  clear: both;
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
  }
  .top-box-left {
    min-height: 200px;
  }
  .invertedshiftdown ul {
    justify-content: center;
  }
  #gallery {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  #contact-form {
    max-width: 100%;
    padding: 15px;
  }
}