/* =============================
   Theme Variables
============================= */
@font-face {
  font-family: 'Inria Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/inriasans/v14/ptRMTiqXYfZMCOiVj9kQ1On4KA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inria Serif';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/inriaserif/v17/fC1lPYxPY3rXxEndZJAzN3Srdy0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root,
[data-bs-theme="light"] {
  --background-color: #f1e7d1;
  --card-color: #dbcfb5;
  --text-input: #f9f7f2;
  --text-color: #454B1B;
  --title-bar-bg: #e2d8bf;
  --title-bar-fg: #454B1B;
  --nav-bg: #f4f4f4;
  --nav-text: #0b020b;
  --button-bg: rgba(74, 97, 15, 0.3);
  --button-hover-bg: #525b0e;
  --input-border: rgba(74, 97, 15, 0.3);
  --footer-color: #454B1B;
  --logo: url('images/dionic_logo_light.png');
  --background: linear-gradient(to top,
      #e2d8bf 0%,
      rgba(197, 199, 186, 0) 100%);
  --headerNavAColor: #3c8123;
 --h3BorderBottom: 1px solid rgba(74, 97, 15, 0.3);
 --emailColor: #4b1b42;
  --emailHoverColor: #ff005d;
}

[data-bs-theme="dark"] {
  --background-color: #141702;
  --card-color: #282e07;
  --text-input: #0c0f01;
  --text-color: #f1e7d1;
  --title-bar-bg: #141c03;
  --title-bar-fg: #f1e7d1;
  --nav-bg: #252222;
  --nav-text: #f1e7d1;
  --button-bg: rgba(238, 225, 225, 0.3);
  --button-hover-bg: #486c04;
  --input-border: rgba(238, 225, 225, 0.3);
  --footer-color: #aaa;
  --logo: url('images/dionic_logo_dark.png');
  --box-shadow: 0 4px 8px rgba(255, 255, 255, 0.05);
  --filter: drop-shadow(0 0 6px rgba(236, 195, 82, 0.907));
  --background: linear-gradient(to top,
      #141702c4 0%,
      rgba(181, 0, 12, 0) 100%);
  --headerNavAColor: #85a58e;
  --h3BorderBottom: 1px solid rgba(238, 225, 225, 0.3);
--emailColor: #aaa;
  --emailHoverColor: #f8f6f3;
}


/* =============================
   Base Styles and Resets
============================= */

body,
html {
  max-width: 100%;
  position: relative;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-family: 'Inria Sans', serif;
  line-height: 1.3rem;
  background-color: var(--background-color);
  color: var(--text-color);
  z-index: 1;
  scroll-behavior: smooth;
  scroll-padding-top:90px;
}

.content-wrapper {
  scroll-behavior: smooth;
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  padding-block-end: 0.5rem;
  padding-block-start: 0.5rem;
  z-index: 2;
}

/*Watermarkbackground*/
body::before {
  content: "";
  background: var(--logo) no-repeat center center;
  background-size: contain;
  opacity: 0.05;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;                 
  pointer-events: none;       
}

/* =============================
   Header & Logo
============================= */
.title-bar {
  position: sticky;
  top: 0;
  line-height: 1;
  width: 100%;
  background: var(--background);
  backdrop-filter: blur(8px);
  z-index: 1000;
  font-weight: bold;
}

.title-bar-content {
  font-family: 'Inria Sans', serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  flex-wrap: wrap;
  min-height: 60px;
  gap: 0;
  padding: 0.25rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.site-title {
  font-size: 3rem;
  font-weight: 300;

  white-space: nowrap;
  margin: 0;
}

.logo {
  align-items: center;
  height: 90px;
  width: auto;
  flex-shrink: 0;
}

.header-nav {
  font-weight: 300;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.header-nav a {
  position: relative;
  color: var(--title-bar-fg);
  text-decoration: none;
  font-weight: light;

}
.header-nav a:hover{
  color: var(--headerNavAColor);
  text-decoration: underline;
  font-weight: light;
  transition: all 0.6s ease;
}

.header-nav a:not(:last-child)::after {
  content: "-";
  margin: 0 0.5rem;
  text-decoration: none;
  display: inline-block;
  pointer-events: none;
}


/* =============================
   Main Sections
============================= */
section {
  margin: 0.5rem;
}

/* =============================
   Theme Toggle Button
============================= */
#theme-toggle-btn {
  position: absolute;
  top: 1rem;
  right: 1.5em;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  padding: 0.1rem;
  transform: translateY(-50%);
  color:var(--text-color);
  filter:var(--filter);
}

#theme-icon svg {
  display: block;
  fill: currentColor;
}


.contact-intro {
  padding: 0.5rem 1rem;
  align-items: center;
}


.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  text-align: left;
  /* <-- This forces left alignment */
}

/* =============================
   Footer
============================= */
footer {
  text-align: center;
  padding: 2rem 1rem 1rem;
  font-size: 0.9rem;
  color: var(--footer-color);
}




/* =============================
   Form Styling
============================= */


.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
}


form {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  max-width: 600px;
  gap: 1rem;
}

form>*:first-child {
  margin-top: 0 !important;
  width: 100%;
}

