/* Futura PT font loaded from local files */
@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaCyrillicBook.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaCyrillicMedium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaCyrillicDemi.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaCyrillicBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Inter', 'Poppins', 'system-ui', 'Segoe UI', 'Arial', sans-serif;
    font-weight: 300;
    background-color: #181A1B;
    color: #F5F5F5;
}

.font-futura {
    font-family: 'Futura PT', 'Arial', sans-serif;
}

.bg-main {
    background-color: #181A1B !important;
}
.bg-card-dark {
    background-color: #232324 !important;
}
.bg-card-mid {
    background-color: #29292B !important;
}
.bg-card-light {
    background-color: #323234 !important;
}
.text-main {
    color: #F5F5F5 !important;
}
.text-muted {
    color: #B0B3B8 !important;
}
.text-heading {
    color: #F5F5F5 !important;
    font-weight: 500;
}

.raf-blue, .bg-raf-blue, .text-raf-blue, .border-raf-blue {
    background: none !important;
    color: inherit !important;
    border-color: #232324 !important;
}
.raf-red, .bg-raf-red, .text-raf-red {
    background: none !important;
    color: #E53935 !important;
}
.raf-yellow, .bg-raf-yellow, .text-raf-yellow {
    background: none !important;
    color: #FFC107 !important;
}
.raf-white, .bg-raf-white, .text-raf-white {
    background: none !important;
    color: #F5F5F5 !important;
}

.section-padding {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.gradient-overlay {
    background: linear-gradient(to bottom, rgba(24,26,27,0.1), rgba(24,26,27,0.8));
}
.navbar-scrolled {
    background-color: #232324 !important;
    transition: background-color 0.3s ease;
}
h1, h2, h3 {
    font-weight: 500;
    color: #F5F5F5;
    letter-spacing: -0.5px;
}
p, a {
    font-weight: 300;
}
a {
    color: #FFC107;
    transition: color 0.2s;
}
a:hover {
    color: #E53935;
}
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 26, 27, 0.8);
    z-index: 1000;
    overflow-y: auto;
}
.popup-content {
    background-color: #232324;
    color: #F5F5F5;
    margin: 5% auto;
    padding: 2rem;
    padding-bottom: 1rem;
    padding-right: 1rem;
    border-radius: 0.5rem;
    position: relative;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Scrollable content areas with proper gutter */
.popup-content .flex-1 {
    padding-right: 1rem;
    margin-right: -1rem;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

.popup-content .close {
    color: #F5F5F5;
    font-size: 28px;
    font-weight: bold;
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    cursor: pointer;
    z-index: 1001;
    background-color: rgba(35, 35, 36, 0.95);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.popup-content p {
    overflow: hidden;
}
.card-shadow, .shadow-lg, .hover\:shadow-xl, .shadow-md {
    box-shadow: none !important;
}
.about-image {
    max-width: 600px;
}
.aspect-ratio-3-2 {
    position: relative;
    width: 100% !important;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

/* Responsive aspect ratios for hero image */
@media (max-width: 767px) {
    .aspect-ratio-3-2 {
        aspect-ratio: 2 / 1; /* More square/compact on mobile */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .aspect-ratio-3-2 {
        aspect-ratio: 5 / 3; /* Slightly less tall on tablets */
    }
}
.aspect-ratio-3-2 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Override for logo in hero section */
.aspect-ratio-3-2 .absolute img[alt*="Logo"] {
    position: static !important;
    width: 50vw !important;
    height: auto !important;
    object-fit: contain !important;
}
#mobile-menu {
    background-color: #232324 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    border-top: none !important;
}
input, textarea, select {
    background: #232324;
    color: #F5F5F5;
    border: 1px solid #323234;
}
input::placeholder {
    color: #B0B3B8;
}
button, .bg-raf-yellow {
    background-color: #FFC107 !important;
    color: #181A1B !important;
    border: none;
    font-weight: 500;
}
button:hover, .hover-raf-yellow-darker:hover {
    background-color: #e0a800 !important;
    color: #232324 !important;
}
.rounded-lg, .rounded, .rounded-full {
    border-radius: 0.25rem !important;
}
footer, nav {
    background-color: #181A1B !important;
    color: #F5F5F5 !important;
}
footer a, nav a {
    color: #FFC107 !important;
}
footer a:hover, nav a:hover {
    color: #E53935 !important;
}
.material-icons {
    color: #FFC107 !important;
}
.trustee-hex-img, .trustee-hex, .trustee-avatar {
  mask-image: none !important;
  -webkit-mask-image: none !important;
  clip-path: none !important;
}
.bg-raf-red {
  background-color: #C0392B !important;
}
.bg-raf-blue {
  background-color: #3A539B !important;
}
.text-raf-white {
  color: #FFFFFF !important;
}
.hover-raf-blue-darker:hover {
  background-color: #2c4079 !important;
}
.rounded-full {
  border-radius: 9999px !important;
}
.bg-raf-yellow {
  background-color: #FFC107 !important;
}
.hover-raf-red-darker:hover {
  background-color: #b91c1c !important; /* matches main image Donate Now button hover */
}
.navbar-link {
  color: #FFFFFF !important;
  transition: color 0.2s;
}
.navbar-link:hover {
  color: #D1D5DB !important;
}
.navbar-link .text-white {
  color: inherit !important;
}
.navbar-link:hover .text-white {
  color: inherit !important;
}
/* Mobile navbar menu link hover color */
#mobile-menu a:hover {
    color: #F3F4F6 !important; /* light grey */
}

/* Consistent Donate button hover color */
.hover-raf-red-darker:hover {
    background-color: #b91c1c !important; /* matches main image Donate Now button hover */
}
.bg-raf-red:hover, .hover-raf-red-darker:hover, .bg-raf-red:focus, .hover-raf-red-darker:focus {
    background-color: #b91c1c !important;
    color: #181A1B !important;
}
#mobile-menu .bg-raf-red:hover, #mobile-menu .hover-raf-red-darker:hover, #mobile-menu .bg-raf-red:focus, #mobile-menu .hover-raf-red-darker:focus {
    color: #181A1B !important;
}

/* Stripe Payment Element custom styling */
.StripeElement {
    background-color: #1f1f1f;
    border-radius: 8px;
}

/* Amount button styling */
.amount-btn {
    background: #232324;
    color: #f5f5f5;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-weight: 500;
    font-size: 0.98rem;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 64px;
    max-width: 90px;
    text-align: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.amount-btn.bg-raf-red {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.amount-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #facc15;
}

/* Modal specific styling */
#donationAmountModal .popup-content {
    max-width: 700px;
    width: 95%;
    padding: 2rem;
}

#donationAmountModal .popup-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

#donationAmountModal .popup-content label {
    margin-bottom: 1rem;
    display: block;
}

#donationPopup .popup-content {
    max-width: 600px;
    width: 95%;
    padding: 2rem;
}

