/* Global Reset & Performance Improvements */
html {
    /* Removed scroll-behavior: smooth as it causes noticeable lag for many users */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
 * Performance Fixes for Scrolling Lag
 * backdrop-filter and mix-blend-mode are notorious for causing massive
 * frame drops during scrolling depending on the GPU/device. Disabling them.
 */
* {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mix-blend-mode: normal !important;
}

/* Global Hover Animations */

.hover-animate-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
}

.hover-animate-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    z-index: 10;
}

.hover-animate-button {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease, box-shadow 0.2s ease !important;
}

.hover-animate-button:hover {
    transform: translateY(-3px) scale(1.06) !important;
    filter: brightness(1.1) !important;
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.1), 0 8px 8px -4px rgba(0, 0, 0, 0.05) !important;
}

/* Specific adjustment for links acting as buttons if they don't have block/inline-block */
a.hover-animate-button {
    display: inline-block;
}

/* Scroll Fade-in Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #101926; /* Dark navy from branding */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    width: 150px;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
    animation: loading 1.5s infinite ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Global Button Text Centering */
button, 
.btn, 
.hover-animate-button,
a.rounded-lg,
a.rounded-xl,
a.rounded-full {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Ensure buttons with w-full stay centered */
.w-full.inline-flex {
    width: 100% !important;
}

/* Hide horizontal scroll on body */
body {
    overflow-x: hidden !important;
    width: 100vw;
}

/* Mobile Friendly Overrides */
@media (max-width: 768px) {
    /* Responsive Typography */
    h1 {
        font-size: 2.25rem !important; /* Cap h1 size on small phones */
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

header img {
    height: 2.5rem; /* Standard desktop size */
    width: auto;
}

/* Global Header cleanup - hides all buttons and nav in the header */
header button,
header .btn,
header nav,
header a.bg-primary,
header a.rounded-lg,
header .hover-animate-button,
#mobile-menu-button {
    display: none !important;
}

/* Mobile Header Overrides */
@media (max-width: 768px) {
    header img {
        height: 1.5rem !important; /* Reduced from 2.5rem */
    }
}

    /* Padding Adjustments */
    section {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    /* Hero Height Adjustments */
    .min-h-\[870px\] {
        min-height: 600px !important;
        height: auto !important;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Make grid containers stack nicely if they don't already */
    .grid {
        gap: 1.5rem !important;
    }
}

.social-icon-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 0 !important;
    color: white !important; /* Force icon color to white */
    transition: all 0.3s ease !important;
}

.social-icon-link:hover {
    background-color: #C9A84C !important; /* Gold accent on hover */
    transform: translateY(-3px) scale(1.1) !important;
}

.footer-logo-white {
    filter: brightness(0) invert(1) !important;
}

.social-icon-link svg {
    display: block !important;
    margin: 0 !important;
}

/* Global Footer Background */
footer {
    background-color: #2A4E7A !important; /* Website primary blue */
    color: #e2e8f0 !important; /* slate-200 for better readability on blue */
}

footer .text-white, 
footer h5,
footer a {
    color: white !important;
}

footer p, 
footer span,
footer li {
    color: #cbd5e1 !important; /* slate-300 */
}

footer a:hover {
    color: #C9A84C !important; /* Gold hover from styles */
}
