@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    :root {
        --background: 0 0% 100%;
        --foreground: 222.2 84% 4.9%;
        --card: 0 0% 100%;
        --card-foreground: 222.2 84% 4.9%;
        --popover: 0 0% 100%;
        --popover-foreground: 222.2 84% 4.9%;
        --primary: 221.2 83.2% 53.3%;
        --primary-foreground: 210 40% 98%;
        --secondary: 210 40% 96.1%;
        --secondary-foreground: 222.2 47.4% 11.2%;
        --muted: 210 40% 96.1%;
        --muted-foreground: 215.4 16.3% 46.9%;
        --accent: 210 40% 96.1%;
        --accent-foreground: 222.2 47.4% 11.2%;
        --destructive: 0 84.2% 60.2%;
        --destructive-foreground: 210 40% 98%;
        --border: 214.3 31.8% 91.4%;
        --input: 214.3 31.8% 91.4%;
        --ring: 221.2 83.2% 53.3%;
        --radius: 0.5rem;
        --chart-1: 221.2 83.2% 53.3%;
        --chart-2: 291.2 83.2% 53.3%;
        --chart-3: 0 84.2% 60.2%;
        --chart-4: 50 84.2% 60.2%;
        --chart-5: 100 84.2% 60.2%;
        --sidebar-background: 0 0% 100%;
        --sidebar-foreground: 222.2 84% 4.9%;
        --sidebar-primary: 221.2 83.2% 53.3%;
        --sidebar-primary-foreground: 210 40% 98%;
        --sidebar-accent: 210 40% 96.1%;
        --sidebar-accent-foreground: 222.2 47.4% 11.2%;
        --sidebar-border: 214.3 31.8% 91.4%;
        --sidebar-ring: 221.2 83.2% 53.3%;
    }

    .dark {
        --background: 222.2 84% 4.9%;
        --foreground: 210 40% 98%;
        --card: 222.2 84% 4.9%;
        --card-foreground: 210 40% 98%;
        --popover: 222.2 84% 4.9%;
        --popover-foreground: 210 40% 98%;
        --primary: 217.2 91.2% 59.8%;
        --primary-foreground: 222.2 47.4% 11.2%;
        --secondary: 217.2 32.6% 17.5%;
        --secondary-foreground: 210 40% 98%;
        --muted: 217.2 32.6% 17.5%;
        --muted-foreground: 215 20.2% 65.1%;
        --accent: 217.2 32.6% 17.5%;
        --accent-foreground: 210 40% 98%;
        --destructive: 0 62.8% 30.6%;
        --destructive-foreground: 210 40% 98%;
        --border: 217.2 32.6% 17.5%;
        --input: 217.2 32.6% 17.5%;
        --ring: 224.3 76.3% 48%;
        --chart-1: 217.2 91.2% 59.8%;
        --chart-2: 291.2 91.2% 59.8%;
        --chart-3: 0 84.2% 60.2%;
        --chart-4: 50 84.2% 60.2%;
        --chart-5: 100 84.2% 60.2%;
        --sidebar-background: 222.2 84% 4.9%;
        --sidebar-foreground: 210 40% 98%;
        --sidebar-primary: 217.2 91.2% 59.8%;
        --sidebar-primary-foreground: 222.2 47.4% 11.2%;
        --sidebar-accent: 217.2 32.6% 17.5%;
        --sidebar-accent-foreground: 210 40% 98%;
        --sidebar-border: 217.2 32.6% 17.5%;
        --sidebar-ring: 224.3 76.3% 48%;
    }
}

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground;
    }
}

body {
    font-family: 'Inter', sans-serif;
}



/* Enhanced menu animations */
.nav-item {
    position: relative;
    overflow: hidden;
}

.logo-img {
    width: 180px;
}
#header {
    background-color: rgba(0, 0, 0, 0.9); 
    padding: 0.75rem; 
    transition: background-color 0.3s, padding 0.3s;
}

    #header.transparent {
        background-color: transparent !important;
        padding-top: 1.25rem; 
        padding-bottom: 1.25rem;
    }


.nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: theme("colors.brand-lime");
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-item:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 210, 42, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(196, 210, 42, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(196, 210, 42, 0);
    }
}

.active-nav-pulse {
    animation: pulse-glow 2s infinite;
}

.menu-button {
    position: relative;
    overflow: hidden;
}

.menu-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.menu-button:hover::before {
    width: 200%;
    height: 200%;
}

html {
    scroll-behavior: smooth;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.carousel-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.vertical-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
}

.transitioning {
    transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.fancybox__container {
    background: #000 !important;
}

.fancybox__content {
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
}

@keyframes slideIn {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-30px);
        opacity: 0;
    }
}

.slide-in {
    animation: slideIn 0.5s forwards cubic-bezier(0.65, 0, 0.35, 1);
}

.slide-out {
    animation: slideOut 0.5s forwards cubic-bezier(0.65, 0, 0.35, 1);
}

