/**
 * Custom CSS
 * Syntaxmate Website
 */

/* Preloader */
#preloader {
    transition: opacity 0.5s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b; /* dark-800 */
}

::-webkit-scrollbar-thumb {
    background: #0ea5e9; /* primary-500 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7; /* primary-600 */
}

/* Selection */
::selection {
    background-color: #0ea5e9; /* primary-500 */
    color: #ffffff;
}

/* Focus Outline */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #0ea5e9; /* primary-500 */
    outline-offset: 2px;
}

/* Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.95) 100%);
}

.hero-pattern {
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%230ea5e9' fill-opacity='0.05'%3E%3Cpath fill-rule='evenodd' d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.5);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Button Glow Effect */
.btn-glow:hover {
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.5);
}

/* Image Hover Zoom */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* Animated Border */
.animated-border {
    position: relative;
}

.animated-border::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0ea5e9; /* primary-500 */
    transition: width 0.3s ease;
}

.animated-border:hover::after {
    width: 100%;
}

/* Glassmorphism */
.glassmorphism {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Testimonial Quote */
.testimonial-quote::before {
    content: '\201C';
    font-size: 4rem;
    position: absolute;
    top: -1rem;
    left: -1rem;
    color: rgba(14, 165, 233, 0.2);
    font-family: Georgia, serif;
}

/* Blog Card */
.blog-card {
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card .blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

/* Team Member Card */
.team-social {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.team-card:hover .team-social {
    opacity: 1;
    transform: translateY(0);
}

/* Service Icon */
.service-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    background-color: #0ea5e9; /* primary-500 */
}

/* Custom Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
    }
    h2 {
        font-size: 1.75rem !important;
    }
    h3 {
        font-size: 1.5rem !important;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .mb-16 {
        margin-bottom: 2rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
    
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-3 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
}

/* Custom Form Styles */
.form-input {
    background-color: #1e293b; /* dark-800 */
    border: 1px solid #334155; /* dark-700 */
    color: #f8fafc; /* dark-50 */
}

.form-input:focus {
    border-color: #0ea5e9; /* primary-500 */
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

.form-input::placeholder {
    color: #64748b; /* dark-500 */
}

/* Dark Mode Specific Styles */
.dark .bg-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.dark .card {
    background-color: #1e293b; /* dark-800 */
    border: 1px solid #334155; /* dark-700 */
}

.dark .border-subtle {
    border-color: #334155; /* dark-700 */
}

/* Custom Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

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

/* Custom Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary {
    background-color: rgba(14, 165, 233, 0.2);
    color: #38bdf8; /* primary-400 */
}

.badge-secondary {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa; /* secondary-400 */
}

/* Custom Divider */
.divider {
    position: relative;
    height: 1px;
    background-color: #334155; /* dark-700 */
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 1px;
    width: 100px;
    background-color: #0ea5e9; /* primary-500 */
}

/* Pill Navigation */
.pill-nav {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.pill-nav.active {
    background-color: #0ea5e9; /* primary-500 */
    color: white;
}

.pill-nav:not(.active):hover {
    background-color: #1e293b; /* dark-800 */
}

/* Underline Animation */
.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #0ea5e9; /* primary-500 */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Typing Cursor Animation */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: #0ea5e9; /* primary-500 */
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In Animation */
.slide-in {
    animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #1e293b; /* dark-800 */
    border: 1px solid #334155; /* dark-700 */
    border-radius: 4px;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: #0ea5e9; /* primary-500 */
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #0ea5e9; /* primary-500 */
    border-color: #0ea5e9; /* primary-500 */
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom Radio Button */
.custom-radio {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #1e293b; /* dark-800 */
    border: 1px solid #334155; /* dark-700 */
    border-radius: 50%;
}

.custom-radio:hover input ~ .radio-mark {
    border-color: #0ea5e9; /* primary-500 */
}

.custom-radio input:checked ~ .radio-mark {
    background-color: #1e293b; /* dark-800 */
    border-color: #0ea5e9; /* primary-500 */
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-radio input:checked ~ .radio-mark:after {
    display: block;
}

.custom-radio .radio-mark:after {
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0ea5e9; /* primary-500 */
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for mobile overflow issues */
body {
    overflow-x: hidden;
    width: 100%;
} 