/*main layout and index - RESPONSIVE VERSION (MAINTAINING ORIGINAL DESIGN)*/

/*/body of the page and html*/

* {
  box-sizing: border-box;
}

body {
  padding-top: 45px;
  width: 100% !important;
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/*top red banner in layout.html */ 

header {
  list-style-type: none;
  padding: 0; 
  overflow:hidden; 
  background-color: rgb(180, 28, 28);
  position:relative; 
  top: -45px;
  width: 100%; 
}

header li { 
  float: right;
  margin-left: 5%; 
}

header li a {
  display: block;
  color: white; 
  text-align: left;
  padding: 8px;
  text-decoration: none;
}

.fa-facebook {
  color: white; 
  float: left;
  margin-left: -8pc;
}

.fa-twitter {
  color: white; 
  float: left;
  margin-left: -10pc;
}

/*/words in the banner/*/

.headerfont {
  color: white;
  font-size: small;
  position: relative;
  float: left;
  margin-inline: 20px;
}

/* Header responsive adjustments only for mobile */
@media screen and (max-width: 768px) {
  body {
    padding-top: 20px;
  }
  
  header {
    top: -20px;
    text-align: center;
  }
  
  header li {
    float: none;
    display: inline-block;
    margin: 5px 10px;
  }
  
  .headerfont {
    font-size: 12px;
    margin-inline: 8px;
  }
}

@media screen and (max-width: 480px) {
  header li {
    display: block;
    margin: 8px auto;
  }
  
  .headerfont {
    font-size: 11px;
  }
}

/* Logo */
#logo img {
  max-width: 100%;
  height: auto;
}

/*menu list after top banner*/

