/* ===================================
   GTP Global Talents Platform
   Custom Styles & Animations
   =================================== */

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ===== Preloader ===== */
#preloader {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #1a6cf5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ===== Navigation ===== */
#navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1a6cf5, #338dff);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== Floating Animation ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #1a6cf5 0%, #338dff 50%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Button Styles ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== Card Hover Effects ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1a6cf5, #338dff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Section Transitions ===== */
section {
    position: relative;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1a6cf5, #338dff);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1356e1, #1a6cf5);
}

/* ===== Form Styles ===== */
input:focus,
textarea:focus,
select:focus {
    border-color: #1a6cf5 !important;
    box-shadow: 0 0 0 3px rgba(26, 108, 245, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ===== Selection Styles ===== */
::selection {
    background: #1a6cf5;
    color: white;
}

/* ===== Image Placeholder ===== */
.img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Pulse Animation ===== */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #1a6cf5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s ease-out infinite;
}

/* ===== Gradient Border ===== */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1.5rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #1a6cf5, #338dff, #16a34a);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ===== Stats Counter Animation ===== */
.counter {
    display: inline-block;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 500px;
}

/* ===== Back to Top Button ===== */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* ===== Global Map Animation ===== */
.map-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1a6cf5;
    border-radius: 50%;
}

.map-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: map-pulse 2s ease-out infinite;
}

@keyframes map-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* ===== Icon Box Hover ===== */
.icon-box {
    transition: all 0.3s ease;
}

.icon-box:hover {
    transform: translateY(-5px);
}

.icon-box:hover .icon {
    transform: scale(1.1);
}

/* ===== Text Gradient Animation ===== */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animated-gradient-text {
    background: linear-gradient(270deg, #1a6cf5, #338dff, #16a34a, #1a6cf5);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .floating-card {
        display: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #1a6cf5;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1a6cf5;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ===== Dark Mode Support (Future) ===== */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid currentColor;
    }
}

/* ===== Shine Effect ===== */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
        transform: rotate(30deg) translateX(-100%);
    }
    20%, 100% {
        transform: rotate(30deg) translateX(100%);
    }
}

/* ===== Glow Effect ===== */
.glow {
    box-shadow: 0 0 20px rgba(26, 108, 245, 0.3);
}

.glow:hover {
    box-shadow: 0 0 40px rgba(26, 108, 245, 0.5);
}

/* ===== Underline Animation ===== */
.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, #1a6cf5, #16a34a);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ===== Blob Animation ===== */
.blob {
    border-radius: 50%;
    animation: blob 8s ease-in-out infinite;
}

@keyframes blob {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* ===== Typewriter Effect Support ===== */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #1a6cf5;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #1a6cf5;
    }
}

/* ===== Tilt Effect Support ===== */
.tilt {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* ===== Parallax Support ===== */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
    }
}

/* ===== Glass Morphism ===== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== Neumorphism ===== */
.neumorphic {
    background: #f0f0f3;
    box-shadow: 
        5px 5px 10px #d1d1d4,
        -5px -5px 10px #ffffff;
}

.neumorphic:hover {
    box-shadow: 
        inset 5px 5px 10px #d1d1d4,
        inset -5px -5px 10px #ffffff;
}

/* ===== Success Message Animation ===== */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #16a34a;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}