.navbar-logo {
    width: 300px;
    height: 100px;
}

.navbar-logo img {
    width: 100%;
}

.bg-brand-lime {
    background-color: rgb(194 212 43);
}

.hover\:bg-brand-lime\/90:hover {
    background-color: rgb(194 212 43 / 0.9);
}

.border-white {
    border: 1px solid white;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-brand-lime {
    --tw-text-opacity: 1;
    color: rgb(194 212 43 / var(--tw-text-opacity, 1));
}

.text-brand-lime {
    color: #d9ff00;
}

.border-brand-lime\/30 {
    border-color: rgba(217, 255, 0, 0.3);
}

.bg-brand-lime\/10 {
    background-color: rgba(217, 255, 0, 0.1);
}

.group:hover svg {
    stroke: black;
}

.snd-btn:hover {
    background-color: #333528;
}

/* New */

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* scroll */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #c4d22a80;
    border-radius: 4px;
}

/* Side Navigation */
.side-nav-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: none;
}

.swiper-slide-image {
    height:565px !important;
}

@media (min-width: 1024px) {

    .side-nav-indicator {
        display: block;
    }
}

.nav-dots-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-dots-container>*:not(:first-child) {
    margin-top: 1.5rem;
}

.nav-dot-link {
    display: block;
    padding: 0.25rem;
}

.nav-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--nav-dot-default-bg);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.nav-dot-link:hover .nav-dot {
    background-color: var(--nav-dot-hover-bg);
}

.nav-dot.active {
    background-color: var(--brand-lime);
    transform: scale(1.25);
}

.scroll-indicator-controller {
    position: fixed;
    top: 50vh;
    transform: translate(0, -50%);
    right: 10px;
    z-index: 999;
}

.scroll-indicator-controller.indi-mobile>div span {
    display: none;
}

@media (min-width: 1025px) {
    .scroll-indicator-controller {
        right: 20px;
    }
}

.scroll-indicator-controller>div {
    width: 13px;
    height: 13px;
    position: relative;
    border-radius: 50%;
    border: none;
    background: rgb(255 255 255 / 0.3);
    margin: 0 0 20px 0;
    cursor: pointer;
    transition: background 0.4s ease;
    will-change: transition;
}

.scroll-indicator-controller>div:hover {
    background: rgb(255 255 255 / 0.6);
}

.scroll-indicator-controller>div span {
    display: none;
    color: tomato;
    position: absolute;
    right: calc(100% + 8px);
    white-space: nowrap;
    top: 50%;
    font-family: arial, sans-serif;
    font-size: 16px;
    line-height: 17px;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-50%) translateX(10px);
    transition: all 0.4s ease;
    will-change: transition;
}

@media (hover: none) {
    .scroll-indicator-controller>div span {
        display: none;
    }
}

.scroll-indicator-controller>div span:after {
    content: "-----";
    padding-left: 5px;
    letter-spacing: -2px;
    font-family: arial, sans-serif;
    vertical-align: text-top;
    line-height: 14px;
}

@media (hover: hover),
(-ms-high-contrast: none),
(-ms-high-contrast: active) {
    .scroll-indicator-controller>div:hover span {
        width: auto;
        opacity: 1;
        overflow: visible;
        transform: translateY(-50%) translateX(0px);
    }
}

.scroll-indicator-controller>div.active {
    background: #d9ff00;
    border-color: rgba(0, 0, 0, 0.25);
}

@supports (-ms-ime-align:auto) {
    .scroll-indicator-controller>div span {
        transition: opacity 0.4s ease;
    }
}


.swiper-slide {
    height: 622px;
}

.creation-btn {
    top: 40%;
}

.thumbnail-slider {
    padding-left: 5px;
    padding-right: 5px;
}

