/* GSAP Animation Enhancements */

/* Optimize performance for animated elements only */
.gsap-animate,
.home-bottom-design,
#header nav ul li a,
.btn {
    will-change: transform, opacity;
}

/* ========================================
   HOME BOTTOM DECORATIVE DESIGN
   ======================================== */

.home-bottom-design {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    z-index: 5;
    overflow: hidden;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    bottom: 20px;
    left: 15%;
    animation: floatCircle 6s ease-in-out infinite;
}

.floating-square {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
    bottom: 40px;
    right: 20%;
    animation: floatSquare 8s ease-in-out infinite;
}

.floating-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid rgba(255, 255, 255, 0.1);
    bottom: 30px;
    left: 60%;
    animation: floatTriangle 7s ease-in-out infinite;
}

.gradient-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 20%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.3) 80%,
            transparent 100%);
    animation: gradientFlow 4s ease-in-out infinite;
}

/* Dark theme adjustments */
body.dark .floating-circle {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark .floating-square {
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark .floating-triangle {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

body.dark .gradient-line {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0.4) 80%,
            transparent 100%);
}

/* Animations */
@keyframes floatCircle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes floatSquare {

    0%,
    100% {
        transform: rotate(45deg) translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: rotate(225deg) translateY(-15px) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes floatTriangle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.7;
    }
}

@keyframes gradientFlow {

    0%,
    100% {
        opacity: 0.6;
        transform: scaleX(1);
    }

    50% {
        opacity: 1;
        transform: scaleX(1.1);
    }
}

/* Portfolio Floating Animations */
@keyframes floatSpeaker {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-25px) rotate(5deg);
        opacity: 1;
    }
}

@keyframes floatLight {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes floatScreen {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-30px) rotate(-3deg);
        opacity: 1;
    }
}

/* Blog Floating Animations */
@keyframes floatBlogTriangle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-25px) rotate(180deg);
        opacity: 0.7;
    }
}

@keyframes floatBlogSquare {

    0%,
    100% {
        transform: rotate(45deg) translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: rotate(225deg) translateY(-15px) scale(1.1);
        opacity: 0.8;
    }
}

/* Contact Floating Animations */
@keyframes floatContactCircle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes floatContactDiamond {

    0%,
    100% {
        transform: rotate(45deg) translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: rotate(225deg) translateY(-15px) scale(1.1);
        opacity: 0.8;
    }
}

/* ========================================
   SECTION BACKGROUNDS
   ======================================== */

/* Portfolio Section Background */
#work {
    padding-bottom: 60px;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(15, 15, 15, 0.9) 50%,
            rgba(0, 0, 0, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

#work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 93, 86, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 93, 86, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Portfolio Floating Objects - Audio/Visual Equipment */
.portfolio-floating {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.portfolio-speaker {
    position: absolute;
    width: 40px;
    height: 60px;
    border: 2px solid rgba(255, 93, 86, 0.3);
    border-radius: 8px;
    top: 20%;
    left: 10%;
    animation: floatSpeaker 8s ease-in-out infinite;
}

.portfolio-speaker::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 20px;
    background: rgba(255, 93, 86, 0.2);
    border-radius: 4px;
}

.portfolio-light {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 60%;
    right: 15%;
    animation: floatLight 6s ease-in-out infinite;
}

.portfolio-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.portfolio-screen {
    position: absolute;
    width: 60px;
    height: 40px;
    border: 2px solid rgba(255, 93, 86, 0.25);
    border-radius: 4px;
    top: 30%;
    right: 25%;
    animation: floatScreen 7s ease-in-out infinite;
}

.portfolio-screen::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: linear-gradient(45deg, rgba(255, 93, 86, 0.1), rgba(255, 255, 255, 0.1));
    border-radius: 2px;
}

