@import url('https://fonts.googleapis.com/css2?family=Rouge+Script&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barriecito&family=Rouge+Script&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barriecito&family=Barrio&family=Rouge+Script&display=swap');

/* ================================================= */
/* Base Styles */
/* ================================================= */

html {
    position: relative;
    scroll-behavior: smooth;
}

body {
    height: 150%;
}

/* ================================================= */
/* Back to Top Button */
/* ================================================= */

#topBtn {
    display: none;
    position: fixed;
    bottom: 250px;
    right: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: red;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
}

    #topBtn:hover {
        background-color: #555;
    }

/* ================================================= */
/* W3.CSS Overrides */
/* ================================================= */

.w3-check input[type="checkbox"] {
    width: auto;
    height: auto;
}

.template-info {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ================================================= */
/* Custom Slideshow Animations (CORRECTED SYNTAX) */
/* ================================================= */

/* 1. Rotate In Animation */
@keyframes w3-animate-rotate-in { /* <--- Corrected to single @ */
    from {
        transform: scale(0.5) rotate(-30deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.w3-animate-rotate-in {
    animation: w3-animate-rotate-in 0.6s;
}


/* W3 Tiles Transition Effect */
/* ================================================= */
/* Custom Tiles Transition CSS (Add to site.css)
/* w3-tiles-transition: 1s → 2.5s
/* w3-tiles-fade: 1.2s → 2.8s
/* w3-tiles-checkerboard: 1s → 2.5s
/* w3-tiles-slide: 0.8s → 2s

/* To customize further:

/* For faster transitions: use values like 0.5s, 0.8s, 1s
/* For medium transitions: use values like 1.5s, 2s, 2.5s
/* For slower transitions: use values like 3s, 3.5s, 4s

/* Just adjust the number before the s in the animation property (e.g., animation: tilesReveal 3s ease-out forwards;)
/* ================================================= */

/* W3 Tiles Transition Effect - SLOWER */
.w3-tiles-transition {
    animation: none;
    position: relative;
}

.w3-tiles-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
    background-size: 20% 20%;
    background-color: #000;
    z-index: 10;
    pointer-events: none;
    animation: tilesReveal 2.5s ease-out forwards; /* Changed from 1s to 2.5s */
}

@keyframes tilesReveal {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* W3 Tiles Fade Effect - SLOWER */
.w3-tiles-fade {
    animation: none;
    position: relative;
}

.w3-tiles-fade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, #000 0px, #000 10%, transparent 10%, transparent 20%),
        repeating-linear-gradient(90deg, #000 0px, #000 10%, transparent 10%, transparent 20%);
    z-index: 10;
    pointer-events: none;
    animation: tilesFadeOut 2.8s ease-in-out forwards; /* Changed from 1.2s to 2.8s */
}

.rouge-script-regular {
  font-family: "Rouge Script", cursive;
  font-weight: 400;
  font-style: normal;
}

@keyframes tilesFadeOut {
    0% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
    100% {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }
}

/* W3 Tiles Checkerboard Effect - SLOWER */
.w3-tiles-checkerboard {
    animation: none;
    position: relative;
}

.w3-tiles-checkerboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%),
        linear-gradient(-45deg, #000 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #000 75%),
        linear-gradient(-45deg, transparent 75%, #000 75%);
    background-size: 100px 100px;
    background-position: 0 0, 0 50px, 50px -50px, -50px 0px;
    z-index: 10;
    pointer-events: none;
    animation: checkerboardReveal 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; /* Changed from 1s to 2.5s */
}

@keyframes checkerboardReveal {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) rotate(5deg);
    }
}

/* W3 Tiles Slide Effect - SLOWER */
.w3-tiles-slide {
    animation: none;
    position: relative;
    overflow: hidden;
}

.w3-tiles-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #000 0px,
        #000 10%,
        transparent 10%,
        transparent 20%
    );
    z-index: 10;
    pointer-events: none;
    animation: tilesSlideOut 2s ease-out forwards; /* Changed from 0.8s to 2s */
}

@keyframes tilesSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0.5;
    }
}


/* W3.CSS Spiral Transition Effect */

/* Spiral Out Animation */
.w3-spiral-out {
    display: block;
    animation: w3-spiral-out-animation 1s ease-in-out 3s forwards;
}

@keyframes w3-spiral-out-animation {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Spiral In Animation */
.w3-spiral-in {
    display: block;
    animation: w3-spiral-in-animation 1s ease-in-out forwards;
}

@keyframes w3-spiral-in-animation {
    0% {
        transform: scale(0) rotate(-360deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}