/* Custom Styles for National Peace Initiative */

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

/* Custom Font */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fade-in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

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

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

::-webkit-scrollbar-thumb {
    background: #0D5C63;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2A7F88;
}

/* Hero Section Animation */
#home h1 {
    animation: fadeInUp 1s ease-out;
}

#home p {
    animation: fadeInUp 1.2s ease-out;
}

#home .flex a {
    animation: fadeInUp 1.4s ease-out;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Button Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 92, 99, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(13, 92, 99, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 92, 99, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0D5C63;
    box-shadow: 0 0 0 3px rgba(13, 92, 99, 0.1);
}

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

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0D5C63;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Custom Utilities */
.text-balance {
    text-wrap: balance;
}

/* Print Styles */
@media print {
    header,
    footer,
    #scroll-top {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Accessibility: Focus Visible */
*:focus-visible {
    outline: 2px solid #0D5C63;
    outline-offset: 2px;
}

/* Skip to Content Link (for accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0D5C63;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support */
    /*
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }

    header {
        background-color: #2d3748;
    }
    */
}

/* Animations for Initiative Cards */
#initiatives .shadow-lg {
    transition: all 0.3s ease;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Footer Links Hover Effect */
footer a:hover {
    transform: translateX(5px);
    transition: transform 0.2s ease;
}

/* Service Cards Responsive Adjustments */
@media (max-width: 768px) {
    #services .md\:flex {
        flex-direction: column;
    }

    #services .md\:w-1\/3,
    #services .md\:w-2\/3 {
        width: 100%;
    }
}

/* Hero Section Responsive Typography */
@media (max-width: 640px) {
    #home h1 {
        font-size: 2.5rem;
    }

    #home p {
        font-size: 1rem;
    }
}

/* Custom Selection Color */
::selection {
    background-color: #78C4B8;
    color: white;
}

::-moz-selection {
    background-color: #78C4B8;
    color: white;
}

/* Ensure smooth transitions for all interactive elements */
a,
button,
input,
textarea,
select {
    transition: all 0.3s ease;
}

/* Social Media Icons Hover Effects */
footer .bg-blue-600:hover,
footer .bg-blue-400:hover,
footer .bg-pink-600:hover,
footer .bg-blue-700:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Biography Scroll Custom Scrollbar */
.biography-scroll::-webkit-scrollbar {
    width: 8px;
}

.biography-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.biography-scroll::-webkit-scrollbar-thumb {
    background: #0D5C63;
    border-radius: 10px;
}

.biography-scroll::-webkit-scrollbar-thumb:hover {
    background: #2A7F88;
}

/* Service Cards Animations */
#services .shadow-lg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#services .shadow-lg:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(13, 92, 99, 0.2);
}

/* Service Card Image Animation */
#services .shadow-lg img {
    transition: all 0.5s ease;
    transform: scale(1);
}

#services .shadow-lg:hover img {
    transform: scale(1.1);
}

/* Service Card Content Animation */
#services .shadow-lg h3 {
    transition: color 0.3s ease;
}

#services .shadow-lg:hover h3 {
    color: #0D5C63;
}

/* Fade in animation for service cards on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#services .shadow-lg {
    animation: fadeInUp 0.6s ease-out backwards;
}

#services .shadow-lg:nth-child(1) { animation-delay: 0.1s; }
#services .shadow-lg:nth-child(2) { animation-delay: 0.2s; }
#services .shadow-lg:nth-child(3) { animation-delay: 0.3s; }
#services .shadow-lg:nth-child(4) { animation-delay: 0.4s; }
#services .shadow-lg:nth-child(5) { animation-delay: 0.5s; }
#services .shadow-lg:nth-child(6) { animation-delay: 0.6s; }
#services .shadow-lg:nth-child(7) { animation-delay: 0.7s; }
#services .shadow-lg:nth-child(8) { animation-delay: 0.8s; }

/* About Submenu Fix */
.group:hover > div {
    display: block !important;
}

/* Add padding to submenu area for better mouse interaction */
.group > div {
    padding-top: 0.5rem;
    margin-top: -0.5rem;
}

/* Hide Google Translate default widget and banner */
#google_translate_element {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
    position: static !important;
}

.goog-te-gadget {
    display: none !important;
}

/* Fix for iframe positioning */
.skiptranslate iframe {
    display: none !important;
}

.goog-logo-link {
    display: none !important;
}

.goog-te-gadget span {
    display: none !important;
}

#goog-gt-tt {
    display: none !important;
}

.goog-te-balloon-frame {
    display: none !important;
}

/* Language Selector Styles */
.language-selector button,
.language-selector-mobile button {
    cursor: pointer;
}

.language-selector .hidden,
.language-selector-mobile .hidden {
    display: none;
}

/* Language dropdown animation */
#language-dropdown,
#language-dropdown-mobile {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mission & Vision Section Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to mission and vision cards */
.mission-card {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.vision-card {
    animation: slideInFromRight 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Core values title animation */
.core-values-title {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

/* Staggered animation for core value cards */
.core-value-card {
    animation: fadeInScale 0.6s ease-out forwards;
    opacity: 0;
}

.core-value-card:nth-child(1) {
    animation-delay: 0.6s;
}

.core-value-card:nth-child(2) {
    animation-delay: 0.7s;
}

.core-value-card:nth-child(3) {
    animation-delay: 0.8s;
}

.core-value-card:nth-child(4) {
    animation-delay: 0.9s;
}

.core-value-card:nth-child(5) {
    animation-delay: 1s;
}

/* Enhanced shadow for mission/vision cards on hover */
.mission-card:hover,
.vision-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Modal backdrop animations */
.modal-backdrop {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-backdrop.closing {
    animation: modalFadeOut 0.3s ease-out;
}

/* Modal content animations */
.modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content.closing {
    animation: modalSlideOut 0.3s ease-out;
}
