/* This is the new centralized stylesheet for your entire site.
  It contains all common styles for the :root, body, nav, buttons,
  modals, and gallery items.
*/
:root {
    --bg-main: #f5f3f0;
    --bg-card: #ffffff;
    --accent-primary: #C5A880;
    --accent-secondary: #D4B896;
    --accent-dark: #15343B;
    --text-dark: #4B5563;
    --text-light: #ffffff;
    --border-light: #e5e7eb;
    --transition: all 0.36s ease;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

html, body { 
    height: 100%; 
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}

main { 
    flex: 1 0 auto; 
}

h1, h2, h3, h4, .font-serif { 
    font-family: var(--font-serif); 
}

/* --- Navigation --- */
.nav-link { 
    position: relative; 
    font-weight: 500; 
    transition: all 0.3s ease;
}
.nav-link:hover { 
    color: var(--accent-primary); 
}
.nav-link::after {
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px;
    bottom: -5px; 
    left: 50%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: all 0.25s ease-in-out;
    transform: translateX(-50%); 
    border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after { 
    width: 100%; 
}
.nav-link:hover, .nav-link.active { 
    color: var(--accent-primary); 
}
.nav-accent-dark { 
    background: var(--accent-dark); 
}
#mobile-menu { 
    transform: translateX(-100%); 
    transition: transform 0.5s ease-in-out; 
    pointer-events: none; 
}
#mobile-menu.open { 
    transform: translateX(0); 
    pointer-events: auto; 
}
#menu-btn #line-top, #menu-btn #line-mid, #menu-btn #line-bot { 
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out; 
    transform-origin: center; 
}
#menu-btn.open #line-top { 
    transform: translateY(6px) rotate(45deg); 
}
#menu-btn.open #line-mid { 
    opacity: 0; 
    transform: scaleX(0); 
}
#menu-btn.open #line-bot { 
    transform: translateY(-3px) rotate(-45deg); 
}

/* --- Common Components --- */
.btn-primary {
    background: linear-gradient(135deg, #15343B 0%, #15343B 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 85, 99, 0.3);
}
.btn-primary:disabled { 
    background: #9ca3af; 
    cursor: not-allowed; 
}
.btn-primary::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%;
    width: 100%; 
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before { 
    left: 100%; 
}

.form-input {
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
}
.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.1);
    transform: translateY(-2px);
}

.loader {
    width: 50px; 
    aspect-ratio: 1; 
    border-radius: 50%;
    background: radial-gradient(farthest-side,var(--accent-primary) 94%,#0000) top/8px 8px no-repeat, conic-gradient(#0000 30%,var(--accent-primary));
    -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8px),#000 0);
    animation: l13 1s infinite linear;
}
@keyframes l13{ 
    100%{transform: rotate(1turn)} 
}

/* --- Gallery & Modal (Used on multiple pages) --- */
.gallery-item {
    position: relative; 
    overflow: hidden; 
    border-radius: 16px;
    transition: var(--transition); 
    opacity: 0; 
    transform: translateY(24px);
    min-height: 160px; 
    background: linear-gradient(180deg, #f7f6f4 0%, #efede9 100%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer;
}
.gallery-item.loaded { 
    opacity: 1; 
    transform: translateY(0); 
}
.gallery-item img {
    transition: transform 0.45s ease; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}
.gallery-item:hover img { 
    transform: scale(1.04); 
}
.overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(21, 52, 59, 0.28); 
    opacity: 0;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: opacity 0.28s ease; 
    color: white;
    font-size: 1.8rem; 
    pointer-events: none;
}
.gallery-item:hover .overlay { 
    opacity: 1; 
}

.modal {
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background-color: rgba(0,0,0,0.85); 
    opacity: 0;
    visibility: hidden; 
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s; 
    padding: 2rem;
}
.modal.active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
}
.modal-content {
    max-width: 1100px; 
    width: 100%; 
    max-height: 88vh;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    gap: 0.75rem; 
    position: relative;
}
.modal-img {
    max-width: 92%; 
    max-height: 76vh; 
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); 
    display: block; 
    margin: 0 auto;
}
.modal-actions {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px;
    padding: 10px 14px; 
    background: rgba(255,255,255,0.02);
    border-radius: 999px; 
    backdrop-filter: blur(4px);
}
.modal-actions .counter { 
    color: #fff; 
    font-size: 0.95rem; 
}
.modal-actions a { 
    text-decoration: none; 
}
.close-btn, .nav-arrow {
    background: transparent; 
    border: none; 
    color: white;
    font-size: 2.2rem; 
    cursor: pointer; 
    user-select: none;
}
.close-btn { 
    position: absolute; 
    top: -6px; 
    right: -6px; 
    line-height: 1; 
}
.nav-arrow { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    padding: 0.6rem; 
}
.arrow-left { 
    left: 1rem; 
}
.arrow-right { 
    right: 1rem; 
}

@media (max-width: 768px) {
    .modal-img { 
        max-width: 100%; 
        max-height: 70vh; 
    }
    .arrow-left { 
        left: 0.5rem; 
    }
    .arrow-right { 
        right: 0.5rem; 
    }
    .modal-actions { 
        padding: 8px 10px; 
        gap: 8px; 
    }
}