#donationPopup .popup-content form {
    width: 100%;
}

#donationPopup .popup-content input,
#donationPopup .popup-content label {
    width: 100%;
    display: block;
}

@media (max-width: 768px) {
    #donationPopup .popup-content {
        padding: 1.5rem;
        padding-bottom: 1rem;
        margin-bottom: 0;
    }
    
    #donationPopup .popup-content form {
        margin-bottom: 0;
    }
    
    #donationPopup .popup-content button[type="submit"] {
        margin-bottom: 0;
    }
    
    .popup-content {
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    #donationPopup .popup-content {
        padding: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 0;
    }
    
    #donationPopup .popup-content input {
        margin-bottom: 0.5rem;
    }
    
    #donationPopup .popup-content button[type="submit"] {
        margin-bottom: 0;
    }
    
    .popup-content {
        padding-bottom: 1rem;
    }
}

#custom-amount-wrapper-step1 {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #232324;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#custom-amount-step1 {
    background: #ffffff !important;
    color: #232324 !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
}

#payment-element {
    /* Let Stripe handle all styling with their SDK defaults */
    margin: 0;
    min-height: 200px;
    margin-bottom: 1.5rem;
    max-width: 100%;
    overflow: hidden;
}

/* Remove custom iframe styling to let Stripe handle it */
#payment-element iframe {
    border: none;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
}

/* Custom Burger Menu Styling */
#mobile-menu-toggle {
    background: transparent !important;
    border: none;
    padding: 8px;
    cursor: pointer;
}

#mobile-menu-toggle .material-icons {
    color: #FA9C28 !important; /* RAF Yellow */
    font-size: 24px;
    transition: color 0.3s ease;
}

#mobile-menu-toggle:hover .material-icons {
    color: #FFB347 !important; /* Lighter yellow on hover */
}