label {
  width: 100%;
  text-align: left;
  margin-bottom: 0.25rem;
  font-weight: light;
}

input,
textarea {
  display: block;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  border: 1px solid var(--input-border);
  background-color: var(--text-input);
  color: var(--text-color);
  margin: 0.5rem;
}

.button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.5rem;
}


input:focus,
textarea:focus {
  outline: none;
  border-color: var(--button-bg);
}

button[type="submit"] {
  display: block;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--button-bg);
  color: var(--text-color);
  border-radius: 4px;
  cursor: not-allowed;
  transition: background-color 0.3s ease;
}

button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button[type="submit"]:hover {
  background-color: var(--button-hover-bg);
}

button[type="submit"].active {
  cursor: pointer;
}

.input:required:invalid:focus {
  border-color: red;
  box-shadow: 0 0 4px red;
}


#firstName:focus:invalid,
#lastName:focus:invalid,
#contactNumber:focus:invalid {
  border-color: red;
  box-shadow: 0 0 4px red;
}


input:not(#firstName):not(#lastName):not(#contactNumber):focus:invalid {
  border-color: initial;
  box-shadow: none;
}

.success-message {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.success-message.show {
  opacity: 1;
}

/* ====================================
   Vision Bar & Images & Welcome Note 
   ==================================== */
.vision-bar {
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto;
  max-width: 900px;
  overflow-x: hidden;
   background-color: var(--card-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.vision-image {
  justify-content: space-between;
  border-radius: 50px;
  height: 80%;
  width: 90%;
  margin-right: 20px;
  margin-left: 20px;
  flex-shrink: 0;
}

.vision-text {
  font-family: 'Inria Serif', serif;
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
  flex: 1;
  color: var(--title-bar-fg);
}

.welcome-note {
  font-family: 'Inria Serif', serif;
  font-weight: light;
  text-align: center;
  font-size: 1rem;
  padding: 2rem;
  color: var(--title-bar-fg);
}


.services-container {
  max-width: 1200px;
  margin: 0 auto;
}

.services-title {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

.cardHolder {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  overflow-x: hidden;
}

.card {
  max-width: 350px;
  background-color: var(--card-color);
  border-radius: 20rem 20rem 1rem 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 1.5rem;
  transition: all .25s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--box-shadow);
}


.card:hover {
  transform: scale(1.02);
}

.service-image {
  width: 90%;
  margin: 5%;
}


.service-heading {
  font-weight: bold;
}

.service-list {
  padding-left: 1.25rem;
  color: var(--text-color);
  list-style: disc;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #263702;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-color);
  color: var(--background-color);
  padding: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.success-message {
  color:var(--text-color);
  margin-top: 1rem;
}

.email {
  color: var(--emailColor);
  text-decoration: none;
}

.email:hover {
  color:var(--emailHoverColor);
  text-decoration: underline;
  font-weight:bolder;
}

h1,
h2,
h3 {

  font-weight: bold;
  color: var(--title-bar-fg);
  text-align: center;
}

h2 {
  font-size: 2rem;
}


h3 {
  padding-bottom: 0.5rem;
  border-bottom: var(--h3BorderBottom);
}


fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-inline-size: unset; /* Optional: prevent it from being too wide */
}

legend{
  text-align: center;
}






@media (max-width: 330px) {
  .title-bar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  html {
    scroll-padding-top: 60px;
  }

  .logo {
    align-items: center;
    height: 24px;
  }

  .site-title {
    font-size: 1rem;
  }

  .header-nav {
    flex-direction: row;
    font-size: 0.6rem;
    padding-bottom: 15px;
    align-items: center;
  }

  h2 {
    font-size: 0.85rem;
  }

  h3 {
    font-size: 0.75rem;
  }

  .content-wrapper {
    font-size: 10px;
  }

  .vision-bar {
    border-radius: 30px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 95%;
    height: auto;
    padding: 0.5rem;
    box-sizing: border-box;
  }

  .vision-image {
    border-radius: 25px;
    width: 100%;
    max-width: 90%;
    height: auto;
    margin: 0.5rem;
  }

  .vision-text {
    width: 100%;
    text-align: center;
    font-size: 10px;
    padding: 0 0.1rem;
    line-height: 1.3;
    box-sizing: border-box;
  }

  #theme-toggle-btn {
    font-size: 8px;
    right: 0.5rem;
    padding-top: 10px;
  }

  .welcome-note {
    font-size: 12px;
    margin-bottom: 1rem;
    padding: 0;
  }

  .card {
    width: 100%
  }

  #contactForm {
    width: 100%;
  }

  input,
  textarea {
    width: 90%;
    margin: 0.1rem;
  }

  .services-section {
    padding: 0.1rem;
  }
}


@media (min-width: 321px) and (max-width: 399px) {
  .title-bar-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  html {
    scroll-padding-top: 60px;
  }

  .content-wrapper {
    font-size: 12px;
  }

  #theme-toggle-btn {
    font-size: 2px;
    right: 0.5rem;
    padding-top: 3px;
  }

  .vision-bar {
    border-radius: 25px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90%;
    height: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
  }

  .vision-image {
    border-radius: 25px;
    align-items: left;
    width: 60%;
    max-width: 250px;
    max-height: 80%;
    margin-left: 0.3rem;
    margin-right: 0.5rem;
  }

  .vision-text {
    text-align: center;
    font-size: 0.65rem;
    box-sizing: border-box;
    line-height: 1.5;
  }

  .welcome-note {
    font-size: 1.05rem;
    padding: 0.5rem;
  }

  .logo {
    height: 45px;
  }

  .site-title {
    font-size: 1.8rem;
  }


  .header-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    font-size: 0.75rem;
    padding-bottom: 10px;
  }


  .wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    width: 100%;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }



  input,
  textarea {
    width: 100%;
  }

  .services-section {
    padding: 0.5rem;
  }
  #contactForm {
    width: 90%;
  }


}

