/*
MANUAL STYLES
*/

/* ROOT COLORS – RANDOM COLORS GENERATED BY JS IN INC FOLDER */
:root {
    --coch: #eb2144;
    --coch-ysgafn: color-mix(in srgb, var(--coch) 8%, white);
    --bs-body-bg: color-mix(in srgb, var(--coch) 8%, white);
    --bs-primary-bg-subtle: color-mix(in srgb, var(--coch) 20%, white);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(235, 33, 68, .25);
}

/* THE ILLUSTRATIONS ARE UPLOADED AS BLACK SVGs AND USED AS MASKS SO THAT THE COLOR CHANGES BETWEEN PAGES */
.svg-mask {
    background-color: var(--coch);

    -webkit-mask-image: var(--svg-url);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;

    mask-image: var(--svg-url);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
}

#logo.svg-mask{
    width: 100%;
    min-height: 10em;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#y-criw.svg-mask{
    width: 80%;
    min-height: 7em;
    aspect-ratio: 5 / 4; /* tweak per SVG */
}

#llyfrgell.svg-mask{
    width: 80%;
    min-height: 7em;
    aspect-ratio: 6 / 4; /* tweak per SVG */
}

@media (max-width: 990.98px){
    #y-criw.svg-mask{
    width: 100%;
    min-height: 7em;
    aspect-ratio: 4 / 3; /* tweak per SVG */
}
}

#car-illustration.svg-mask{
    width: 100%;
    aspect-ratio: 5 / 4; /* tweak per SVG */
}



#gofodwr.svg-mask {
    width: 60%;
    min-height: 400px;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#jiraff.svg-mask{
    width: 100%;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#rhyfelwr.svg-mask {
    width: 60%;
    min-height: 400px;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#cowboi-gwyddonydd.svg-mask {
    width: 90%;
    min-height: 400px;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

img.image-left{
    max-width: 80%;
    max-height: 640px;
    border-radius: 12px;
}

#car-illustration.svg-mask.image-block{
    width: 100%;
    aspect-ratio: 1 / 1; /* tweak per SVG */
    transform: translate(-50px, 0);
}

#gofodwr.svg-mask.image-block {
    width: 30%;
    min-height: 400px;
    aspect-ratio: 1 / 1; /* tweak per SVG */
    transform: translate(-8px,0);
}

@media (max-width: 990.98px){
   #gofodwr.svg-mask.image-block {
    width: 90%;
    min-height: 0px;
} 
}

#jiraff.svg-mask.image-block{
    width: 48%;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#rhyfelwr.svg-mask.image-block {
    width: 42%;
    min-height: 400px;
    aspect-ratio: 1 / 1; /* tweak per SVG */
}

#cowboi-gwyddonydd.svg-mask.image-block {
    width: 54%;
    min-height: 400px;
    aspect-ratio: 4 / 3; /* tweak per SVG */
}

@media (max-width: 990.98px){
    #cowboi-gwyddonydd.svg-mask{
    width: 100%;
    min-height: 90px;
    aspect-ratio: 4 / 3; /* tweak per SVG */
    }
}

#car-illustration.svg-mask.image-block {
    width: 90%;
    aspect-ratio: 6 / 3; /* tweak per SVG */
}

@media (max-width: 990.98px){
#car-illustration.svg-mask.image-block {
    width: 100%;
    transform: translate(-20px,0);
}
}

img.image-left.image-block{
    max-width: 80%;
    max-height: 640px;
    border-radius: 12px;
}


