/* =========================
   Font Declarations
   ========================= */
@font-face {
    font-family: 'Copperplate';
    src: url('Copperplate/Copperplate-Light.woff2') format('woff2'),
        url('Copperplate/Copperplate-Light.woff') format('woff'),
        url('Copperplate/Copperplate-Light-01.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Copperplate';
    src: url('Copperplate/Copperplate.woff2') format('woff2'),
        url('Copperplate/Copperplate.woff') format('woff'),
        url('Copperplate/Copperplate-03.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Copperplate';
    src: url('Copperplate/Copperplate-Bold.woff2') format('woff2'),
        url('Copperplate/Copperplate-Bold.woff') format('woff'),
        url('Copperplate/Copperplate-Bold-02.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* =========================
   Base styles and resets
   ========================= */
:root {
  --blue: #225272;
  --green: #5c7222;
  --light-blue: #6fb1c8;
  --gray: #d9d9d9;
  --white: #ffffff;
  --black: #000000;
  --text-dark: #333333;
  
  --font-primary: "AvenirNext-Regular", sans-serif;
  --font-header: "AvenirNext-DemiBold", sans-serif;
  --font-header-italic: "AvenirNext-DemiBoldItalic", sans-serif;
  --font-bold: "AvenirNext-Bold", sans-serif;
  --font-copperplate: "Copperplate", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  line-height: 1.5;
  color: var(--black);
}

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

ul, ol {
  list-style-position: inside;
}

strong {
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}




/* =========================
   Banner & Header
   ========================= */
.banner {
  background-color: var(--blue);
  width: 100%;
  padding: 0.25rem 0;
}

.banner-text {
  color: white;
  text-align: center;
  font-family: var(--font-copperplate);
  font-size: 1.25rem;
  font-weight: 400;
  max-width: 900px;
  margin: 0 auto;
}

.header {
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  max-width: 22rem;
  height: auto;
}

/* =========================
   Hero Section (Mobile First)
   ========================= */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--blue);
  border-radius: 1.5rem;
  overflow: hidden;
  background-image: url('rockland-map0.png');
  background-position: bottom 50% right 10%;
  background-repeat: no-repeat;
}

.hero-image,
.contact-us-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.headshot {
  width: 25.85rem;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.contact-us-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contact-us-form {
  background-color: rgba(92, 114, 34, 0.72);
  padding: 2rem 1rem;
  border-radius: 1rem;
  width: 100%;
  margin-bottom: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  max-width: 600px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-group.email-group,
.form-group.message-group {
  width: 100%;
  max-width: 100%;
  flex-basis: 100%;
}

/* =========================
   Form Elements
   ========================= */
.contact-us-form label {
  display: block;
  color: var(--white);
  font-family: var(--font-bold);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.contact-us-form input,
.contact-us-form textarea {
  width: 100%;
  background: var(--white);
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-primary);
  font-size: 1.125rem;
  color: var(--text-dark);
  box-sizing: border-box;
}

.contact-us-form input {
  height: 3rem;
}

.contact-us-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-us-form button {
  background: #6fb1c8;
  color: var(--white);
  font-family: var(--font-bold);
  font-size: 1.25rem;
  text-align: center;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  width: auto;
  min-width: 12rem;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
}

.contact-us-form button:hover {
  background-color: #5a9ab0;
}

.hero-map img {
  width: 100%;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  opacity: 0.2;
  object-fit: cover;
}

/* =========================
   Intro, Bio, Image, Platform, Footer
   ========================= */
.intro-section {
  padding: 3rem 1.5rem;
  max-width: 75rem;
  margin: 0 auto;
}

.intro-text p {
  font-size: 1.5rem;
  line-height: 2.2;
  margin-bottom: 2rem;
}

.intro-lead {
  color: #000000;
  font-family: "AvenirNext-Regular", sans-serif;
  font-size: 61px;
  line-height: 41px;
  font-weight: 500;
}

.top-text-font {
  color: #000000;
  font-size: 24px;
  line-height: 41px;
  font-weight: 500;
}

.bio-section {
  background-color: var(--blue);
  color: var(--white);
  padding: 3rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bio-title,
.bio-subtitle {
  text-align: center;
}

.bio-title {
  font-family: var(--font-header);
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

.bio-subtitle {
  font-family: var(--font-header-italic);
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 3rem;
}

.bio-content {
  max-width: 75rem;
  margin: 0 auto;
  text-align: left;
  line-height: 2;
}

.bio-content p {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.image-section {
  padding: 2rem 0;
}

.full-width-image {
  width: 100%;
  max-width: 85rem;
  margin: 0 auto;
  display: block;
  border-radius: 1rem;
  object-fit: cover;
  aspect-ratio: 1346.39/727;
}

.platform-section {
  padding: 3rem 1.5rem;
  max-width: 76rem;
  margin: 0 auto;
}

.platform-list {
  color: var(--blue);
  list-style-type: none;
}

.platform-list li {
  margin-bottom: 2.5rem;
}

.platform-list h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.platform-list p {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.7;
  padding-left: 1.5rem;
}

.footer {
  padding: 3rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo img {
  max-width: 25rem;
}

/* =========================
   Donate button styles
   ========================= */
.donate-button-container {
  position: absolute;
  top: 4rem;
  right: 2rem;
  z-index: 10;
}

.donate-button {
  background: #6fb1c8;
  color: var(--white);
  font-family: var(--font-bold);
  font-size: 1.25rem;
  text-align: center;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  border: none;
  width: auto;
  min-width: 8rem;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-block;
  text-decoration: none;
}

.donate-button:hover {
  background-color: #5a9ab0;
}

/* =========================
   Hide/show elements based on screen size
   ========================= */
.desktop-only {
  display: none; /* Hide by default (mobile-first) */
}

.mobile-only {
  display: block; /* Show by default (mobile-first) */
}

@media (min-width: 768px) {
  .desktop-only {
    display: block; /* Show on desktop */
  }
  
  .mobile-only {
    display: none; /* Hide on desktop */
  }
}

/* =========================
   Tablet/Desktop Layout (min-width: 768px)
   ========================= */
@media (min-width: 768px) {
  .hero-section {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
  }
  .hero-image {
    flex: 1 1 40%;
    max-width: 40%;
    min-width: 180px;
    margin-bottom: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .contact-us-section {
    flex: 1 1 60%;
    max-width: 60%;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .contact-us-form {
    max-width: 600px;
    padding: 4rem 4rem 2rem 2rem;
  }
  .form-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .form-group {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
    min-width: 0;
  }
  
  .banner-text .mobile-bold {
    font-weight: 400;
  }
  .banner-text .mobile-break {
    display: none;
  }
}

/* =========================
   Large Desktop (min-width: 1440px)
   ========================= */
@media (min-width: 1440px) {
  .hero-section {
    max-width: 1400px;
    margin: 0 auto;
    gap: 3rem;
  }
  .hero-image {
    flex: 1 1 45%;
    max-width: 45%;
  }
  .contact-us-section {
    flex: 1 1 55%;
    max-width: 55%;
  }
  .contact-us-form {
    max-width: 700px;
    padding: 5rem 5rem 2.5rem 2.5rem;
  }
}

/* =========================
   Font-size scaling (min-width: 992px)
   ========================= */
@media (min-width: 992px) {
  .form-group {
    flex: 1 1 48%;
    max-width: 48%;
    min-width: 0;
  }
  .banner-text { font-size: 1.35rem; }
  .intro-text p { font-size: 1.75rem; }
  .intro-lead { font-size: 4rem; }
  .bio-title { font-size: 4rem; }
  .bio-subtitle { font-size: 2.25rem; }
  .bio-content p { font-size: 1.75rem; }
  .platform-list h3 { font-size: 2.1rem; }
  .platform-list p { font-size: 1.6rem; padding-left: 4rem; }
}

.caption {
  text-align: center;
  margin: 1rem auto 2rem auto;
  max-width: 85rem;
  color: #333;
  font-size: 1.05rem;
  line-height: 1.5;
}



/* Mobile-only bold and break for banner text */
@media (max-width: 767px) {
  .banner-text .mobile-bold {
    font-weight: bold;
  }
  .banner-text .mobile-break {
    display: block;
    height: 0;
    width: 100%;
  }
  
  /* Responsive donate button positioning for mobile - below the headshot image */
  .donate-button-container {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 1rem;
    order: 2; /* Place it after the hero-image */
  }
  
  .donate-button {
    font-size: 1.1rem;
    padding: 0.6rem 1.5rem;
    min-width: 8rem;
  }
}

@media (min-width: 768px) {
  .banner-text .mobile-bold {
    font-weight: 400;
  }
  .banner-text .mobile-break {
    display: none;
  }
  
  /* Restore desktop donate button styling */
  .donate-button-container.desktop-only {
    position: absolute;
    top: 6rem;
    right: 2rem;
    z-index: 10;
  }
}

/* =========================
   Donate Modal Styling
   ========================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  padding: 2rem 2rem 1.5rem;
  border-radius: 8px;
  max-width: 550px;
  width: 90%;
  position: relative;
}

/* Button in modal uses the same base styles */
.modal-actions .donate-button {
  background-color: #5c7222;
  box-shadow: none;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: #999999;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-size: 18px;
  font-weight: bold;
  border: none;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
  background-color: #aaaaaa;
}

.modal-content h2 {
  color: var(--blue);
  font-family: var(--font-copperplate);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.modal-intro {
  margin-bottom: 1.5rem;
}

.modal-intro p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  text-align: center;
}

.modal-form-group {
  margin-bottom: 1.25rem;
}

.modal-error {
  color: #d32f2f;
  margin: 1rem 0;
  font-size: 0.875rem;
  text-align: center;
}

.modal-actions {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

/* Amount selection styling */
.amount-header {
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--text-dark);
  text-align: center;
}

.benefit-text {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-style: normal;
  color: var(--text-dark);
  text-align: center;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.amount-option {
  background-color: #75AECC;
  box-shadow: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 1rem 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amount-option:hover, .amount-option.selected {
  background-color: #5D98B3;
}

.amount-option.selected {
  color: white;
  border: 2px solid #225272;
  background-color: #225272;
  box-shadow: 0 0 0 2px #225272;
  transform: scale(1.03);
}

/* Make custom amount container look more like a button */
.custom-amount-container {
  position: relative;
  background-color: #75AECC;
  box-shadow: 0 1px 3px #75AECC;
  min-height: 3.75rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.custom-amount-container:hover {
  background-color: #5D98B3;
}

.custom-amount-container.selected {
  color: white;
  border: 2px solid #75AECC;
  background-color: #75AECC;
  box-shadow: 0 0 0 2px #75AECC;
}

.dollar-sign {
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
  position: absolute;
  left: 4%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.custom-amount {
  width: 70%;
  height: 60%;
  padding: 0.25rem;
  border: none;
  border-radius: 3px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dark);
  background: white;
  text-align: left;
  position: relative;
  z-index: 1;
  -moz-appearance: textfield; /* Firefox */
  appearance: textfield; /* Standard */
}

/* Remove spinner buttons for Chrome, Safari, Edge, Opera */
.custom-amount::-webkit-outer-spin-button,
.custom-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Focus styling */
.custom-amount:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Contribution rules section */
.contribution-rules {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #333;
}

.contribution-rules hr {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  border: 0;
  border-top: 1px solid #ddd;
}

.contribution-rules h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

.contribution-rules ol {
  padding-left: 1.5rem;
  line-height: 1.5;
}

.contribution-rules li {
  margin-bottom: 0.75rem;
}

/* Modal Loading State */
.donate-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Modal display */
#donate-modal {
  display: none;
}

#donate-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="text"][inputmode="numeric"]::-webkit-inner-spin-button,
input[type="text"][inputmode="numeric"]::-webkit-outer-spin-button,
input[type="text"][inputmode="decimal"]::-webkit-inner-spin-button,
input[type="text"][inputmode="decimal"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* For Firefox and standard browsers */
input[type="number"],
input[type="text"][inputmode="numeric"],
input[type="text"][inputmode="decimal"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* =========================
   Mobile Styles (Small Screens)
   ========================= */
@media (max-width: 375px) {
  /* Make scrollable modal */
  .modal-content {
    padding: 1.25rem;
    max-height: 90vh; /* Limit height to enable scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
  }
  
  /* Hide webkit scrollbars */
  .modal-content::-webkit-scrollbar {
    display: none;
  }
  
  /* Single column layout for buttons */
  .amount-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 0.75rem; /* Slightly increased gap for better visual separation */
    width: 85%; /* Make buttons not full width */
    margin-left: auto;
    margin-right: auto;
  }
  
  .amount-option, 
  .custom-amount-container {
    min-height: 3.25rem; /* Slightly reduced height for a more compact layout */
    padding: 0.75rem 0.25rem; /* Adjusted padding */
    width: 100%; /* Ensure proper width inside the grid */
  }
  
  /* Adjust donate button to not be full width */
  .modal-actions {
    display: flex;
    justify-content: center;
  }
  
  .modal-actions .donate-button {
    width: auto;
    min-width: 150px;
    max-width: 85%;
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  /* Reduce some font sizes for better fit */
  .amount-option {
    font-size: 1.125rem;
  }
  
  .modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .modal-intro p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .amount-header {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .benefit-text {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
}


@media (min-width: 1024px) {
    .donate-button-container.desktop-only {
        right: 1rem;
    }
}

@media (min-width: 1440px) {
    .donate-button-container.desktop-only {
        right: 2rem;
    }
}
@media (min-width: 1920px) {
    .donate-button-container.desktop-only {
        right: 16rem;
    }
}