/* ============================================================
   PETRA'S QUILTEREI – style.css
   ============================================================ */

/* === FONTS === */
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-display-v40-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/playfair-display-v40-latin-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato-v25-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato-v25-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* === CUSTOM PROPERTIES === */
:root {
    --color-primary:      #c8847a;
    --color-primary-dark: #b06b61;
    --color-secondary:    #f9f3ee;
    --color-accent:       #7a5c4f;
    --color-text:         #3d2b24;
    --color-text-light:   #6b4f46;
    --color-bg:           #fdf8f4;
    --color-border:       #e8d8d0;
    --color-footer-bg:    #4a3028;
    --color-footer-text:  #f0e6e0;
    --font-heading:       'Playfair Display', Georgia, serif;
    --font-body:          'Lato', 'Segoe UI', Arial, sans-serif;
    --border-radius:      10px;
    --shadow:             0 2px 12px rgba(122, 92, 79, 0.10);
    --max-width:          1100px;
}

/* === RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='6' height='6' fill='%23fdf8f4'/%3E%3Cpath d='M0 0l6 6M6 0l-6 6' stroke='%23c8847a' stroke-width='0.4' opacity='0.07'/%3E%3C/svg%3E");
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* === LAYOUT === */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-main {
    flex: 1;
}

/* === INFOBAR === */
.site-infobar {
    background: var(--color-accent);
    color: #fff;
    text-align: center;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* === HEADER === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === NAVIGATION === */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.2rem;
    align-items: center;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
    display: block;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.20);
}

.main-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 700;
}

/* === MENU TOGGLE === */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #fff;
    font-size: 1.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.2;
    flex-shrink: 0;
}

/* === FOOTER === */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 2rem 0;
    text-align: center;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    justify-content: center;
    list-style: none;
    margin: 0.5rem 0;
}

.footer-nav a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--color-secondary), #ffe8e0);
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--color-accent);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.hero-text {
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.notice-btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 0.7rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-decoration: none;
    margin: 1.5rem auto 0;
    box-shadow: var(--shadow);
    transition: background 0.2s, transform 0.15s;
}

.notice-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.hero-image {
    max-width: 800px;
    margin: 2rem auto 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(122, 92, 79, 0.18);
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* === QUICKLINKS === */
.quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.quicklink-card {
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    box-shadow: var(--shadow);
    display: block;
}

.quicklink-card:hover {
    box-shadow: 0 6px 24px rgba(122, 92, 79, 0.18);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.card-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: 0.4rem;
}

.quicklink-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(135deg, var(--color-secondary), #ffe8e0);
    padding: 2.5rem 0;
    border-bottom: 3px solid var(--color-border);
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 0.4rem;
}

.page-header p {
    color: var(--color-text-light);
    margin-top: 0.4rem;
}

/* === ENTRY CONTENT === */
.entry-content {
    max-width: 780px;
    padding-bottom: 3rem;
}

.entry-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.entry-content a {
    color: var(--color-primary);
}

.entry-content h2 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
}

/* === GALLERY === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    height: auto;
    background: var(--color-secondary);
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* === MASONRY GALLERY === */
.masonry-grid {
    columns: 4;
    column-gap: 1rem;
}

.masonry-grid .gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    aspect-ratio: unset;
    height: auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    background: transparent;
}

.masonry-grid .gallery-item img {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
    transition: transform 0.3s ease;
}

.masonry-grid .gallery-item:hover img {
    transform: scale(1.03);
}

@media (max-width: 900px) {
    .masonry-grid { columns: 3; }
}

@media (max-width: 600px) {
    .masonry-grid { columns: 2; }
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.lightbox.is-open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* === HOURS / CONTACT CARD === */
.hours-card {
    max-width: 480px;
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.hours-card p {
    line-height: 2;
    margin-bottom: 0.1rem;
}

.hours-card a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.hours-card a:hover {
    text-decoration: underline;
}

/* === NOTICE BOX === */
.notice-box {
    background: #fde8e8;
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 600;
    color: var(--color-accent);
}

/* === ACCESSIBILITY === */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .site-title {
        order: 1;
        flex: 1;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: var(--color-primary-dark);
        border-radius: var(--border-radius);
        margin-top: 0.5rem;
        padding: 0.5rem;
        gap: 0.15rem;
    }

    .main-nav ul.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 0.6rem 1rem;
    }

    .hero-section {
        padding: 2.5rem 0;
    }
}

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