*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
background: linear-gradient(135deg, lightyellow 0%, rgb(252, 200, 104) 30%, rgb(248, 195, 175) 40%, rgb(255, 127, 57) 100%);
    background-size: 400% 400%;
    animation: gradientMove 20s ease infinite;
    font-family: "Inter", Arial, sans-serif;
}

@keyframes gradientMove {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- HEADER / NAV ---------- */

/* ---------- LIVE + NEWS ---------- */
.live {
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 80%;
    margin: 0 auto;
    padding-left: 30px;
}

.live > video {
    flex: 2 1 0;
    min-width: 0;
    width: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border: none;
    animation: glowShift 5s ease-in-out infinite;
    margin: 10px 0;
    background:#000;
    object-fit: contain;
}

@keyframes glowShift {
    0%, 100% { box-shadow: 0 0 25px 4px rgba(139, 69, 19, 0.45); }
    33%      { box-shadow: 0 0 25px 4px rgba(255, 200, 50, 0.45); }
    66%      { box-shadow: 0 0 25px 4px rgba(255, 140, 0, 0.45); }
}

.news {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 10px 0;
    background: rgb(255, 254, 254);
    border-radius: 5px;
}
.news:hover{
    box-shadow: 0 4px 12px rgb(255, 217, 0);
}
.news-video { flex: none; }
.news-video iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
}

.news-text {
    flex: 1;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow-y: auto;
    text-align: center;
    color: #0b2545;
    padding: 10px 16px;
}
.news-text h4 
{ margin: 0 0; 
    font-size: 1.5rem;
    font-size: clamp(1.3rem, 2.4vw, 2.0rem);   /* grows with the screen to fill the space */
    line-height: 1.20;
}
.news-text p  { margin: 0; font-size: 1.3rem; }
.news p {
  text-align: center;
}
.news-text, .news-text h4 a{
    text-decoration: none;
}
.news-text, .news-text p a{
    text-decoration: none;
}
a.read-article {
  text-decoration: none;
  color: inherit;
}
/* ---------- HOMILY ---------- */
.homily {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    background-color: white;
    color: black; 
}

.homily-label,
.homily-button button {
    font-family: Helvetica, sans-serif;
    font-size: 1.1rem;
    line-height: 1.2;
    flex-shrink: 0;
    background-color: lightgoldenrodyellow;
    color: black;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid white;
}
.homily-label { margin: 10px; padding: 1.5px 4px; }

.homily-scroll { flex: 1; overflow: hidden; white-space: nowrap; }
.homily-scroll p {
    display: inline-block;
    margin: 0;
    padding-left: 100%;
    font-size: 1.2rem;
    animation: homily-scroll 20s linear infinite;
    margin-top: 5px;
    color: #0b2545;
}
.homily-scroll:hover p { animation-play-state: paused; }

@keyframes homily-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.homily-button { display: flex; justify-content: center; padding: 15px 20px; }

/*.....articles......*/
.news-articles{
    display:grid;
    grid-template-columns: 1fr;
    max-width:600px;
    margin: 0 auto;
}
.news-articles .images {
  width: 120px;
  height: 90px;
  margin: 0;
  flex-shrink: 0;
  overflow: hidden;
}
.news-articles .images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: static;   /* cancels any absolute positioning pulling it out */
}
.article-1{
    display:flex;
    align-items:flex-start;
    gap:5px;
    border-top: 1px solid #0b2545;;
    padding:1px;
    text-decoration: none;
    font-weight:bold;
}
.article-2{
    display:flex;
    align-items:flex-start;
    gap:5px;
    border-top: 1px solid #0b2545;;
    padding:1px;
    text-decoration: none;
    font-weight:bold;
}
.article-3{
    display:flex;
    align-items:flex-start;
    gap:5px;
    border-top: 1px solid #0b2545;;
    padding:1px;
    text-decoration: none;
    font-weight:bold;
}
.article-4{
    display:flex;
    align-items:flex-start;
    gap:5px;
    border-top: 1px solid #0b2545;;
    padding:1px;
    text-decoration: none;
    font-weight:bold;
}
.news-articles p {
   flex: 1;                   /* text fills the remaining space */
  color:#0b2545;
}
.article-1:hover p, 
.article-2:hover p,
.article-3:hover p,
.article-4:hover p
{
  color: red;
}