.topnav a {
  float: left; 
  display: block;
  color: black;
  font-size: 14.3px;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.topnav .icon {
  display: none;
}

.topnav button {
  position: relative; 
  top: 12px; 
  background-color: white;
  display: block;
}

.dropbtn {
  color: black;
  text-align: center;
  font-size: 14.3px;
  border: none;
}

.dropdown {
  position: relative;
  display: inline-block;
  color: black;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color:orange;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  opacity: 0.8;
}

.dropdown .dropbtn {
  border: none; 
  outline: none;
  background-color: inherit;
  padding: 2px ;
  font-family:inherit;
  left: 9.8px; 
  margin: 0;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.topnav .icon:hover {
  background-color: #555;
}

.dropdown-content a:hover {
  background-color: gray;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {background-color:  gray;}

/* Mobile menu responsiveness */
@media screen and (max-width: 810px) {
  .topnav a:not(:first-child), .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 810px) {
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
}

/*start of object of picture slides*/

#slideshow-container {
  width: 100%;
  position: relative;
}

.mySlides img {
  width: 100%;
  height: auto;
}

/*box object containing introduction to exceptional service*/

.leftbox {
  position: relative;
  width: 40%;
  bottom:13rem; 
  left: 1rem;
  display:block;
}

.box { 
  background-color: white;
  width: 100%;
  height: auto;
  opacity: 0.8;
}

.box p {
  font-size: 1.4em;
  font-family: Arial, Helvetica, sans-serif; 
}

.box h1 {
  font-size: 1.9em; 
  flex-wrap: wrap;
}

/* Box responsive adjustments */
@media screen and (max-width: 768px) {
  .leftbox {
    width: 80%;
    bottom: 8rem;
  }
  
  .box p {
    font-size: 1.1em;
  }
  
  .box h1 {
    font-size: 1.5em;
  }
}

@media screen and (max-width: 480px) {
  .leftbox {
    width: 95%;
    bottom: 5rem;
    left: 0.5rem;
  }
  
  .box p {
    font-size: 0.95em;
  }
  
  .box h1 {
    font-size: 1.3em;
  }
}

 /*The body for pictures with words in the middle */

.column {
  float: left;
  width: 50%;
  padding: 20px; 
}

.rowwhoare::after {
  content:" " ;
  clear: both;
  display: table;
}

.column p {
  font-size: 1.5em;
  width: 100%;
}

.following-row::after {
  content: " ";
  clear: both;
  display: table; 
}

/* Two column responsive - stack on mobile */
@media screen and (max-width: 768px) {
  .column {
    float: none;
    width: 100%;
    padding: 20px 30px;
  }
  
  .column p {
    font-size: 1.2em;
  }
}

@media screen and (max-width: 480px) {
  .column {
    padding: 15px 20px;
  }
  
  .column p {
    font-size: 1em;
  }
}

/* animation for the sliding pictures */
.fade {
  animation: fade ease 10s;
  -webkit-animation: fade ease 10s;
  -moz-animation: fade ease 10s;
  -o-animation: fade ease 10s;
  -ms-animation: fade ease 10s;
}

@-webkit-keyframes fade {
  from {opacity: .8}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .8}
  to {opacity: 1}
}

/*footer controls */

.footer {
  position: relative;
  overflow: hidden;
  list-style-type: none;
  left: 0;
  bottom: 0; 
  width: 100%;
  background-color:rgb(180, 28, 28); 
  color: white;
  text-align: center;
}

.header-footer {
  display: flex;
  justify-content: space-between;
  border-bottom:white 3px solid;
}

.header-footer h2 {
  font-style: italic;
}

.header-footer p{
  padding: 10px;
  font-size: .6em;
  font-style: normal;
}

.subheading-footer {
  display: flex;
  justify-content: flex-start;
}

.insidebox {
  background-color: orange;
  width: 30%;
  padding: 3rem;
  border-style: solid;
  border-color: white;
}

.about-main {
  width: 100%;
  display: grid;
  grid-template-columns: 33.33% 33.33% 33.33%;
  grid-template-rows: 10%, 90%;
  align-items: stretch;
}

.initial-container {
  margin-left: 10%;
}

.next-container h3 {
  margin-bottom: -10px;
}

.next-container ul {
  margin-top: 3%;
}

.last-container {
  margin-right: 30%;
}

.next-container ul li a{
  text-decoration: none !important;
  color: white;
}

/* Footer responsive - stack on mobile */
@media screen and (max-width: 768px) {
  .header-footer {
    flex-direction: column;
    padding: 20px;
  }
  
  .header-footer h2 {
    font-size: 1.3em;
    margin-bottom: 20px;
  }
  
  .insidebox {
    width: 80%;
    padding: 1.5rem;
    margin: 20px auto;
  }
  
  .about-main {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  .initial-container, .last-container {
    margin-left: 5%;
    margin-right: 5%;
  }
  
  .initial-container p {
    width: 100% !important;
  }
}

/*menu settings for each bullet under services*/

#menu2 li::before {
  content: "\f101";
  font-family: fontawesome;
  color: #e89c34;
  display: inline-block;
  margin-right: 5px;
  padding: 5px;
}

#menu2 a{
  border-bottom: 1px solid #ffffff59;
  font-family: Roboto, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none !important;
  color: #fff;
  border-right: unset;
}

#menu li:before {
  content: "\f101";
  font-family: fontawesome;
  color: #e89c34;
  display: inline-block;
  margin-right: 10px;
  padding: 8px; 
}

#menu a{
  border-bottom: 1px solid #ffffff59;
  font-family: Roboto, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none !important;
  color: #fff;
  border-right: unset;
}

.logo img {
  position: relative; 
  float: left; 
  left: 20rem; 
  top: 2rem;
}

/* Logo responsive */
@media screen and (max-width: 768px) {
  .logo img {
    float: none;
    left: 0;
    top: 0;
    display: block;
    margin: 0 auto;
  }
}

/*copyright */

.copyright {
  display: flex;
}

.copyright p {
  color: whitesmoke;
}

@media screen and (max-width: 768px) {
  .copyright {
    justify-content: center;
    padding: 15px;
  }
  
  .copyright p {
    font-size: 12px;
  }
}

/* Contact Page */
.maincontact{
  display: grid;
  width: 100%;
  grid-template-rows: 1fr, 1fr, 1fr/1fr, 1fr, 1fr;
}

.contact-page {
  grid-row-start: 1;
  grid-row-end: 2; 
  margin-left: 10%;
  margin-bottom:10%;
  margin-top: 5%;
  font-family: verdana;
}

.contactforms {
  margin-left: 10%;
  margin-bottom: 3%;
}

.contactformheader {
  margin-left: 10%; 
}

.speech_therapy {
  text-align: left;
  margin-left: 20px;
}