/* Blog Section Background - Distinct Gradient */
#blog {
    background: linear-gradient(135deg,
            rgba(20, 15, 25, 0.95) 0%,
            rgba(35, 25, 40, 0.9) 50%,
            rgba(25, 20, 30, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

#blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Blog Floating Objects - Geometric Shapes */
.blog-floating {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.blog-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid rgba(138, 43, 226, 0.2);
    top: 8%;
    right: 8%;
    animation: floatBlogTriangle 9s ease-in-out infinite;
}

.blog-square {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    bottom: 12%;
    left: 6%;
    animation: floatBlogSquare 7s ease-in-out infinite;
}

/* Contact Section Background */
#contact {
    background: linear-gradient(135deg,
            rgba(5, 5, 10, 0.95) 0%,
            rgba(15, 15, 20, 0.9) 50%,
            rgba(10, 10, 15, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 25% 75%, rgba(255, 93, 86, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Contact Floating Objects - Geometric Shapes like Home */
.contact-floating {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.contact-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    bottom: 20%;
    left: 10%;
    animation: floatContactCircle 8s ease-in-out infinite;
}

.contact-diamond {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    top: 15%;
    right: 10%;
    animation: floatContactDiamond 7s ease-in-out infinite;
}

/* Light theme adjustments */
body.light #work {
    background: linear-gradient(135deg,
            rgba(245, 245, 245, 0.95) 0%,
            rgba(250, 250, 250, 0.9) 50%,
            rgba(245, 245, 245, 0.95) 100%);
}

body.light #work::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 93, 86, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 93, 86, 0.1) 0%, transparent 50%);
}

body.light #blog {
    background: linear-gradient(135deg,
            rgba(250, 248, 255, 0.95) 0%,
            rgba(255, 252, 255, 0.9) 50%,
            rgba(250, 248, 255, 0.95) 100%);
}

body.light #blog::before {
    background:
        radial-gradient(circle at 30% 20%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
}

body.light #contact {
    background: linear-gradient(135deg,
            rgba(240, 240, 245, 0.95) 0%,
            rgba(245, 245, 250, 0.9) 50%,
            rgba(240, 240, 245, 0.95) 100%);
}

body.light #contact::before {
    background:
        radial-gradient(circle at 25% 75%, rgba(255, 93, 86, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
}

/* ========================================
   INSTAGRAM SECTION
   ======================================== */

/* Instagram Section Background */
#instagram {
    background: linear-gradient(135deg,
            rgba(25, 20, 30, 0.95) 0%,
            rgba(40, 30, 45, 0.9) 50%,
            rgba(30, 25, 35, 0.95) 100%);
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

#instagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 93, 86, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}



/* Instagram Carousel */
.instagram-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-inner {
    padding: 20px 0;
}

.carousel-item {
    padding: 10px 0;
}

.instagram-feed {
    display: flex;
    justify-content: center;
    align-items: center;
}

.instagram-feed-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    padding: 20px 0;
}

.instagram-post {
    position: relative;
    flex: 0 0 calc(25% - 20px);
    max-width: calc(25% - 20px);
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.instagram-post:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 93, 86, 0.6);
}

.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.instagram-video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.instagram-video-indicator i {
    color: white;
    font-size: 1.2rem;
}

.instagram-post:hover img {
    transform: scale(1.05);
}

.instagram-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 93, 86, 0.9), rgba(255, 138, 128, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.instagram-post:hover .instagram-post-overlay {
    opacity: 1;
}

.instagram-post-overlay i {
    color: white;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Instagram Error State */
.instagram-error {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.instagram-error p {
    margin: 0;
    font-size: 1.1rem;
}

/* Loading State */
.instagram-loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ff5d56;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Responsive Instagram Grid */
@media (max-width: 768px) {
    .instagram-feed-grid {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .instagram-feed-grid {
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
        gap: 20px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   FOOTER
   ======================================== */

#footer {
    background: linear-gradient(135deg,
            rgba(10, 10, 15, 0.95) 0%,
            rgba(20, 15, 20, 0.9) 100%);
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 14px;
}

/* Footer Contact Info */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.footer-contact-item i {
    margin-right: 8px;
    font-size: 14px;
    color: #ff5d56;
}

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-social a.tiktok {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social a.tiktok svg {
    width: 12px;
    fill: rgba(255, 255, 255, 0.7);
}

.footer-social a:hover {
    background: #ff5d56;
    color: white;
    transform: translateY(-2px);
}

.footer-social a:hover svg {
    fill: #fff;
    transform: translateY(-2px);
}

/* Footer Responsive */
@media (max-width: 768px) {
    #footer .row {
        text-align: center;
    }

    .footer-contact {
        margin: 15px 0;
    }

    .footer-social {
        justify-content: center;
        margin-top: 15px;
    }

    .footer-contact-item {
        justify-content: center;
    }
}

/* ========================================
   NAVIGATION TRANSITIONS
   ======================================== */

/* Navigation item transitions */
#header nav ul li {
    transition: all 0.4s ease-in-out;
    position: relative;
}

#header nav ul li a {
    transition: all 0.4s ease-in-out;
    position: relative;
}

/* Active navigation item animation */
#header nav ul li.active {
    transform: scale(1.05);
}

#header nav ul li.active a {
    transform: translateY(-2px);
}

/* Inactive navigation items */
#header nav ul li:not(.active) a {
    color: #fff;
}

/* Hover effects with transitions */
#header nav ul li:hover:not(.active) {
    transform: scale(1.02);
}

#header nav ul li:hover:not(.active) a {
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .instagram-post {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    .home-bottom-design {
        height: 80px;
    }

    .floating-circle {
        width: 40px;
        height: 40px;
        left: 10%;
    }

    .floating-square {
        width: 30px;
        height: 30px;
        right: 15%;
    }

    .floating-triangle {
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-bottom: 30px solid rgba(255, 255, 255, 0.1);
        left: 55%;
    }

    .section-text-separator {
        height: 60px;
    }

    .separator-text {
        font-size: 12px;
        letter-spacing: 2px;
        padding: 0 30px;
    }

    /* Instagram Feed Mobile Responsive */
    .instagram-feed {
        gap: 20px;
    }

    .instagram-post {
        flex: 0 0 calc(100% - 15px);
        max-width: calc(100% - 15px);
        min-width: 150px;
    }

    .instagram-post {
        aspect-ratio: 4/5;
    }

    .instagram-post-overlay i {
        font-size: 2rem;
        padding: 15px;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
}

/* Instagram Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 93, 86, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    margin: 0 5px;
}

.carousel-indicators li.active {
    background: #ff5d56;
}

.separator-text::before,
.separator-text::after {
    width: 60px;
}
}