@import "fonts.css";
@import "base.css";
@import "header-footer.css";
@import "bricks.css";

/*------------------------*/
/* theme colors
/*------------------------*/

:root {
    --textDark: #33222a;
    --textMedium: rgba(51, 34, 42, 0.78);
    --borderMedium: rgba(51, 34, 42, 0.2);
    --borderLight: rgba(51, 34, 42, 0.08);
    --accent: #b8343b;
    --textAccent: #7a2638;
    --light: #fbeeea;
    --mauve: #c08690;
    --accentLight: #c94a4f;
    --accentDark: #7a2638;
    --bg: white;
    --highlight: rgba(233, 181, 168, 0.8);
    --flowerBg: #fbeeea;
}

[data-theme="dark"] {
    color-scheme: dark;
    --textDark: #f5e9e5;
    --textMedium: rgba(245, 233, 229, 0.78);
    --borderMedium: rgba(245, 233, 229, 0.22);
    --borderLight: rgba(245, 233, 229, 0.1);
    --textAccent: #f2a7a0;
    --light: #2b1d23;
    --bg: #1c1317;
    --highlight: rgba(184, 52, 59, 0.6);
    --flowerBg: #d9c5bf;
}

/*------------------------*/
/* turn grayscale off
/*------------------------*/

img {
    filter: grayscale(0);
}

/*------------------------*/
/* colorize_image
/*------------------------*/

.colorize_image {
    filter: contrast(1) sepia(1) hue-rotate(160deg) grayscale(0.8) !important;
}

/*------------------------*/
/* black_2_textDark
/*------------------------*/

.map::after, .black_2_textDark {
    filter: contrast(0.7) sepia(1) hue-rotate(300deg) !important;
}

/*------------------------*/
/* black_2_textMedium
/*------------------------*/

.black_2_textMedium {
    filter: contrast(0.3) sepia(0.3) hue-rotate(300deg) brightness(1.4) !important;
}

/*------------------------*/
/* black_2_accent
/*------------------------*/

.black_2_accent {
    filter: contrast(0.25) sepia(1) hue-rotate(300deg) contrast(3) !important;
}

/*------------------------*/
/* CSS overrides below
/*------------------------*/

html {
    font-size: clamp(15px, 2vw, 17px);
    scroll-padding-top: 100px;
    background: var(--bg);
}
body, .innerbody, header, header.sticky, footer {
    background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
    html {scroll-behavior: auto;}
    * {transition: none !important; animation: none !important;}
}
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0.25rem;
}
::selection {
    background: var(--mauve);
    color: white;
}

h1, h2, a.logo {
    font-weight: 400;
    letter-spacing: -0.01em;
}
h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}
h3 {
    font-family: var(--fontTitles);
    font-weight: 400;
    font-size: 1.3rem;
}
p strong {
    color: var(--textDark);
}
p > img {
    border-radius: 1.5rem;
}

.button, button {
    border-radius: 2rem;
    padding: 0.8em 1.5em;
}
.button:hover {
    background: var(--accentDark);
}
.button.ghost:hover {
    background: var(--light);
    color: var(--textAccent);
}

/* Header */
.logo > img {
    max-height: 72px;
}
.preheader.light {
    background: var(--light);
    border-bottom: 0;
}
header.sticky {
    box-shadow: 0 1px 0 var(--borderLight);
}
header nav > ul > li::after {
    height: 0.15rem;
    border-radius: 1rem;
    background-color: var(--accent);
}

