/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-login a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding: 8px;
  color: var(--dark);
  transition: var(--transition);
}

.admin-login a:hover {
  color: var(--primary);
}

.admin-login i {
  position: relative;
  top: 3px; 
}


:root {
    --primary: #8b1d1d;
    --primary-dark: #6b1717;
    --secondary: #1d4e34;
    --secondary-dark: #163b27;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --white: #ffffff;
    --font-heading: 'Lora', serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* Force browsers to use light mode rendering */
:root {
    color-scheme: light;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.content-list ul {
    list-style-type: disc;
    /* enables bullets */
    margin-left: 1.5rem;
    /* optional: indents the list */
    padding-left: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto 30px;
}

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

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.admin-login a {
  display: inline-block;
  align-items: center;   /* vertically center the icon */
  justify-content: center;
  font-size: 1.1rem;     /* adjust size to match text */
  line-height: 1.5rem;        /* keeps it tight */
  vertical-align: middle;
}

.admin-login i {
  display: inline-flex;       /* make it flex so it aligns to center */
  align-items: center;        /* vertically center inside line box */
  vertical-align: middle;     /* nudge it off the baseline */
  line-height: 1;        /* prevents inline misalignment */
}
    .admin-login a:hover {
      color: #0077cc; /* adjust hover color */
    }

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1002;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

/* Optional: Add a more visible divider that matches your design */
header::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    width: 100%;
    z-index: 0;
    /* Lower z-index for desktop by default */
    position: absolute;
    bottom: 0;
    left: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 60px;
    height: auto;
}


.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0;
}

.logo-text h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 400;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

.nav-menu>li>a {
    white-space: nowrap;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 0;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* Default for desktop */
.nav-menu>li.dropdown {
    display: inline-block;
    position: relative;
}

@media (max-width: 768px) {
    .nav-menu>li.dropdown {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dropdown-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Increase z-index for mobile view */
    header::after {
        z-index: 1001;
        /* Higher z-index for mobile to ensure visibility */
    }

    .dropdown-toggle {
        flex: 1;
        padding-right: 10px;
    }

    .dropdown-chevron {
        display: flex;
        align-items: center;
        padding: 10px;
    }
}

@media (min-width: 768px) {
    .dropdown-chevron {
        display: none;
    }
}

/* Ensure all top-level nav links including dropdowns are bold */
.nav-menu>li>a,
.nav-menu .dropdown-toggle {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
}

/* Make dropdowns full width and align content */
.nav-menu>li.dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Make link fill available space */
.nav-menu>li.dropdown>.dropdown-toggle {
    flex-grow: 1;
    padding-right: 10px;
    /* space between text and chevron */
}


.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 0.8rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    min-width: 200px;
    border-radius: 4px;
    padding: 10px 0;
    display: none;
    z-index: 1000;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 8px 20px;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('https://i.ibb.co/6c5GWYLw/St-Peters-Background.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Service Times Section */
.service-times {
    padding: 80px 0;
    background-color: var(--white);
}

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

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--dark);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
}

.service-grid>*:last-child:nth-child(4n + 1) {
    grid-column: 2 / 4;
}

@media (max-width: 992px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-grid>*:last-child:nth-child(4n + 1) {
        grid-column: auto;
    }
}

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

    .service-grid>*:last-child:nth-child(4n + 1) {
        grid-column: auto;
    }
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.service-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary);
    color: var(--white);
}

.service-card:hover .service-icon {
    color: var(--white);
}

.service-card:hover p {
    color: var(--white);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
    color: var(--dark);
}

.service-card p {
    color: var(--gray);
}

/* Upcoming Events Section */
.upcoming-events {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.event-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-content {
    padding: 20px;
}

.event-content h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--dark);
}

.event-details {
    margin-bottom: 15px;
}

.event-details p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.event-details i {
    color: var(--primary);
}

.event-content>p {
    margin-bottom: 20px;
}

.center-button {
    text-align: center;
    margin-top: 40px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.about-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feature-list i {
    color: var(--secondary);
}

.about-buttons {
    display: flex;
    gap: 15px;
}

/* Life Events Section */
.life-events {
    padding: 80px 0;
    background-color: var(--light);
}

.life-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.life-event-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.life-event-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary);
    color: var(--white);
}

.life-event-card:hover .life-event-icon {
    color: var(--white);
}

.life-event-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.life-event-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.life-event-card p {
    color: inherit;
    opacity: 0.8;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
}

.footer-top {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-column .phone,
.footer-column .email {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column .phone a,
.footer-column .email a {
    color: var(--white);
}

.footer-column .phone a:hover,
.footer-column .email a:hover {
    text-decoration: underline;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

.safeguarding-link {
    color: var(--white);
    text-decoration: underline;
}

.safeguarding-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: 2;
    }

    .about-content {
        order: 1;
    }
}
/* 1024px seems to max for the nav bar before it gets too big */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 90px;
        left: -100%;
        right: 0;
        width: 100vw;
        height: calc(100vh - 40px);
        background-color: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        transition: left 0.3s;
        gap: 20px;
        box-shadow: var(--shadow);
    }

    /* Fix for the 1px gap on mobile menu */
    .nav-menu {
        right: 0;
        width: 100vw;
        /* Use viewport width instead of percentage */
        left: -100vw;
        /* Match the width for proper animation */
        margin: 0;
        /* Remove any margin that might cause gaps */
        box-sizing: border-box;
        /* Ensure padding is included in width */
        overflow-y: auto;
        /* Allow scrolling within the menu if needed */
    }

    .nav-menu.active {
        margin-top: 0;
        top: 125%;
        width: 100vw;
        /* Position directly below the header */
        position: absolute;
        right: 0;
        left: 0;
        z-index: 1000;
        /* Ensure it appears above other content */
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        /* Optional: adds a shadow for better visibility */
    }

    /* Ensure the menu covers the entire viewport width */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 80px;
        /* Match the top position of the menu */
        right: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--white);
        z-index: 999;
        /* Just below the menu z-index */
        display: block;
    }


    .dropdown-menu {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
        width: 100%;
        z-index: 1005;

    }

    .dropdown.active .dropdown-menu {
        display: block;
        z-index: 1005;
    }

    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .life-events-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .about-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Prevent body scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}

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

    .hero-content h2 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .logo-text h2 {
        font-size: 0.9rem;
    }

    .logo-img {
        width: 50px;
        height: 50px;
    }
}