/*

MAIN PAGE START

*/  

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    padding: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
    font-family: sans-serif;
}

.main-content h1 {
    color: red;
    text-align: center;
}

.main-content h2 {
    text-align: center;
}

.intro {
    border-bottom: 1px solid #ccc;
    padding-bottom: 1em;
    margin-bottom: 2em;
    text-align: center;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.grid-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.grid-container.whats-on {
    height: 80vh;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.grid-item {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    text-align: center;
    flex-direction: column;
}

.grid-item h3 {
    margin-bottom: 12px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.grid-item a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.grid-item a:hover {
    color: #b22222;
}

.text-item li {
    text-align: left;
}

.text-box-container {
    display: grid;
    gap: 30px;
    padding-bottom: 20px;
    padding-top: 10px;
    box-sizing: border-box;
}

.text-box-container img {
    width: 250px;
    max-width: 100%;
    height: auto;
    display: block;
}

.text-item {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    text-align: center;
    flex-direction: column;
}

.text-item h3 {
    margin-bottom: 12px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.text-item a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.text-item a:hover {
    color: #b22222;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .grid-container img {
        max-width: 80%;
        margin: 0 auto;
    }

    .grid-container.whats-on {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .grid-item {
        font-size: 1.2rem;
        padding: 15px;
    }

    .text-box-container {
        height: auto;
        padding: 10px;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .grid-item {
        font-size: 1rem;
        padding: 10px;
    }

    .grid-container img {
        max-width: 70%;
    }
}

/*

MAIN PAGE ENDS

*/

/* 

CSS FOR FOOTER START

*/
.footer {
    background-color: #1e1e2f;
    color: #fff;
    padding: 40px 20px;
    font-family: sans-serif;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
}

.footer-section {
    flex: 1 1 200px;
    margin: 20px;
}

.footer-section h3,
.footer-section h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

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

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

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-section iframe {
    width: 100%;
    height: 100%;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        margin: 10px 0;
        text-align: center;
    }

    .footer-section iframe {
    width: 100%;
    height: 100%;
}
}
/* 

CSS FOR FOOTER ENDS

*/

/* 

CSS FOR NAVBAR START

*/
.navbar {
    background-color: #1e1e2f;
    color: #fff;
    padding: 10px 20px;
    font-family: sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: #fff;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Hover style */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
  
.nav-links a:hover::after {
    transform: scaleX(1);
}
  
/* === Active (Current Page) === */

/* Animated underline using pseudo-element */
.nav-links a.current::after {
    animation: slide-in 0.4s forwards;
}
  
/* Slide-in animation for current link underline */
  @keyframes slide-in {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
}
  
/* Actual border-bottom appears after animation delay */
.nav-links a.active {
    color: #ffffff;
    font-weight: bold;
    border-bottom: 2px solid transparent; /* Layout consistency */
    animation: show-border 0.1s 0.4s forwards; /* 0.4s delay = underline duration */
}
  
  /* Reveal the border-bottom after animation finishes */
  @keyframes show-border {
    to {
      border-bottom-color: #ffffff;
    }
}
  
  
/* === Responsive Dropdown === */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background-color: #2a2a3d;
        border-radius: 8px;
        padding: 10px;
    }

    .nav-links a {
        padding: 10px;
        display: block;
    }

    .nav-container.open .nav-links {
        display: flex;
    }
}
/* 

CSS FOR NAVBAR ENDS

*/


/* 

CSS FOR HERO STARTS

*/
.nav-hero {
    width: 100%;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-texts {
    position: relative;
    height: 60px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.hero-text {
    opacity: 1;
    transition: opacity 0.6s ease;
    position: relative;
    font-size: 2.5rem;
    font-weight: bold;
    color: #e0e0e0;
    white-space: nowrap;
}

/* Cursor style: blinking vertical bar after text */
.hero-text::after {
    content: '|';
    margin-left: 3px;
    animation: blink 1s step-start infinite;
    color: #e0e0e0;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    50.1%, 100% {
        opacity: 0;
    }
}
  

.hero-text.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.page-name {
    text-align: center;
    margin-top: 20px;
}

.page-name h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #a4b2cb;
}
/* 

CSS FOR HERO ENDS

*/
/* 

CSS FOR RIGHT-SIDEBAR START

*/

#nextEventDisplay span {
    color: #333;
    font-weight: bold;
}

#nextEventDisplay span:hover {
    color: #b22222;
}

#nextChurchEventDisplay span {
    color: #333;
    font-weight: bold;
}

#nextChurchEventDisplay span:hover {
    color: #b22222;
}

.sidebar-wrapper {
    width: 220px;
    display: flex;
    flex-direction: column;
    height: auto;
}

.sidebar-right {
    background-color: #f0f0f0;
    border-left: 2px solid #ccc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
    font-family: sans-serif;
    text-align: center;
    flex: 1;
    height: 100%;
    overflow-y: auto;
}

.sidebar-title {
    text-align: center;
    border-bottom: 1px solid #1e1e2f;
}

.sidebar-right a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.sidebar-right a:hover {
    color: #b22222;
}

.sidebar-right img {
    display: inline-block;
    max-width: 50%;
    max-height: 50%;
}

