* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #6366f1;
    --accent-color: #8b5cf6;
    --text-color: #ffffff;
    --bg-dark: #111827;
    --bg-darker: #0f172a;
    --spacing-unit: 1rem;
}

/* Improved Typography */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-darker);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

p {
    margin-bottom: 1em;
    line-height: 1.75;
}

/* Header Styles */
.header-sticky {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-sticky.shrink {
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #60a5fa;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
}

/* Glass Card Effect - Enhanced */
.glass-card {
    background: rgba(30, 41, 59, 0.65) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 1px 0 rgba(255, 255, 255, 0.1) inset;
    transform: translateY(-2px);
}

/* Ensure glass-card works even with Tailwind overrides */
.glass-card {
    position: relative;
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

/* Feature Cards */
.feature-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
    background: rgba(30, 41, 59, 0.7);
}

/* Highlight Cards */
.highlight-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.25);
    background: rgba(30, 41, 59, 0.75);
}

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4),
                0 1px 0 rgba(255, 255, 255, 0.1) inset;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5),
                0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

/* Enhanced Animations */
@keyframes blob {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Improved Fade In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Blog Cards */
.blog-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
}

.blog-category {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-category.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

/* Line Clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #6366f1);
    border-radius: 6px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #4f46e5);
}

/* Image Enhancements */
img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    max-width: 100%;
    height: auto;
    display: block;
}

img:hover {
    opacity: 0.95;
}

/* Picture element support */
picture {
    display: block;
    width: 100%;
    height: 100%;
}

picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TailwindCSS Utility Support - Gradient Text (Enhanced) */
.bg-clip-text {
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.text-transparent {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Fix for gradient text rendering in headings and spans */
h1 .bg-clip-text,
h2 .bg-clip-text,
h3 .bg-clip-text,
span.bg-clip-text,
div.bg-clip-text,
.bg-clip-text {
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

/* Specific fix for statistics numbers with gradient */
.text-2xl.bg-clip-text,
.text-3xl.bg-clip-text,
.text-4xl.bg-clip-text,
.text-5xl.bg-clip-text {
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: block;
    line-height: 1.2;
}

/* Ensure gradient backgrounds work properly */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important;
}

/* Gradient color stops for better browser support */
.from-blue-400 {
    --tw-gradient-from: #60a5fa;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0));
}

.via-indigo-300 {
    --tw-gradient-stops: var(--tw-gradient-from), #a5b4fc var(--tw-gradient-via-position, 50%), var(--tw-gradient-to, rgba(165, 180, 252, 0));
}

.to-indigo-400 {
    --tw-gradient-to: #818cf8;
}

.to-purple-300 {
    --tw-gradient-to: #c4b5fd;
}

.to-purple-400 {
    --tw-gradient-to: #a78bfa;
}

.to-pink-400 {
    --tw-gradient-to: #f472b6;
}

.to-cyan-400 {
    --tw-gradient-to: #22d3ee;
}

/* Image Loading States */
img:not([src]),
img[src=""] {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.5) 0%, rgba(30, 41, 59, 0.3) 50%, rgba(30, 41, 59, 0.5) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Profile Image Styling */
.rounded-full img {
    border: 3px solid rgba(59, 130, 246, 0.3);
    transition: border-color 0.3s ease;
}

.rounded-full:hover img {
    border-color: rgba(59, 130, 246, 0.6);
}

/* Gallery Image Hover Effects */
.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-image:hover::after {
    opacity: 1;
}

/* Blog Image Enhancements */
.blog-card img {
    filter: brightness(0.9);
    transition: filter 0.4s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover img {
    filter: brightness(1);
    transform: scale(1.08);
}

/* Testimonial Image Styling */
.testimonial-image {
    border: 3px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.testimonial-image:hover {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Event Image Styling */
.event-image {
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.event-image:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

/* Smooth Image Loading */
img[src] {
    opacity: 1;
    animation: fadeInImage 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* TailwindCSS Utility Support - Gradient Text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.text-transparent {
    color: transparent;
}

/* Ensure gradient backgrounds work */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Fix for gradient text rendering */
h1 .bg-clip-text,
h2 .bg-clip-text,
h3 .bg-clip-text,
.bg-clip-text {
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection Styling */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Improved Spacing Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Ensure mx-auto works */
.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }
    
    .glass-card {
        padding: 1.5rem !important;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .blog-card img {
        height: 200px;
    }
    
    .gallery-image {
        height: 250px;
    }
    
    .fade-in-left,
    .fade-in-right {
        transform: translateY(40px);
    }
    
    .fade-in-left.visible,
    .fade-in-right.visible {
        transform: translateY(0);
    }
    
    /* Fix gradient text on mobile */
    .bg-clip-text {
        -webkit-background-clip: text !important;
        background-clip: text !important;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

/* Performance Optimizations */
.glass-card,
.feature-card,
.highlight-card {
    will-change: transform;
}

/* Additional fixes for homepage */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure z-index works properly */
.hero-section .relative {
    position: relative;
    z-index: 10;
}

/* Fix for gradient text in statistics */
.glass-card .text-transparent.bg-clip-text {
    background-size: 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* Ensure proper text rendering */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Logo Rotation Effect - Globe Animation */
.logo-rotate {
    animation: rotateGlobe 20s linear infinite;
    transform-origin: center center;
}

@keyframes rotateGlobe {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Smooth logo hover effect */
.logo-rotate:hover {
    animation-duration: 10s;
    transition: animation-duration 0.3s ease;
}

/* Print Styles */
@media print {
    .header-sticky,
    .btn-primary,
    .btn-secondary,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
