/**
 * Charity Hub Page Styles
 * Extracted from charity/index.php for cacheability
 */
:root {
    --primary: #00498f;
    --primary-dark: #003366;
    --accent: #00c2ff;
    --gold: #ffd700;
    --success: #10b981;
    --heart-red: #e74c3c;
    --tree-green: #27ae60;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

#wrapper { background: transparent !important; box-shadow: none !important; }

/* Hero Section */
.charity-hero {
    background: linear-gradient(180deg, #e8f4fc 0%, #f0f7fc 100%);
    padding: 50px 0 60px;
    border-bottom: 1px solid var(--gray-200);
}

.charity-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.hero-logo {
    margin-bottom: 24px;
}

.hero-logo img {
    max-width: 220px;
    height: auto;
}

.charity-hero-content h1 {
    font-size: 38px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 14px;
    line-height: 1.2;
}

.charity-hero-content h1 span {
    color: var(--heart-red);
}

.charity-hero-content .tagline {
    font-size: 17px;
    color: var(--gray-600);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 10px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--tree-green);
    display: block;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 14px;
}

.section-header p {
    font-size: 17px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Tree-Nation Feature Section */
.tree-nation-section {
    background: linear-gradient(135deg, var(--tree-green) 0%, #1e8449 100%);
    border-radius: 24px;
    padding: 60px;
    margin-bottom: 70px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: stretch;
}

.tree-nation-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border: 50px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.tree-nation-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tree-nation-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.tree-nation-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    line-height: 1.7;
}


.tree-nation-badge-large {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tree-nation-badge-large img {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.tree-nation-badge-large h3 {
    color: var(--tree-green);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tree-nation-badge-large p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 20px;
}

.tree-nation-badge-large .badge-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.tree-nation-badge-large .badge-stat {
    text-align: center;
}

.tree-nation-badge-large .badge-stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--tree-green);
    display: block;
}

.tree-nation-badge-large .badge-stat-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.tree-nation-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--tree-green);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.tree-nation-link:hover {
    text-decoration: underline;
}

.tree-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.tree-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 12px;
}

.tree-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: white;
    display: block;
}

.tree-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Directory Browse Section */
.directory-section {
    background: white;
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 70px;
    border: 1px solid var(--gray-200);
}

.directory-search-form {
    max-width: 600px;
    margin: 0 auto 32px;
    display: flex;
    gap: 0;
}

.directory-search-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--gray-200);
    border-right: none;
    border-radius: 12px 0 0 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.directory-search-form input:focus {
    border-color: var(--primary);
}

.directory-search-form button {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
    border-radius: 0 12px 12px 0;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.directory-search-form button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.category-pill {
    display: inline-block;
    padding: 8px 18px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.browse-all-link {
    display: block;
    text-align: center;
    margin-top: 8px;
}

.browse-all-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: gap 0.2s;
}

.browse-all-link a:hover {
    gap: 10px;
    text-decoration: underline;
}

/* Quick Links Row */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 70px;
}

.quick-link-card {
    background: white;
    border-radius: 18px;
    padding: 32px;
    border: 1px solid var(--gray-200);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.quick-link-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-link-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.quick-link-icon.blue { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.quick-link-icon.green { background: linear-gradient(135deg, var(--tree-green) 0%, #1e8449 100%); }
.quick-link-icon.red { background: linear-gradient(135deg, var(--heart-red) 0%, #c0392b 100%); }

.quick-link-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.quick-link-text p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* Charity Cards Grid */
.charity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 70px;
}

.charity-card {
    background: white;
    border-radius: 18px;
    padding: 32px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.charity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: var(--heart-red);
}

.charity-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--heart-red) 0%, #c0392b 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.charity-card-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.charity-card-icon.green {
    background: linear-gradient(135deg, var(--tree-green) 0%, #1e8449 100%);
}

.charity-card-icon.blue {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.charity-card-icon.purple {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.charity-card-icon.orange {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.charity-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.charity-card p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 15px;
}

.charity-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--heart-red);
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.charity-card:hover .charity-card-link {
    gap: 10px;
}

/* Featured Charity - Memorial Section */
.memorial-section {
    background: white;
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 70px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.memorial-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.memorial-image {
    max-width: 500px;
    margin: 0 auto 24px;
}

.memorial-image img {
    width: 25%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.memorial-section p {
    font-size: 16px;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.memorial-section p a {
    color: var(--tree-green);
    font-weight: 600;
    text-decoration: none;
}

.memorial-section p a:hover {
    text-decoration: underline;
}

/* Recommend CTA Section */
.cta-section {
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, var(--heart-red) 0%, #c0392b 100%);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 70px;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border: 60px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-size: 34px;
    font-weight: 800;
    color: white;
    margin-bottom: 14px;
}

.cta-section > .cta-content > p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.cta-btn.white {
    background: white !important;
    color: #c0392b !important;
    border: 2px solid white;
}

.cta-btn.white svg {
    fill: #c0392b !important;
}

.cta-btn.white * {
    color: #c0392b !important;
}

.cta-btn.white:hover {
    background: var(--gray-50);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

.cta-btn.outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-btn.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7fc 100%);
    border-left: 4px solid var(--primary);
    padding: 24px 30px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.info-box svg {
    width: 28px;
    height: 28px;
    fill: var(--primary);
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    color: var(--gray-700);
    font-size: 15px;
}

.info-box a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

/* Attribution */
.attribution {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-200);
    margin-top: 20px;
}

.attribution a {
    color: var(--primary);
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .tree-nation-section { grid-template-columns: 1fr; text-align: center; }
    .tree-stats { justify-content: center; }
    .charity-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .charity-hero { padding: 30px 0 40px; }
    .charity-hero-inner { padding: 0 20px; }
    .hero-logo img { max-width: 180px; }
    .charity-hero-content h1 { font-size: 28px; }
    .charity-hero-content .tagline { font-size: 15px; }
    .hero-stats { flex-wrap: wrap; gap: 30px; }
    .hero-stat-number { font-size: 26px; }
    .main-content { padding: 50px 20px; }
    .section-header h2 { font-size: 28px; }
    .directory-section { padding: 30px 20px; }
    .directory-search-form input { padding: 12px 16px; font-size: 14px; }
    .directory-search-form button { padding: 12px 18px; font-size: 14px; }
    .quick-links { grid-template-columns: 1fr; }
    .quick-link-card { padding: 24px; }
    .tree-nation-section { padding: 40px 24px; }
    .tree-nation-content h2 { font-size: 26px; }
    .tree-stats { flex-wrap: wrap; }
    .charity-grid { grid-template-columns: 1fr; }
    .charity-card { padding: 24px; }
    .memorial-section { padding: 30px 20px; }
    .cta-section { padding: 40px 20px; }
    .cta-section h2 { font-size: 26px; }
    .cta-buttons { flex-direction: column; }
    .cta-btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .hero-logo img { max-width: 150px; }
    .charity-hero-content h1 { font-size: 24px; }
    .hero-stats { gap: 20px; }
    .hero-stat-number { font-size: 22px; }
    .tree-stat { padding: 12px 16px; }
    .tree-stat-number { font-size: 22px; }
}
