/**
 * Diivanvoodi Child Theme - Custom Styles
 * Interior Design Blog - Warm & Earthy Palette
 */

/* ==========================================
   Typography
   ========================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.wp-block-site-title,
.wp-block-post-title {
    font-family: 'DM Serif Display', Georgia, serif;
}

/* ==========================================
   Animations & Keyframes
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes drawLine {
    from { width: 0; }
    to { width: 80px; }
}

/* Scroll animation base class */
.dv-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dv-animate.dv-visible {
    opacity: 1;
    transform: translateY(0);
}

.dv-animate-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.dv-animate-left.dv-visible {
    opacity: 1;
    transform: translateX(0);
}

.dv-animate-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.dv-animate-right.dv-visible {
    opacity: 1;
    transform: translateX(0);
}

.dv-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.dv-animate-scale.dv-visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================
   Global Wow Effects
   ========================================== */

/* Elegant separator line after headings */
.wp-block-post-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #C4704B, #A68A6B);
    margin-top: 0.5em;
    border-radius: 2px;
    animation: drawLine 1s ease forwards;
}

/* Hero section on front page */
.home .wp-block-post-content > *:first-child,
.page-template-default .entry-content > *:first-child {
    animation: fadeInUp 1s ease forwards;
}

/* Smooth hover on all links */
a {
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* Button wow effects */
.wp-block-button__link,
.wp-element-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 4px 15px rgba(196, 112, 75, 0.3);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(196, 112, 75, 0.45) !important;
}

.wp-block-button__link::after,
.wp-element-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.wp-block-button__link:hover::after,
.wp-element-button:hover::after {
    width: 300px;
    height: 300px;
}

/* ==========================================
   Navigation Enhancements
   ========================================== */

.wp-block-navigation-item a {
    position: relative;
    transition: color 0.3s ease !important;
}

.wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #C4704B, #A68A6B);
    transition: width 0.4s ease, left 0.4s ease;
    border-radius: 1px;
}

.wp-block-navigation-item a:hover::after {
    width: 100%;
    left: 0;
}

/* Site title hover */
.wp-block-site-title a {
    transition: opacity 0.3s ease !important;
}

.wp-block-site-title a:hover {
    opacity: 0.8;
}

/* ==========================================
   Blog Post Cards & Content
   ========================================== */

/* Post cards with hover lift effect */
.wp-block-post {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
    border-radius: 12px;
}

.wp-block-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(59, 47, 47, 0.12);
}

/* Post title links */
.wp-block-post-title a {
    transition: color 0.3s ease !important;
    text-decoration: none !important;
}

.wp-block-post-title a:hover {
    color: #C4704B !important;
}

/* Featured images with zoom effect */
.wp-block-post-featured-image img,
.wp-block-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.6s ease;
    border-radius: 8px;
}

.wp-block-post-featured-image:hover img,
.wp-block-image:hover img {
    transform: scale(1.05);
}

.wp-block-post-featured-image {
    overflow: hidden;
    border-radius: 8px;
}

/* Drop cap styling */
.has-drop-cap:not(:focus)::first-letter {
    font-family: 'DM Serif Display', Georgia, serif;
    color: #C4704B;
    font-size: 4em;
    line-height: 0.8;
    float: left;
    margin-right: 0.1em;
    margin-top: 0.05em;
}

/* Category tags */
.wp-block-post-terms a {
    display: inline-block;
    padding: 4px 14px;
    background: #F5EDE3;
    color: #5C4A3A !important;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    margin-right: 6px;
    margin-bottom: 6px;
}

.wp-block-post-terms a:hover {
    background: #C4704B !important;
    color: #FDFAF6 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 112, 75, 0.3);
}

/* ==========================================
   Decorative Elements
   ========================================== */

/* Gradient accent for separator blocks */
.wp-block-separator {
    border: none !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent, #C4704B, #A68A6B, transparent) !important;
    opacity: 0.6;
}

