/**
 * Custom CSS overrides for One World Institute theme
 */

/* Additional Tailwind utilities */
@layer utilities {
    .text-shadow {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .text-shadow-lg {
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
    }
    
    .backdrop-blur {
        backdrop-filter: blur(10px);
    }
    
    .gradient-primary {
        background: linear-gradient(135deg, #25336B 0%, #929AB4 100%);
    }
    
    .gradient-accent {
        background: linear-gradient(135deg, #CF152B 0%, #E68C98 100%);
    }
    
    .gradient-orange {
        background: linear-gradient(135deg, #F9B233 0%, #FBD9A1 100%);
    }
}

/* Enhanced Button Styles */
.owi-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.owi-btn::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;
}

.owi-btn:hover::before {
    left: 100%;
}

.owi-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.owi-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    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 Card Hover Effects */
.owi-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.owi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 51, 107, 0.05) 0%, rgba(146, 154, 180, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.owi-card:hover::before {
    opacity: 1;
}

.owi-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(37, 51, 107, 0.15);
}

/* Enhanced Promo Box */
.owi-promo-box {
    position: relative;
    overflow: hidden;
}

.owi-promo-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(249, 178, 51, 0.3), transparent);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.owi-promo-box:hover::before {
    opacity: 1;
}

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

/* Enhanced Hero Section */
.owi-hero {
    position: relative;
    overflow: hidden;
}

.owi-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(249, 178, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(207, 21, 43, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 51, 107, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

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

/* Enhanced Navigation */
.site-header {
    transition: all 0.3s ease;
}

.owi-nav a {
    position: relative;
}

.owi-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #F9B233;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.owi-nav a:hover::after {
    width: 100%;
}

/* Enhanced Form Styles */
.owi-form input:focus,
.owi-form textarea:focus,
.owi-form select:focus {
    box-shadow: 0 0 0 3px rgba(249, 178, 51, 0.2);
}

.owi-form input.error,
.owi-form textarea.error,
.owi-form select.error {
    border-color: #CF152B;
    box-shadow: 0 0 0 3px rgba(207, 21, 43, 0.2);
}

.owi-form input.success,
.owi-form textarea.success,
.owi-form select.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Enhanced Footer */
.owi-footer {
    position: relative;
}

.owi-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F9B233, #CF152B, #E68C98, #F9B233);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Enhanced Social Links */
.owi-social a {
    position: relative;
    overflow: hidden;
}

.owi-social a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.owi-social a:hover::before {
    width: 100%;
    height: 100%;
}

/* Enhanced Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(10px);
    background: rgba(37, 51, 107, 0.95);
}

#mobile-menu a {
    position: relative;
    transition: all 0.3s ease;
}

#mobile-menu a::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 0;
    height: 2px;
    background: #F9B233;
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

#mobile-menu a:hover::before {
    width: 15px;
}

/* Enhanced Animations */
.benefit-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    position: relative;
}


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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #25336B, #929AB4);
    border-radius: 4px;
}

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

/* Enhanced Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #25336B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .owi-hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .owi-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .owi-nav a::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .owi-hero-content h1 {
        font-size: 2rem;
    }
    
    .owi-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .owi-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .owi-nav,
    .owi-footer,
    .owi-btn,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .owi-hero {
        background: none !important;
        color: #000 !important;
    }
    
    .owi-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Contact Modal */
.owi-modal-open {
    overflow: hidden;
}

#owi-contact-modal {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#owi-contact-modal.owi-modal-active {
    pointer-events: auto;
}

#owi-contact-modal.owi-modal-visible {
    opacity: 1;
}

#owi-contact-modal .owi-modal__panel {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#owi-contact-modal.owi-modal-visible .owi-modal__panel {
    transform: translateY(0);
    opacity: 1;
}

#owi-contact-modal .owi-modal__panel::-webkit-scrollbar {
    width: 6px;
}

#owi-contact-modal .owi-modal__panel::-webkit-scrollbar-thumb {
    background: rgba(37, 51, 107, 0.3);
    border-radius: 9999px;
}