/**
 * Mimotti Blue Theme Styles
 *
 * @package MimottiBlue
 */

/* ── CSS Custom Properties ────────────────────────────────────────────────── */
:root {
    --color-wood: #3B2F20;
    --color-warmwood: #8B6914;
    --color-sand: #F2EFE9;
    --color-beige: #E6DBC9;
    --color-cream: #FAF8F4;
    --color-sage: #8FAE8A;
    --color-sage-dark: #5B7A57;
    --color-sage-light: rgba(143, 174, 138, 0.12);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-wood);
}

.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.bg-sand { background-color: var(--color-sand); }
.bg-beige { background-color: var(--color-beige); }
.bg-cream { background-color: var(--color-cream); }
.text-wood { color: var(--color-wood); }
.text-warmwood { color: var(--color-warmwood); }

/* ── Typography Utilities ─────────────────────────────────────────────────── */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.mimotti-header.scrolled {
    box-shadow: 0 1px 3px rgba(59, 47, 32, 0.08);
}

.mimotti-header.scrolled .header-topbar {
    height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    opacity: 0;
}

/* ── Unit Switch ──────────────────────────────────────────────────────────── */
.unit-switch.active {
    background-color: var(--color-sage);
    color: white;
}

.unit-switch:not(.active) {
    color: var(--color-sage-dark);
}

/* ── Plan Cards ───────────────────────────────────────────────────────────── */
.plan-card {
    will-change: transform;
}

.plan-card:hover {
    transform: translateY(-2px);
}

/* ── Gallery Thumbnails ───────────────────────────────────────────────────── */
.gallery-thumb {
    cursor: pointer;
    transition: border-color 0.2s;
}

.gallery-thumb.active {
    border-color: var(--color-sage) !important;
}

.gallery-thumb:not(.active):hover {
    border-color: var(--color-beige) !important;
}

/* ── FAQ Accordion ────────────────────────────────────────────────────────── */
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-item.open .faq-answer {
    display: block;
}

/* ── Gallery Filter ───────────────────────────────────────────────────────── */
.gallery-filter-btn.active {
    background-color: var(--color-sage) !important;
    color: white !important;
}

.faq-filter-btn.active {
    background-color: var(--color-sage) !important;
    color: white !important;
}

/* ── Modal / Popup ────────────────────────────────────────────────────────── */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-leave {
    animation: modalFadeOut 0.2s ease-in;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ── Animations ───────────────────────────────────────────────────────────── */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Prose (content styling) ──────────────────────────────────────────────── */
.prose h2 { font-family: 'Playfair Display', Georgia, serif; color: var(--color-wood); margin-bottom: 0.75em; }
.prose h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--color-wood); margin-bottom: 0.5em; }
.prose p { margin-bottom: 1em; line-height: 1.75; }
.prose ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.prose ol { list-style: decimal; padding-left: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.25em; }
.prose a { color: var(--color-sage-dark); text-decoration: underline; }
.prose a:hover { color: var(--color-sage); }
.prose img { border-radius: 1rem; margin: 1.5em 0; }
.prose blockquote { border-left: 3px solid var(--color-sage); padding-left: 1em; font-style: italic; color: rgba(59,47,32,0.7); }

/* ── Dropdown ─────────────────────────────────────────────────────────────── */
.mimotti-dropdown { display: none; }
.group:hover > .mimotti-dropdown { display: block; }

/* ── WordPress specific ───────────────────────────────────────────────────── */
.wp-block-image img { border-radius: 1rem; }
.wp-block-separator { border-color: var(--color-beige); }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a, .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-links a {
    background-color: white;
    border: 1px solid var(--color-beige);
    color: var(--color-wood);
}

.nav-links a:hover {
    background-color: var(--color-sage);
    color: white;
    border-color: var(--color-sage);
}

.nav-links .current {
    background-color: var(--color-sage);
    color: white;
    border: 1px solid var(--color-sage);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}
.gallery-thumbnails::-webkit-scrollbar-track {
    background: var(--color-sand);
    border-radius: 2px;
}
.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--color-beige);
    border-radius: 2px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mimotti-header .header-topbar .flex {
        font-size: 0.65rem;
    }
}

/* ── Loading States ───────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--color-sand) 25%, var(--color-cream) 50%, var(--color-sand) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
    .mimotti-header, footer, .unit-switch, #quick-view-modal, #documents-modal, #lightbox { display: none !important; }
    body { background: white; }
}
