/*
 Theme Name:   Ferienwohnung Russhaupten
 Theme URI:    https://russhaupten.de
 Description:  Child-Theme fuer OceanWP - Ferienwohnung Russhaupten
 Author:       Russhaupten
 Author URI:   https://russhaupten.de
 Template:     oceanwp
 Version:      1.0.3
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  fw-child
*/

/* ==========================================================================
   1. Global: Header / Logo (extracted from functions.php)
   ========================================================================== */

#site-header-inner {
    height: 52px !important;
    min-height: 52px !important;
}

#site-header-inner .container,
#site-header-inner .container > .site-header-inner {
    height: 100%;
    display: flex !important;
    align-items: center;
}

#site-navigation-wrap,
#site-navigation-wrap .main-navigation,
#site-navigation-wrap .main-navigation > ul {
    height: 100%;
    display: flex !important;
    align-items: center;
}

#site-navigation-wrap .main-navigation > ul > li {
    display: flex;
    align-items: center;
    height: 100%;
}

#site-navigation-wrap .main-navigation > ul > li > a {
    height: auto;
    line-height: normal;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

#site-logo .site-logo-text,
#site-logo .site-title,
#site-logo > a:not(.custom-logo-link) {
    display: none !important;
}

#site-logo {
    display: flex !important;
    align-items: center;
    height: 100%;
}

#site-logo .custom-logo-link {
    display: flex !important;
    align-items: center;
    height: 100%;
    padding: 10px 0;
}

#site-logo .custom-logo {
    max-height: 46px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

/* ==========================================================================
   2. Home: front-page.php Sections
   ========================================================================== */

.rh-home {
    width: 100%;
    overflow: hidden;
}

/* Video */
.rh-home__video {
    position: relative;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    line-height: 0;
}

.rh-home__video video {
    width: 100%;
    height: 80vh;
    object-fit: cover;
    display: block;
}

/* Video Overlay */
.rh-home__video-overlay {
    position: absolute;
    top: 90%;
    left: 0;
    right: 0;
    z-index: 9999;
    text-align: center;
    pointer-events: none;
    padding: 0 1rem;
}

.rh-home__video-title {
    display: inline-block;
    font-family: 'Chocolate Vanilla', cursive;
    font-size: 9vw;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.55);
    opacity: 0;
    animation: rh-fadein 30s ease-in forwards, rh-grow 30s ease-in-out forwards;
    animation-delay: 15s, 15s;
}

