:root {
    --bg-cream: #fdfaf3;
    --nav-blue: #0A1E44;
    --gold: #9C7D41; /* Darkened for accessibility (4.5:1 contrast on white) */
    --gold-hover: #8A6E39;
    --sunlight-gold: #FFD700;
    --midnight-blue: #051433;
    --hope-blue: #235BA8;
    --hope-blue-hover: #1A4682;
    --text-dark: #1a1a1a;
    --text-muted: #595e68; /* Darkened for accessibility */
    --white: #ffffff;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --radius: 16px;
    --font-main: 'Outfit', sans-serif;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--gold);
    color: white;
    padding: 10px 20px;
    z-index: 9999;
    transition: top 0.2s;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
}

.skip-link:focus {
    top: 0;
}

/* Better focus states */
a:focus-visible, 
button:focus-visible {
    outline: 3px solid var(--hope-blue);
    outline-offset: 2px;
}

.navbar .nav-link:focus-visible {
    outline-color: var(--sunlight-gold);
}

.text-inherit {
    color: inherit !important;
}

body {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(197, 160, 89, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(35, 91, 168, 0.05) 0px, transparent 50%);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--midnight-blue);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 1.15rem; /* Increased from default for better readability */
    padding-top: 80px; /* Offset for the fixed navbar */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Larger, high-contrast links */
a {
    transition: all 0.2s ease;
    text-underline-offset: 4px;
}
a:hover {
    text-decoration: underline;
}

/* Navbar - Luminous Sacred Theme */
.navbar {
    background: rgba(253, 250, 243, 0.98); /* Warm Luminous Cream */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid rgba(156, 125, 65, 0.15); /* Subtle gold hairline */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

/* Hero pages: let the hero slide under the fixed navbar */
.hero {
    padding-top: 80px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--midnight-blue) !important;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.navbar-brand img {
    height: 40px;
    filter: none; /* Already high contrast on light */
}

.navbar .nav-link {
    font-weight: 600;
    color: var(--midnight-blue) !important; /* High contrast dark blue */
    padding: 0.8rem 1.4rem !important;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0 2px;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--gold) !important;
    background: rgba(156, 125, 65, 0.05);
    text-decoration: none;
}

.navbar .nav-link.active {
    color: var(--gold) !important;
    background: rgba(156, 125, 65, 0.08);
    position: relative;
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--gold);
    border-radius: 10px;
}

.text-gold {
    color: var(--sunlight-gold) !important;
}

.text-sunlight-gold {
    color: var(--sunlight-gold) !important;
}

/* Buttons & Actions */
.btn-gold {
    background: var(--gold);
    color: white !important;
    border: none;
    font-weight: 700;
    padding: 0.8rem 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.btn-gold:hover {
    background: #af8d4c; /* Darker gold for better contrast on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
    color: white !important;
}

.btn-outline-gold {
    color: var(--gold);
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background-color: var(--gold);
    color: white;
}

/* Action Row Balance */
.action-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 48px;
    gap: 12px;
}

/* Navbar Tuning */
.nav-link i {
    vertical-align: middle;
    margin-top: -2px;
}

/* Social Share Grid */
.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

@media (max-width: 576px) {
    .share-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 550px;
    width: 100%;
    background: url('../images/hero_banner_v2.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(10, 30, 68, 0.7) 0%, 
        rgba(10, 30, 68, 0.2) 60%,
        rgba(248, 250, 252, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 60px 32px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-post {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
    color: white;
    padding: 16px 40px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-block;
    box-shadow: 0 10px 25px -5px rgba(197, 160, 89, 0.4);
    font-size: 1.1rem;
}

.btn-post:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(197, 160, 89, 0.5);
    color: white;
}

/* Layout */
.main-container {
    max-width: 1540px;
    margin: 20px auto 60px; /* Reduced margin since body padding is now used */
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 32px;
    padding: 0 32px;
    position: relative;
    z-index: 10;
}

/* Overlap effect only when hero is present */
.hero + .main-container {
    margin-top: -60px;
}

@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: 250px 1fr 300px;
    }
}

@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 300px;
    }
    .sidebar-left { display: none; }
}

@media (max-width: 991px) {
    .main-container {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }
    .sidebar-right { display: none; }
}

/* Sidebar & Cards */
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 24px 0 16px;
    color: var(--midnight-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.user-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user-info .name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.user-info .time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Prayer Wall Grid */
.wall-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--midnight-blue);
    letter-spacing: -0.02em;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
}

@media (max-width: 768px) {
    .prayer-grid {
        grid-template-columns: 1fr;
    }
}

.prayer-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--hope-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prayer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: rgba(197, 160, 89, 0.2);
}

.prayer-card:hover::before {
    opacity: 1;
}

.prayer-card .body {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #374151;
    margin: 20px 0;
}

/* Buttons */
.btn-gold {
    background: var(--gold);
    color: white !important;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
}

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold) !important;
    border-radius: 12px;
    padding: 8px 20px;
    font-weight: 600;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: white !important;
}

/* Praise Reports Section */
.praise-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    border-left: 4px solid var(--sunlight-gold) !important;
}

.praise-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.praise-text {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin-top: 8px;
    font-style: italic;
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-card {
    background: white;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-control {
    padding: 14px 18px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

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

.prayer-card {
    animation: fadeInUp 0.6s ease out backwards;
}

.prayer-card:nth-child(1) { animation-delay: 0.1s; }
.prayer-card:nth-child(2) { animation-delay: 0.2s; }
.prayer-card:nth-child(3) { animation-delay: 0.3s; }