/* Modern CSS Reset and Custom Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Enhanced image quality for presentations */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimizeQuality;
}

/* Dark mode support */
body.dark {
    color: #e2e8f0;
    background-color: #0f172a;
}

body.dark .bg-white {
    background-color: #1e293b !important;
}

body.dark .text-gray-900 {
    color: #e2e8f0 !important;
}

body.dark .text-gray-600 {
    color: #94a3b8 !important;
}

body.dark .border-gray-200 {
    border-color: #374151 !important;
}

/* Removed scroll snap behavior for better mobile experience */

/* Enhanced custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation active state highlighting */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

.nav-link.active span {
    width: 100% !important;
    left: 0 !important;
    background: linear-gradient(90deg, #e91e63, #ff6b35) !important;
}

/* For navbar when it reaches about section */
.nav-link.active-on-about {
    color: #1f2937 !important;
    background-color: rgba(233, 30, 99, 0.1);
    border-radius: 8px;
}

.nav-link.active-on-about span {
    background: linear-gradient(90deg, #e91e63, #ff6b35) !important;
}

/* Mobile navigation active states */
.nav-links .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border-radius: 8px;
}

/* Navbar styling adjustments when in about section */
#navbar.in-about-section {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-color: rgba(0, 0, 0, 0.1);
}

#navbar.in-about-section .nav-link {
    color: rgba(31, 41, 55, 0.8) !important;
}

#navbar.in-about-section .nav-link:hover {
    color: #1f2937 !important;
}

#navbar.in-about-section .nav-link.active-on-about {
    color: #1f2937 !important;
    background-color: rgba(233, 30, 99, 0.1);
}

/* Contact button styling in about section */
#navbar.in-about-section .nav-link[href="#contact"] {
    background: linear-gradient(90deg, #e91e63, #ff6b35) !important;
    color: white !important;
}

#navbar.in-about-section .nav-link[href="#contact"]:hover {
    color: white !important;
}

/* Mobile responsiveness fixes */
@media (max-width: 640px) {
    #home {
        padding-top: 5rem !important; /* 80px */
        min-height: 100vh;
    }
    
    #home h1 {
        margin-top: 1rem;
        font-size: 2.5rem !important; /* text-4xl equivalent */
        line-height: 1.1;
    }
    
    #navbar {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@media (max-width: 480px) {
    #home {
        padding-top: 6rem !important; /* 96px */
    }
    
    #home h1 {
        font-size: 2.25rem !important; /* text-4xl smaller */
        padding: 0 1rem;
    }
    
    #home p {
        font-size: 1rem !important;
        padding: 0 1.5rem;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(233, 30, 99, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
}

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

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

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

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
    background-size: 200% 200%;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Additional utility classes */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced focus styles for accessibility */
input:focus, textarea:focus, button:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e91e63, #ff6b35);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e91e63, #ff6b35);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d81b60, #ff5722);
}

/* Responsive text sizes */
@media (max-width: 640px) {
    .text-responsive-lg {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    .text-responsive-xl {
        font-size: 2.5rem;
        line-height: 3rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

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

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e91e63, #ff6b35);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c2185b, #e64a19);
}

/* Navigation enhancements */
.nav-link.active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-weight: 600;
}

/* Mobile menu improvements */
.mobile-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Enhanced mobile menu animations */
.nav-links {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease-in-out;
}

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #e91e63 !important;
    background: rgba(233, 30, 99, 0.1) !important;
}

.navbar-scrolled .mobile-menu span {
    background: #374151 !important;
}

.navbar-scrolled .text-white {
    color: #374151 !important;
}

/* Navbar default state */
#navbar {
    transition: all 0.3s ease-in-out, transform 0.3s ease-in-out;
    will-change: transform, background-color;
}

/* Mobile menu animation */
.mobile-menu span {
    transition: all 0.3s ease-in-out;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#navbar.scrolled .px-3,
#navbar.scrolled .xs\\:px-4,
#navbar.scrolled .sm\\:px-6 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 480px) {
    #navbar.scrolled .xs\\:py-3 {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
}

/* Smooth transitions for navbar state changes */
#navbar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar * {
    transition: inherit;
}

/* Responsive navbar adjustments */
@media (max-width: 479px) {
    #navbar {
        width: 98%;
        margin-top: 0.25rem;
        border-radius: 1rem;
    }
    
    #navbar .px-3 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (min-width: 480px) and (max-width: 639px) {
    #navbar {
        width: 96%;
        margin-top: 0.5rem;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    #navbar {
        width: 94%;
        margin-top: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #navbar {
        width: 92%;
        margin-top: 0.75rem;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    #navbar {
        width: 90%;
        margin-top: 1rem;
    }
}

@media (min-width: 1280px) {
    #navbar {
        width: 91.666667%; /* w-11/12 */
        margin-top: 1rem;
    }
}

/* Form focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* Enhanced focus indicators for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .text-responsive-lg {
        font-size: 1.5rem;
        line-height: 1.3;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Responsive typography for navbar */
@media (max-width: 479px) {
    .mobile-menu .w-5 {
        width: 1.125rem; /* 18px */
        height: 1.125rem; /* 18px */
    }
    
    .nav-links a {
        font-size: 0.875rem; /* 14px */
        padding: 0.5rem 0.75rem;
    }
}

@media (min-width: 480px) and (max-width: 639px) {
    .nav-links a {
        font-size: 0.9375rem; /* 15px */
    }
}

/* Improved focus states for better accessibility */
.mobile-menu:focus,
.nav-link:focus {
    outline: 2px solid rgba(233, 30, 99, 0.8);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Enhanced hover states for touch devices */
@media (hover: hover) {
    .nav-link:hover {
        transform: translateY(-1px);
    }
}

/* Touch-friendly tap targets */
@media (max-width: 1023px) {
    .mobile-menu {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Navbar dark text state when reaching About section */
#navbar.dark-text {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#navbar.dark-text .text-white {
    color: #1f2937 !important;
}

#navbar.dark-text .text-white\/90 {
    color: #374151 !important;
}

#navbar.dark-text .hover\\:text-white:hover {
    color: #e91e63 !important;
}

#navbar.dark-text .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

#navbar.dark-text .bg-white\/10:hover {
    background-color: rgba(233, 30, 99, 0.1) !important;
}

#navbar.dark-text .mobile-menu span {
    background-color: #374151;
}

/* Combine scrolled and dark-text states */
#navbar.scrolled.dark-text {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
}

/* Logo transition for smooth image swapping */
#navbar img[src*="rotaract-logo"] {
    transition: opacity 0.3s ease-in-out;
}
