/*
Theme Name: dehati-theme-2026
Version: 1.0.1
Author: The Dehati Fest
... (metadata as before) ...
*/

:root {
    --dehati-rococo-flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' fill='none' stroke='%234D3809' stroke-width='1'/%3E%3C/svg%3E");
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--wp--preset--color--earth-light);
    color: var(--wp--preset--color--black);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

footer.wp-block-group {
    margin-top: auto;
}

.wp-block-group.is-style-rococo-separator {
    position: relative;
    padding: 40px 0;
    text-align: center;
}

.wp-block-group.is-style-rococo-separator::before {
    content: "";
    display: block;
    width: 200px;
    height: 20px;
    margin: 0 auto 20px;
    background-image: var(--dehati-rococo-flourish);
    background-repeat: no-repeat;
    background-position: center;
}

h1,
h2,
h3 {
    color: var(--wp--preset--color--brown);
    font-family: 'Cormorant Garamond', serif;
    /* Pivot to Serif for high-contrast */
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Force inheritance for headers inside colored groups */
.wp-block-group.has-text-color h1,
.wp-block-group.has-text-color h2,
.wp-block-group.has-text-color h3 {
    color: inherit;
}

.wp-block-button__link {
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 56, 9, 0.2);
}


/* Carousel Styling */
.wp-block-group.is-style-carousel {
    display: flex;
    overflow-x: auto;
    gap: var(--wp--preset--spacing--40);
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    scrollbar-width: none;
    /* Firefox */
}

.wp-block-group.is-style-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.wp-block-group.is-style-carousel>* {
    scroll-snap-align: center;
    flex: 0 0 85%;
    /* Mobile-first: show most of the slide */
    min-width: 300px;
}

@media (min-width: 782px) {
    .wp-block-group.is-style-carousel>* {
        flex: 0 0 45%;
        /* Desktop: show 2+ slides */
    }
}

/* 
 * Layout Reset 
 * Remove default WP block gap for full-width layout control 
 */
:where(.wp-site-blocks)>* {
    margin-block-start: 0;
    margin-block-end: 0;
}

