html, body {
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

body {
    background-image: url(../images/blue-gothic-lily.svg);
    background-size: 100% 100%;
    background-color: #FFFAF9;
    font-family: 'Warbler', 'WarblerText', serif;
    font-variation-settings: 'opsz' 16;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
    position: relative;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #FFFAF9;
    position: relative;
    border: 0px solid #08092D;
    border-top: none;
    border-bottom: none;

}


header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem 3rem 1rem;
}

article {
    max-width: 550px;
    margin: 0 auto;
    padding: 2rem 2rem 2rem 2rem;
}

article:first-child {
    padding-top: 0rem;
}

article.home:first-child {
    padding-top: 2rem;
}

article h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: 'opsz' 32;
    line-height: 1.2;
}

article p {
    margin: 0 0 1.5rem 0;
}

article ol , article ul {
    margin: 0 0 1.5rem 2rem;
    padding: 0;
}

article ol li, article ul li {
    padding: 0.5rem 0;
}

article ol.bordered {
    max-width: 600px;
    font-style: italic;
    position: relative;
    list-style-position: inside;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

article ol.bordered::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        42deg,
        #BC8A2F,
        #BC8A2F 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #BC8A2F 1.6px
    );
}

article ol.bordered li {
    padding: 1.5rem 1.7rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

article ol.bordered li:last-child {
    border-bottom: none;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: 'opsz' 40;
    line-height: 0.9;
    color: #0E1038;
    text-align: center;
    background: repeating-linear-gradient(
        42deg,
        #BC8A2F,
        #BC8A2F 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #BC8A2F 1.6px
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: -3px -3px #000, -2px -2px #fff;
}

h1.filiae {
    font-size: 3rem;
}

h1 span {
    display: inline-block
}

h3 {
    margin: 2rem 0 0.5rem 0;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: -0.04rem;
}

blockquote {
    margin: 0 2rem 1rem 2rem;
    font-style: italic;
}

.subtitle {
    margin: 0.7rem 0 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    font-variation-settings: 'opsz' 24;
    text-align: center;
}

.subtitle-block {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 720px;
    margin: 0 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    border-left: none;
    border-right: none;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 400;
    font-variant-caps: small-caps;
    font-variation-settings: 'opsz' 24;
    text-align: center;
    background: repeating-linear-gradient(
        42deg,
        #FFEDD7,
        #FFEDD7 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #FFEDD7 1.6px
    );
}

.subtitle-block span {
    margin: 0 auto;
}

.subtitle-block::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        42deg,
        #BC8A2F,
        #BC8A2F 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #BC8A2F 1.6px
    );
}