/* Blockquote styling */
.wp-block-quote {
    border-left: 4px solid #C4704B !important;
    padding: 1.5em 2em !important;
    background: linear-gradient(135deg, #F5EDE3 0%, #FDFAF6 100%);
    border-radius: 0 12px 12px 0;
    position: relative;
    font-style: italic;
}

.wp-block-quote::before {
    content: '\201C';
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 4em;
    color: #C4704B;
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 15px;
    line-height: 1;
}

/* Cover blocks with overlay animation */
.wp-block-cover {
    transition: transform 0.5s ease;
}

.wp-block-cover:hover {
    transform: scale(1.01);
}

/* ==========================================
   Page & Content Spacing
   ========================================== */

/* Better content max-width */
.entry-content,
.wp-block-post-content {
    max-width: 800px;
}

/* Smooth page load animation */
.wp-site-blocks {
    animation: fadeIn 0.6s ease forwards;
}

/* ==========================================
   Footer Enhancements
   ========================================== */

/* Footer link hover effects */
footer a,
.wp-block-template-part footer a {
    transition: color 0.3s ease, padding-left 0.3s ease !important;
}

footer a:hover,
.wp-block-template-part footer a:hover {
    padding-left: 4px;
}

/* ==========================================
   Author & Comment Hiding (disabled site-wide)
   ========================================== */

.wp-block-post-author,
.wp-block-post-author-name,
[class*="post-author"],
.wp-block-post-comments-form,
.wp-block-comments,
.comments-area,
#comments {
    display: none !important;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */

@media (max-width: 768px) {
    .wp-block-post-title::after {
        width: 60px;
    }

    .wp-block-post:hover {
        transform: translateY(-3px);
    }

    .has-drop-cap:not(:focus)::first-letter {
        font-size: 3em;
    }

    .wp-block-quote {
        padding: 1em 1.5em !important;
    }
}

/* ==========================================
   Selection & Scrollbar Styling
   ========================================== */

::selection {
    background: #C4704B;
    color: #FDFAF6;
}

::-moz-selection {
    background: #C4704B;
    color: #FDFAF6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5EDE3;
}

::-webkit-scrollbar-thumb {
    background: #A68A6B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C4704B;
}



/* ==========================================
   Blog Grid Cards
   ========================================== */

/* Grid card container */
.wp-block-post-template.is-layout-grid {
    gap: 2rem !important;
}

.wp-block-post-template.is-layout-grid > .wp-block-post {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
    overflow: hidden;
}

.wp-block-post-template.is-layout-grid > .wp-block-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 47, 47, 0.15);
}

/* Card image styling */
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image {
    overflow: hidden;
    margin: 0;
}

.wp-block-post-template.is-layout-grid .wp-block-post-featured-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    object-fit: cover;
}

.wp-block-post-template.is-layout-grid .wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.08);
}

/* Card title */
.wp-block-post-template.is-layout-grid .wp-block-post-title a {
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.wp-block-post-template.is-layout-grid .wp-block-post-title a:hover {
    color: #C4704B !important;
}

/* Card category tags */
.wp-block-post-template.is-layout-grid .wp-block-post-terms a {
    display: inline-block;
    padding: 2px 10px;
    background: #F5EDE3;
    color: #C4704B !important;
    border-radius: 20px;
    font-size: 0.7rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.wp-block-post-template.is-layout-grid .wp-block-post-terms a:hover {
    background: #C4704B !important;
    color: #FDFAF6 !important;
}

/* Card excerpt */
.wp-block-post-template.is-layout-grid .wp-block-post-excerpt__more-text {
    display: none;
}

/* Responsive: 2 columns on tablet, 1 on mobile */
@media (max-width: 1024px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   Drop Cap Fix - Override TT5 default
   ========================================== */

/* Override TT5 parent theme drop cap - higher specificity */
body .entry-content p:first-of-type::first-letter,
body .wp-block-post-content p:first-of-type::first-letter,
body.home .entry-content p:first-of-type::first-letter,
body.home .wp-block-post-content p:first-of-type::first-letter,
body.page .entry-content p:first-of-type::first-letter,
body.page .wp-block-post-content p:first-of-type::first-letter,
body .wp-block-post-content .wp-block-group p:first-of-type::first-letter {
    float: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
    initial-letter: normal !important;
    text-transform: none !important;
}

/* Re-enable drop cap ONLY on single blog posts where has-drop-cap is explicitly set */
body.single-post .wp-block-post-content .has-drop-cap:not(:focus)::first-letter {
    font-family: 'DM Serif Display', Georgia, serif !important;
    color: #C4704B !important;
    font-size: 4em !important;
    line-height: 0.8 !important;
    float: left !important;
    margin-right: 0.1em !important;
    margin-top: 0.05em !important;
}

/* Blog Grid - Force equal columns and image height */
.wp-block-post-template.is-layout-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
}
.wp-block-post-template.is-layout-grid > .wp-block-post {
    max-width: 100% !important;
    min-width: 0 !important;
}
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image {
    height: 220px !important;
    overflow: hidden !important;
    border-radius: 12px 12px 0 0 !important;
}
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
@media (max-width: 900px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Single post - center text */
body.single .entry-content,
body.single .entry-content p,
body.single .entry-content h1,
body.single .entry-content h2,
body.single .entry-content h3,
body.single .entry-content h4,
body.single .wp-block-post-content,
body.single .wp-block-post-content p,
body.single .wp-block-post-content h1,
body.single .wp-block-post-content h2,
body.single .wp-block-post-content h3,
body.single .wp-block-post-content h4 {
    text-align: center !important;
}
body.single .wp-block-post-title,
body.single .entry-title {
    text-align: center !important;
}
body.single .wp-block-post-date,
body.single .wp-block-post-terms {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
}