@media (min-width: 992px) {
  .news-articles {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    column-gap: 30px;                 /* space between the columns */
    max-width: 1100px;
  }
}
/*.............Programs............*/
/*.............Programs............*/
.programs {
    margin: clamp(10px, 2vw, 20px);
    padding: 5px;
    border: 1px solid navy;
    border-radius: 10px;
}

/* The scrolling row */
.programs .program-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 5px 12px;
    min-width: 0;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Each card: fixed width, never shrinks */
.programs .program-nav > div {
    flex: 0 0 clamp(160px, 65vw, 220px);
    display: flex;
    flex-direction: column;
    border: 1px solid #36454F;
    border-radius: 5px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: 0.3s;
}

/* Center the row when it fits, scroll when it doesn't */
.programs .program-nav > div:first-child { margin-left: auto; }
.programs .program-nav > div:last-child  { margin-right: auto; }

.programs .program-nav > div:hover {
    border-color: rgb(244, 201, 59);
    box-shadow: 0 10px 20px #1E293B;
}

.programs .program-text {
    display: flex;
    justify-content: center;
    padding: 4px 8px;
    text-align: center;
    border-bottom: 1px solid black;
    text-decoration: none;
}
.programs .program-text h4 {
    margin: 4px 0;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    overflow-wrap: anywhere;
    color:black;
    border-radius:8%;
    text-decoration: none;
}

.programs .program-text a{
    text-decoration: none;
}

.programs .program-banner {
    width: 100%;
    aspect-ratio: 20 / 13;
}

.programs .program-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.programs .program-time {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding: 4px 8px;
    border-top: 1px solid black;
}

.programs .program-time p {
    margin: 4px 0;
    font-size: clamp(0.85rem, 2vw, 1rem);
}
/* ---------- REELS ---------- */
.partreel h2 {
    display: flex;
    justify-content: center;
    border: 1px solid orangered;
    background-color: brown;
    color: lightgoldenrodyellow;
    margin-left: 45%;
    width: 9%;
    border-radius: 6px;
}

.reels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 across on desktop */
    gap: 16px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
}
.reel {
    aspect-ratio: 9 / 16;
    background: lightgoldenrodyellow;
    border-radius: 12px;
    overflow: hidden;
}
.reel iframe { width: 100%; height: 100%; border: 0; }

/* ---------- FOOTER ---------- */
footer {
    background-color: brown;
    color: lightgoldenrodyellow;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    font-size: 1.1rem;
}
 footer .address {
        grid-column: 1 / -1;      /* full width on top */
        text-align: center;
    }
    
footer .social-media-icons,
footer .quick-links { padding-left: 10px; }
footer .quick-links { color: white; }
footer a { text-decoration: none; }
footer .quick-links li { list-style: none; color: white; }
footer .quick-links ul li a { color: lightsalmon; }
footer .quick-links ul li a:hover { color: white; }

footer .form-container {
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: 100%;
    flex: 0 1 240px;
    margin: 0;
    padding: 8px;
    border: 2px solid orangered;
    background-color: lightgoldenrodyellow;
    color: black;
    border-radius: 12px;
}
footer .form-container .title { text-align: center; margin: 0 0 8px; }
footer .form-container .title h3 { margin: 0; text-align: center; font-size: 1rem; }
footer .form-container input { display: block; width: 100%; border-radius: 5px; }

footer .message-row { display: flex; flex-direction: column; align-items: stretch; }
footer .message-row label { flex: 0 0 auto; margin: 1px 0 0; }
footer .message-row textarea { flex: 1; min-width: 0; width: auto; margin: 0; border-radius: 10px; }

footer .form-container button {
    display: block;
    margin: 1px auto;
    padding: 8px;
    border-radius: 10px;
    background-color: rgb(3, 20, 39);
    border: 1px solid orangered;
    color: white;
}
footer .form-container button:hover  { background-color: green; color: white; border: 1px solid green; }
footer .form-container button:active { background-color: white; color: green; border: 1px solid green; }