body{
    background-color: var(--coch);
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.theme-loaded {
    opacity: 1;
}

.acf-character {
    width: 100%;
}

.acf-character svg path {
    fill: var(--coch)
}

.content-image{
    max-height: 960px;
}


/* ------------------------------------------------------------------
TYPOGRAPHY
 ------------------------------------------------------------------ */
@font-face {
    font-family: 'Rohyt Slim';
    src: url('/wp-content/themes/thema-na-nog/assets/RohytSlim-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'inclusive-sans';
    src: url('/wp-content/themes/thema-na-nog/assets/TirnaNog-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}


h1, h2, h3, h4, h5{
    font-family: "Rohyt Slim";
    text-transform: uppercase;
    color: var(--coch);
}

h1{
    font-size: 4.4em;
    line-height: 0.8em;
}

@media (max-width: 990.98px) {
    h1{
        font-size: 3.4em;
    }

    h2{
        font-size: 2.2em;
    }

    h2.smaller{
        font-size: 1.6em;
    }

    .large{
    font-size: 3.4em !important;
    line-height: 0.9em;
    }

    .pre-title{
    font-size: 1.2em !important;

    }

    p.pre-title{
        font-size: 1em !important;
    }

    .title{
        font-size: 3em !important;
        line-height: 1.2em !important;
    }
}

h2{
    font-size: 3.2em;
    line-height: 1em;
}

h2.smaller{
    font-size: 2.2em;
}

h2.smaller-xs{
    font-size: 1.6em;
}


h3{
    font-size: 2.2em;
}


h5{
    font-size: 2.4em;
}

p, ul{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.3em;
}


p strong{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 600;
    font-style: normal;
}

p i{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: italic;
}

p a{
    color: var(--coch);
    text-decoration: underline;
}

.navbar ul.main-menu, .navbar .wpml-ls ul{
    font-size: 1.1em;
}

a:active{
    color: white;
}

.page-id-655 h2, .page-id-657 h2, .page-id-770 h2, .page-id-793 h2 {
    padding-top: 1em;
    text-transform: capitalize;
}

.overide-inclusive{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2em;
}

.overide-rohyt{
    font-family: "Rohyt Slim";
    text-transform: uppercase;
    color: var(--coch);
}

p.smaller-text{
    font-size: 1em;
}

.large{
    font-size: 4.4em;
    line-height: 0.9em;
}

.shear{
    transform: skew(0deg, -5deg);
}

.white{
    color: white;
}

h1.background, h2.background, h3.background, h4.background, h5.background, h6.background, p.background{
    display: inline-block;
}

.background{
    background-color: var(--coch);
    padding: 1rem;
    border-radius: 0.2em;
}

span.para-font{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.3em;
}

span.para-font.smaller-text{
    font-size: 1em;
}

.overlay-on-card{
    z-index: 99;
    transform: translate(0, -50%);
    transition: 400ms ease-in-out;
}

.card:hover .overlay-on-card {
    transform: translate(0, -60%);
    transition: 160ms ease-in-out;
}

.no-animations .card:hover .overlay-on-card {
    transform: translate(0, -50%);
    transition: 160ms ease-in-out;
}

.winner-tag{
    display: inline-block;
    z-index: 100;
    font-size: 1.3em;
    transform: translate(-30px, 50px);
    transition: 300ms ease-in-out;
}

.card:hover .winner-tag{
    transform: translate(-20px, 60px);
    transition: 260ms ease-in-out;
}

.no-animations .card:hover .winner-tag {
    transform: translate(-30px, 50px);
}

.pre-title{
    font-size: 2.2em !important;
    font-family: "Rohyt Slim" !important;
    text-transform: uppercase;
    line-height: 0.8em !important;
}

p.pre-title{
    font-size: 2.2em !important;
    display: inline-block;

}

.title{
    font-size: 4.4em;
    color: var(--coch) !important;
    line-height: 1.2em;
    text-transform: none !important;
}

p.title{
    font-family: "Rohyt Slim";
}

p.shortlist-category{
    font-size: 2em;
}

@media (max-width: 990.98px){
    p.shortlist-category{
        font-size: 1.5em;
    }
}

p.winner-category{
    font-size: 2.4em;
}

.sub-footer-menu{
    font-size: 1em;
}


/* ------------------------------------------------------------------
BTN STYLING
 ------------------------------------------------------------------ */
.btn{
    background-color: var(--coch-ysgafn);
    padding: 0.5em 1.3em;
    border: 2px solid var(--coch);
    color: var(--coch);
    transition: 160ms ease-in-out;
    font-family: "Rohyt Slim";
    font-size: 1.7em;
    background-image: none;
}

.btn:hover{
    background-color: var(--coch);
    transform: scale(1.02);
    transition: 160ms ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active{
    border-color: var(--coch)
}





/* ------------------------------------------------------------------
ANIMATION TOGGLE STYLING 
 ------------------------------------------------------------------ */
.theme-checkbox {
  --toggle-size: 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 6.25em;
  height: 3.125em;
  background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
  background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
  background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
  background-size: 205%;
  background-position: 0;
  -webkit-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
  border-radius: 99em;
  position: relative;
  cursor: pointer;
  font-size: var(--toggle-size);
}

.theme-checkbox::before {
  content: "";
  width: 2.25em;
  height: 2.25em;
  position: absolute;
  top: 0.438em;
  left: 0.438em;
  background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
  background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
  background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
  background-size: 205%;
  background-position: 100%;
  border-radius: 50%;
  -webkit-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
}

.theme-checkbox:checked::before {
  left: calc(100% - 2.25em - 0.438em);
  background-position: 0;
}

.theme-checkbox:checked {
  background-position: 100%;
}

@media (max-width: 576px) {
    .animation-toggle-wrapper {
        bottom: 1rem;
        right: 1rem;
        transform: scale(0.9);
    }
}

#toggle-animations{
    background-color: red;
}



/* ------------------------------------------------------------------
JUDGES + SHORTLIST CARDS
 ------------------------------------------------------------------ */
.card-img-top {
    width: 100%;
    height: 25vw;
    max-height: 500px;
    min-height: 500px;
    object-fit: cover;
    border-radius: 13px;
}

.card{
    border: none;
    background-color: transparent;
}

.card img {
    transform: scale(1);
    transition: 400ms ease-in-out;
}

.card:hover img {
    transform: scale(1.02);
    transition: 160ms ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.no-animations .card:hover img{
    transform: scale(1);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0));
}

@media (min-width: 576px) {
.single-shortlist .height-adjust-custom img, .page-template-page-shortlist .height-adjust-custom img {
    object-fit: contain;
    height: 25vw;
}
}




/* ------------------------------------------------------------------
BORDER STYLING
 ------------------------------------------------------------------ */
#border-wrapper{
    background-color: var(--coch-ysgafn);
    margin: 18px;
    border-radius: 24px;
    padding-bottom: 4em;
}

.accordion-button{
    padding-left: 0;
    padding-right: 0;
    font-size: 0.65em;
}

.accordion-body{
    padding: 1em 0 0 0;
}

.js-animate {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s ease-out;
}

/* Triggered when in viewport */
.js-animate.animate__animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Optional: smoother shadow/floating effect for cards */
.card.js-animate {
    transition: transform 0.6s ease-out, box-shadow 0.6s ease-out, opacity 0.6s ease-out;
}

.card.js-animate.animate__animated {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}




/* ------------------------------------------------------------------
SINGLES – JUDGES AND SHORTLISTS
 ------------------------------------------------------------------ */
.shortlist-cover-photo{
    max-height: 740px;
}

.judge-cover-photo{
    max-height: 740px;
    border-radius: 12px;
}



/* ------------------------------------------------------------------
DOWNLOAD GRID
 ------------------------------------------------------------------ */
.download-grid .card{
    background-color: var(--coch);
}

.download-grid .card {
    transform: scale(1);
    transition: 400ms ease-in-out;
    border-radius: 13px;
    padding: 1em;
}

.download-grid .card:hover {
    transform: scale(1.02);
    transition: 160ms ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.download-grid .card-subtitle{
    font-size: 1.4em !important;
    color: white !important;

}

.download-grid .card-title{
    font-size: 2.6em;
    line-height: 1em;
}

.download-grid .card-text{
    font-size: 1.3em;
    line-height: 1.3em;
}



/* ------------------------------------------------------------------
NAVBAR
 ------------------------------------------------------------------ */
.offcanvas li, .navbar li {
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2em;
    padding-inline: 0.8rem;
}

/* =========================
   DESKTOP GRID HEADER
   ========================= */
@media (min-width: 1710px) {

  .navbar-expand-custom .navbar-toggler {
    display: none;
  }

  .d-custom-flex {
    display: flex !important;
  }

  .d-custom-block {
    display: none !important;
  }

  /* ✅ MAIN HEADER GRID */
  .container-fluid.position-relative {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
  }

  /* LEFT: LOGO */
  .navbar-brand {
    grid-column: 1;
    display: flex;
    align-items: center;
  }

  /* CENTER: MAIN MENU */
  .center-menu-wrapper {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
  }

  /* IMPORTANT: remove old absolute centering */
  .main-menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;

    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;

    position: static !important;
    transform: none !important;
    left: auto !important;
  }

  /* RIGHT: LANGUAGE + MENU */
  .right-menu {
    grid-column: 3;
    justify-self: end;

    display: flex !important;
    align-items: center;
    gap: 1rem;
  }

  .right-wrapper,
  .desktop-lang {
    display: flex;
    align-items: center;
  }

  /* WPML FIX */
  .desktop-lang {
    line-height: 1;
    padding-inline-end: 1em;
  }

  .desktop-lang ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
  }

  .desktop-lang li {
    display: inline-flex;
    align-items: center;
  }

  /* RIGHT MENU ITEMS */
  .right-style {
    display: flex !important;
    align-items: center;
    gap: 1rem;

    margin: 0;
    padding: 0;
    list-style: none;
  }

  .right-style li {
    display: inline-flex;
    align-items: center;
  }

  /* ensure all header zones align properly */
  .center-menu-wrapper,
  .right-menu,
  .navbar-brand {
    display: flex;
    align-items: center;
  }
}

/* =========================
   MOBILE (<1710px)
   ========================= */
@media (max-width: 1709.98px) {

  .main-menu,
  .right-menu {
    display: none !important;
  }

  .d-custom-block {
    display: inline-flex !important;
  }

  /* fullscreen menu */
  .fullscreen-menu {
    height: 100vh !important;
    width: 100vw !important;
  }
}

/* =========================
   WPML GLOBAL CLEANUP
   ========================= */
.wpml-ls-legacy-list-horizontal,
.wpml-ls-legacy-list-horizontal a {
    padding: 0;
    border: none;
}

/* RIGHT MENU STYLE (desktop items) */
.right-wrapper li {
    background-color: var(--coch);
    border-radius: 4px;

    display: inline-block;

    font-family: "Rohyt Slim";
    font-size: 1.8rem;
    text-transform: uppercase;
    color: whitesmoke;

    margin-bottom: 12px;

    transform: skewY(-5deg);
}

.offcanvas{
    background-color: var(--coch);
}

.nav-mobile li{
    color: white;
}

.wpml-ls-item a{
    color: var(--coch);
}

.offcanvas .btn-close {
  filter: invert(1); /* makes it white */
  opacity: 1;
  transition: 200ms ease-in;
}

.offcanvas .btn-close:hover {
  transform: scale(1.3);
  transition: 200ms ease-in;
}

/* TOGGLER */
.navbar-toggler {
    border: none;
    font-size: 1.8em;
}

.navbar{
    background-image: none;
}

.offcanvas .wpml-ls-native{
    color: white;
}

@media (max-width: 990.98px) {
    #logo.svg-mask{
        width: 100%;
        min-height: 7.2em;
        aspect-ratio: 1 / 1; /* tweak per SVG */
    }

    #border-wrapper{
        margin: 14px;
        border-radius: 24px;
        padding-bottom: 2.8em;
    }

    .navbar .container-fluid{
        padding: 0.9em 1.6em;
    }

}