/* Hero */
header + section.image {
    padding-top: 9.5rem !important;
    padding-bottom: 4rem;
}
header + section.image .twocols {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: 2rem 4rem;
}
header + section.image h1 {
    font-size: clamp(3rem, 6.5vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
header + section.image h1 + p {
    font-size: 1.2rem;
    color: var(--textDark);
    max-width: 32rem;
}
header + section.image h1 span {
    display: block;
    width: fit-content;
    position: relative;
    z-index: 0;
}
header + section.image h1 span::before {
    content: "";
    position: absolute;
    inset: 38% -0.2em 6% -0.15em;
    background: var(--highlight);
    border-radius: 0.5em 0.25em 0.6em 0.2em / 0.3em 0.5em 0.25em 0.45em;
    transform: rotate(-1.5deg);
    z-index: -1;
}
header + section.image p:has(.call) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
header + section.image p:has(.call) .button {
    margin: 0;
}
.call {
    display: inline-flex;
    align-items: stretch;
    border-radius: 2rem;
    background: var(--accentLight);
    color: white;
    font-weight: 600;
    overflow: hidden;
}
.call-label {
    display: flex;
    font-weight: 600;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8em 1rem;
    padding-inline-start: 1.4rem;
    background: var(--light);
    color: var(--textAccent);
}
.call-label img {
    height: 1rem;
}
.call a {
    color: white;
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.8em 1.1rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.35);
    transition: background 0.15s ease-in-out;
    white-space: nowrap;
}
.call a:last-child {
    padding-inline-end: 1.4rem;
}
.call a:hover {
    background: var(--accent);
}
@media (max-width: 30rem) {
    .call {
        flex-wrap: wrap;
        border-radius: 1.25rem;
    }
    .call-label {
        flex-basis: 100%;
        justify-content: center;
        padding: 0.6em 1rem;
    }
    .call a {
        flex: 1;
        justify-content: center;
        padding: 0.8em 0.75rem;
    }
    .call a:first-of-type {
        border-inline-start: 0;
    }
}
header + section.image .text p:last-child {
    font-size: 0.95rem;
    padding-inline-start: 1rem;
    border-inline-start: 0.2rem solid var(--mauve);
}
header + section.image .twocols .image img {
    max-width: 100%;
    border-radius: 1.5rem;
}
header + section.image .twocols .image p {
    position: relative;
    z-index: 0;
    width: fit-content;
    margin-inline: auto;
}
header + section.image .twocols .image p::before {
    content: "";
    position: absolute;
    inset: -6% -4%;
    background: var(--flowerBg);
    border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
    transform: rotate(-3deg);
    z-index: -1;
}

/* Chi siamo */
section.image:not(header + section) {
    padding-top: 5rem;
}
section.image:not(header + section) .twocols {
    align-items: start;
}
section.image .twocols .image img {
    max-width: 100%;
    border-radius: 1.5rem;
}
.shortcode-youtube {
    border: 0.1rem solid var(--borderLight);
    max-width: 26rem;
}

/* Gallery */
section.about {
    padding-top: 1rem !important;
}
section.about .container.small {
    max-width: 84rem;
}
.carousel-track {
    display: flex;
    gap: 1rem;
    margin: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
    display: none;
}
.carousel-track li {
    list-style: none;
    flex: 0 0 calc((100% - 3rem) / 4);
    scroll-snap-align: start;
}
.carousel-track img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 1rem;
}
.carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}
.carousel-controls button {
    background: var(--bg);
    color: var(--textDark);
    box-shadow: inset 0 0 0 0.1rem var(--borderMedium);
    height: 2.75rem;
    min-width: 2.75rem;
    padding: 0 1.1rem;
    font-weight: 600;
}
.carousel-controls .carousel-toggle,
.carousel-controls .carousel-prev,
.carousel-controls .carousel-next {
    padding: 0;
    font-size: 1.6rem;
    line-height: 1;
}
.carousel-controls button:hover {
    background: var(--light);
}
.carousel-toggle::before {
    content: "";
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    margin: auto;
    background: currentColor;
    -webkit-mask: url(../img/icons/material-symbols/200/rounded/pause-fill.svg) center / contain no-repeat;
    mask: url(../img/icons/material-symbols/200/rounded/pause-fill.svg) center / contain no-repeat;
}
.carousel-toggle.paused::before {
    -webkit-mask-image: url(../img/icons/material-symbols/200/rounded/play_arrow-fill.svg);
    mask-image: url(../img/icons/material-symbols/200/rounded/play_arrow-fill.svg);
}
@media (max-width: 60rem) {
    .carousel-track li {flex-basis: 40%;}
}
@media (max-width: 600px) {
    .carousel-track li {flex-basis: 80%;}
}

/* Servizi */
section.features {
    background: var(--light);
    padding: 5.5rem 0 6rem !important;
}
section.features .container.small,
section.reviews .container.small {
    max-width: 84rem;
    text-align: start;
    margin-bottom: 3rem;
}
section.features .container.small em {
    font-size: 0.95rem;
}
ul.features {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 3rem 3.5rem;
}
ul.features li {
    text-align: start;
}
ul.features li.has_icon p.image {
    border: 0;
    padding: 1.1rem;
    background: var(--bg);
    border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
}
ul.features li:nth-child(2n).has_icon p.image {
    border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%;
}
ul.features li:nth-child(3n).has_icon p.image {
    border-radius: 52% 48% 62% 38% / 42% 58% 42% 58%;
}
ul.features li.has_icon p.image img {
    width: 2.25rem;
}

