/* Public Pages Consistency Improvements */

/* Standardized typography system */
.public-page-container h1,
.public-page-container h2,
.public-page-container h3,
.public-page-container h4,
.public-page-container h5,
.public-page-container h6 {
    font-family: "Raleway", sans-serif !important;
    font-weight: 700;
    color: #22356f;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.public-page-container h1 { font-size: 2.5rem; }
.public-page-container h2 { font-size: 2rem; }
.public-page-container h3 { font-size: 1.75rem; }
.public-page-container h4 { font-size: 1.5rem; }
.public-page-container h5 { font-size: 1.25rem; }
.public-page-container h6 { font-size: 1rem; }

/* Standardized container patterns */
.public-page-container {
    background: var(--bs-white);
    border-radius: 6px;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Standardized page headers */
.public-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.public-page-header h2,
.public-page-header h3 {
    color: #22356f;
    font-weight: 700;
    margin-bottom: 1rem;
}

.public-page-header .lead {
    color: #6c757d;
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

/* Standardized section spacing */
.public-section {
    margin-bottom: 3rem;
}

.public-section:last-child {
    margin-bottom: 0;
}

/* Standardized card patterns */
.public-card {
    background: #f8fafc;
    border: 1px solid #e3eaf3;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
}

/* Standardized button patterns with proper text color */
.btn-primary-public {
    background: linear-gradient(135deg, #22356f 0%, #2d4a8c 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(34, 53, 111, 0.2);
    display: inline-block;
}

.btn-primary-public:hover {
    background: linear-gradient(135deg, #1e2f5f 0%, #294082 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 53, 111, 0.25);
    color: white !important;
}

.btn-primary-public:focus,
.btn-primary-public:active {
    background: linear-gradient(135deg, #1a2a55 0%, #25397a 100%);
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(34, 53, 111, 0.25);
}

.btn-secondary-public {
    background: #f8f9fa;
    border: 2px solid #22356f;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #22356f !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary-public:hover {
    background: #22356f;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 53, 111, 0.2);
}

/* Enhanced button styling for smaller buttons */
.btn-primary-public.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(34, 53, 111, 0.15);
}

.btn-primary-public.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 53, 111, 0.25);
}

/* Enhanced button styling for larger buttons */
.btn-primary-public.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 10px;
}

/* Standardized secondary button sizes */
.btn-secondary-public.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
}

.btn-secondary-public.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 10px;
}

.btn-primary-public .bi {
    font-size: 0.9em;
    vertical-align: baseline;
}

/* Medal recipient button enhancements */
/* Remove flashy shimmer effect - replace with professional hover */
.public-card .btn-primary-public {
    position: relative;
    /* Removed overflow: hidden and shimmer effect */
}

/* Form consistency and standardization */
.public-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.public-form .form-floating > label {
    color: #6c757d;
    font-weight: 500;
}

/* Standardized form control styling */
.public-form .form-control,
.public-page-container .form-control {
    border-radius: 8px;
    border: 2px solid #e3eaf3;
    transition: all 0.3s ease;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.public-form .form-control:focus,
.public-page-container .form-control:focus {
    border-color: #22356f;
    box-shadow: 0 0 0 0.2rem rgba(34, 53, 111, 0.25);
    transform: translateY(-1px);
}

/* Required field indicators */
.public-form .form-control.required,
.public-page-container .form-control.required {
    border-left: 4px solid #22356f;
}

/* Standardized placeholder styling */
.public-form .form-control::placeholder,
.public-page-container .form-control::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Image styling for public pages */
.public-page-container img {
    max-width: 100%;
    height: auto;
}

.public-page-container .img-fluid {
    border-radius: 8px;
}

/* Gallery styling */
.public-section .row .col-md-6 img {
    transition: transform 0.3s ease;
}

.public-section .row .col-md-6 img:hover {
    transform: scale(1.02);
}

/* Patron link styling */
.patron-link {
    color: #22356f !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.patron-link:hover {
    color: #1e2f5f !important;
    text-decoration: underline !important;
    transform: translateY(-1px);
}

.patron-link:before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: #22356f;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.patron-link:hover:before {
    width: 100%;
}

/* General link improvements for public pages */
.public-page-container a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item) {
    color: #22356f;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
}

.public-page-container a:not(.btn):not(.navbar-brand):not(.nav-link):not(.dropdown-item):hover {
    color: #1e2f5f;
    text-decoration: underline;
}

/* Card link styling */
.public-card a:not(.btn) {
    color: #22356f;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.public-card a:not(.btn):hover {
    color: #1e2f5f;
    border-bottom-color: #22356f;
    transform: translateY(-1px);
}

/* Individual Record Page Styling */
.info-item {
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #22356f;
}

.info-item strong {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.biography-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
}

.bio-content {
    line-height: 1.7;
    font-size: 1rem;
    color: #2d3748;
}

