/* =============================================================================
   COMPONENTS.CSS — Every Name Matters
   SUPERSET of base.css — contains everything base.css has, PLUS all components.
   Old pages using base.css still work. New pages use this file for everything.
   ============================================================================= */


/* -----------------------------------------------------------------------------
   BASE RESET & FOUNDATION (from base.css — do not remove)
----------------------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', 'Noto Naskh Arabic', sans-serif;
    background: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.7;
}

main {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    background: rgba(26, 26, 26, 0.92);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

body.homepage main {
    position: relative;
    max-width: 1200px;
    margin: -35vh auto 4rem;
    padding: 5rem 2rem 3rem;
    background: rgba(15, 15, 15, 0.15);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

main.narrow-main { max-width: 900px; }

h1 { color: #ff8800; margin-bottom: 1.5rem; font-size: 2.8rem; }
h2 { color: #ff8800; margin: 2.5rem 0 1rem; font-size: 2rem; }
h3 { color: #ff8800; margin: 2.5rem 0 1rem; font-size: 2rem; text-align: center; width: 100%; }

p, li, blockquote { margin-bottom: 1.2rem; line-height: 1.7; }
ul, ol { margin-left: 1.5rem; margin-bottom: 1.5rem; }
strong { color: #ff8800; }
a { color: #ff8800; text-decoration: none; }
a:hover { text-decoration: underline; }

.subtitle     { font-size: 1.2rem; opacity: 0.92; }
.center-note  { text-align: center; font-style: italic; opacity: 0.92; margin-top: 2rem; }
.center-strong { text-align: center; font-style: italic; opacity: 0.95; margin-top: 2.25rem; }

.notice-box {
    padding: 1.25rem;
    border-left: 4px solid #ff8800;
    background: rgba(255, 136, 0, 0.08);
    border-radius: 10px;
    margin: 1.5rem 0;
}

.stack-form label { display: block; margin: 1rem 0 0.45rem; font-weight: 600; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #444;
    border-radius: 10px;
    background: #1d1d1d;
    color: #f2f2f2;
    font: inherit;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #ff8800;
}

textarea { min-height: 180px; resize: vertical; }

button,
.cta-button {
    display: inline-block;
    background: #ff8800;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 1rem 1.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

button:hover,
.cta-button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    text-decoration: none;
}

.cta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2.5rem 0;
}

.resource-link,
.read-more { font-weight: 600; }

.card-list { display: flex; flex-direction: column; gap: 1.5rem; }

.event-card,
.post,
.support-block {
    background: rgba(40, 40, 40, 0.6);
    padding: 1.8rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border-left: 4px solid #ff8800;
}

.event-card .date,
.post .date {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.75rem;
}

.to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ff8800;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
    text-decoration: none;
}

.to-top:hover {
    background: #e07a00;
    transform: scale(1.1);
    text-decoration: none;
}


/* -----------------------------------------------------------------------------
   SUPPORT GRID (from base.css — do not remove)
----------------------------------------------------------------------------- */
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.support-card {
    background: rgba(40, 40, 40, 0.6);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.support-card:hover {
    transform: translateY(-4px);
    border-color: #ff8800;
}

.card-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }

.support-card h2 { color: #ff8800; font-size: 1.5rem; margin: 0 0 0.8rem 0; }
.support-card p  { font-size: 0.9rem; margin-bottom: 1.2rem; color: #ddd; }
.support-card .cta-button { display: inline-block; margin-top: 0.5rem; }


/* -----------------------------------------------------------------------------
   NEWS GRID (Blog / RSS Feed) — new component
----------------------------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 320px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.news-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-source {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.9rem;
}

.source-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    gap: 0.25rem;
    min-width: 64px;
}

.source-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.source-name {
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
}

.news-date {
    color: #aaa;
    font-size: 0.8rem;
    white-space: nowrap;
    padding-top: 0.3rem;
}

/* Override h3 base styles inside news cards */
.news-card-title {
    color: #e0e0e0 !important;
    text-align: left !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0.5rem 0 0.75rem !important;
    line-height: 1.45 !important;
    width: auto !important;
}

body.rtl .news-card-title { text-align: right !important; }

.news-card-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card-title a:hover {
    color: #ff8800;
    text-decoration: none;
}

.news-card-description {
    color: #aaa;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
    text-align: left;
}

body.rtl .news-card-description { text-align: right; }

.news-card .read-more {
    margin-top: auto;
    display: inline-block;
    font-size: 0.9rem;
}

.news-footer {
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}


/* -----------------------------------------------------------------------------
   RESPONSIVE BREAKPOINTS (from base.css — do not remove)
----------------------------------------------------------------------------- */
@media (max-width: 980px) {
    main, body.homepage main { margin: 2rem 1rem; padding: 2rem 1.2rem; }
    body.homepage main { margin-top: -20vh; }
    .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    main { margin: 1rem !important; padding: 1.5rem !important; }
    .tagline { font-size: 1.2rem !important; bottom: 20px !important; }

    .support-grid { grid-template-columns: 1fr; gap: 1rem; }
    .news-grid    { grid-template-columns: 1fr; }

    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .memorial-card .card-header {
        min-height: 100px !important;
        padding: 1rem !important;
    }

    .contact-box { display: none !important; }

    .floating-qr-unit {
        width: 140px !important;
        right: 10px !important;
        top: 100px !important;
        padding: 8px 8px 6px 8px !important;
    }

    .floating-qr-unit img { width: 100% !important; }

    .qr-caption { font-size: 0.7rem !important; margin-top: 6px !important; }
    .qr-caption span { font-size: 0.6rem !important; }
}

@media (max-width: 668px) {
    .floating-qr-unit,
    .contact-box { display: none !important; }
}