:root {
    --burgundy: #9E1B32;
    --burgundy-dark: #5D0000;
    --gold: #D4AF37;
    --gold-light: #E8C547;
    --white: #FFFFFF;
    --light-bg: #F8F8F8;
    --gray-light: #E8E8E8;
    --gray-medium: #CCCCCC;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --shadow: 0 2px 8px rgba(158, 27, 50, 0.15);
    --shadow-md: 0 4px 12px rgba(158, 27, 50, 0.2);
    --shadow-lg: 0 6px 16px rgba(158, 27, 50, 0.25);
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-y: scroll;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    min-height: 400px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER ==================== */
.header {
    background-color: var(--white);
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    border-bottom: 2px solid var(--burgundy);
    width: 100%;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-section img {
    max-height: 140px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(158, 27, 50, 0.3));
    transition: var(--transition);
}

.logo-section img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.4));
}

.main-nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--burgundy);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--burgundy);
}

.main-nav a:hover:after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    top: 100%;
    left: 0;
    border-top: 3px solid var(--burgundy);
}

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

.dropdown-menu a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--burgundy);
    padding-left: 18px;
}

.donate-btn {
    background: var(--burgundy);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
}

.donate-btn:hover {
    background: var(--burgundy-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    background: var(--burgundy);
    color: var(--text-light);
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 3px;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    background: var(--burgundy);
    color: var(--text-light);
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--burgundy-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--burgundy);
    border: 2px solid var(--burgundy);
    padding: 10px 26px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--burgundy);
    color: var(--text-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* ==================== CONTENT SECTIONS ==================== */
.section-title {
    color: var(--burgundy);
    font-size: 28px;
    font-weight: 700;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--gold);
    position: relative;
}

.page-title {
    color: var(--burgundy);
    font-size: 38px;
    font-weight: 900;
    margin: 20px 0;
    line-height: 1.2;
}

.page-intro {
    color: var(--gray-medium);
    font-size: 16px;
    max-width: 800px;
    margin-bottom: 30px;
    line-height: 1.7;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.grid-item {
    background: #F0F0F0;
    padding: 25px;
    border-radius: 3px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--burgundy);
    transition: var(--transition);
}

.grid-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.grid-item h3 {
    color: #5D0000;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
}

.grid-item p {
    color: #2C2C2C;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
    font-weight: 500;
}

.grid-item strong {
    color: #5D0000;
    font-weight: 700;
}

.card {
    background: #F0F0F0;
    padding: 25px;
    border-radius: 3px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--burgundy);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card h3 {
    color: #5D0000;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
}

.card p {
    color: #2C2C2C;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
    font-weight: 500;
}

.card a {
    color: #9E1B32;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.card a:hover {
    color: #5D0000;
}

/* ==================== INFO BOX ==================== */
.info-box {
    background: #F0F0F0;
    border-left: 4px solid var(--burgundy);
    padding: 25px;
    border-radius: 3px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

.info-box h3 {
    color: #5D0000;
    font-size: 18px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.info-box p {
    color: #2C2C2C;
    font-size: 14px;
    margin: 0;
    line-height: 1.7;
    font-weight: 500;
}

.info-box ul li {
    color: #2C2C2C;
    font-weight: 500;
}

.info-box strong {
    color: #5D0000;
    font-weight: 700;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--burgundy-dark);
    color: var(--text-light);
    padding: 50px 0 20px;
    border-top: 3px solid var(--gold);
    margin-top: 0;
    width: 100%;
    clear: both;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--gold);
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-section strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: rgba(255, 255, 255, 1);
}

footer a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
}

footer a:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    padding: 35px;
    border-radius: 3px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    border-top: 4px solid var(--burgundy);
}