.btn-primary{
    line-height: 1.1;
}


.footer-wrapper{
    background-color: var(--coch);
    margin: 18px;
    border-radius: 24px;
}

#footer{
    background-color: var(--coch);
    color: white;
}


.sub-footer-menu li a{
    font-family: "inclusive-sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.9em;
    flex-direction: column;
}

@media (max-width: 990.98px){
.sub-footer-logo{
    padding-right: 0em !important;
}
}

@media (max-width: 990.98px){
.sub-footer-menu li:not(:last-child){
    padding-right: 0.4em !important;
}
}

.sub-footer-menu li:not(:last-child){
    padding-right: 1.8em;
}


img.sub-footer-logo{
    min-height: 2em;
    max-height: 2.6em;
}

img.sub-footer-logo:not(:last-child){
    padding-right: 1.3em;
}

img#halen-mon{
    min-height: 2em;
    max-height: 6em;
    padding-inline: 0.8em;
    padding-inline-start: 0em;
}

#footer .menu-item a[aria-current=page]{
    color: white;
}



/* ================================
   GLOBAL DISABLE ANIMATIONS
================================ */

body.no-animations *,
body.no-animations *::before,
body.no-animations *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* ================================
   SAFE HOVER OVERRIDES
   (adjust selectors to your site)
================================ */

body.no-animations a:hover,
body.no-animations button:hover,
body.no-animations .card:hover,
body.no-animations .js-hover:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;

}

/* If you use a reusable hover class, this is best */
body.no-animations .hover-lift:hover,
body.no-animations .hover-scale:hover {
    transform: none !important;
}

/* ================================
   REDUCED MOTION SUPPORT (IMPORTANT)
================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


.winner-wrapper {
    position: relative;
    display: inline-block; /* or block if you prefer full width */
}

.winner-wrapper .winner-tag {
    position: absolute;
    top: -70px;      /* adjust spacing */
    left: 0px;     /* adjust spacing */
    z-index: 2;
}

@media (max-width: 990.98px){
    .winner-wrapper .winner-tag {
        left: 22px;     /* adjust spacing */
    }
}

.winner-wrapper .winner-tag p {
    margin: 0;
}

/* Optional: make sure image sits underneath cleanly */
.winner-wrapper img {
    display: block;
}


@media (max-width: 990.98px){
.background{
    padding: 0.3em;
}
}

@media (max-width: 990.98px){
.offcanvas li, .navbar li {
    font-size: 0.8em;
}
}

@media (max-width: 990.98px){
.download-grid .card-title{font-size: 2.4em;}
}