#mobile-menu-toggle:active .material-icons,
#mobile-menu-toggle.active .material-icons {
    color: #E6851F !important; /* Darker yellow when active/pressed */
}

#card-errors {
    display: none;
    margin: 0.25rem 0;
}

/* Payment result modal */
#paymentResultModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.6);
}

#paymentResultModal.popup {
    display: flex;
    align-items: center;
    justify-content: center;
}

#paymentResultModal .popup-content {
    margin: 0;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

/* Trustee section styling */
#trustees {
    background-color: #232324;
}

/* Trustee popup styling */
.trustee-popup .popup-content {
    background-color: #232324;
    color: #F5F5F5;
    max-width: 700px;
    width: 90%;
}

/* Trustee name colors - More specific to override Tailwind */
.trustee-mark,
span.trustee-mark,
h2.trustee-mark,
p.trustee-mark,
.text-xl.trustee-mark,
.font-bold.trustee-mark,
.font-light.trustee-mark {
    color: #2E8B57 !important;
}

.trustee-beth,
span.trustee-beth,
h2.trustee-beth,
p.trustee-beth,
.text-xl.trustee-beth,
.font-bold.trustee-beth,
.font-light.trustee-beth {
    color: #E57373 !important;
}

.trustee-peter,
span.trustee-peter,
h2.trustee-peter,
p.trustee-peter,
.text-xl.trustee-peter,
.font-bold.trustee-peter,
.font-light.trustee-peter {
    color: #A0522D !important;
}

.trustee-james,
span.trustee-james,
h2.trustee-james,
p.trustee-james,
.text-xl.trustee-james,
.font-bold.trustee-james,
.font-light.trustee-james {
    color: #1E88E5 !important;
}

/* Donation form input styling */
#fullname, #address, #postcode {
    background: #ffffff !important;
    color: #232324 !important;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Autofill styling */
input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

input::-moz-calendar-picker-indicator {
    filter: invert(1);
}

input::-webkit-autofill,
input::-webkit-autofill:hover,
input::-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f5f5;
    -webkit-box-shadow: 0 0 0px 1000px #232324 inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Gift Aid input fields */
#fullname, #address, #postcode {
    background-color: #ffffff !important;
    color: #232324 !important;
}

#fullname::placeholder, #address::placeholder, #postcode::placeholder {
    color: #6b7280 !important;
}

/* Amount buttons responsive styling */
#amount-buttons-step1 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
}

.amount-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 60px;
    max-width: 80px;
    flex-shrink: 0;
    margin: 0;
    text-align: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (max-width: 480px) {
    #amount-buttons-step1 {
        gap: 0.25rem;
        padding: 0.5rem 0;
    }
    
    .amount-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 50px;
        max-width: 70px;
    }
}

@media (min-width: 768px) {
    #amount-buttons-step1 {
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .amount-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-width: 80px;
        max-width: 100px;
    }
}

@media (min-width: 1024px) {
    #amount-buttons-step1 {
        gap: 1rem;
    }
    
    .amount-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-width: 80px;
        max-width: 100px;
    }
}

/* Scrollbar styling */
#amount-buttons {
    scrollbar-width: thin;
    scrollbar-color: #b0b3b8 #232324;
}

#amount-buttons::-webkit-scrollbar {
    height: 6px;
}

#amount-buttons::-webkit-scrollbar-thumb {
    background: #b0b3b8;
    border-radius: 4px;
}

.amount-btn:focus,
.amount-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Footer social icon styling */
.footer-social-icon, .footer-social-icon svg {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* News feed styling - Responsive and card-based */
#news-feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

#news-feed .bg-card-mid {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#news-feed .aspect-square {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    background: #232324;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

#news-feed .aspect-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive grid layout */
@media (min-width: 768px) {
    #news-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    #news-feed {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Ensure cards have consistent height */
#news-feed .bg-card-mid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

#news-feed .bg-card-mid h3 {
    flex-grow: 0;
    margin-bottom: 0.5rem;
}

#news-feed .bg-card-mid p {
    flex-grow: 0;
    margin-bottom: 0.5rem;
}

#news-feed .bg-card-mid a {
    flex-grow: 0;
    margin-top: auto;
}

/* Navbar height */
#navbar {
    height: 56px;
    padding: 0.5rem 0;
    background-color: #000000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

