/*!
 Theme Name: Rubrum
 Theme URI:
 Author: Dev Team
 Author URI:
 Description: Rubrum is a blank canvas for your ideas and it makes the block editor your best brush.
 Requires at least: 6.6
 Tested up to: 6.8.3
 Requires PHP: 8.0
 Version: 6.8
 Text Domain: rubrum
*/


/** Add your custom styles here **/


body {
    font-family: "Figtree", sans-serif;
}
p {
    font-size: var(--wp--preset--font-size--normal);
    line-height: 1.3;
}
a {
    color: var(--wp--preset--color--contrast);
}
.fw-900 {
    font-weight: 900 !important;
}

.home-cover {
    height: 50vw;
    max-height: 790px;
}
@media (max-width: 767.98px) {
    .home-cover {
        min-height: 696px !important;
        padding: var(--wp--preset--spacing--50) !important;
    }
}
.home-cover-2 {
    height: 62.5vw;
    max-height: 1012px;
}
.home-cover-3 {
    height: 59vw;
    max-height: 930px;
}

.section-mythbusting h3 {
    font-weight: 700;
}
.learn-more {
    color: var(--wp--preset--color--primary);
}
.card-myth:hover > div .learn-more,
.card-fact:hover > div .go-back {
    color: var(--wp--preset--color--light-blue) !important;
}

/** Myths and Facts **/

/* 1. Target the WordPress Row block parent to force left-alignment and equal-height rows */
div:has(> .container-myth-fact) {
    justify-content: flex-start !important;
    align-items: stretch !important; /* Forces front cards in a row to match height naturally */
}

/* 2. Container holds the 3D space */
.container-myth-fact {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(33.333% - 16px);
    box-sizing: border-box;
    margin-right: 24px;
    margin-bottom: 24px;
    transition: min-height 0.3s ease-in-out;
}

/* Removes right margin on every third card to maintain perfect row alignment */
.container-myth-fact:nth-child(3n) {
    margin-right: 0;
}

/* 3. Contains both front and back sides */
.container-inner-myth-fact {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 100%;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Rotates the inner container 180 degrees on click */
.container-myth-fact.flipped .container-inner-myth-fact {
    transform: rotateY(180deg);
}

/* 4. Positions the front and back divs */
.card-myth, .card-fact {
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-sizing: border-box;
}

/* Front styling remains standard grid child */
.card-myth {
    height: 100%;
}

/* Back styling (Default: Absolute hides its massive content size from the row height engine) */
.card-fact {
    position: absolute;
    top: 0;
    left: 0;
    height: auto;
    margin-top: 0 !important;
    transform: rotateY(180deg);
}

/* While flipped, the back card breaks to a relative position to expand the row */
.container-myth-fact.flipped .card-fact {
    position: relative;
}

/* 5. Responsive Breakpoints */
@media (max-width: 980px) {
    .container-myth-fact {
        flex-basis: calc(50% - 12px);
        margin-right: 24px;
    }
    .container-myth-fact:nth-child(3n) {
        margin-right: 24px;
    }
    .container-myth-fact:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .container-myth-fact {
        flex-basis: 100%;
        margin-right: 0;
    }
}

.container-myth-fact.flipped .icon-x {
    display: none !important;
}



/** Accordion Block **/
.wp-block-accordion .wp-block-accordion-heading .wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
    text-decoration: none;
}
.wp-block-accordion-heading {
    padding-right: var(--wp--preset--spacing--50);
    padding-left: var(--wp--preset--spacing--50);
}
.wp-block-accordion-heading:hover {
    color: var(--wp--preset--color--secondary);
}
.wp-block-accordion-heading button {
    margin: 0 auto;
    max-width: var(--wp--style--global--wide-size) !important;
}
.wp-block-accordion .wp-block-accordion-panel {
    transition: all 0.33s ease-in-out;
}
.wp-block-accordion .wp-block-accordion-item:not(.is-open) .wp-block-accordion-panel {
    display: grid;
    grid-template-rows: 0fr !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    transition: all 0.33s ease-in-out;
}
.wp-block-accordion .wp-block-accordion-item.is-open .wp-block-accordion-panel {
    grid-template-rows: 1fr !important;
    transition: all .33s ease-in-out;
}
.wp-block-accordion-panel > * {
    margin: 0 auto;
    max-width: var(--wp--style--global--wide-size) !important;
    min-height: 0 !important;
    overflow: hidden;
}
.wp-block-accordion-panel p {
    font-weight: 700;
}

/** Accordion Icon Customization **/
.wp-block-accordion-heading__toggle-icon {
    font-size: 0; /* Hide the + */
    padding: 8px 0 8px 8px;
    width: auto;
}
.wp-block-accordion-heading__toggle-icon::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="21" height="17" viewBox="0 0 21 17" fill="none"><path d="M1.6001 1.19995L10.6001 13.2L19.1001 1.19995" stroke="%2323537D" stroke-width="4"/></svg>');
    background-repeat: no-repeat;
    background-size: 17px 21px;
    content: "";
    display: inline-block;
    height: 21px;
    width: 17px;
    transition: all .33s ease-in-out;
}
.wp-block-accordion-heading__toggle[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon::before {
    transform: rotate(180deg);
}
.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
    transform: none;
}

.img-bg-white img {
    background-color: var(--wp--preset--color--main-white);
}
.img-bg-blue img {
    background-color: var(--wp--preset--color--primary);
}

.form-contact h3 {
    margin-top: 12px;
    margin-bottom: -8px;
}
.message-short textarea {
    height: 52px !important;
}

footer,
footer a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}
footer a:hover {
    color: var(--wp--preset--color--light-blue);
    text-decoration: underline;
}