@keyframes rh-fadein {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes rh-grow {
    0%   { transform: scale(0.5); }
    100% { transform: scale(1); }
}

/* Marquee overlay */
.rh-home__marquee {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    z-index: 10;
    overflow: hidden;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1.2;
    height: auto;
    min-height: 3rem;
}

.rh-home__marquee-text {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    will-change: transform;
    animation: rh-marquee 16s linear infinite;
}

@keyframes rh-marquee {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Spacer */
.rh-home__spacer {
    height: 4rem;
}

/* Intro: Greeting + Gebäudefoto */
.rh-home__intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 4rem 3rem;
    background: #f0f0f0;
}

.rh-home__intro-left {
    flex: 0 1 auto;
}

.rh-home__intro-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.rh-home__intro-right {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rh-home__intro-text {
    font-family: 'Chocolate Vanilla', cursive !important;
    font-size: 16rem;
    font-weight: bold;
    margin: 0 0 2rem;
    color: #333;
}

.rh-home__intro-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: invert(1) brightness(0.2);
}

.rh-home__intro-logo.rh-bounce-pending {
    opacity: 0;
}

.rh-home__intro-logo.rh-bounce-active {
    animation: rh-bounceInDown 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

@keyframes rh-bounceInDown {
    0%   { opacity: 0; transform: translate3d(0, -3000px, 0); }
    60%  { opacity: 1; transform: translate3d(0, 25px, 0); }
    75%  { transform: translate3d(0, -10px, 0); }
    90%  { transform: translate3d(0, 5px, 0); }
    100% { opacity: 1; transform: none; }
}

/* Aktuelles */
.rh-home__news {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 3rem;
}

.rh-home__news-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #333;
}

.rh-home__news-body {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

/* ==========================================================================
   3. Gästebuch Overrides (extracted from functions.php)
      Using page slug class instead of page-id-661
   ========================================================================== */

body.page-slug-gastebuch .page-header,
body.page-id-661 .page-header {
    display: none !important;
}

.rh-gb-intro-card {
    font-size: 24px !important;
    line-height: 1.5;
    text-align: center;
}

.rh-gb-intro-card p {
    margin: 0;
}

body.page-slug-gastebuch .content-area,
body.page-id-661 .content-area {
    width: 100% !important;
    padding-right: 0 !important;
    float: none !important;
}

body.page-slug-gastebuch #right-sidebar,
body.page-id-661 #right-sidebar {
    display: none !important;
}

.rh-gb-form-title,
.rh-gb-entries-title {
    font-size: 16px !important;
}

.rh-gb-field label,
.rh-gb-field input[type="text"],
.rh-gb-field input[type="file"],
.rh-gb-field--checkbox label {
    font-size: 12px !important;
}

.rh-gb-entry__name {
    font-size: 14px !important;
}

.rh-gb-entry__date {
    font-size: 12px !important;
}

.rh-gb-entry__content {
    font-size: 12px !important;
}

/* ==========================================================================
   4. RESPONSIVE: 959px (Tablet – OceanWP mobile menu trigger)
   ========================================================================== */

@media (max-width: 959px) {

    /* -- Home -- */
    .rh-home__intro {
        flex-direction: column;
        padding: 3rem 2rem;
    }

    .rh-home__intro-text {
        font-size: 10rem;
    }

    .rh-home__intro-img {
        max-width: 400px;
    }

    /* -- Anfrage: Calendar single column -- */
    .rus-calendar-months {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   5. RESPONSIVE: 767px (Phone)
   ========================================================================== */

@media (max-width: 767px) {

    /* -- Global: iOS background-attachment fix -- */
    body {
        background-attachment: scroll !important;
    }

    /* -- Header -- */
    #site-header-inner {
        height: 50px !important;
        min-height: 50px !important;
    }

    #site-logo .custom-logo {
        max-height: 38px;
    }

    #site-header-inner .mobile-menu,
    .oceanwp-mobile-menu-icon {
        display: flex;
        align-items: center;
        height: 100%;
    }

    /* -- Mobile Menu: Horizontales Desktop-Menü ausblenden -- */
    #site-navigation-wrap,
    .navigation-wrap,
    .oceanwp-mobile-menu-icon + #site-navigation-wrap {
        display: none !important;
    }

    /* -- Mobile Menu: Mobile Menü-Button sichtbar und vergrößert -- */
    .oceanwp-mobile-menu-icon,
    .mobile-menu-icon,
    #oceanwp-mobile-menu-icon {
        display: flex !important;
        align-items: center;
        height: 100%;
    }

    .oceanwp-mobile-menu-icon a,
    .mobile-menu-icon a,
    a.mobile-menu {
        padding: 10px 14px !important;
        min-width: 52px;
        min-height: 52px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 16px !important;
    }

    .oceanwp-mobile-menu-icon .hamburger-inner,
    .oceanwp-mobile-menu-icon .hamburger-inner::before,
    .oceanwp-mobile-menu-icon .hamburger-inner::after {
        width: 28px !important;
        height: 3px !important;
    }

    /* -- Mobile Menu: Text "Menu" vergrößern -- */
    .oceanwp-mobile-menu-icon .owp-icon-menu + span,
    .mobile-menu .hamburger-box + span,
    a.mobile-menu span {
        font-size: 18px !important;
        font-weight: 500 !important;
        margin-left: 8px;
    }

    /* -- Mobile Menu: Dropdown vergrößern -- */
    #mobile-dropdown,
    .sidr,
    #sidr,
    #mobile-fullscreen {
        font-size: 18px !important;
    }

    #mobile-dropdown ul li a,
    .sidr-class-dropdown-menu li a,
    #sidr ul li a,
    .mobile-menu ul li a,
    #mobile-fullscreen ul li a {
        font-size: 20px !important;
        padding: 16px 24px !important;
        min-height: 52px;
        display: flex;
        align-items: center;
    }

    #mobile-dropdown .sub-menu li a,
    .sidr-class-dropdown-menu .sidr-class-sub-menu li a,
    #sidr .sub-menu li a,
    #mobile-fullscreen .sub-menu li a {
        font-size: 18px !important;
        padding-left: 36px !important;
    }

    /* -- Mobile Menu: Close Button -- */
    .close-icon,
    #mobile-dropdown .close-icon,
    .sidr-class-toggle-sidr-close,
    #mobile-fullscreen .close-icon {
        font-size: 32px !important;
        padding: 14px !important;
        min-width: 52px;
        min-height: 52px;
    }

    /* -- Home -- */
    .rh-home__video,
    .rh-home__video video {
        height: 50vh;
        max-height: 50vh;
    }

    .rh-home__intro {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .rh-home__intro-text {
        font-size: 7rem;
    }

    .rh-home__intro-logo {
        max-width: 200px;
    }

    .rh-home__marquee-text {
        font-size: 1.6rem;
    }

    .rh-home__spacer {
        height: 2rem;
    }

    .rh-home__news {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    /* -- Anfrage: Touch-friendly nav buttons -- */
    .rus-nav-prev,
    .rus-nav-next {
        padding: 12px 20px;
    }

    .rus-booking-wrapper {
        margin: 0 10px;
    }

    /* -- Bilder: Hotspot Icons verkleinern -- */
    .grundriss-container > .grundriss-hotspot {
        min-width: 28px;
        min-height: 28px;
    }

    .grundriss-container > .grundriss-hotspot img {
        width: 22px;
        height: 22px;
    }

    /* -- Info: Full width -- */
    body.page-slug-info .content-area {
        width: 100% !important;
        float: none !important;
    }

    body.page-slug-info #right-sidebar {
        display: none !important;
    }

    body.page-slug-info img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* -- Gästebuch -- */
    .rh-gb-intro-card {
        font-size: 18px !important;
    }

    .rh-gb-field input[type="text"],
    .rh-gb-field input[type="file"] {
        font-size: 16px !important;
    }

    .rh-gb-entry__name {
        font-size: 13px !important;
    }

    .rh-gb-entry__date {
        font-size: 11px !important;
    }

    .rh-gb-entry__content {
        font-size: 11px !important;
    }
}