@media (min-width: 400px) and (max-width: 499px) {
  .title-bar-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .content-wrapper {
    font-size: 12px;
  }

  #theme-toggle-btn {
    font-size: 2px;
    right: 0.5rem;
    padding-top: 3px;
  }

  .vision-bar {
    flex-direction: row;
    border-radius: 25px;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 80%;
    height: 165px;
    padding: 0.4rem;
    box-sizing: border-box;
  }

  .vision-image {
    align-items: left;
    border-radius: 20px;
    width: 60%;
    max-width: 250px;
    height: 90%;
    margin-left: 0.3rem;
    margin-right: 0.5rem;
  }

  .vision-text {
    text-align: center;
    font-size: 0.65rem;
    box-sizing: border-box;
    line-height: 1.5;
  }

  .welcome-note {
    font-size: 1.25rem;
    padding: 0.5rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  .logo {
    height: 45px;
  }

  .site-title {
    font-size: 1.8rem;
  }


  .header-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.75rem;
    padding-bottom: 10px;
  }


  .wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    width: 100%;
  }

  #contactForm {
    width: 90%;
  }

  input,
  textarea {
    width: 100%;
  }

}

@media (min-width: 500px) and (max-width: 700px) {
  .title-bar-content {
    padding: 0.1rem;
  }


  .logo {
    height: 50px;
  }

  .site-title {
    font-size: 2rem;
  }

  .header-nav {
    font-size: 0.85rem;
    padding-right: 3.5rem;
  }


  .header-nav a::after {
    margin: 0.5rem;
  }

  #theme-toggle-btn {
    right: 0.5rem;
    padding-top: 10px;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  #contactForm {
    width: 95%;
  }

  input,
  textarea {
    width: 100%;
  }

  .content-wrapper {
    font-size: 15px;
  }


  .vision-bar {
    border-radius: 25px;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    width: 75%;
    max-width: 100%;
    height: auto;
    padding: 0.5rem;
    box-sizing: border-box;
  }

  .vision-image {
    border-radius: 20px;
    width: 62%;
    max-width: 100%;
    height: auto;
    margin: 0.5rem;
  }

  .vision-text {
    text-align: center;
    font-size: 12px;
    padding: 0.5rem 0.5rem;
    box-sizing: border-box;
  }

  .welcome-note {
    font-size: 24px;
    padding: 1rem;
  }
}




@media (min-width: 701px) and (max-width: 900px) {

  .title-bar-content {
    padding: 0.5rem;
  }

  .logo {
    height: 70px;
  }

  .site-title {
    font-size: 3 rem;
  }

  .header-nav {
    font-size: 1rem;
    padding-right: 2.5rem;
  }

  .header-nav a::after {
    margin: 1rem;
  }

  #theme-toggle-btn {
    right: 0.6rem;
    padding-top: 5px;
  }

  .vision-bar {
    border-radius: 35px;
    width: 65%;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 1rem;
  }

  .vision-image {
    border-radius: 30px;
    width: 60%;
    height: auto;
    margin: 0;
  }

  .vision-text {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
  }

  .welcome-note {
    font-size: 1.4rem;
    padding-bottom: 1.5rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  #contactForm {
    padding: 2.5rem;
    min-width: 85%;
  }

  input,
  textarea {
    margin-left: 0;
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem;
  }

}

@media (min-width: 901px) {
  .logo {
    height: 80px;
  }

  .site-title {
    font-size: 3.5rem;
  }

  .header-nav {
    font-size: 1.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
#theme-toggle-btn {
    right: 0.6rem;
    padding-top: 5px;
  }
  .welcome-note {
    font-size: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .vision-bar {
    width: 70%;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 1rem;
  }

  .vision-image {
    width: 60%;
    height: auto;
    margin: 1rem;
  }

  .vision-text {
    text-align: center;
    padding-left: 1rem;
  }

  
  input,
  textarea {
    margin-left: 0;
    width: 100%;
    font-size: 1.125rem;
    padding: 1rem;
  }


  #contactForm {
    min-width: 60%;
    margin: 0 auto; /* center horizontally */
    padding: 2rem; /* reduce padding */
  }

  #contact {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .form-group {
    width: 100%;
  }


  #contact-intro {
    max-width: 600px;
    text-align: left;
    margin-bottom: 0;
  }

}