.bio-content p {
    margin-bottom: 1rem;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

/* Improve text rendering */
.bio-content {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Handle quotes and special characters better */
.bio-content q,
.bio-content blockquote {
    font-style: italic;
    border-left: 4px solid #22356f;
    padding-left: 1rem;
    margin: 1rem 0;
}

/* Ensure proper word wrapping for long text */
.bio-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.medal-link {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
}

.medal-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 16px rgba(34, 53, 111, 0.2);
}

.medal-link img {
    transition: all 0.3s ease;
}

/* Media gallery enhancements */
.public-card img {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.public-card img:hover {
    transform: scale(1.02);
}

/* Special styling for KIA records */
.text-danger {
    font-weight: 600;
}

/* Special styling for Hall of Heroes inductees */
.text-success {
    font-weight: 600;
}

/* Breadcrumb styling */
.breadcrumb {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: #22356f;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #1e2f5f;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .public-page-container {
        padding: 1.5rem 1rem;
    /* Keep container centered on small screens */
    margin: 0.5rem auto;
    }
    
    .public-page-header h2,
    .public-page-header h3 {
        font-size: 1.75rem;
    }
    
    .public-page-header .lead {
        font-size: 1rem;
    }
}

/* Navigation responsive fixes */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .dropdown-menu {
        text-align: left;
    }
}

/* Donate page button alignment/sizing */
.public-donate-options .donate-option-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* unify radius with primary-public */
    font-weight: 600; /* normalize weight between brands */
}

/* Consistent icon spacing */
.public-donate-options .donate-option-btn .bi {
    font-size: 1rem;
}

/* Make each option (form/anchor) a flex item with equal height behavior */
.public-donate-options > * {
    display: flex;
    align-items: stretch;
}
.public-donate-options > * .donate-option-btn {
    height: 100%;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    /* At LG widths, keep donate buttons visually consistent */
    .public-donate-options { gap: 1rem; align-items: stretch; justify-content: center; }
    .public-donate-options > * { flex: 0 1 auto; }
    .public-donate-options .donate-option-btn {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
        line-height: 1.2;
        min-height: 3.1rem; /* enforce consistent height */
    min-width: 260px; /* keep widths similar without feeling oversized */
    }
    .public-donate-options .btn-success { border-width: 0; }
}

@media (max-width: 576px) {
    .navbar-brand img {
        width: 45px;
        height: 45px;
    }
    
    .btn.donate-button {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-outline-light {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Enhanced image consistency for gallery sections */
.ratio img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
}

/* Ensure ratio containers are exactly the same size */
.ratio.ratio-4x3 {
    aspect-ratio: 4/3 !important;
    position: relative;
    overflow: hidden;
}

/* Remove any conflicting Bootstrap image utilities when inside ratio containers */
.ratio .img-fluid {
    max-width: none !important;
    height: 100% !important;
}

/* ========================================
   STANDARDIZED INTERACTION EFFECTS
   ======================================== */

/* Standardized link hover effects */
.standard-link-hover {
    transition: all 0.3s ease;
    text-decoration: none;
}

.standard-link-hover:hover {
    color: #1e2f5f !important;
    transform: translateY(-1px);
    text-decoration: underline;
}

/* Standardized card hover effects */
.standard-card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.standard-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Apply standard hover to news cards */
.public-page-container .card {
    transition: all 0.3s ease;
}

.public-page-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

/* ========================================
   SPACING CONSISTENCY SYSTEM
   ======================================== */

/* Standardized spacing classes */
.spacing-xs { margin: 0.5rem; }
.spacing-sm { margin: 1rem; }
.spacing-md { margin: 1.5rem; }
.spacing-lg { margin: 2rem; }
.spacing-xl { margin: 3rem; }

/* Vertical spacing variants */
.spacing-top-xs { margin-top: 0.5rem; }
.spacing-top-sm { margin-top: 1rem; }
.spacing-top-md { margin-top: 1.5rem; }
.spacing-top-lg { margin-top: 2rem; }
.spacing-top-xl { margin-top: 3rem; }

.spacing-bottom-xs { margin-bottom: 0.5rem; }
.spacing-bottom-sm { margin-bottom: 1rem; }
.spacing-bottom-md { margin-bottom: 1.5rem; }
.spacing-bottom-lg { margin-bottom: 2rem; }
.spacing-bottom-xl { margin-bottom: 3rem; }

/* ========================================
   ANIMATION STANDARDIZATION
   ======================================== */

/* Consistent transition durations */
.transition-fast { transition: all 0.15s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow { transition: all 0.5s ease; }

/* Consistent transform effects */
.hover-lift:hover { transform: translateY(-2px); }
.hover-lift-small:hover { transform: translateY(-1px); }
.hover-lift-large:hover { transform: translateY(-4px); }
.hover-scale:hover { transform: scale(1.02); }
.hover-scale-small:hover { transform: scale(1.01); }

/* Apply consistent shadow system */
.shadow-subtle { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.shadow-normal { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.shadow-strong { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.shadow-hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
