/*
Theme Name:   Redcatpig Child
Theme URI:    https://redcatpig.com/
Description:  Child theme of Hello Elementor for Redcatpig. Replaces the
              site header with a custom full-screen hamburger menu ported
              from the original hand-coded PHP site.
Author:       Redcatpig
Template:     hello-elementor
Version:      1.0.0
Text Domain:  redcatpig-child
*/

/* ==========================================================================
   MENU — ported from the original styles.css, class names prefixed with
   `rcp-` to avoid collisions with Elementor and third-party plugins.
   IDs (#menuToggle, #menuOverlay, #menuBackground) kept from the original
   since the JS targets them.
   ========================================================================== */

/* Base body font (the rest of the body is styled by Hello Elementor / Elementor) */
body {
    font-family: 'Poppins', sans-serif;
}

/* --- Header bar (fixed, transparent, above everything) --- */
.rcp-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: transparent;
    z-index: 9999;
}

/* --- Hamburger icon (top-left, three lines → X when open) --- */
.menu-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 35px;
    height: 30px;
    z-index: 10001;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.menu-icon:hover {
    transform: rotate(90deg);
}

.menu-icon span {
    display: block;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    transition: 0.4s;
}

.menu-icon.open span:nth-child(1) {
    transform: translateY(13px) rotate(45deg);
}
.menu-icon.open span:nth-child(2) {
    opacity: 0;
}
.menu-icon.open span:nth-child(3) {
    transform: translateY(-13px) rotate(-45deg);
}

/* --- Logo (top-right of header bar) --- */
.rcp-logo {
    position: absolute;
    top: 60%;
    right: 0;
    z-index: 3;
    transform: translate(-50%, -50%);
    text-align: center;
}

.rcp-logo img {
    width: 60px;
    height: auto;
    display: block;
}

/* --- Full-screen menu overlay --- */
#menuOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(23, 34, 58, 1);
    z-index: 998;
    display: none;
    overflow: hidden;
}

/* Background image behind the menu — swapped per-item on hover */
#menuBackground {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    transition: transform 1.2s ease, opacity 0.4s ease;
    z-index: 1;
}

/* --- Menu content container --- */
.rcp-menu-container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    padding: 80px;
    gap: 100px;
    overflow: visible;
}

.rcp-main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 30%;
    position: relative;
    z-index: 3;
}

.rcp-main-menu a {
    color: #fff;
    text-decoration: none;
}

.rcp-main-menu > li {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 2.4rem;
    cursor: pointer;
    position: relative;
    font-weight: bold;
    display: block;
}

/* Hover: red label slides up from below (uses data-label attribute) */
.rcp-main-menu > li::before,
.rcp-submenu li::before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: inline-block;
    transform: translateY(90%);
    color: #ff7474;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
}

.rcp-submenu li::before {
    padding: 5px 10px;
}

.rcp-main-menu > li:hover::before,
.rcp-submenu li:hover::before {
    transform: translateY(0%);
    opacity: 1;
}

/* Underline slides in on hover */
.rcp-main-menu > li::after,
.rcp-submenu li::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(45deg, #ff7474, #e23e57);
    transition: width 0.3s ease;
}

.rcp-main-menu > li:hover::after,
.rcp-submenu li:hover::after {
    width: 100%;
}

/* --- Submenu (flies out to the right on hover, desktop) --- */
.rcp-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    margin: 0 0 0 20px;
    padding: 10px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    background: transparent;
}

.rcp-main-menu > li:hover .rcp-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rcp-submenu a {
    color: #fff;
    text-decoration: none;
}

.rcp-submenu li {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    display: block;
    position: relative;
    padding: 5px 10px;
    cursor: pointer;
}

/* --- Menu footer (bottom-right links + social icons) --- */
.rcp-footer-menu {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 40px;
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
}

.rcp-footer-links,
.rcp-footer-socials {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rcp-footer-links li a {
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.rcp-footer-links li a:hover {
    opacity: 1;
}

.rcp-footer-socials li a {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.rcp-footer-socials li a:hover {
    opacity: 1;
}

/* ==========================================================================
   MOBILE — accordion submenus, stacked layout
   ========================================================================== */
@media (max-width: 768px) {
    .rcp-menu-container {
        flex-direction: column;
        padding: 80px 40px;
        overflow-y: auto;
        gap: 0;
    }

    .rcp-main-menu {
        width: 100%;
    }

    .rcp-main-menu > li {
        font-size: 2rem;
        margin-bottom: 1.6rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    /* Kill desktop hover effects on mobile */
    .rcp-main-menu > li:hover .rcp-submenu {
        opacity: unset;
        visibility: unset;
        pointer-events: unset;
    }

    .rcp-main-menu > li:hover::before,
    .rcp-submenu li:hover::before,
    .rcp-main-menu > li:hover::after,
    .rcp-submenu li:hover::after {
        all: unset;
    }

    /* Submenu becomes an inline accordion, JS toggles show/hide */
    .rcp-submenu {
        display: none;
        position: static;
        width: 100%;
        margin: 10px 0 0 0;
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        background: transparent;
    }

    .rcp-submenu li {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .rcp-footer-menu {
        flex-direction: column;
        align-items: center;
        right: 0;
        left: 0;
        bottom: 20px;
        gap: 20px;
        width: 100%;
    }

    .rcp-footer-socials {
        order: 1;
    }
}