.sidebar-section {
    border-bottom: 1px solid #1e1e2f;
    padding-bottom: 2px;
    margin-bottom: 10px;
}

.sidebar-social-section {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.social.icons-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-item {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
}

.social-icons-sidebar img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    margin-right: 10px;
    flex-shrink: 0;
    display: block;
}

.social-icons-sidebar img:hover {
    transform: scale(1.2);
}

/* Responsive: Hide sidebar on smaller screens */
@media (max-width: 768px) {
    .page-content {
        flex-direction: column;
    }

    .sidebar-wrapper {
        width: 100%;
    }

    .sidebar-right {
        border-left: none;
        box-shadow: none;
        padding-top: 0;
    }
}
/* 

CSS FOR RIGHT-SIDEBAR ENDS

*/

/* 

CSS FOR NEWS FEED START

*/
#rss-feed {
    padding: 1em;
}

.news-item {
    margin-bottom: 2em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1em;
}

.news-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5em;
    border-radius: 6px;
}

.read-more {
  display: inline-block;
  margin-top: 0.5em;
  padding: 0.4em 0.8em;
  background-color: #4a90e2;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

#rss-feed a {
    color: white;
}

.read-more:hover {
  background-color: #357ABD;
  transform: scale(1.05);
}

#pagination-controls {
  text-align: center;
  margin-top: 1em;
}

.page-btn {
  display: inline-block;
  margin: 0 0.3em;
  padding: 0.4em 0.8em;
  background-color: #eee;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.page-btn:hover {
  background-color: #ccc;
  transform: scale(1.05);
}

.page-btn.active {
  background-color: #4a90e2;
  color: white;
}

/* 

CSS FOR NEWS FEED ENDS

*/

/* 

CSS FOR CALENDAR FILTER BUTTONS START

*/ 

#calendarFilterButtons {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#calendarFilterButtons button {
    background-color: #4a90e2;
    border: none;
    color: white;
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

#calendarFilterButtons button:hover {
    background-color: #357ABD;
    transform: scale(1.05);
}

#calendarFilterButtons button:focus {
    outline: 3px solid #9dc6ff;
    outline-offset: 2px;
}

#calendarFilterButtons button:active {
    background-color: #2a5f9e;
    transform: scale(0.98);
}
/* 

CSS FOR CALENDAR FILTER BUTTONS ENDS

*/ 

/* 

CSS FOR EVENT BUTTONS STARTS

*/
/* ==== SERVICE BUTTONS ==== */

.service-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.service-btn {
    width: 180px;
    height: 180px;
    background-size: cover;
    background-position: center;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    text-align: center;
    line-height: 1.2;
}

.service-btn:hover,
.service-btn:focus {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    outline: none;
}

/* ==== COMMUNITY / CHURCH EVENT BUTTONS ==== */

.community-buttons,
.church-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.community-buttons button,
.church-buttons button {
    width: 160px;
    height: 160px;
    font-size: 1rem;
    font-weight: bold;
    background-color: #2a67c7;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    padding: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-buttons button[style*="background-image"],
.church-buttons button[style*="background-image"] {
    background-blend-mode: normal;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.community-buttons button:hover,
.church-buttons button:hover {
    background-color: #1f4da0;
    transform: translateY(-2px);
}

.community-buttons button:focus,
.church-buttons button:focus {
    outline: 2px solid #0056b3;
}

/* ==== MODAL ==== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 24px;
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #333;
}

.modal-content p {
    font-size: 1rem;
    color: #555;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.modal-content li {
    margin: 8px 0;
    padding: 8px;
    background: #f6f8fa;
    border-radius: 6px;
    font-size: 0.95rem;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

.closeGroup {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #e00;
    outline: none;
}

.closeGroup:hover,
.closeGroup:focus {
    color: #e00;
    outline: none;
}

/* ==== ANIMATIONS ==== */

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 600px) {
    .service-buttons {
        flex-direction: column;
        align-items: center;
    }

    .service-btn {
        width: 90%;
        height: 140px;
        font-size: 1rem;
    }

    .community-buttons button,
    .church-buttons button {
        width: 100%;
        height: auto;
        padding: 16px;
        font-size: 1rem;
    }

    .community-buttons button[style*="background-image"],
    .church-buttons button[style*="background-image"] {
        background-size: 80%;
        background-position: left 30%;
        padding-top: 80px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
/* 

CSS FOR EVENT BUTTONS ENDS

*/

/* 

CSS FOR CONTACT FORM STARTS

*/

.contact-section {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.contact-section form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.contact-section label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
}

.contact-section input,
.contact-section select,
.contact-section textarea,
.contact-section button {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.3rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.contact-section button {
    background-color: #007bff;
    color: white;
    border: none;
    margin-top: 1.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.contact-section button:hover {
    background-color: #0056b3;
}

.contact-section .hidden {
    display: none;
}

/* 

CSS FOR CONTACT FORM ENDS

*/

/* 

CSS FOR SLIDESHOW BUTTONS STARTS

*/

.image-slideshow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  
  .image-slideshow img {
    max-width: 80%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }
  
  .image-slideshow button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
  }
  
  .image-slideshow button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
  }
  
  .image-slideshow button:active {
    transform: scale(0.95);
  }

/* 

CSS FOR SLIDESHOW BUTTONS ENDS

*/