@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --bg-1: #f2f2f2;
    --bg-2: #a6a6a6;
    --txt-1: #0d0d0d;
    --txt-2: #262626;
    --txt-3: #595959;
    --accent: #262626;
    --white: #ffffff;
    --danger: #891515;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--txt-1);
    background:
        radial-gradient(circle at top right, #d9d9d9 0%, transparent 45%),
        linear-gradient(160deg, var(--bg-1) 0%, #ececec 50%, #dedede 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background-color: rgba(242, 242, 242, 0.75);
    border-bottom: 1px solid rgba(89, 89, 89, 0.15);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.nav-desktop {
    display: none;
}

.nav-desktop a {
    font-size: 0.95rem;
    color: var(--txt-2);
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(89, 89, 89, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--txt-2);
    border-radius: 4px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: min(84vw, 320px);
    height: 100dvh;
    padding: 16px;
    background: #f2f2f2;
    box-shadow: 12px 0 30px rgba(13, 13, 13, 0.18);
    z-index: 95;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu[hidden] {
    display: none !important;
}

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
}

.mobile-menu-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
}

.mobile-menu a {
    font-size: 1rem;
    color: var(--txt-2);
    padding: 10px 8px;
    border-radius: 8px;
}

.mobile-menu a:hover {
    background: rgba(89, 89, 89, 0.1);
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.34);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
}

.mobile-menu-backdrop[hidden] {
    display: none !important;
}

body.menu-open {
    overflow: hidden;
}

body.lightbox-open {
    overflow: hidden;
}

.page-content {
    padding: 26px 0 70px;
}

.site-footer {
    margin-top: 20px;
    padding: 18px 0 10px;
    border-top: 1px solid rgba(89, 89, 89, 0.25);
    background: rgba(242, 242, 242, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-logo {
    display: inline-block;
    width: fit-content;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--txt-2);
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(89, 89, 89, 0.28);
    border-radius: 999px;
    color: var(--txt-2);
    background: rgba(255, 255, 255, 0.55);
}

.footer-social-link svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.footer-block h3 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--txt-2);
}

.footer-block p {
    margin: 0 0 4px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--txt-3);
}

.footer-block a {
    color: var(--txt-2);
    text-decoration: none;
}

.footer-copy {
    margin: 14px auto 0;
    width: min(460px, 92vw);
    padding: 8px 14px;
    text-align: center;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    color: var(--txt-2);
    border: 1px solid rgba(89, 89, 89, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero p {
    color: var(--txt-3);
    max-width: 60ch;
}

.cards-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.latest-photos-section {
    margin-top: 34px;
}

.latest-photos-head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    color: var(--txt-2);
}

.latest-photos-head p {
    margin: 6px 0 0;
    color: var(--txt-3);
    font-size: 0.95rem;
}

.masonry-grid {
    margin-top: 14px;
    column-count: 1;
    column-gap: 12px;
}

.masonry-item {
    display: block;
    position: relative;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    break-inside: avoid;
    background: #d7d7d7;
    box-shadow: 0 10px 24px rgba(13, 13, 13, 0.1);
}

.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
}

.masonry-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(13, 13, 13, 0.78);
    color: #f2f2f2;
}

.category-card {
    min-height: 320px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background-color: #d5d5d5;
    box-shadow: 0 16px 34px rgba(13, 13, 13, 0.12);
}

.card-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.category-card img,
.card-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    display: grid;
    place-items: center;
    color: var(--txt-3);
    font-weight: 600;
}

.card-overlay {
    position: absolute;
    inset: 0;
    padding: 18px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    color: var(--white);
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.08) 0%, rgba(13, 13, 13, 0.72) 100%);
    transition: background 0.25s ease;
}

.card-overlay h2 {
    margin: 0;
    font-size: 1.5rem;
}

.card-overlay span {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.category-card:hover .card-overlay {
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.12) 0%, rgba(13, 13, 13, 0.84) 100%);
}

.gallery-header h1,
.contact-section h1,
.admin-page h1 {
    margin-bottom: 6px;
}

.gallery-header p,
.contact-section p {
    color: var(--txt-3);
}

.gallery-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    padding: 20px 16px;
    overflow: auto;
}

.lightbox[hidden] {
    display: none !important;
}

.lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 40px);
    object-fit: contain;
    margin: auto;
    border: 1px solid #a6a6a6;
    background: #0d0d0d;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    border: 0;
    background: var(--white);
    color: var(--txt-1);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.contact-links {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}

.contact-links a {
    padding: 9px 14px;
    border: 1px solid rgba(89, 89, 89, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.contact-form,
.admin-form {
    display: grid;
    gap: 8px;
    max-width: 520px;
    margin-top: 14px;
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(89, 89, 89, 0.35);
    border-radius: 8px;
    background: #fff;
}

button,
.admin-actions a {
    width: fit-content;
    padding: 10px 16px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    background: var(--accent);
    color: var(--white);
}

button.danger {
    background: var(--danger);
}

.flash {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.flash.success {
    background: rgba(15, 117, 63, 0.12);
    color: #105f39;
}

.flash.error {
    background: rgba(137, 21, 21, 0.12);
    color: #791515;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.admin-filter label {
    font-weight: 600;
    color: var(--txt-2);
}

.admin-filter select {
    width: auto;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.9);
}

.admin-category {
    margin-top: 20px;
}

.admin-image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.admin-image-item {
    border: 1px solid rgba(89, 89, 89, 0.2);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-image-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.admin-file-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--txt-2);
    overflow-wrap: anywhere;
}

.admin-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-card-actions form {
    margin: 0;
    display: inline-flex;
}

.admin-btn {
    min-width: 104px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.admin-btn-edit,
.admin-btn-save {
    background: #262626;
    color: #fff;
}

.admin-btn-delete {
    background: #9b1414;
    color: #fff;
}

.admin-btn-cancel {
    background: #d2d2d2;
    color: #262626;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 16px;
}

.admin-modal[hidden] {
    display: none !important;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 13, 0.58);
}

.admin-modal-panel {
    position: relative;
    width: min(460px, 92vw);
    border-radius: 14px;
    border: 1px solid rgba(89, 89, 89, 0.35);
    background: #f2f2f2;
    box-shadow: 0 18px 42px rgba(13, 13, 13, 0.3);
    padding: 14px;
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-modal-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.admin-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    padding: 0;
}

.admin-rename-form {
    max-width: none;
}

.admin-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

body.admin-modal-open {
    overflow: hidden;
}

.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: #25d366;
    color: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    font-weight: 600;
    z-index: 50;
}

.empty-state {
    padding: 14px;
    border-radius: 8px;
    background: rgba(89, 89, 89, 0.1);
    color: var(--txt-3);
}

@media (min-width: 700px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 860px) {
    .menu-toggle {
        display: none;
    }

    .nav-desktop {
        display: flex;
        gap: 14px;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .masonry-grid {
        column-count: 3;
    }
}
