* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  width: 100%;
  overflow-x: hidden;
  background-color: #f4f4f4;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.patient-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
  background-color: #f7f7f7;
  border-top: 5px solid #d8c400;
}

.image-container {
  flex: 1;
  max-width: 50%;
  padding: 0 1rem;
}

.image-container img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Responsive Image Adjustments */
@media screen and (max-width: 1024px) {
  .image-container {
    max-width: 45%;
    padding: 0 0.75rem;
  }

  .image-container img {
    max-width: 450px;
  }
}

@media screen and (max-width: 768px) {
  .patient-section {
    flex-direction: column;
    padding: 2rem 1rem;
    text-align: center;
  }

  .content, .image-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .image-container {
    max-width: 100%;
    order: -1;
  }

  .image-container img {
    max-width: 350px;
    margin: 0 auto;
    display: block;
  }
}

@media screen and (max-width: 480px) {
  .image-container img {
    max-width: 250px;
  }
}  }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
  .patient-section {
    padding: 1.5rem 0.5rem;
  }
}

.content, .image-container {
  flex: 1;
  min-width: 300px;
  padding: 1rem;
}

@media screen and (max-width: 768px) {
  .patient-section {
    flex-direction: column;
    padding: 1rem;
  }
  
  .content, .image-container {
    flex: 100%;
    min-width: 100%;
    padding: 0.5rem;
  }
}

@media screen and (max-width: 1024px) {
  .patient-section {
    padding: 60px 80px;
  }
}

@media screen and (max-width: 768px) {
  .patient-section {
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
  }

  .content {
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 30px;
  }

  .image-container {
    width: 100%;
    order: -1;
  }
}

@media screen and (max-width: 480px) {
  .patient-section {
    padding: 20px 10px;
  }
}

.content {
  flex: 1;
  max-width: 50%;
  padding: 0 2rem;
}

.content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #333;
  line-height: 1.2;
}

.content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #666;
  line-height: 1.6;
}

.new-patient-form {
  display: inline-block;
  background-color: #4CAF50;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.new-patient-form:hover {
  background-color: #45a049;
}

