/* Common Styles for Holy Wisdom Website */

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

img {
    max-width: 100%;
    height: auto;
    outline: none;
    border-style: none;
}

img[class*="logo"],
img.hero-logo {
    display: block;
}

body {
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    line-height: 1.8;
    color: #1a1a1a;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Navigation */
nav {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.logo img {
    height: 62px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo a:active img {
    transform: scale(0.98);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a1a1a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav-links a.active {
        font-weight: 600;
        color: #1a1a1a;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: #1a1a1a;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

#menu-checkbox {
    display: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .container-narrow {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .container-narrow {
        padding: 0 1.25rem;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, #f8f8f8, #ffffff);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero .subtitle {
    font-size: 2rem;
    font-style: italic;
    color: #666;
    margin-bottom: 1rem;
}

/* Content Sections */
section {
    padding: 5rem 0;
}

section.alt-bg {
    background-color: #fafafa;
}

section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

section p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* Apply same paragraph sizing site-wide */
p {
    font-size: 1.2rem;
}

section em {
    font-style: italic;
}

/* Floating image for text wrap */
.float-left {
    float: left;
    width: 240px;
    max-width: 40%;
    height: auto;
    margin: 0 1.5rem 1rem 0;
    display: block;
}

/* Right-floating image for text wrap */
.float-right {
    float: right;
    width: 240px;
    max-width: 40%;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    display: block;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    color: #666;
    margin-bottom: 0.5rem;
}

footer .quote {
    font-style: italic;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-container {
        padding: 1rem 1.5rem;
        height: 70px;
        min-height: 70px;
        flex-wrap: wrap;
        align-content: flex-start;
        align-items: center;
        gap: 0;
    }

    .logo {
        flex-shrink: 0;
        order: 1;
        width: auto;
        max-width: calc(100% - 60px);
        display: flex;
        align-items: center;
        height: 50px;
    }

    .logo img {
        height: 50px;
        width: auto;
        max-width: 100%;
        display: block;
    }

    .menu-toggle {
        order: 2;
        flex-shrink: 0;
        align-self: center;
        padding: 0.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0;
        margin-top: 0;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding: 0;
        border-top: 1px solid #e0e0e0;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        flex-basis: 100%;
        background-color: #ffffff;
    }

    .nav-links li {
        padding: 0;
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: flex;
        width: 100%;
        padding: 1.125rem 1.5rem;
        font-size: 1.125rem;
        min-height: 48px;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        color: #1a1a1a;
        word-break: keep-all;
        overflow-wrap: normal;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links a:active {
        background-color: #f8f8f8;
    }

    #menu-checkbox:checked ~ .nav-container {
        height: auto;
        padding-bottom: 0;
    }

    #menu-checkbox:checked ~ .nav-container .nav-links {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        margin-top: 0.5rem;
    }

    #menu-checkbox:checked ~ .nav-container .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    #menu-checkbox:checked ~ .nav-container .menu-toggle span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    #menu-checkbox:checked ~ .nav-container .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

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

    .hero .subtitle {
        font-size: 1.5rem;
    }

    section h2 {
        font-size: 2.25rem;
    }

    /* Make floated images stack on small screens */
    .float-left {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    
    .float-right {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.875rem 1.25rem;
        height: 65px;
        min-height: 65px;
    }

    .logo {
        height: 45px;
    }

    .logo img {
        height: 45px;
    }

    .menu-toggle {
        padding: 0.5rem;
    }

    .nav-links {
        margin-left: -1.25rem;
        margin-right: -1.25rem;
    }

    .nav-links a {
        font-size: 1.0625rem;
        padding: 1rem 1.25rem;
        min-height: 44px;
    }

    #menu-checkbox:checked ~ .nav-container {
        padding-bottom: 0;
    }
}