.decorative-element {
    width: 30px;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.decorative-element.left {
    left: -30px;
}

.decorative-element.right {
    right: -30px;
    transform: translateY(-50%) scaleX(-1);
}

nav {
    margin: 0 auto;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    background-color: #FFFAF9;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-menu-row {
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-menu-row:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-menu-items {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    min-height: 2.4rem;
}

/* Mobile first - About Us first, then shield */
.nav-menu-row:first-child .nav-menu-items li:nth-child(1) {
    order: 1;
}

.nav-menu-row:first-child .nav-menu-items li:nth-child(2) {
    order: 2;
}

.nav-menu-row:first-child .nav-menu-items li:nth-child(3) {
    order: 3;
}

.nav-menu li {
    margin: 0;
    text-align: center;
    flex: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



.nav-menu a {
    position: relative;
    padding: 0.5rem 0.5rem 0.4rem 0.5rem;
    color: #0E1038;
    font-family: 'Warbler', 'WarblerText', serif;
    font-variation-settings: 'opsz' 16;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.2;
    font-style: normal;
    text-decoration: none;
}

.nav-menu .nav-logo a {
    padding: 0.3rem 0.5rem 0 0.5rem;
}

.nav-logo {
    width: 30px;
    height: auto;
    display: block;
    filter: drop-shadow(0px 3px 2px rgba(0, 0, 0, 0.1));
    margin-bottom: -0.30rem;
}

.nav-menu a::before,
.nav-menu a::after {
    content: '';
    position: absolute;
    top: 55%;
    width: 12px;
    height: 12px;
    background-image: url('../images/active-page.svg');
    background-size: 10px;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-menu a::before {
    left: -4px;
    transform: translateY(-50%);
}

.nav-menu a::after {
    right: -4px;
    transform: translateY(-50%) scaleX(-1);
}

.nav-menu a:hover,
.nav-menu a.current-page {
    color: #a20000;
}

.nav-menu a:hover::before,
.nav-menu a:hover::after,
.nav-menu a.current-page::before,
.nav-menu a.current-page::after {
    opacity: 1;
}

img {
    display:block;
    width: 100%;
    height: auto;
}

footer {
    padding: 0;
    color: #fff;
    background-color: #0E1038;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    font-variation-settings: 'opsz' 16;
    position: relative;
}

.decorative-stars {
    width: 80px;
    margin: 2rem auto;
    opacity: 0.75;
}

.verse-container {
    font-style: italic;
}

footer aside {
    padding: 2rem;
    text-align: center;
}

footer p {
    opacity: 0.5;
}

.contact-info p {
    margin: 0 0 1rem 0;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.verse {
    font-size: 1rem;
    font-weight: 400;
    font-style: normal;
    font-variant-caps: all-small-caps;
    font-variation-settings: 'opsz' 16;
    margin: 1rem 0;
}


.focus-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 720px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    border: 1px solid #000;
    border-left: none;
    border-right: none;
    background: repeating-linear-gradient(
        42deg,
        #FFEDD7,
        #FFEDD7 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #FFEDD7 1.6px
    );
}

.focus-block form {
    width: 100%;
}

.focus-block span {
    margin: 0 auto;
}

.focus-block::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        42deg,
        #BC8A2F,
        #BC8A2F 0.5px,
        #fff 0.6px,
        #fff 1.5px,
        #BC8A2F 1.6px
    );
}


.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contact-column:first-child {
    flex-shrink: 0;
}

.coat-of-arms-reversed {
    width: 50px;
    opacity: 0.6;
}

#coat-of-arms {
    width: 60px;
    padding-bottom: 1rem;
    filter: drop-shadow(0px 3px 2px rgba(0, 0, 0, 0.1));
    margin-bottom: -0.5rem;
}

.lily-divider {
    width: 130px;
    margin: 0 auto;
    margin-top: 2rem;
    opacity: 0.25;
}

.horarium {
    margin: 0 auto;
    padding: 0rem 1.5rem 3rem 1.5rem;
}

.horarium h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: 'opsz' 32;
}

.paper-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.horarium-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.horarium-row:first-child {
    padding-top: 2rem;
}

.horarium-row:last-child {
    padding-bottom: 2rem;
}

.horarium-row {
    display: flex;
    align-items: center;
    padding: 0.3rem 0;
}

.horarium-time {
    min-width: 6rem;
    padding-right: 0.25rem;
    padding-left: 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.horarium-time span {
    font-variant-caps: all-small-caps;
}

.horarium-time hr {
    flex: 1;
    margin: 0;
    padding-top: 0.8rem;
    border: none;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.3);
}

.horarium-activity {
    padding-right: 1rem;
}

.horarium-border-top {
    margin: 0 auto;
}

