/********** Seasonal decorations **********/
/*
   Generic placement for seasonal images. The images themselves come from a
   theme file (e.g. seasonal-halloween.css) that sets the variables below.
   A decoration only shows up if its variable is set, so a theme can use
   any subset of the spots.

   --season-hero     : bottom-left of the hero header
   --season-service  : top-right corner of the Services section (floating)
   --season-areas    : top-left corner of the Areas Covered section (wide image, floating)
   --season-reviews  : top-right corner of the Reviews section (floating)

   Static corner pieces, per section and corner:
   --season-{service|areas|reviews}-{tl|tr|bl|br}

   Full-width repeating divider on top of every section (e.g. garland):
   --season-divider
   --season-divider-overlap : how far it reaches up into the section above,
                              covering the seam between the two (0 = none)

   --season-logo     : on the top-left corner of the About and navbar logos (e.g. santa hat)

   Optional sizes:
   --season-hero-size, --season-corner-size, --season-divider-height

   To disable: comment out the two seasonal <link> lines in index.html.
   New theme: copy a theme file (e.g. seasonal-christmas.css), rename,
   change the image paths.
*/

:root {
    --season-divider-height: clamp(40px, 5vw, 70px);
    --season-divider-overlap: 0px;
    --season-corner-size: clamp(80px, 10vw, 170px);
}

.hero-header {
    position: relative;
    overflow: hidden;
}

/* Clip sideways only, so the divider can reach up over the section above */
#aboutus,
#service,
#areas,
#reviews,
#footer {
    position: relative;
    overflow-x: clip;
}

.hero-header > .container,
#aboutus > .container,
#service > .container,
#areas > .container,
#reviews > .container,
#footer > .container {
    position: relative;
    z-index: 1;
}

.hero-header::after,
#service::after,
#areas::after,
#reviews::after {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
}

/*** Hero ***/
.hero-header::after {
    left: 0;
    bottom: 0;
    width: var(--season-hero-size, clamp(320px, 56vw, 840px));
    aspect-ratio: 1;
    background-image: var(--season-hero, none);
    background-position: left bottom;
    opacity: .9;
}

/* Dark glass panel behind the hero intro text so it stays readable over the image */
.hero-header p {
    display: inline-block;
    padding: .75rem 1rem;
    border-radius: .5rem;
    background: rgba(15, 23, 43, .6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

/*** Services ***/
#service::after {
    top: 1rem;
    right: 2%;
    width: clamp(110px, 16vw, 230px);
    aspect-ratio: 1;
    background-image: var(--season-service, none);
    background-position: right top;
    animation: seasonFloat 4s ease-in-out infinite;
}

/*** Areas Covered ***/
#areas::after {
    top: 1rem;
    left: 1%;
    width: clamp(150px, 20vw, 330px);
    aspect-ratio: 16 / 9;
    background-image: var(--season-areas, none);
    background-position: left top;
    animation: seasonFloat 4.5s ease-in-out infinite;
}

/*** Reviews ***/
#reviews::after {
    top: 1rem;
    right: 2%;
    width: clamp(100px, 14vw, 200px);
    aspect-ratio: 1;
    background-image: var(--season-reviews, none);
    background-position: right top;
    animation: seasonFloat 5s ease-in-out infinite reverse;
}

/*** Divider + corner decorations (static) ***/
/* First layer is the full-width divider, then the four corners */
#aboutus::before,
#service::before,
#areas::before,
#reviews::before,
#footer::before {
    content: "";
    position: absolute;
    inset: 0;
    top: calc(-1 * var(--season-divider-overlap));
    z-index: 0;
    pointer-events: none;
    background-image: var(--season-divider, none);
    background-repeat: repeat-x;
    background-position: center top;
    background-size: auto var(--season-divider-height);
}

#service::before {
    background-image: var(--season-divider, none), var(--season-service-tl, none), var(--season-service-tr, none), var(--season-service-bl, none), var(--season-service-br, none);
}

#areas::before {
    background-image: var(--season-divider, none), var(--season-areas-tl, none), var(--season-areas-tr, none), var(--season-areas-bl, none), var(--season-areas-br, none);
}

#reviews::before {
    background-image: var(--season-divider, none), var(--season-reviews-tl, none), var(--season-reviews-tr, none), var(--season-reviews-bl, none), var(--season-reviews-br, none);
}

#service::before,
#areas::before,
#reviews::before {
    background-repeat: repeat-x, no-repeat, no-repeat, no-repeat, no-repeat;
    background-position:
        center top,
        left top var(--season-divider-overlap),
        right top var(--season-divider-overlap),
        left bottom,
        right bottom;
    background-size:
        auto var(--season-divider-height),
        var(--season-corner-size),
        var(--season-corner-size),
        var(--season-corner-size),
        var(--season-corner-size);
}

/*** Logos (About + navbar) ***/
#aboutus .row.g-3,
.navbar-brand {
    position: relative;
}

#aboutus .row.g-3::after,
.navbar-brand::after {
    content: "";
    position: absolute;
    top: -15%;
    left: -13%;
    width: 60%;
    aspect-ratio: 880 / 702;
    z-index: 1;
    pointer-events: none;
    background: var(--season-logo, none) no-repeat center / contain;
    transform: scaleX(-1) rotate(10deg);
}

/* The navbar logo has a right margin inside the link, so it needs its own numbers */
.navbar-brand::after {
    top: -18%;
    left: -10%;
    width: 52%;
    transform: scaleX(-1) rotate(0deg);
}

/* Cards are transparent by default; make them solid so corner images don't show through.
   Same specificity as .service-item:hover in style.css, so the hover colour still wins. */
.service-item {
    background-color: #fff;
}

/* Push section content below the divider (0 when the theme has none) */
#aboutus > .container,
#service > .container,
#areas > .container,
#reviews > .container,
#footer > .container {
    margin-top: var(--season-divider-space, 0px);
}

@keyframes seasonFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-10px) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
    #service::after,
    #areas::after,
    #reviews::after { animation: none; }
}
