/*
Theme Name: Paroisse Saint-Sauveur
Theme URI: https://pstsauveur.ca
Author: Jonathan Dupré
Author URI: https://jonathandupre.com
Description: Theme pour la paroisse Saint-Sauveur	
Version: 1.1
License: Unlicensed
Text Domain: pstsauveur
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Work+Sans:wght@300;400;500;600;700&display=swap');

.debug > *,
.debug > * > *,
.debug > * > * > *,
.debug > * > * > * > *,
.debug > * > * > * > * > *,
.debug > * > * > * > * > * > *,
.debug > * > * > * > * > * > * > *,
.debug > * > * > * > * > * > * > * > *,
.debug > * > * > * > * > * > * > * > * > *,
.debug > * > * > * > * > * > * > * > * > * > * {
    outline: 1px solid orange; /* or use border */
}

/* Reset and base styles */
:root {
    --charcoal: #1C231E;
    --vert: #1C3725;
    --route: #792428;
    --beige: #EAD8BE;
    --blanc: #ffffff;
    --stroke: #CAC9C4;
    --background: #F6F2EE;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Work Sans', sans-serif;
    --bs-border-radius: 0.2rem; 
    --bs-dropdown-font-size: 0.8rem;
}

.fs-7 {
    font-size: 0.875rem !important;
}
.fs-8 {
    font-size: 0.75rem !important;
}

.font-heading {
   font-family: var(--font-heading);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 400; /* Prata looks better without heavy weight */
    color: var(--charcoal);
}

/* More dramatic typographic scale */
h1, .h1 {
    font-size: 4rem;    /* 64px */
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-size: 3.25rem; /* 52px */
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-size: 2.5rem;  /* 40px */
    line-height: 1.2;
}

h4, .h4 {
    font-size: 2rem;    /* 32px */
    line-height: 1.25;
}

h5, .h5 {
    font-size: 1.5rem;  /* 24px */
    line-height: 1.3;
}

h6, .h6 {
    font-size: 1.25rem; /* 20px */
    line-height: 1.4;
    font-family: var(--font-body);
    font-weight: 700;
}

/* Responsive typography */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: 3rem;    /* 48px */
    }

    h2, .h2 {
        font-size: 2.5rem;  /* 40px */
    }

    h3, .h3 {
        font-size: 2rem;    /* 32px */
    }

    h4, .h4 {
        font-size: 1.75rem; /* 28px */
    }

    h5, .h5 {
        font-size: 1.375rem; /* 22px */
    }

    h6, .h6 {
        font-size: 1.125rem; /* 18px */
    }
}

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--charcoal);
    text-decoration: none;
}

a:hover {
    color: var(--route);
    text-decoration: underline;
}

/* Top navbar */
.top-navbar {
    background-color: var(--charcoal);
    padding: 0.5rem 0;
}

.bg-vert {
    background-color: var(--vert);
}
.bg-charcoal {
    background-color: var(--charcoal);
}
.text-charcoal {
    color: var(--charcoal);
}

.bg-vert a {
    color: var(--white);
    text-decoration: underline;
}

/* Hero Banner */
.hero-banner {
    height: 600px;
    overflow: hidden;
}

.frontpage-hero {
    object-position: 30% center
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    /* No text shadow */
}

.hero-icon {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-banner {
        height: 400px;
    }
    
    .hero-content {
        text-align: center;
    }
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: none;
}


.custom-logo-mobile {
    display: none;
}

@media (max-width: 768px) {
    .site-branding .custom-logo {
        width: 300px;
    }
}

/* Navigation */
.navbar {
    padding: 0;
}

/* Override default selection background */
.navbar-nav .sub-menu a:focus,
.navbar-nav .dropdown-item:focus,
.navbar-nav .dropdown-item:active {
    background-color: var(--beige);
    color: var(--charcoal);
}

#masthead {
    background-color: var(--blanc);
}

.navbar-nav {
    align-items: center;
    /* padding: 0.5rem 0; */
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    color: var(--charcoal);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
    font-size: .8rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: var(--route);
}

/* Dropdown menu */
.navbar-nav .dropdown-menu {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    min-width: 200px;
    display: none;
}

.navbar-nav .menu-item-has-children {
    position: relative;
}

/* Desktop dropdown styles */
.navbar-nav .sub-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background-color: #fff;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 200px;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Add invisible padding area to prevent menu from disappearing */
.navbar-nav .menu-item-has-children:before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
    z-index: 1000;
}