.horarium-border-bottom {
    margin: 0 auto;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 0.75rem;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #0E1038;
    box-shadow: 0 0 0 2px rgba(14, 16, 56, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-group.checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    zoom: 1.5;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-group button {
    display: block;
    position: relative;
    width: 100%;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background-color: #0E1038;
    color: white;
    border: none;
    font-family: 'Warbler', 'WarblerText', serif;
    font-variation-settings: 'opsz' 16;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-group button:hover {
    background-color: #1a1f4d;
}

.form-group button::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        42deg,
        #0E1038,
        #0E1038 0.5px,
        #FFFAF9 0.6px,
        #FFFAF9 1.5px,
        #0E1038 1.6px
    );
}

.button-link {
    display: inline-block;
    position: relative;
    padding: 1rem 2rem;
    background-color: #0E1038;
    color: white;
    border: none;
    font-family: 'Warbler', 'WarblerText', serif;
    font-variation-settings: 'opsz' 16;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button-link:hover {
    background-color: #1a1f4d;
    color: white;
    text-decoration: none;
}

.button-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        42deg,
        #0E1038,
        #0E1038 0.5px,
        #FFFAF9 0.6px,
        #FFFAF9 1.5px,
        #0E1038 1.6px
    );
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (min-width: 768px) {
    body {
        font-size: 1.2rem;
    }

    .content-container {
        border-width: 30px;
    }

    .content-container::before {
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
    }

    nav {
        padding: 0 4rem;
    }

    header {
        padding: 5.5rem 2rem 5.5rem 2rem;
    }

    #coat-of-arms {
        width: 100px;
        margin-bottom: -1rem;
    }

    h1 {
        font-size: 4rem;
    }

    h1.filiae {
        font-size: 6rem;
    }

    h3 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 2rem;
    }

    .subtitle-block {
        margin: 0 4rem;
        padding: 0.5rem 3.5rem;
        font-size: 1.4rem;
    }

    article {
        max-width: 720px;
        padding: 3rem 6rem;
    }

    .nav-menu {
        flex-direction: row;
    }

    .nav-menu-row {
        flex: 1;
        margin-bottom: 0;
    }

    .nav-menu-row:first-child {
        border-bottom: none;  
    }

    .nav-menu-items {
        flex-direction: row;
    }

    .nav-menu li {
        width: auto;
    }

    .nav-menu a {
        font-size: 0.9rem;
        padding: 1.4rem 0.5rem 1rem 0.5rem;
    }

    .nav-menu a::before,
    .nav-menu a::after {
        width: 14px;
        height: 14px;
        top: 60%;
    }

    footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 4rem;
    }

    footer aside {
        flex: 1;
        margin: 0;
        padding: 0 2rem;
        text-align: left;
    }

    footer aside:first-child {
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }

    .decorative-stars {
        margin: 2rem 0;
    }

    .contact-info {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 2rem;
    }

    .contact-column {
        align-items: flex-start;
        width: auto;
    }

    .coat-of-arms-reversed {
        width: 80px;
    }

    /* Desktop - Shield first, then About Us */
    .nav-menu-row:first-child .nav-menu-items li:nth-child(1) {
        order: 2;
    }

    .nav-menu-row:first-child .nav-menu-items li:nth-child(2) {
        order: 1;
    }

    .nav-menu-row:first-child .nav-menu-items li:nth-child(3) {
        order: 3;
    }

    .nav-logo {
        width: 45px;
        margin-bottom: -0.7rem;
    }

    .paper-container {
        padding: 2.5rem 3rem;
    }

    .horarium {
        padding: 0rem 2rem 5rem 2rem;
    }

    .horarium h2 {
        font-size: 2.5rem;
        font-variation-settings: 'opsz' 40;
    }

    .horarium-time {
        min-width: 10rem;
        padding-left: 3rem;
    }

    .horarium-activity {
        padding-right: 3rem;
    }

    .form-row {
        flex-direction: row;
        gap: 1rem;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        padding: 0.75rem;
    }

    .form-group button {
        font-size: 1.2rem;
    }

    .button-link {
        font-size: 1.2rem;
    }

    .focus-block {
        margin: 2rem auto;
        padding: 2.5rem 3rem;
    }
}

@media (min-width: 768px) and (max-width: 929px) {
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
    /* Prioritize verse container not wrapping */
    .verse-container {
        flex: 1 0 auto;
    }
}