footer .form-container input,
footer .form-container textarea {
    border: 1px solid #ccc;
    outline: none;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
footer .form-container input:hover,
footer .form-container textarea:hover {
    border-color: #c9a227;
    box-shadow: 0 0 6px 1px rgba(201, 162, 39, 0.5);
}
footer .form-container input:focus,
footer .form-container textarea:focus {
    border-color: brown;
    box-shadow: 0 0 10px 3px rgba(201, 162, 39, 0.7), 0 0 4px 1px rgba(165, 42, 42, 0.6);
}

/* form button states */
button[type="submit"].loading { background: #ff9500; animation: pulse 1s infinite; }
button[type="submit"].success { background: #fefefe; cursor: default; color: rgb(6, 188, 103); animation: pop 0.4s ease; }
.check { display: inline-block; margin-right: 6px; animation: checkIn 0.5s ease; }

@keyframes pulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes pop     { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes checkIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

.social-media-icons a { color: inherit; transition: color 0.3s ease; }
.social-media-icons a:hover { color: orangered; }
.hp { position: absolute; left: -9999px; }

/* =========================================================
   TABLET  (900px and below)
   news moves below the live frame, reels become 2 x 2
   ========================================================= */
@media (max-width: 900px) {
    .live {
        flex-direction: column;
        width: 100%;
        padding: 0 16px;
        gap: 0;
    }
    .live > video { flex: none; width: 100%; }
    .news { flex: none; width: 100%; }


    .partreel h2 { margin-left: auto; margin-right: auto; width: auto; padding: 4px 16px; }
}

/* =========================================================
   MOBILE NAV  (768px and below)
   ========================================================= */
@media (max-width: 768px) {
    .intro { gap: 10px; }
    .intro p { margin-right: auto; }       /* pushes donate + menu button to the right */

    .nav-toggle { display: block; }

    .navbar {
        display: none;                     /* hidden until the button is tapped */
        position: absolute;
        top: calc(100% + 6px);
        right: 12px;
        z-index: 100;
        width: min(260px, calc(100vw - 24px));
        margin: 0;
        padding: 8px;
        background: #fff;
        border: 2px solid brown;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }
    .navbar.open { display: block; }

    .navbar ul { flex-direction: column; gap: 0; font-size: 1.1rem; }
    .navbar ul li a {
        display: block;
        padding: 12px 14px;
        border-radius: 8px;
    }
    .navbar a:hover { background: lightgoldenrodyellow; border-bottom: none; }
}

/* =========================================================
   PHONE  (600px and below)
   ========================================================= */
@media (max-width: 600px) {
    .reels {
        display: grid;
        grid-template-columns: repeat(2, 1fr);   /* 2 columns -> 4 reels make 2 rows */
        gap: 10px;
        padding: 0 10px;
    }
    .reel {
        width: 100%;
        aspect-ratio: 9 / 16;
    }
    .reel iframe {
        width: 100%;
        height: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body, .live > video, .homily-scroll p { animation: none; }
}

@media (max-width: 600px) {
    .homily {
        flex-wrap: wrap;
        align-items: center;
    }

    /* row 1: the two buttons */
    .homily-label  { order: 1; margin: 8px; }
    .homily-button { order: 2; margin-left: auto; padding: 8px; }

    /* row 2: the scrolling text, full width */
    .homily-scroll {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        padding-bottom: 10px;
    }

    .homily-scroll p {
        padding-left: 12px;          /* starts visible, not off-screen */
        font-size: 1.1rem;
        animation: homily-scroll-mobile 18s linear infinite;
    }

    @keyframes homily-scroll-mobile {
        from { transform: translateX(0); }
        to   { transform: translateX(-100%); }
    }
}

@media (max-width: 768px) {
    /* footer: grid so social icons and quick links share a row */
    footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 16px;
        align-items: start;
    }

    footer .address {
        grid-column: 1 / -1;      /* full width on top */
        text-align: center;
    }

    footer .form-container {
        grid-column: 1 / -1;      /* full width at the bottom */
        justify-self: stretch;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        margin: 0;
        padding: 12px;
    }

    /* social icons (left) and quick links (right) side by side */
    footer .social-media-icons,
    footer .quick-links { padding-left: 0; }

    footer .social-media-icons p,
    footer .quick-links h3 { margin: 0 0 8px; }

    footer .social-media-icons a {
        display: inline-block;
        margin: 0 5px 8px 0;
        font-size: 1.2rem;
    }   /* <-- this brace was missing */

    footer .form-container input,
    footer .form-container textarea {
        width: 100%;
        font-size: 1rem;
        padding: 8px;
    }

    footer .form-container textarea { min-height: 120px; }

    footer .form-container button {
        width: 100%;
        padding: 12px;
    }
}