/* ==========================================================================
   6. RESPONSIVE: 480px (Small Phone)
   ========================================================================== */

@media (max-width: 480px) {

    /* -- Home -- */
    .rh-home__video,
    .rh-home__video video {
        height: 40vh;
        max-height: 40vh;
    }

    .rh-home__intro-text {
        font-size: 4.5rem;
    }

    .rh-home__intro-logo {
        max-width: 160px;
    }

    .rh-home__marquee-text {
        font-size: 1.2rem;
    }

    .rh-home__video-title {
        font-size: 12vw;
    }

    .rh-home__news {
        padding: 1.5rem 1rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    /* -- Anfrage -- */
    .rus-booking-wrapper {
        padding: 8px;
        margin: 0 5px;
    }

    .rus-form-selection {
        flex-direction: column;
        text-align: center;
    }

    .rus-selection-nights {
        border-left: none;
        padding-left: 0;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
    }

    .rus-day {
        font-size: 11px;
    }

    .rus-form-row input,
    .rus-form-row textarea {
        font-size: 16px;
    }

    /* -- Bilder: Hotspot Icons noch kleiner -- */
    .grundriss-container > .grundriss-hotspot {
        min-width: 24px;
        min-height: 24px;
    }

    .grundriss-container > .grundriss-hotspot img {
        width: 18px;
        height: 18px;
    }

    #rus-pano-viewer {
        height: 260px;
        min-height: 220px;
    }

    #rus-pano-title {
        font-size: 1rem;
    }

    /* -- Info -- */
    body.page-slug-info .entry-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* -- Gästebuch -- */
    .rh-gb-intro-card {
        font-size: 16px !important;
    }

    .rh-gb-pagination .page-numbers {
        padding: 10px 16px;
        margin: 0 2px;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .rh-gb-form-title,
    .rh-gb-entries-title {
        font-size: 1.1rem !important;
    }
}

/* ==========================================================================
   7. Bilderkarusell (Home) - 3-Column Layout with Thumbnails
   ========================================================================== */

.rh-home__carousel {
    padding: 4rem 0;
    background: #fff;
}

.rh-carousel {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding: 0 2rem;
}

/* 5-Column Layout: prev-2 | prev-1 | current | next-1 | next-2 */
.rh-carousel__container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
}

.rh-carousel__track {
    display: none; /* Hide default track */
}

/* Thumbnails (prev/next) - half size */
.rh-carousel__thumbnail {
    flex: 0 0 10%;
    max-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rh-carousel__thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rh-carousel__thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 120px;
    background: #f5f5f5;
}

/* Main current image */
.rh-carousel__main {
    flex: 1 1 60%;
    max-width: 900px;
    cursor: zoom-in;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.rh-carousel__main:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.rh-carousel__main img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 600px;
    background: #f5f5f5;
}

/* Navigation Buttons */
.rh-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rh-carousel__btn:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.rh-carousel__btn:active {
    transform: translateY(-50%) scale(0.95);
}

.rh-carousel__btn--prev {
    left: 0;
}

.rh-carousel__btn--next {
    right: 0;
}

.rh-carousel__btn svg {
    color: #333;
}

/* Caption */
.rh-carousel__caption {
    margin-top: 1.5rem;
    text-align: center;
    min-height: 2rem;
}