/* Tablet Responsiveness */
@media screen and (max-width: 1024px) {
  .content {
    max-width: 60%;
    padding: 0 1.5rem;
  }

  .content h2 {
    font-size: 2.2rem;
  }

  .content p {
    font-size: 1rem;
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .content {
    max-width: 100%;
    padding: 0 1rem;
    text-align: center;
  }

  .content h2 {
    font-size: 1.8rem;
  }

  .content p {
    font-size: 0.9rem;
  }

  .new-patient-form {
    width: 100%;
    text-align: center;
  }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
  .content {
    padding: 0 0.5rem;
  }

  .content h2 {
    font-size: 1.5rem;
  }

  .content p {
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 768px) {
  .content {
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 30px;
  }
}

/* Medical Form Styling */
.form-section {
  width: 100%;
  font-family: 'Segoe UI', sans-serif;
}

@media screen and (max-width: 768px) {
  .form-section {
    width: 95%;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 4px;
  }
}

@media screen and (max-width: 480px) {
  .form-section {
    width: 100%;
    margin: 0.5rem auto;
    padding: 0.75rem;
  }
}

@media screen and (max-width: 768px) {
  .form-section {
    width: 95%;
    padding: 20px;
  }
}

@media screen and (max-width: 480px) {
  .form-section {
    width: 100%;
    padding: 15px;
  }
}

h2 {
  font-size: 40px;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
  h2 {
    font-size: 28px;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  h2 {
    font-size: 24px;
  }
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #4CAF50;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .patient-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .patient-form {
    grid-template-columns: 1fr;
    gap: 1rem;
    gap: 15px;
  }
}

.form-section {
  width: 95%;
  padding: 20px;
  margin: 20px auto;
}

.form-row {
  grid-column: 1;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Responsive Adjustments */
@media screen and (max-width: 1024px) {
  .form-group {
    flex: 1 1 calc(50% - 20px);
  }
}

@media screen and (max-width: 768px) {
  .form-section {
    padding: 20px 10px;
  }

  .patient-form {
    flex-direction: column;
    gap: 15px;
  }

  .form-group {
    flex: 1 1 100%;
    min-width: auto;
  }

  label {
    font-size: 14px;
  }

  input, select, textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
}

@media screen and (max-width: 480px) {
  .form-section {
    padding: 15px 5px;
  }

  label {
    font-size: 13px;
  }

  input, select, textarea {
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* Special Responsive Elements */
.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
  align-items: flex-start;
}

.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  width: 100%;
}

.radio-group input[type='radio'], 
.checkbox-group input[type='checkbox'] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #4CAF50;
}

@media screen and (max-width: 768px) {
  .radio-group, .checkbox-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .radio-group label, .checkbox-group label {
    width: 100%;
    align-items: center;
    margin-bottom: 5px;
  }

  .radio-group input[type='radio'], 
  .checkbox-group input[type='checkbox'] {
    margin-right: 10px;
  }
}

/* Sections Responsive */
.authority-section, .identification-section {
  background: #f8f9fa;
  padding: 24px;
  border-radius: 8px;
  margin: 24px 0;
}

@media screen and (max-width: 768px) {
  .authority-section, .identification-section {
    padding: 15px;
    margin: 15px 0;
  }
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .patient-form {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-section {
    width: 95%;
    padding: 20px;
    margin: 20px auto;
  }

  .form-row {
    grid-column: 1;
  }

  label {
    font-size: 13px;
  }

  input, select, textarea {
    font-size: 14px;
    padding: 10px 12px;
  }

  .radio-group, .checkbox-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .authority-section,
  .identification-section {
    padding: 15px;
    margin: 15px 0;
  }

  .authority-checkbox label,
  .identification-option label {
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .form-section {
    width: 100%;
    padding: 15px;
    margin: 10px auto;
  }

  label {
    font-size: 12px;
  }

  input, select, textarea {
    font-size: 13px;
    padding: 8px 10px;
  }

  .authority-checkbox label,
  .identification-option label {
    font-size: 13px;
  }
}

/* Form Controls - Final Alignment */
.authority-checkbox,
.identification-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.authority-checkbox input[type="checkbox"],
.identification-option input[type="radio"] {
  margin-top: 3px;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  accent-color: #4CAF50; /* Modern browser styling */
}

.authority-checkbox label,
.identification-option label {
  flex: 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  cursor: pointer;
}

.new-patient-form {
  display: inline-block;
  background-color: #d8c400;
  padding: 0.75rem 1.5rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-align: center;
}

.new-patient-form:hover {
  background-color: #bca300;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

@media screen and (max-width: 768px) {
  .new-patient-form {
    width: 100%;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 768px) {
  .new-patient-form {
    font-size: 16px;
    padding: 12px 25px;
  }
}

@media screen and (max-width: 480px) {
  .new-patient-form {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* Section Styling */
.authority-section,
.identification-section {
  background: #f8f9fa;
  padding: 24px;
  border-radius: 8px;
  margin: 24px 0;
}

/* Consistent section styling */
/* .authority-section,
.identification-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
} */

/* Patient Authority Checkboxes */
.authority-checkbox {
  /* margin-bottom: 15px; */
}

.authority-checkbox input[type="checkbox"] {
  /* width: 18px;
  height: 18px;
  cursor: pointer; */
}

/* Signature Pad */
.signature-container {
  margin: 20px 0;
}

.signature-pad {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  width: 100%;
  height: 150px;
  background: white;
  touch-action: none; /* Prevent scrolling on touch devices */
}

.signature-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.clear-signature {
  padding: 8px 16px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.clear-signature:hover {
  background: #e0e0e0;
}

/* Buttons */
.submit-button, .clear-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.submit-button {
  background: #4CAF50;
  color: white;
  margin-top: 30px;
}

.submit-button:hover {
  background: #3d8b40;
  transform: translateY(-2px);
}

.clear-button:hover {
  background: #e0e0e0;
}

/* Identification Radio Buttons */
.identification-section {
  /* margin: 20px 0; */
}

.identification-option {
  /* margin-bottom: 10px; */
}

/* Responsive */
@media (max-width: 768px) {
  .form-section {
    padding: 25px;
  }
  
  .patient-form {
    grid-template-columns: 1fr;
  }
}

body {
  overflow-x: hidden;
}

/* Style for the navigation bar */
.navbar {
    background-color: #f8f9fa; /* Light gray background */
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Style for the Home button */
.home-button {
    text-decoration: none; /* Remove underline */
    color: #4CAF50; /* Blue text */
    font-size: 16px;
    font-weight: bold;
    padding: 8px 15px;
    border: 2px solid #4CAF50; /* Blue border */
    border-radius: 50px; /* Rounded corners */
    transition: background-color 0.3s, color 0.3s; /* Smooth hover effect */
}

/* Hover effect for the Home button */
.home-button:hover {
    background-color: #4CAF50; /* Blue background */
    color: #fff; /* White text */
}