:root :where(.is-layout-constrained)>* {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* 
 * Micro-Animations (Phase 5)
 * Subtle, non-intrusive reveal effects
 */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Organic touch without being "overly round" */
.organic-radius {
    border-radius: 8px 12px 6px 10px / 10px 6px 12px 8px;
    /* Subtle variations */
    overflow: hidden;
}

/* Baroque Drop Cap */
.has-baroque-drop-cap:first-letter {
    font-size: 3.5em;
    font-weight: 300;
    line-height: 0.8;
    float: left;
    margin-right: 0.15em;
    color: var(--wp--preset--color--brown);
    font-family: serif;
    /* Fallback to standard serif for elegance */
}

/* Floral Separator Visibility Fix */
.wp-block-group.is-style-rococo-separator {
    width: 100%;
    overflow: hidden;
    /* Ensure SVG doesn't overflow */
}

/* Force override of default WP block margins */
:root :where(.is-layout-flow)>* {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* Texture & Atmosphere (Phase 7) */

/* Mandana SVG Pattern (Subtle Floor Art) */
.has-mandana-texture {
    position: relative;
    overflow: hidden;
}

.has-mandana-texture::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* More subtle, geometric Mandana pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 10 L110 60 L60 110 L10 60 Z' fill='none' stroke='%234D3809' stroke-width='0.25' stroke-opacity='0.03'/%3E%3Ccircle cx='60' cy='60' r='2' fill='%234D3809' fill-opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

/* Global Paper Grain Texture */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url("assets/images/bg-texture.jpg");
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.15;
    /* Adjusted for image texture visibility */
    mix-blend-mode: multiply;
}

/* Atmospheric Gradients */
.bg-gradient-earth {
    background: linear-gradient(135deg, #f5f1e9 0%, #e8e2d4 100%) !important;
}

.bg-gradient-deep {
    background: linear-gradient(135deg, #4D3809 0%, #302306 100%) !important;
}

.bg-gradient-nature {
    background: linear-gradient(135deg, #566039 0%, #3d4529 100%) !important;
}

/* Poetic Card Styling */
.poetic-card {
    padding: 0;
    border: 1px solid rgba(77, 56, 9, 0.15);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 4px;
    font-family: 'Cormorant Garamond', serif;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poetic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(77, 56, 9, 0.08);
}

.poetic-card img {
    width: 100%;
    height: auto;
    /* Remove fixed height to prevent cropping */
    display: block;
    margin: 0 !important;
}

.poetic-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.poetic-card h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 !important;
    /* Zero margins as requested */
    color: var(--wp--preset--color--brown);
    font-style: normal;
}

.poetic-card p {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 !important;
    font-style: italic;
    color: var(--wp--preset--color--black);
    opacity: 0.85;
}

/* Global Section Header Standardization */
.section-header-standard {
    font-size: clamp(2.5rem, 6vw, 3.5rem) !important;
    font-weight: 400;
    margin-bottom: 2rem !important;
    /* Standardized to 2rem as requested */
}

/* Equal Height Cards Fix */
.equal-height-columns .wp-block-column {
    display: flex;
    flex-direction: column;
}

.equal-height-columns .wp-block-column>.wp-block-group {
    flex-grow: 1;
}

/* Header & Navigation Polish (Phase 6.5) */

/* 1. Right Align Navigation */
header .wp-block-navigation {
    justify-content: flex-end;
    /* Force right alignment */
    flex-grow: 1;
}

/* 2. Brown Underline Hover Effect */
.wp-block-navigation .wp-block-navigation-item__content {
    text-decoration: none !important;
    position: relative;
    padding-bottom: 2px;
}

.wp-block-navigation .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--wp--preset--color--brown);
    transition: width 0.3s ease;
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.floating-cta.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.floating-cta:hover {
    transform: translateY(-5px) scale(1.05);
}

@media (max-width: 600px) {
    .floating-cta {
        bottom: 20px;
        right: 20px;
    }
}

.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content:focus::after {
    width: 100%;
}

/* 3. Submenu Arrow Alignment */
.wp-block-navigation-submenu__toggle {
    align-self: center;
    /* Vertical alignment fix */
    margin-top: -2px;
    /* Micro-adjustment for visual center */
}

/* FAQ Styling */
details.wp-block-details {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--wp--preset--color--brown);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

details.wp-block-details[open] {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(77, 56, 9, 0.05);
}

summary {
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    /* Remove default triangle */
    position: relative;
    padding-right: 2rem;
}

summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
    /* Turn to X */
}

/* Remove default marker in Webkit */
summary::-webkit-details-marker {
    display: none;
}

/* Mobile Responsive Refinements */
@media (max-width: 782px) {

    /* Hide utility class */
    .hide-on-mobile {
        display: none !important;
    }

    /* Specifically remove Site Title text from mobile header as requested */
    header .wp-block-site-title {
        display: none !important;
    }

    /* Ensure logo doesn't feel lonely / center it if needed */
    header .wp-block-group {
        justify-content: center !important;
    }
}

/* Presents Section (Aesthetic Refresh) */
.presents-logo img {
    filter: grayscale(1) contrast(1.1);
    transition: filter 0.5s ease;
}

.presents-logo:hover img {
    filter: grayscale(0) contrast(1);
}

.presents-title {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    letter-spacing: -0.04em !important;
}

.presents-date {
    font-family: 'Inter', sans-serif !important;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   Snap Scrolling Support (Phase 8) - Added via Gemini
   ------------------------------------------------------------------------- */
/* Scope snapping to home body to avoid global side effects */
body.home {
    height: 100dvh;
    /* Force body to be the scroll container */
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    margin: 0;
    /* Ensure no margin causing double scrollbar */
}

/* Apply snap logic only on homepage sections */
body.home header,
body.home footer,
body.home main>.wp-block-group:not(#event-info):not(#hero) {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* Re-enabling "always" to provide the "75% speed" feel by forcing stops */
}