#submit_button {
  position: relative;
  top: -10px;
  background-color: rgb(180, 28, 28);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

#submit_button:hover {
  background-color: rgb(150, 20, 20);
}

/* Contact form styling */
.contactforms input[type="text"],
.contactforms input[type="email"],
.contactforms input[type="tel"],
.contactforms select,
.contactforms textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.contactforms textarea {
  min-height: 150px;
}

/* Contact page responsive */
@media screen and (max-width: 768px) {
  .contact-page, .contactformheader, .contactforms {
    margin-left: 5%;
    margin-right: 5%;
  }
  
  .contactforms input,
  .contactforms select,
  .contactforms textarea {
    font-size: 14px;
  }
  
  #submit_button {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .contact-page, .contactformheader, .contactforms {
    margin-left: 3%;
    margin-right: 3%;
  }
}

/*contact information submission */
.submission {
  width: 100%; 
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 60px;
}

/* UPDATED: General page layout - now centered like homepage */
.generalpg {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;  /* CHANGED from margin-left: 10% */
  padding: 40px 60px;
}

.generalpg h1 {
  font-size: 2.5em;
  margin-bottom: 30px;
}

.generalpg h2 {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
}

.generalpg p {
  font-size: 1.1em;
  line-height: 1.8;
}

/* General page responsive - tablets */
@media screen and (max-width: 1024px) {
  .generalpg {
    padding: 30px 40px;
  }
  
  .generalpg h1 {
    font-size: 2.2em;
  }
  
  .generalpg h2 {
    font-size: 1.6em;
  }
  
  .submission {
    padding: 30px 40px;
  }
}

/* General page responsive - mobile */
@media screen and (max-width: 768px) {
  .submission, .generalpg {
    margin: 0 auto;
    padding: 20px 30px;
  }
  
  .generalpg h1 {
    font-size: 1.8em;
  }
  
  .generalpg h2 {
    font-size: 1.4em;
  }
  
  .generalpg p {
    font-size: 1em;
  }
}

@media screen and (max-width: 480px) {
  .submission, .generalpg {
    padding: 20px 20px;
  }
  
  .generalpg h1 {
    font-size: 1.5em;
  }
  
  .generalpg h2 {
    font-size: 1.2em;
  }
  
  .generalpg p {
    font-size: 0.95em;
  }
}

/* Inline style overrides for mobile - handles the new homepage sections */
@media screen and (max-width: 768px) {
  /* Grid layouts become single column */
  [style*="display: grid"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Reduce padding on mobile */
  [style*="padding: 60px"],
  [style*="padding: 50px"] {
    padding: 30px 20px !important;
  }
  
  [style*="padding: 40px"] {
    padding: 20px 15px !important;
  }
  
  /* Adjust font sizes on mobile */
  [style*="font-size: 42px"],
  [style*="font-size: 40px"] {
    font-size: 28px !important;
  }
  
  [style*="font-size: 36px"] {
    font-size: 26px !important;
  }
  
  [style*="font-size: 32px"] {
    font-size: 24px !important;
  }
  
  [style*="font-size: 28px"] {
    font-size: 22px !important;
  }
  
  [style*="font-size: 24px"] {
    font-size: 20px !important;
  }
  
  [style*="font-size: 22px"] {
    font-size: 18px !important;
  }
  
  [style*="font-size: 20px"] {
    font-size: 17px !important;
  }
  
  /* Reduce gaps on mobile */
  [style*="gap: 60px"],
  [style*="gap: 50px"] {
    gap: 25px !important;
  }
  
  [style*="gap: 40px"],
  [style*="gap: 30px"] {
    gap: 20px !important;
  }
  
  /* Stack flex layouts */
  [style*="display: flex"][style*="gap:"] {
    flex-wrap: wrap !important;
  }
}

@media screen and (max-width: 480px) {
  /* Further font size reductions */
  [style*="font-size: 28px"],
  [style*="font-size: 26px"],
  [style*="font-size: 24px"] {
    font-size: 20px !important;
  }
  
  [style*="font-size: 22px"],
  [style*="font-size: 20px"] {
    font-size: 18px !important;
  }
  
  [style*="font-size: 18px"] {
    font-size: 16px !important;
  }
}