/* General Container */
.tarot-container {
    text-align: center;
    font-family: "DM Sans", sans-serif;
    color: #333;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 10vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Title and Headings */
h2,
h3 {
    font-weight: 400;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
}

.section-title {
    font-family: "Playfair Display", serif;
    font-size: 46px;
    font-weight: 600;
    color: #fff;
}

/* Selected Cards Section */
.selected-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Placeholder for Selected Cards */
.card-placeholder {
    width: 174px;
    height: 286px;
    border: 1px dashed #BA9A63;
    border-radius: 10px;
    /* background-color: #f9f9f9; */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.card-placeholder:hover {
    /* transform: scale(1.05); */
    cursor: grab;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}



/* Ensure the card fills the placeholder */
.card-placeholder .tarot-card {
    width: 174px;
    height: 286px;
    position: absolute;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 20;
    /* animation: bounce 1.5s infinite ease-in-out;*/
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}



/* Celtic Cross Layout */
.celtic-cross {
    display: grid;
    grid-template-areas:
        ". . card5 . . card10"
        ". card4 card1 card6 . card9"
        ". . card3 . . card8"
        ". . . . . card7";
    grid-gap: 30px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
    /* Allows overlapping positioning */
}

.celtic-cross .card-placeholder {
    width: 98px;
    height: 162px;
    border: 1px dashed #BA9A63;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #3e3e53;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    /* Default for all cards */
}

.celtic-cross .card-placeholder .tarot-card {
    width: 98px;
    height: 162px;
    position: absolute;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Card 1: Centered in the cross */
/* Card 1: Centered in the cross */
.celtic-cross .card-placeholder:nth-child(1) {
    grid-area: card1;
    position: relative;
    /* Acts as the parent for Card 2 */
    z-index: 1;
    /* Ensure it's below Card 2 */
    display: flex;
    flex-direction: column;
    /* Stack content vertically */
    justify-content: flex-start;
    /* Align content to the top */
    align-items: center;
    /* Center horizontally */
    padding-top: 10px;
    /* Add some spacing from the top edge */
}


/* Card 2: Overlaps Card 1 at the center and is flipped */
.celtic-cross .card-placeholder:nth-child(2) {
    position: absolute;
    /* Allows overlapping */
    top: 40%;
    /* Center vertically relative to Card 1 */
    left: 37.5%;
    /* Center horizontally relative to Card 1 */
    transform: translate(-50%, -50%) rotate(90deg);
    /* Centers and flips the card */
    width: 98px;
    height: 162px;
    /* Same size as other cards */
    z-index: 10;
    /* Ensure it's above Card 1 */
    border-radius: 10px;
    /* Consistent styling */
}

/* Card 3: Below Card 1 */
.celtic-cross .card-placeholder:nth-child(3) {
    grid-area: card3;
}

/* Card 4: To the left of Card 1/2 */
.celtic-cross .card-placeholder:nth-child(4) {
    grid-area: card4;
}

/* Card 5: Above Card 1/2 */
.celtic-cross .card-placeholder:nth-child(5) {
    grid-area: card5;
}

/* Card 6: To the right of Card 1/2 */
.celtic-cross .card-placeholder:nth-child(6) {
    grid-area: card6;
}

/* Vertical column: Cards 7–10 */
.celtic-cross .card-placeholder:nth-child(7) {
    grid-area: card7;
}

.celtic-cross .card-placeholder:nth-child(8) {
    grid-area: card8;
}

.celtic-cross .card-placeholder:nth-child(9) {
    grid-area: card9;
}

.celtic-cross .card-placeholder:nth-child(10) {
    grid-area: card10;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .celtic-cross {
        grid-template-areas:
            "card5"
            "card4"
            "card2"
            "card1"
            "card6"
            "card3"
            "card10"
            "card9"
            "card8"
            "card7";
        grid-gap: 10px;
    }

    .celtic-cross .card-placeholder {
        width: 100px;
        height: 120px;
    }

    .celtic-cross .card-placeholder:nth-child(2) {
        width: 100px;
        /* Adjust width for smaller screens */
        height: 120px;
        /* Maintain consistent size */
        top: 50%;
        /* Adjust vertical position */
        left: 50%;
        /* Adjust horizontal position */
    }
}


/* Love Tarot Layout */
.love-tarot {
    display: grid;
    grid-template-areas:
        " . card5 . "
        "card1 card3 card2"
        " . card4 . ";
    /* Reduce center column width */
    grid-template-rows: auto auto auto auto;
    grid-gap: 0px 70px;
    /* Reduce the gap between rows */
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

/* General Card Styling */
.love-tarot .card-placeholder {
    width: 174px;
    height: 286px;
    border: 1px dashed #BA9A63;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #3e3e53;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden; /* Prevents overflow issues */
    background-color: transparent; /* Ensure no unwanted background */
}

/* Fix overlapping issue and ensure only one card per placeholder */
.love-tarot .card-placeholder .tarot-card {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none !important; /* Remove unwanted background */
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Specific Card Positioning */
.love-tarot .card-placeholder[data-position="1"] {
    grid-area: card1;
    /* Left card */
}

.love-tarot .card-placeholder[data-position="2"] {
    grid-area: card2;
    /* Right card */
}

.love-tarot .card-placeholder[data-position="3"] {
    grid-area: card3;
    /* Center card (flipped) */
    transform: rotate(90deg);
    /* Flip the card */
}

.love-tarot .card-placeholder[data-position="4"] {
    grid-area: card4;
    /* Bottom card */
    margin-top: -20px;
    /* Move closer to Card 3 */
}

.love-tarot .card-placeholder[data-position="5"] {
    grid-area: card5;
    /* Top card */
    margin-bottom: -20px;
    /* Move closer to Card 3 */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .love-tarot {
        grid-template-areas:
            "card5"
            "card1"
            "card3"
            "card2"
            "card4";
        grid-template-columns: 1fr;
        grid-gap: 10px;
    }

    .love-tarot .card-placeholder {
        width: 100px;
        height: 120px;
    }
}

/* Cards in Deck */
.cards {
    width: 100%;
    /* Deck uses half the container width */
    overflow-x: auto;
    /* Horizontal scroll if there are many cards */
    white-space: nowrap;
    /* Prevent line-break so cards stay in one row */
    margin: 0 auto;
    /* Optional: center the .cards container */
    padding: 80px 0;
    /* Keep your existing padding if you wish */
}

/* Overlapping cards */
.cards .tarot-card {
    display: inline-block;
    /* The card is 120px wide per your CSS, so a -75px margin is a 50% overlap */
    margin-left: -75px;
    vertical-align: middle;
    /* Keep them aligned nicely in a horizontal row */
}

.cards .tarot-card:first-child {
    margin-left: 0;
}

/* First card in the deck 
.cards .tarot-card:first-child {
    margin-left: 0;
} */


/* Selected cards in the deck */
.cards .tarot-card.selected {
    filter: brightness(0.8);

    transform: translateY(-20px);
    pointer-events: grab;
}

/* Unselected cards remain stacked below */


/* Unselected cards remain stacked below */

/* Keyframes for bounce animation */
@keyframes bounce {
    0% {
        transform: translateX(0px) translateY(0px);
        animation-timing-function: ease-out;
    }

    30% {
        transform: translateX(0px) translateY(-20px);
        animation-timing-function: ease-in;
    }

    60% {
        transform: translateX(0px) translateY(10px);
        animation-timing-function: ease-out;
    }

    100% {
        transform: translateX(0px) translateY(0px);
        animation-timing-function: ease-in;
    }
}


/* Card Styling */
.tarot-card {
    width: 98px;
    height: 162px;
    background-color: #cfcabe;
    border-radius: 10px;
    cursor: pointer;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: all 0.3s ease-in-out;
}

.tarot-card:hover {
    transform: translateX(0px) translateY(-20px);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.25);
}

.tarot-card.unhover:hover {
    transform: none !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Inner Card Flip Animation */
.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.tarot-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back of Cards */
.tarot-card-front,
.tarot-card-back {
    position: absolute;
    width: 98px!important;
    height: 162px!important;
    backface-visibility: hidden;
    border-radius: 10px;
}

.tarot-card-front {
    background-size: cover;
    transform: rotateY(180deg);
}

.tarot-card-back {
    background-color: #333;
    background-size: cover;
}

.tarot-card-front-placeholder,
.tarot-card-back-placeholder {
    position: absolute;
    width: 174px;
    height: 286px;
    backface-visibility: hidden;
    border-radius: 10px;
}

.celtic-cross-front-placeholder,
.celtic-cross-back-placeholder {
    position: absolute;
    width: 98px;
    height: 162px;
    backface-visibility: hidden;
    border-radius: 10px;
}

.tarot-card-front-placeholder {
    background-size: cover;
    transform: rotateY(180deg);
}

.tarot-card-back-placeholder {
    background-color: #333;
    background-size: cover;
}

.revealed-card {
    font-family: "DM Sans", Sans-serif !important;
    color: #fff!important;
}

.revealed-cards {
    text-align: left !important;
}

/* Buttons */
/* General Button Styles */
/* General Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Styling Buttons Like Elementor */
.btn-shuffle {
    background-color: #EC4400;
    /* Matches Elementor blue */
    color: #fff;
}


.btn-interpretation {
    background-color: #ffc107;
    align-items: center!important;
    justify-content: center!important;
    /* Matches Elementor yellow */
    color: #000;
    border: 2px solid #ffc107;
}

/* Hover Effects */
/* Buttons in a Row */
.button-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.elementor-button:hover {
    background-color: #d4d4d4 !important;
    /* Slightly darker background on hover */
    color: #000;
    /* Optional: change text color */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Smooth transition */
}

/* Reset Button Styling */
/* #reset-deck {
    font-size: 14px;
    color: #000;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 15px;
}

#reset-deck:hover {
    color: #0056b3;
    text-decoration: none;
} */

/* Order Full Interpretation Button */
/* #order-interpretation {
    display: block;
    margin: 20px auto;
    background-color: #444;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
} */

/* Shuffle Effect Animation */
/* Keyframes for flying left */
@keyframes flyLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-200px);
        opacity: 0;
    }
}

/* Keyframes for flying in from the right */
@keyframes flyRight {
    0% {
        transform: translateX(200px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Shuffling state styles */
.cards.shuffling .tarot-card {
    pointer-events: none;
    /* Disable interactions during shuffle */
}


.focus-message {
    font-size: 1.2em;
    margin: 1em 0;
    text-align: center;
    color: #555;
}

.extra-offers {
    margin-top: 1.5em;
    font-size: 0.9em;
    text-align: center!important;
    color: #fff!important;
}

.extra-offers p {
    margin: 0.5em 0;
}


/* Responsive Adjustments */
@media (max-width: 768px) {

    .cards,
    .selected-cards {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-placeholder {
        width: 98px;
    height: 162px;
    }

    .tarot-card {
        width: 98px;
    height: 162px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

.card-placeholder.no-click {
    pointer-events: none;
    opacity: 0.7;
}

/* WebKit-based browsers (Chrome, Safari, newer Edge, Opera) */
::-webkit-scrollbar {
    width: 8px;
    /* Adjust scrollbar width */
}

::-webkit-scrollbar-track {
    background: #A78B59;
    /* Track color */
}

::-webkit-scrollbar-thumb {
    background: #21212C;
    /* Scrollbar thumb color */
    border-radius: 4px;
    /* Rounding corners (optional) */
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
    /* A slightly lighter black on hover (optional) */
}

/* Firefox (limited styling via scrollbar-color/scrollbar-width) */
html {
    scrollbar-color: #21212C #A78B59;
    /* thumb color, track color */
    scrollbar-width: thin;
    /* “auto” or “thin” */
}

/* Container for selected tarot cards */
.tarot-selected-cards {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #1c1c1c;
    /* Dark background */
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* Heading above selected cards */
.tarot-selected-cards h3 {
    font-family: "Playfair Display", serif;
    font-size: 24px;
    color: #ffcc00;
    margin-bottom: 15px;
}

/* Wrapper for selected tarot cards */
.tarot-selected-cards-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Individual selected card container */
.tarot-card-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #2b2b2b;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

/* Hover effect for selected tarot cards */
.tarot-card-selected:hover {
    transform: scale(1.05);
}

/* Tarot card image */
.tarot-card-selected img {
    width: 110px;
    /* Adjust based on layout */
    height: auto;
    border-radius: 6px;
    border: 2px solid #ffcc00;
    /* Gold border */
}

/* Tarot card name */
.tarot-card-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tarot-selected-cards-wrapper {
        flex-direction: column;
    }

    .tarot-card-selected img {
        width: 90px;
    }
}