/* ==========================================================================
   Start of custom CSS
   ========================================================================== */
.tabs {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 100dvh;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
}

.tabs_tab {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    min-height: 100vh;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
}

.tabs_link {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    padding: 2.3em .5em;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: end;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    border-right: 2px solid transparent;
    border-left: 2px solid #333333;
    /* background-color: #FFFEFA;*/
    -webkit-transition: all 400ms ease;
    transition: all 400ms ease;
    text-decoration: none;
}

#first-selector-acc {
    border-right-color: #333333;
    /* background-color: #FFFEFA;*/
}

.tabs_content {
    position: relative;
    overflow: hidden;
    width: 0%;
    -webkit-box-flex: 0;
    -webkit-flex: 0 auto;
    -ms-flex: 0 auto;
    flex: 0 auto;
    /* background-color: #FFFEFA;*/
    -webkit-transition: height 400ms ease, width 400ms ease;
    transition: height 400ms ease, width 400ms ease;
}

.tabs_content.active {
    width: 100%;
    height: 100dvh; 
    overflow-y: auto;
}

.tab_wrap {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: 100%;
    height: 100%;
    /* padding: 2.8em;*/
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.tab_contain {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    /* Se corrige "20p" a "20px" */
    gap: 20px;
    padding: 20px;
}

.tabs_heading {
    margin-right: 0;
    margin-left: 0;
    -webkit-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg);
    font-size: 1.9em;
    font-weight: 700;
    text-decoration: none;
}

.first-selector-acc {
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.tab_contain p {
    font-size: 1.5rem;
    line-height: 1.2;
	text-justify: justify;
}

.we-print {
    font-size: 5em;
}

.language-switcher.modal {
    /* Puedes agregar estilos si es necesario */
}

.contact-container {
    background: #333333;
    color: #FFFEFA;
}

/* ==========================================================================
   PUNTO DE ROMPER: Vertical a partir de 991px
   ========================================================================= */
@media screen and (max-width: 767px) {
	#rv-logo {
		max-width: 50px;
	}
	.tabs {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column !important;
    }
    .tabs {
		position: fixed; /* Assegura que l'alçada es calculi correctament */
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}
    
    .tabs_link {
        border-width: 2px 0;
        border-top-style: solid;
        border-top-color: #333333;
        border-bottom-style: solid;
        border-bottom-color: transparent;
        padding: 5px 0.9em;
    }
    
    .tabs_link.active {
        border-bottom-color: #333333;
    }
    
    .tabs_content {
        width: 100%;
        height: 0;
    }
    
    .tabs_content.active {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch; /* Desplaçament suau a iOS */
	}
    
    .tab_contain {
        width: 100%;
        max-width: 43em;
		padding: 0;
    }
    
    .tabs_heading {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
        margin: 0;
		font-size: 1em;
    }
    
    .first-selector-acc {
        flex-direction: row !important;
    }
    
    .tab_wrap {
        justify-content: flex-start;
    }
}

@media screen and (max-width: 479px) {
    .tabs_heading {
        font-size: 1em;
    }
    
    h1,
    .we-print {
        font-size: 3em;
    }
    
    .tab_wrap {
        padding: 20px;
    }
}

/* ==========================================================================
   MODAL LANG SWITCHER
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    opacity: 0;
    z-index: 1000;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: white;
    color: black;
    padding: 20px;
    width: 300px;
    text-align: center;
    display: none;
    opacity: 0;
    z-index: 1100;
    border: 2px solid;
}

.modal-content {
    justify-items: center;
}

.wpml-ls-legacy-list-vertical {
    display: block;
    font-size: 2rem;
}

.close-modal {
    margin-top: 20px;
    padding: 10px 20px;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
}

.lang-switcher-modal {
    cursor: pointer;
}

/* ==========================================================================
   Estils globals
   Fins ara vivien en un <style> inline dins de .global-styles a index.php.
   Es carreguen abans de style.css, que nomes declara font-family, aixi que
   la cascada no canvia.
   ========================================================================== */
:root {
    --main-dark: #4d4d4d;
    --main-light: white;
}

::selection {
    background: var(--main-dark);
    color: var(--main-light);
    text-shadow: none;
}

img::selection,
svg::selection {
    background: transparent;
}

/* El color dels enllacos l'hereten del contenidor. */
a {
    color: inherit;
}

.no-click {
    pointer-events: none;
}

.can-click {
    pointer-events: auto;
}

@media screen and (min-width: 768px) {
    .tabs_heading {
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }
}
