/*
=====================================================
Ruca's Promise
Main Stylesheet
=====================================================
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Nunito", Arial, sans-serif;
    background: #f8faf7;
    color: #333;
}

.page {
    display: grid;
    grid-template-rows: 60px minmax(0, 1fr) 150px;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#header,
#footer {
    min-height: 0;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 0 25px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.site-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-title {
    color: #3d7045;
    font-size: 1.7rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.site-title:hover,
.site-title:focus-visible {
    color: #2d5632;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 90px;
    padding: 8px 20px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    background: #d96b6b;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.login-button:hover,
.login-button:focus-visible {
    background: #b95050;
}

.login-button:active {
    transform: scale(0.97);
}

.content {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8faf7;
}

#navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: #f8faf7;
    border-bottom: 1px solid #ddd;
}

.nav-button {
    display: inline-block;
    padding: 10px 22px;
    color: #333;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: #eee;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.nav-button:hover,
.nav-button:focus-visible {
    background: #b8e6b8;
}

.nav-button.active {
    background: #f6b2b2;
}

.nav-button:active {
    transform: scale(0.97);
}

.content-wrapper {
    width: calc(100% - 48px);
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px 0 50px;
}

.hero {
    text-align: center;
}

.hero h1 {
    margin-bottom: 20px;
    color: #3d7045;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero h2 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
}

.hero p {
    margin-bottom: 1.15rem;
    font-size: 1.15rem;
    line-height: 1.8;
}

.page-content {
    text-align: left;
    line-height: 1.8;
}

.page-content::after {
    display: block;
    clear: both;
    content: "";
}

.page-content h1 {
    margin-bottom: 20px;
    color: #3d7045;
}

.page-content h2 {
    margin: 30px 0 15px;
    color: #555;
}

.page-content p {
    margin-bottom: 1.2rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
}

.about-page h2 {
    margin-top: 0;
    margin-bottom: 28px;
    color: #3d7045;
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
}

.about-photo,
.ruca-photo {
    display: block;
    height: auto;
    background: #fff;
    border: 4px solid #fff;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.about-photo {
    float: left;
    width: 350px;
    max-width: 45%;
    margin: 0 30px 20px 0;
}

.ruca-photo {
    float: right;
    width: 320px;
    max-width: 42%;
    margin: 40px 0 20px 30px;
}

.clearfix {
    clear: both;
}

.footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 150px;
    padding: 20px;
    color: #fff;
    text-align: center;
    background: #3d7045;
}

.footer a {
    margin: 0 10px;
    color: #fff;
    text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
    text-decoration: underline;
}

.footer p {
    margin-top: 15px;
    font-size: 0.9rem;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(61, 112, 69, 0.35);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 15px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .main-nav {
        gap: 6px;
        padding: 10px;
    }

    .nav-button {
        flex: 1 1 calc(50% - 6px);
        min-width: 130px;
    }

    .content-wrapper {
        width: calc(100% - 30px);
        padding-top: 25px;
    }

    .about-photo,
    .ruca-photo {
        float: none;
        width: 100%;
        max-width: 520px;
        margin: 0 auto 25px;
    }

    .footer a {
        display: inline-block;
        margin: 4px 8px;
    }
}

@media (max-width: 480px) {
    .site-title {
        max-width: 210px;
        overflow: hidden;
        font-size: 1.1rem;
        text-overflow: ellipsis;
    }

    .login-button {
        min-width: 76px;
        padding: 7px 14px;
    }

    .nav-button {
        flex-basis: 100%;
        width: 100%;
    }

    .content-wrapper {
        width: calc(100% - 24px);
        padding-top: 20px;
    }
}

.photo-carousel {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    overflow: hidden;
}

#carousel-image {
    display: block;
    width: 250px;
    height: 250px;
    object-fit: cover;
    opacity: 1;
    transition: opacity 500ms ease;
}