/* Custom transitions and refinements */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Cormorant Garamond', serif;
}

.hero-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

/* Navigation enhancements */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(43, 75, 91, 0.1);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #438D94; /* nia-teal */
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Card & Image Effects */
.card-zoom {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-zoom:hover {
    transform: translateY(-8px);
}

.card-zoom:hover img {
    transform: scale(1.08);
}

.image-overlay-glow {
    position: relative;
}

.image-overlay-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(43, 75, 91, 0.05) 100%);
    pointer-events: none;
}

/* Typography refinements */
.letter-spacing-widest {
    letter-spacing: 0.2em;
}

.text-gradient-teal {
    background: linear-gradient(to right, #2B4B5B, #438D94);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button Refinements */
.btn-primary {
    background-color: #2B4B5B;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(43, 75, 91, 0.2);
}

.btn-primary:hover {
    background-color: #438D94;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 141, 148, 0.23);
}

/* Section Transitions */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Soft abstract hero background (Art, Books, etc.) */
.nia-soft-hero-bg {
    background-color: #2B4B5B;
    background-image: url('../images/image copy 8.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Art gallery – editorial grid layout */
.art-gallery-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(200px, 1fr);
}

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

@media (min-width: 1024px) {
    .art-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, minmax(0, 22vw));
        gap: 1rem;
    }

    .art-gallery-hero {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.art-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f9fafb;
}

.art-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.art-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(43, 75, 91, 0.92) 0%, rgba(43, 75, 91, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
}

.art-gallery-item:hover .art-gallery-overlay {
    opacity: 1;
}

.art-gallery-badge {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #F66C10;
    margin-bottom: 0.5rem;
}

.art-gallery-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    font-style: italic;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .art-gallery-title {
        font-size: 1.5rem;
    }
}

.art-gallery-hero .art-gallery-title {
    font-size: 1.75rem;
}

@media (min-width: 1024px) {
    .art-gallery-hero .art-gallery-title {
        font-size: 2.25rem;
    }
}

.art-gallery-cta {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    width: max-content;
    transition: border-color 0.2s ease;
}

.art-gallery-item:hover .art-gallery-cta {
    border-bottom-color: #F66C10;
}

/* Blog post body (Markdown output) */
.nia-post-body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: #4b5563;
    line-height: 1.75;
    font-size: 1rem;
}

.nia-post-body h1,
.nia-post-body h2,
.nia-post-body h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #2B4B5B;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.nia-post-body h1 { font-size: 2.25rem; }
.nia-post-body h2 { font-size: 1.75rem; }
.nia-post-body h3 { font-size: 1.35rem; }

.nia-post-body p {
    margin-bottom: 1rem;
}

.nia-post-body ul,
.nia-post-body ol {
    margin: 1rem 0 1rem 1.25rem;
}

.nia-post-body a {
    color: #438D94;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nia-post-body a:hover {
    color: #F66C10;
}

.nia-post-body blockquote {
    border-left: 3px solid #438D94;
    margin: 1.5rem 0;
    padding-left: 1rem;
    font-style: italic;
    color: #2B4B5B;
}

.nia-post-body code {
    font-size: 0.9em;
    background: #f3f4f6;
    padding: 0.15em 0.4em;
}

.nia-post-body pre {
    background: #f3f4f6;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
}

/* Richer post body when shown in the colorful post layout */
.nia-post-article .nia-post-body strong {
    color: #2B4B5B;
    font-weight: 600;
}

.nia-post-article .nia-post-body hr {
    border: 0;
    height: 1px;
    margin: 2rem 0;
    background: linear-gradient(90deg, rgba(67, 141, 148, 0.35), rgba(246, 108, 16, 0.45), rgba(67, 141, 148, 0.35));
}

.nia-post-article .nia-post-body code {
    background: rgba(67, 141, 148, 0.12);
    color: #2B4B5B;
}

.nia-post-article .nia-post-body pre {
    background: linear-gradient(135deg, rgba(67, 141, 148, 0.08), rgba(255, 182, 35, 0.08));
    border: 1px solid rgba(43, 75, 91, 0.12);
}

.nia-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 8px 24px rgba(43, 75, 91, 0.12);
}

/* Trustmary review carousel on Horses page */
.trustmary-widget-wrap {
    width: 100%;
    overflow: hidden;
}

.trustmary-widget-wrap [data-trustmary-widget] {
    width: 100%;
}