/* Recensioni */
section.reviews {
    padding-top: 6rem !important;
}
ul.reviews li div.box {
    background: var(--light);
    border: 0;
    border-radius: 1.5rem;
    padding: 2.25rem 2rem 2rem;
}
ul.reviews li div.box p {
    color: var(--textDark);
    font-size: 1.05rem;
}
ul.reviews li div.box .stars {
    margin-bottom: 1rem;
}
ul.reviews li div.box h3 {
    font-size: 1rem;
    color: var(--textAccent);
}

section.error404 p > img {
    width: 22rem;
    margin: 0 auto;
}

/* Contatti */
section.map div.map {
    padding: 5rem 0;
}
section.map div.map > .container > div {
    background: var(--bg);
    border-radius: 1.5rem;
    box-shadow: 0 1rem 3rem rgba(51, 34, 42, 0.12);
}

/* Footer */
footer {
    border-top: 0;
}
footer a.logo img.inline {
    filter: none !important;
}
ul.buttons.social .button {
    border-radius: 100%;
}
@media (max-width: 47rem) {
    header + section.image .twocols .image p {max-width: 65%;}
}

/* Preheader: language and theme */
.preheader-end {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.languages {
    display: flex;
    gap: 0.75rem;
}
.preheader .languages a {
    text-decoration: none;
}
.preheader .languages a[aria-current] {
    color: var(--textDark);
    font-weight: 600;
}
.theme-toggle {
    background: none;
    color: var(--textDark);
    padding: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 100%;
}
.theme-toggle:hover {
    background: var(--borderLight);
}
.theme-toggle::before {
    content: "";
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    margin: auto;
    background: currentColor;
    -webkit-mask: url(../img/icons/material-symbols/200/rounded/dark_mode.svg) center / contain no-repeat;
    mask: url(../img/icons/material-symbols/200/rounded/dark_mode.svg) center / contain no-repeat;
}
[data-theme="dark"] .theme-toggle::before {
    -webkit-mask-image: url(../img/icons/material-symbols/200/rounded/light_mode.svg);
    mask-image: url(../img/icons/material-symbols/200/rounded/light_mode.svg);
}
@media (max-width: 600px) {
    .preheader .hours {display: none;}
}

/* Dark theme */
[data-theme="dark"] section.error404 p > img,
[data-theme="dark"] .shortcode-youtube img {
    filter: invert(1) hue-rotate(180deg);
}
[data-theme="dark"] header a.logo {
    display: inline-block;
    position: relative;
    z-index: 0;
}
[data-theme="dark"] header a.logo::before {
    content: "";
    position: absolute;
    inset: -20% 0 -20% -10%;
    background: var(--flowerBg);
    border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
    transform: rotate(2deg);
    z-index: -1;
}
[data-theme="dark"] header.sticky a.logo::before {
    inset: -12% 0 -12% -10%;
}
[data-theme="dark"] .black_2_textMedium,
[data-theme="dark"] .call-label img {
    filter: invert(0.85) !important;
}
[data-theme="dark"] #togglemenu {
    filter: invert(1);
}
[data-theme="dark"] body.mobilemenu header > div.container > div:nth-child(2) {
    background: var(--light);
}
[data-theme="dark"] ul.buttons.social .button {
    background: var(--light);
}
[data-theme="dark"] .button.icon:hover {
    background: var(--accentDark);
    box-shadow: none;
}
[data-theme="dark"] section.map .overlay {
    background: rgba(28, 19, 23, 0.45);
}

/* Right-to-left (Arabic) */
a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: isolate;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] a.logo {
    letter-spacing: 0;
}
[dir="rtl"] header > .container > div:first-child,
[dir="rtl"] footer .container > div:first-child:not(:only-child) {
    text-align: right;
}
[dir="rtl"] footer .container > div:last-child:not(:only-child) {
    text-align: left;
}
[dir="rtl"] body.mobilemenu header nav > ul {
    text-align: right;
}
[dir="rtl"] #togglemenu {
    right: auto;
    left: clamp(1rem, 4vw, 3rem);
    margin-right: 0;
    margin-left: -0.75rem;
}
[dir="rtl"] body.mobilemenu header > div.container > div:nth-child(2) {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}
[dir="rtl"] body.mobilemenu.menushown header > div.container > div:nth-child(2) {
    transform: translateX(0);
}
[dir="rtl"] .carousel-prev,
[dir="rtl"] .carousel-next {
    transform: scaleX(-1);
}
footer a.logo span:first-child {
    text-transform: lowercase;
}