.custom-thumb-nav {
    color: #A3E635;
    --swiper-navigation-size: 28px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 50%;
    width: var(--swiper-navigation-size) !important;
    height: var(--swiper-navigation-size) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.custom-thumb-nav:hover {
    background-color: rgba(50, 50, 50, 0.7);
}

.custom-thumb-nav::after {
    font-size: 14px !important;
}

.thumbnail-swiper-slide {
    height: 75px !important;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s, border-color 0.3s;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail-swiper-slide:hover {
    opacity: 0.9;
}

.thumbnail-swiper-slide.swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #A3E635;
}


.thumbnail-swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-swiper {
    position: relative;
    overflow: visible !important;
}

.vertical-title-container {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: -moz-fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    z-index: 500;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    max-width: 150px;
}

.vertical-title {
    color: white;
    font-size: 1.175rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 10px 8px;
    border-radius: 0px;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

.swiper-slide-prev .vertical-title-container {
    opacity: 1;
    right: 35px;
    left: auto;
}

.swiper-slide-prev .vertical-title {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    text-orientation: mixed;
}

.swiper-slide-next .vertical-title-container {
    opacity: 0.7;
    left: 35px;
    right: auto;
}

@media (max-width: 1024px) {

    .swiper-slide-next .vertical-title-container {
        left: 20px;
    }

    .swiper-slide-prev .vertical-title-container {
        right: 20px;
    }

    .logo-img {
        width: 140px;
    }

    .space-x-8 > :not(:last-child) {
         margin-inline-start: unset; 
         margin-inline-end: unset; 
    }
}


.project-card .card-content {
    opacity: 0;
    transition: opacity 0.1s ease-out; /* fast fade out */
}

.project-card.is-active .card-content {
    opacity: 1;
    transition: opacity 1s ease-in 0.5s !important; /* slow fade in */
    /*transition-delay: 0.5s;*/
}



@media (max-width: 600px) {
    .swiper-slide-next .vertical-title-container {
        left: 12px;
    }

    .swiper-slide-prev .vertical-title-container {
        right: 12px;
    }
    .swiper-slide-image {
        height:100% !important;
    }
    .swiper-slide {
        height:540px;
    }



}

@media (max-width: 500px) {

    .swiper-slide-next .vertical-title-container {
        left: 6px;
    }

    .swiper-slide-prev .vertical-title-container {
        right: 6px;
    }
    #mobile-search-complex-container .custom-right{
        right: -51px !important;
    }
    #mobile-search-complex-container .custom-w-96 {
        width: 21rem;
    }

    
}


@media (max-width: 400px) {

    .swiper-slide-next .vertical-title-container {
        left: 0px;
    }

    .swiper-slide-prev .vertical-title-container {
        right: 0px;
    }
    #mobile-search-complex-container .custom-w-96 {
        width: 19rem;
    }
    #mobile-search-complex-container .custom-right {
        right: -55px !important;
    }
}

.swiper-slide-next .vertical-title {
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

.swiper-slide-active .vertical-title-container {
    opacity: 0 !important;
    transition: opacity 0.1s ease-out;
}

.swiper-slide .slide-content-wrapper {
    position: relative;
    z-index: 10;
}

.swiper-slide-next .slider-content {
    display: none;
}

.swiper-slide-prev .slider-content {
    display: none;
}



.fade-out {
    opacity: 0;
    transform: scale(0.98);
    transition: all 0.3s ease-out;
}

.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease-in;
}

.full-text {
    display: inline;
}

.abbr-text {
    display: none;
}

@media (max-width: 639px) {

    .full-text {
        display: none;
    }

    .abbr-text {
        display: inline;
    }
}

@media (max-width: 768px) {

.award-img {
    display:none;
}
}

.mobile-items {
    margin-left: 20px;
}

/* recommendation */

.recommendation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    -webkit-animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.recommendation-overlay h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: bold;
}

.recommendation-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    flex-wrap: wrap;
}

.recommendation-item {
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: transform 0.2s ease-in-out;
}

.recommendation-item:hover {
    transform: scale(1.05);
}

.recommendation-item img {
    width: 240px;
    height: 135px;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease-in-out;
}

.recommendation-item:hover img {
    border-color: #a3e635;
}

.recommendation-item span {
    font-size: 16px;
    display: block;
}

@media (max-width: 560px) {
    .recommendation-item img {
        width: 160px;
        height: 90px;
    }

    .recommendation-item span {
        font-size: 13px;
    }

}



/* fixes */
.fancybox__backdrop {
    background-color: rgb(0, 0, 0);
}

.animated-link-custom:hover .svg-icon-custom path {
    stroke: rgb(0 0 0 / var(--tw-text-opacity, 1));
}

#nprogress .bar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: 0.25rem;
    --tw-bg-opacity: 1;
    background-color: rgb(194 212 43 / var(--tw-bg-opacity));
    z-index: 50;
    transform-origin: left;
    transition: opacity 0.3s;
}


#nprogress .peg,
#nprogress .spinner {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.loader-fast {
    border-top-color: transparent;
    animation: spin-fast 0.6s linear infinite;
}

@keyframes spin-fast {
    to {
        transform: rotate(360deg);
    }
}

#video-wrapper {
    position: relative;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

    #video-wrapper iframe {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100vw;
        height: 100vh;
        transform: translate(-50%, -50%);
    }

@media (min-aspect-ratio: 16/9) {
    #video-wrapper iframe {
       /*  height = 100 * (9 / 16) = 56.25 */
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    #video-wrapper iframe {
        /* width = 100 / (9 / 16) = 177.777777 */
        width: 177.78vh;
    }
}

@media(min-width:548px) and  (max-width: 640px) {
    #video-wrapper iframe {
height:177vw;
    }
}



@media (hover: hover) {
    .project-card:hover .project-card-thumbnail {
        transform: scale(1.1);
    }

    .project-card:hover .project-title-rotate {
        opacity: 0;
    }

    .project-card:hover .card-content {
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0.5s; /* like your Tailwind delay */
    }
}