/* Add a subtle arrow to the submenu */
.navbar-nav .sub-menu:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #E6E7E9;
    z-index: 1001;
}

.navbar-nav .sub-menu .menu-item {
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 1000;
}

.navbar-nav .sub-menu .menu-item:last-child {
    border-bottom: none;
}

.navbar-nav .sub-menu a {
    padding: 0.75rem 1rem;
    color: var(--charcoal);
    font-size: 0.75rem;
    display: block;
    text-decoration: none;
    position: relative;
    z-index: 1000;
}

.navbar-nav .sub-menu a:hover {
    background-color: var(--beige);
    color: var(--charcoal);
}


.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    opacity: 0.9;
    background-color: var(--route);
    border-color: var(--route);
    color: var(--blanc) !important;
    text-decoration: none;
}

/* Hide checkbox inputs */
.dropdown-toggle-input {
    display: none;
}

/* Desktop dropdown behavior */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Desktop menu */
@media (min-width: 992px) {
    .navbar-collapse {
        display: none !important;
    }

    .navbar {
        display: flex;
    }

    .navbar-nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        justify-content: center;
        gap: 2rem;
    }

    .navbar-nav > li:not(:last-child) {
        margin-right: 0;
    }

    #donate-button {
        margin-left: auto;
        background-color: var(--route);
        color: var(--blanc) !important;
        padding: 0.75rem 1rem;
    }

    #donate-button:hover {
        opacity: 0.9;
    }
}

.dropdown-item .custom-dropdown-item {
    font-size: .8rem;
}

/* Mobile menu */
@media (max-width: 991.98px) {
    .d-lg-none.text-end {
        position: fixed;
        top: 0;
        right: 0;
        padding: 1rem;
        z-index: 500;
        width: 100%;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .site-branding {
        margin-top: 3.5rem;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        z-index: 1001;
        position: relative;
        margin-right: 0.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 1.5em;
        height: 1.5em;
    }

    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 15rem;
        padding: 2rem;
        background-color: var(--charcoal);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        overflow-y: auto;
    }
        
    .custom-logo-mobile {
        display: block;
        width: 11rem;
    }

    .navbar-nav {
        margin: 0 !important;
        padding: 1rem 0;
        text-align: left;
        width: 100%;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link,
    .navbar-nav .dropdown-toggle {
        color: var(--blanc) !important;
        font-size: 1.1rem;
        padding: 0.25rem 0;
        text-align: left;
        width: 100%;
        display: block;
        cursor: pointer;
    }

    .navbar-nav .dropdown-toggle::after {
        content: "▾";
        float: right;
        border: none;
        font-size: 1.5rem;
        margin-top: -0.2rem;
        transition: transform 0.2s ease;
    }

    /* Dropdown wrapper */
    .navbar-nav .dropdown-wrapper {
        position: relative;
        width: 100%;
    }

    /* Dropdown menu behavior */
    .navbar-nav .dropdown-menu {
        display: none;
        background: transparent;
        border: none;
        padding: 0 0 0 1.2rem;
        margin: 0;
    }

    /* Show dropdown menu when checkbox is checked */
    .navbar-nav .dropdown-toggle-input:checked + .dropdown-toggle + .dropdown-menu {
        display: block;
    }

    /* Style for dropdown items */
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 0.25rem 0;
        font-size: .8rem;
    }

    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        color: white !important;
        background: transparent;
    }

    /* Dropdown toggle styling */
    .navbar-nav .dropdown-toggle {
        position: relative;
        cursor: pointer;
        color: white !important;
        font-size: 1.1rem;
        padding: 0.25rem 0;
        text-align: left;
        width: 100%;
        display: block;
    }

    .navbar-nav .dropdown-toggle::after {
        content: "▾";
        float: right;
        border: none;
        font-size: 1.5rem;
        margin-top: -0.2rem;
        transition: transform 0.2s ease;
    }

    /* Rotate arrow when dropdown is open */
    .navbar-nav .dropdown-toggle-input:checked + .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    /* Bootstrap collapse backdrop styling */
    .navbar-collapse::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .navbar-collapse.show::before {
        opacity: 1;
    }



    #donate-button {
        margin: 1.5rem auto;
        width: 100%;
        max-width: 200px;
        text-align: center;
        background-color: white;
        color: #1B4332 !important;
        display: block;
    }

    #donate-button:hover,
    #donate-button:focus,
    #donate-button:active {
        opacity: 0.9;
        background-color: rgba(255, 255, 255, 0.9);
        border-color: white;
        color: #1B4332 !important;
        text-decoration: none;
    }
}

