/* Modern Custom Styles */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Preloader Animation */
.preloader {
    transition: opacity 0.3s ease;
}

/* Back to top button */
.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions */
a, button {
    transition: all 0.2s ease;
}

/* Grid pattern for hero section */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Sponsor link hover effect */
.sponsor-link {
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sponsor-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content-wrapper {
    background: white;
    border-radius: 1rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 1rem 1rem 0 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-body img {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
}

.modal-body strong {
    color: #1f2937;
    font-size: 1.25rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-body p {
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.modal-body ul {
    color: #4b5563;
    line-height: 1.75;
}

/* Countdown styling */
#countdown {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Custom scrollbar */
.modal-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.modal-content-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 1rem 1rem 0;
}

.modal-content-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive font sizes */
@media (max-width: 768px) {
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-body strong {
        font-size: 1.125rem;
    }
}

/* Hover effects for cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Loading animation for images */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Print styles */
@media print {
    .back-to-top,
    nav,
    footer {
        display: none !important;
    }
}

/* Fix for text clipping */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.1em; /* Prevent bottom clipping */
}

/* Ensure proper line height for gradient text */
h4.bg-clip-text {
    line-height: 1.2;
}

/* Prevent email overflow */
.break-all {
    word-break: break-all;
}


/* Yellow accent line */
.bg-yellow-500 {
    background-color: #eab308;
}

/* Prevent overflow and break long text */
.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Ensure inner boxes don't overflow */
#contact .bg-gradient-to-br {
    overflow: hidden;
}

/* Compact contact cards */
#contact .bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#contact .bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive grid */
@media (max-width: 768px) {
    #contact .grid {
        grid-template-columns: 1fr;
    }
}