@media (min-width: 768px) {
    #navbar {
        padding: 0.75rem 0;
        background-color: #000000 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
}

.navbar-spacer {
    height: 56px;
}

/* Donate button height */
.donate-btn {
    height: 40px;
}

/* Payment result icon */
.payment-result-icon {
    font-size: 48px;
}

/* Footer email link */
.footer-email-link {
    color: #9ca3af !important;
    font-size: 0.875rem;
    font-weight: 300;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-email-link:hover,
.footer-email-link:focus {
    color: #fff !important;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .expanded-image {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
    }
    .popup-content p {
        overflow: visible;
    }
}

/* Footer styling to replace removed Tailwind classes */
footer p,
footer span,
footer a {
    color: #9ca3af;
}

footer a:hover {
    color: #fff;
}

footer .material-icons {
    color: #9ca3af;
}

footer .social-icons svg {
    color: #9ca3af;
}

footer .social-icons svg:hover {
    color: #fff;
}

/* Trustee email links */
.trustee-email-link {
    color: #9ca3af !important;
    transition: color 0.2s;
}

.trustee-email-link:hover {
    color: #fff !important;
}

/* Footer copyright text */
.footer-copyright {
    color: #9ca3af;
}

/* Hide hero buttons on medium screens and below (show only on large screens and up) */
@media (max-width: 1023px) {
    .hero-text-content a,
    .hero-text-content button {
        display: none;
    }
}

/* Gift Aid checkbox styling */
#donation-form label[for="giftaid"],
#donation-form .flex.items-center,
#donationPopup .flex.items-center,
#donationPopup label.flex.items-center {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.75rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
}

#donation-form input[type="checkbox"],
#donationPopup input[type="checkbox"] {
    flex-shrink: 0 !important;
    margin: 0 !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    order: -1 !important;
}

#donation-form label span,
#donationPopup label span {
    flex: 1 !important;
    line-height: 1.4 !important;
    order: 1 !important;
}

/* Override for logo in hero section */
.aspect-ratio-3-2 .absolute img[alt*="Logo"] {
  position: static;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 25vw;
  object-fit: contain;
}

.hero-content {
  padding-top: 2%;
  padding-bottom: 2%;
}

/* On small screens, reposition hero content below the image */
@media (max-width: 767px) {
  .hero-content {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    padding: 1rem 1rem 2rem 1rem;
  }

  .hero-text-content {
    text-align: center;
    margin-top: 1rem;
    display: block !important; /* Ensure it's visible */
  }

  .hero-text-content h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
    display: block !important; /* Ensure it's visible */
  }

  .hero-text-content p {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem;
    display: block !important; /* Ensure it's visible */
  }

  .hero-text-content a,
  .hero-text-content button {
    display: none !important; /* Hide buttons in hero-text-content on small screens */
  }

  /* Hide logo in hero-content on small screens */
  .hero-content img[alt*="Mark Long Trust Logo"] {
    display: none !important;
  }

  /* Hide hero-text-content in overlay on small screens */
  .hero-content .hero-text-content {
    display: none !important;
  }

  .hero-content div,
  .hero-content img {
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Ensure logo is visible on small screens - very specific rule */
  .hero-content div div img[alt*="Mark Long Trust Logo"],
  .hero-content img[alt*="Mark Long Trust Logo"] {
    max-width: 50vw !important; /* 50% of viewport width on small screens */
    width: 50vw !important;
    height: auto !important;
    margin: 0 auto 1rem auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: 1 !important;
  }

  /* Specific logo override */
  img[alt*="Mark Long Trust Logo"] {
    display: block !important;
    max-width: 50vw !important; /* 50% of viewport width on small screens */
    width: 50vw !important;
    height: auto !important;
    margin: 0 auto 1rem auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
  }
}

#donate-btn {
  margin-top: 0 !important;
}

/* Ensure donation amount buttons are full width on all screen sizes */
#amount-buttons-step1 .amount-btn {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.75rem 1rem !important;
  margin: 0 !important;
  min-height: 3rem !important;
}

/* Force donation amount buttons to stack vertically and fill full width on small screens only */
@media (max-width: 767px) {
  #amount-buttons-step1 {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: none !important;
  }

  #amount-buttons-step1 .amount-btn {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 1rem 1.5rem !important;
    margin: 0 !important;
    min-height: 3.5rem !important;
  }
}