.rh-carousel__caption-text {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* Dots Navigation - REMOVED */

/* Modal/Lightbox */
.rh-carousel__modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.rh-carousel__modal.is-open {
    display: flex;
}

.rh-carousel__modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    cursor: default;
}

.rh-carousel__modal-img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Modal Close Button */
.rh-carousel__modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.rh-carousel__modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.rh-carousel__modal-close svg {
    width: 24px;
    height: 24px;
    stroke: #333;
}

/* Modal Navigation */
.rh-carousel__modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.rh-carousel__modal-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.rh-carousel__modal-nav--prev {
    left: 2rem;
}

.rh-carousel__modal-nav--next {
    right: 2rem;
}

.rh-carousel__modal-nav svg {
    width: 28px;
    height: 28px;
    stroke: #333;
}

/* ==========================================================================
   8. Karusell Responsive
   ========================================================================== */

@media (max-width: 959px) {
    .rh-home__carousel {
        padding: 3rem 0;
    }

    .rh-carousel {
        padding: 0 1.5rem;
    }

    .rh-carousel__container {
        gap: 0.8rem;
    }

    .rh-carousel__thumbnail {
        flex: 0 0 8%;
        max-width: 100px;
    }

    .rh-carousel__thumbnail img {
        max-height: 80px;
    }

    .rh-carousel__main img {
        max-height: 500px;
    }

    .rh-carousel__btn {
        width: 44px;
        height: 44px;
    }

    .rh-carousel__modal-nav {
        width: 52px;
        height: 52px;
    }

    .rh-carousel__modal-close {
        top: -45px;
        right: -45px;
    }
}

@media (max-width: 767px) {
    .rh-home__carousel {
        padding: 2rem 0;
    }

    .rh-carousel {
        padding: 0 1rem;
    }

    .rh-carousel__container {
        gap: 0.5rem;
    }

    /* Show only 2 thumbnails on mobile (hide the outer ones) */
    .rh-carousel__thumbnail--prev-2,
    .rh-carousel__thumbnail--next-2 {
        display: none;
    }

    .rh-carousel__thumbnail {
        flex: 0 0 12%;
        max-width: 60px;
    }

    .rh-carousel__thumbnail img {
        max-height: 60px;
    }

    .rh-carousel__main {
        flex: 1 1 70%;
    }

    .rh-carousel__main img {
        max-height: 400px;
    }

    .rh-carousel__btn {
        width: 40px;
        height: 40px;
    }

    .rh-carousel__btn--prev {
        left: 10px;
    }

    .rh-carousel__btn--next {
        right: 10px;
    }

    .rh-carousel__btn svg {
        width: 20px;
        height: 20px;
    }

    /* Modal adjustments */
    .rh-carousel__modal {
        padding: 1rem;
    }

    .rh-carousel__modal-nav {
        width: 48px;
        height: 48px;
    }

    .rh-carousel__modal-nav--prev {
        left: 1rem;
    }

    .rh-carousel__modal-nav--next {
        right: 1rem;
    }

    .rh-carousel__modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    .rh-carousel__modal-close svg {
        width: 20px;
        height: 20px;
    }

    .rh-carousel__caption {
        margin-top: 1rem;
    }

    .rh-carousel__caption-text {
        font-size: 0.9rem;
        padding: 0.4rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .rh-home__carousel {
        padding: 1.5rem 0;
    }

    .rh-carousel {
        padding: 0 0.5rem;
    }

    .rh-carousel__container {
        gap: 0.3rem;
    }

    .rh-carousel__thumbnail {
        flex: 0 0 10%;
        max-width: 50px;
    }

    .rh-carousel__thumbnail img {
        max-height: 50px;
    }

    .rh-carousel__main img {
        max-height: 300px;
    }

    .rh-carousel__btn {
        width: 36px;
        height: 36px;
    }

    .rh-carousel__btn--prev {
        left: 5px;
    }

    .rh-carousel__btn--next {
        right: 5px;
    }

    /* Modal adjustments */
    .rh-carousel__modal-nav {
        width: 44px;
        height: 44px;
    }

    .rh-carousel__modal-nav--prev {
        left: 0.5rem;
    }

    .rh-carousel__modal-nav--next {
        right: 0.5rem;
    }

    .rh-carousel__modal-nav svg {
        width: 24px;
        height: 24px;
    }

    .rh-carousel__caption {
        margin-top: 0.75rem;
    }

    .rh-carousel__caption-text {
        font-size: 0.85rem;
        padding: 0.35rem 1rem;
    }
}