.modal-content h2 {
    color: var(--burgundy);
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-info-block {
    margin-bottom: 20px;
    padding: 20px;
    background: #F0F0F0;
    border-radius: 3px;
    border-left: 3px solid var(--gold);
}

.modal-info-block h3 {
    color: #5D0000;
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.modal-info-block p {
    color: #2C2C2C;
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.modal-close-btn {
    display: block;
    margin: 20px auto 0;
    background: var(--burgundy);
    color: var(--text-light);
    border: none;
    padding: 12px 30px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.modal-close-btn:hover {
    background: var(--burgundy-dark);
}

/* ==================== SCROLL TO TOP ==================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--burgundy);
    color: var(--text-light);
    border: none;
    border-radius: 3px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--burgundy-dark);
    transform: translateY(-2px);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #5D0000;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--gray-medium);
    border-radius: 3px;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--burgundy);
    box-shadow: 0 0 0 3px rgba(158, 27, 50, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: var(--burgundy);
    color: var(--text-light);
    border: none;
    padding: 14px 32px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    width: 100%;
}

.btn-submit:hover {
    background: var(--burgundy-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 991px) {
    .main-nav {
        gap: 15px;
    }
    
    .main-nav a {
        font-size: 13px;
    }
    
    .donate-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .header .container {
        gap: 12px;
    }
    
    .logo-section {
        flex: 1;
        justify-content: center;
    }
    
    .logo-section img {
        max-height: 100px;
    }
    
    .main-nav {
        display: none !important;
    }
    
    .donate-btn {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .grid-item,
    .card,
    .info-box {
        padding: 20px;
        font-size: 13px;
    }
    
    .grid-item h3,
    .card h3 {
        font-size: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section h3 {
        font-size: 14px;
    }
    
    .footer-section p {
        font-size: 12px;
    }
    
    .scroll-top-btn {
        bottom: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 25px;
        max-width: 90%;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 12px 12px;
    }
    
    .btn-submit {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
}

@media (max-width: 479px) {
    html {
        font-size: 14px;
    }
    
    .header .container {
        gap: 0;
    }
    
    .logo-section {
        width: auto;
        flex-shrink: 0;
    }
    
    .logo-section img {
        max-height: 50px;
    }
    
    .main-nav {
        display: none !important;
    }
    
    .donate-btn {
        display: none !important;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .grid-item,
    .card,
    .info-box {
        padding: 15px;
        font-size: 12px;
    }
    
    .grid-item h3,
    .card h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .grid-item p,
    .card p {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 11px 10px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .btn-submit {
        padding: 11px 16px;
        font-size: 13px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-section h3 {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .footer-section p {
        font-size: 11px;
    }
    
    .footer-bottom {
        font-size: 11px;
        padding-top: 15px;
    }
    
    .scroll-top-btn {
        bottom: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .modal-content h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .modal-info-block {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .modal-info-block h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .modal-info-block p {
        font-size: 12px;
    }
    
    .modal-close-btn {
        padding: 10px 20px;
        font-size: 12px;
        margin-top: 15px;
    }
    
    .dropdown-menu {
        min-width: 150px;
    }
    
    .dropdown-menu a {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* ==================== HEADER TOP ==================== */
.header-top {
    background: linear-gradient(90deg, var(--burgundy-dark) 0%, var(--burgundy) 100%);
    padding: 12px 0;
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 102;
    width: 100%;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-top-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#accessibilityBtn {
    background: var(--gold);
    color: var(--burgundy);
    border: 2px solid var(--gold);
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    white-space: nowrap;
}

#accessibilityBtn:hover {
    background: var(--burgundy);
    color: var(--gold);
    border-color: var(--gold);
}

.font-size-label {
    color: var(--gold);
    font-weight: 600;
    font-size: 12px;
}

.font-size-controls {
    display: flex;
    gap: 6px;
}

.font-size-controls button {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: var(--transition);
}

.font-size-controls button:hover {
    background: var(--gold);
    color: var(--burgundy);
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--gold);
    padding: 8px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-family: var(--font-main);
    transition: var(--transition);
    min-width: 180px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: var(--light-bg);
}

.search-box input::placeholder {
    color: var(--gray-medium);
}

@media (max-width: 767px) {
    .header-top-left {
        flex: 1;
        justify-content: space-between;
    }
    
    #accessibilityBtn {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .font-size-label {
        font-size: 11px;
    }
    
    .font-size-controls button {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .search-box input {
        padding: 7px 12px;
        font-size: 11px;
        min-width: 140px;
    }
}

@media (max-width: 479px) {
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-top-left {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        min-width: unset;
    }
    
    #accessibilityBtn {
        width: 100%;
        text-align: center;
    }
}

/* ==================== EXTRA RESPONSIVE ==================== */

/* iPhone SE, iPhone 13 mini (375px) */
@media (max-width: 374px) {
    .container { padding: 0 12px; }
    html { font-size: 13px; }
    .header .container { padding: 0 10px; }
    .logo-section img { max-height: 40px; }
    .main-nav { display: none !important; }
    .donate-btn { display: none !important; }
    .header-top .container { padding: 0 10px; }
    #accessibilityBtn { padding: 6px 10px; font-size: 10px; }
    .font-size-label { display: none; }
    .font-size-controls { display: none; }
    .search-box input { min-width: 120px; font-size: 10px; }
}

/* Tablets (600px - 1024px) */
@media (min-width: 600px) and (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 30px; }
    .main-nav { gap: 20px; }
    .main-nav a { font-size: 14px; }
}

/* Large Tablets (1025px+) */
@media (min-width: 1025px) {
    .container { max-width: 1200px; }
    .main-nav { gap: 25px; }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .header { padding: 8px 0; }
    .logo-section img { max-height: 50px; }
    main { margin-top: 0; }
}

/* iPhone X, 11, 12, 13 (390px - 430px) */
@media (min-width: 375px) and (max-width: 430px) {
    html { font-size: 14px; }
    .container { padding: 0 15px; }
    #accessibilityBtn { padding: 7px 12px; font-size: 11px; }
    .search-box input { min-width: 130px; font-size: 11px; }
}

/* Android Large (480px - 600px) */
@media (min-width: 480px) and (max-width: 600px) {
    html { font-size: 15px; }
    .container { padding: 0 18px; }
    .header-top-left { gap: 10px; }
}

/* Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body { -webkit-font-smoothing: antialiased; }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .btn-primary, .btn-secondary, .donate-btn, #accessibilityBtn {
        padding: 14px 28px;
        font-size: 16px;
        min-height: 44px;
    }
    .font-size-controls button {
        padding: 10px 14px;
        min-height: 44px;
    }
    .search-box input {
        padding: 12px 16px;
        min-height: 44px;
    }
}