/* Social icons */
.social a {
    color: var(--blanc);
    display: inline-block;
    font-size: 1.25rem;
    margin-right: 1rem;
    transition: opacity 0.3s ease;
}

.social a:hover {
    opacity: 0.8;
}

/* Footer menu */
.footer-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    background-color: var(--light-gray);
    margin-top: 2rem;
}

/* Gutenberg specific styles */
.wp-block {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block[data-align="wide"] {
    max-width: 1400px;
}

.wp-block[data-align="full"] {
    max-width: none;
}

/* Footer menu */
.footer-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    background-color: var(--light-gray);
    margin-top: 2rem;
}

/* Gutenberg specific styles */
.wp-block {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block[data-align="wide"] {
    max-width: 1400px;
}

.wp-block[data-align="full"] {
    max-width: none;
}

.navbar-nav .menu-item-has-children > a::after {
    content: "▾";
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.navbar-nav .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

@media (max-width: 991.98px) {
    .navbar-nav .menu-item-has-children > a::after {
        float: right;
        margin-top: 0.25rem;
    }
}

/* Mission section */
.mission-section {
    background-color: var(--vert);
    color: var(--blanc);
    background-image: url('assets/images/icons/Logo_symbole_transparent.svg');
    background-repeat: no-repeat;
    background-position: left center;
}

.mission-inner {
    padding: 6rem 1rem 9rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mission-eyebrow {
    letter-spacing: 0.18em;
    font-weight: 600;
}

.mission-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.mission-eyebrow .mission-icon {
    filter: invert(1);
}

.mission-heading {
    font-family: var(--font-heading);
    color: var(--blanc);
    margin-left: auto;
    margin-right: auto;
}

.mission-image-stage {
    background: var(--background);
}

.mission-image-wrapper {
    transform: translateY(-100px);
}

/* Constrain mission image size */
.mission-image-wrapper {
    max-width: 72rem;
    margin: 0 auto;
}

.mission-image {
    height: 32rem;
    object-fit: cover;
    display: block;
}

@media (max-width: 992px) {
    .mission-inner { padding: 4rem 1rem 7rem; }
    .mission-image-wrapper { transform: translateY(-60px); }
    .mission-section {
        background-position: center top;
        background-size: clamp(160px, 40vw, 360px);
    }
    .mission-image { height: 220px; }
}

/* Mission proportion refinements */
.mission-section {
    background-size: clamp(480px, 48vw, 1040px);
    background-position: left -8vw center;
}

.mission-inner {
    padding: 5rem 1rem 5.5rem;
}

.mission-heading {
    font-size: clamp(2.8rem, 6vw, 4.75rem);
    max-width: 20ch;
}

.mission-image-wrapper {
    transform: translateY(-12rem);
}

/* Next Event section */
.next-event-section {
    background: var(--background);
}

.event-image-wrap { background: #000; }
.event-photo { height: 520px; object-fit: cover; display: block; }

@media (max-width: 991.98px) {
  .event-photo { height: 360px; }
}

.event-badge-svg {
    width: 4rem;
    height: 4rem;
}

.event-meta .event-date {
    letter-spacing: 0.01em;
}

.event-meta .event-time {
    letter-spacing: 0.12em;
}

.event-venue {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0.375rem;
    border-left: 3px solid var(--route);
}

.event-venue i {
    color: var(--route);
    font-size: 0.875rem;
}

.next-event-section hr {
    border-top: 1px solid var(--stroke);
}

.btn-route {
    background-color: var(--route);
    color: var(--blanc);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-route:hover,
.btn-route:focus {
    background-color: #5c1b1f;
    color: var(--blanc);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(121, 36, 40, 0.3);
}

.btn-route:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(121, 36, 40, 0.3);
}

.btn-outline-charcoal {
    border: 1px solid var(--charcoal);
    color: var(--charcoal);
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline-charcoal:hover,
.btn-outline-charcoal:focus {
    background: var(--charcoal);
    color: var(--blanc);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline-charcoal:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.98px) {
    .event-badge {
        left: 0.75rem;
        right: 0.75rem;
        top: -1rem;
    }
    .event-photo { height: 360px; }
}

@media (max-width: 991.98px) {
    .event-badge { top: 0.5rem; left: 0.5rem; right: 0.5rem; }
    .event-photo { height: 320px; }
}


