/**
 * RABEC Emergency Care Consultancy - Custom Tailwind CSS
 * 
 * This file contains custom CSS additions to complement Tailwind CSS
 * It includes custom animations, responsive utilities, and specific styling
 * for the RABEC website components.
 */

/* ===========================================
   Custom CSS Reset and Base Styles
   =========================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* ==================================================
    Overrides: remove gradients and purple colors site-wide
    - Disable gradient background utilities for non-text elements
    - Map any 'purple' utility classes to the site's primary teal color
    NOTE: The original rules were overly broad and removed gradients
    used intentionally for hero text/backgrounds. Narrow the selector
    so elements using text gradients (bg-clip-text) keep their styling.
    ==================================================*/

/* Neutralize Tailwind gradient utility classes for non-text elements only
    Keep elements with `bg-clip-text` (text gradients) intact. Also avoid
    matching classes that contain 'hero' to reduce impact on hero components. */
[class*="bg-gradient-to"]:not(.bg-clip-text):not([class*="hero"]):not(.absolute),
[class*="bg-gradient"]:not(.bg-clip-text):not([class*="hero"]):not(.absolute) {
    /* Avoid neutralizing absolutely-positioned overlays (they use bg-gradient utilities)
       which would otherwise become solid white and occlude background images. */
    background-image: none !important;
    background: #ffffff !important;
}

/* NOTE: Removed the blanket neutralization of inline linear-gradient styles
    because it hid intended decorative gradients (for example, text or hero
    overlay gradients). If a specific element needs disabling, add a scoped
    rule or a helper class instead. */

/* Replace purple text/background utilities with primary teal */
[class*="purple"], [class*="text-purple"], [class*="bg-purple"], [class*="from-purple"], [class*="via-purple"], [class*="to-purple"] {
    color: #01c6a8 !important;
    background-color: #01c6a8 !important;
    background-image: none !important;
}

/* Ensure elements that explicitly need white text keep readable contrast */
.text-white[class*="purple"], .text-white[class*="bg-purple"] {
    color: #ffffff !important;
}


/* ===========================================
   Custom Animations
   =========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===========================================
   Animation Classes
   =========================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================================
   Hero Slider Specific Styles (Enhanced with Stylish Edges)
   =========================================== */

.hero-slider {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: all 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
    border: 3px solid rgba(1, 198, 168, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(1, 198, 168, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Enhanced decorative border animation */
.hero-slider::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: #01c6a8;
    border-radius: 0 0 2rem 2rem;
    z-index: -1;
    opacity: 0.12;
}

.hero-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.08);
    z-index: 1;
    transition: opacity 0.8s ease;
    border-radius: 0 0 2rem 2rem;
}

.hero-slider > * {
    position: relative;
    z-index: 2;
/* Ensure explicit background-image blocks in split slider are visible
   and stack correctly above background overlays but below content */
.bg-image {
    z-index: 0; /* place behind content (which uses z-index >=1) */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 1 !important;
    will-change: transform, opacity;
}
}

/* Decorative corner elements styling */
.hero-slider .absolute.w-20.h-20 {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cornerPulse 4s ease-in-out infinite;
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(1, 198, 168, 0.5));
    }
}

.hero-slider:hover .absolute.w-20.h-20 {
    opacity: 0.9;
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(1, 198, 168, 0.7));
}

/* Enhanced Slide Transitions with Background Image Focus and Rounded Edges */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1.08);
    z-index: 1;
    filter: blur(2px) brightness(0.8);
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed;
    border-radius: 0 0 2rem 2rem;
    overflow: hidden;
}

/* Ken Burns effect for background images with enhanced movement */
.slide::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: inherit;
    animation: kenBurns 10s ease-in-out infinite;
    z-index: -1;
    filter: contrast(1.1) saturate(1.2);
}

@keyframes kenBurns {
    0%, 100% {
        transform: scale(1) translateX(0) translateY(0);
    }
    20% {
        transform: scale(1.12) translateX(-3%) translateY(-2%);
    }
    40% {
        transform: scale(1.18) translateX(2%) translateY(-3%);
    }
    60% {
        transform: scale(1.15) translateX(-2%) translateY(2%);
    }
    80% {
        transform: scale(1.10) translateX(1%) translateY(-1%);
    }
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
    filter: blur(0px) brightness(1.2) contrast(1.1);
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced background image transition for active slide */
.slide.active::before {
    filter: contrast(1.3) saturate(1.4) brightness(1.1);
}

/* Ensure background images are always visible and prominent */
.slide {
    background-blend-mode: normal;
}

.slide .absolute.inset-0:first-child {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.15) 100%);
}

.slide .absolute.inset-0:nth-child(2) {
    background: rgba(0, 0, 0, 0.05);
}

/* Add exit animation for leaving slide */
.slide.exiting {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(3px) brightness(0.6);
    z-index: 1;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-content {
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    filter: blur(3px);
}

.slide.active .slide-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0px);
}

/* Enhanced staggered animation delays for slide content */
.slide-content:nth-child(1) { transition-delay: 0.3s; }
.slide-content:nth-child(2) { transition-delay: 0.5s; }
.slide-content:nth-child(3) { transition-delay: 0.7s; }
.slide-content:nth-child(4) { transition-delay: 0.9s; }
.slide-content:nth-child(5) { transition-delay: 1.1s; }

/* Enhanced Particles Animation with More Life */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg) scale(1); }
    20% { transform: translateY(-15px) rotate(72deg) scale(1.1); }
    40% { transform: translateY(-25px) rotate(144deg) scale(0.9); }
    60% { transform: translateY(-20px) rotate(216deg) scale(1.2); }
    80% { transform: translateY(-10px) rotate(288deg) scale(0.8); }
    100% { transform: translateY(0px) rotate(360deg) scale(1); }
}

@keyframes glow {
    0%, 100% { 
        opacity: 0.2; 
        box-shadow: 0 0 5px currentColor; 
    }
    25% { 
        opacity: 0.6; 
        box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; 
    }
    50% { 
        opacity: 0.9; 
        box-shadow: 0 0 25px currentColor, 0 0 35px currentColor, 0 0 45px currentColor; 
    }
    75% { 
        opacity: 0.7; 
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; 
    }
}

@keyframes drift {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(10px) translateY(-5px); }
    50% { transform: translateX(-5px) translateY(-10px); }
    75% { transform: translateX(-10px) translateY(5px); }
}

.particle {
    animation: float 8s ease-in-out infinite, glow 2s ease-in-out infinite, drift 12s ease-in-out infinite;
    will-change: transform, opacity, box-shadow;
}

/* Section watermark helper: place a semi-transparent, non-interactive favicon behind section content */
/* per-section watermark removed; using global body.with-watermark instead */

/* Impact / Stats lead paragraph: stronger contrast and readability over images/watermarks */
.impact-lead {
    color: #ffffff !important;
    font-size: 1.125rem; /* ~18px */
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0.98;
}
.impact-lead.small-screen {
    font-size: 1rem;
}

/* Site-wide watermark applied to pages that opt in via body class (not index) */
body.with-watermark::before {
    content: '';
    position: fixed;
    inset: 0;
    /* use the translucent texture as the site-wide watermark */
    background-image: url('../images/util/tran-bg.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 50vw; /* large centered watermark */
    opacity: 0.12;
    pointer-events: none;
    z-index: -1; /* sit behind all page content */
}

/* Stronger watermark variant for highlighted pages (e.g., about.php) */
body.with-watermark-strong::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../images/util/tran-bg.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 60vw; /* even larger */
    opacity: 0.22; /* stronger visibility */
    pointer-events: none;
    z-index: -1;
}

/* Helper to place a subtle watermark inside text containers */
.text-watermark {
    position: relative;
    overflow: visible;
}
.text-watermark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background-image: url('../images/util/tran-bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}
.text-watermark > * { position: relative; z-index: 1; }

/* Glass Effect Enhancements */
.backdrop-blur-sm {
    backdrop-filter: blur(8px) saturate(180%);
}

/* Enhanced Navigation Arrows with Rounded Design */
.hero-slider button:hover {
    backdrop-filter: blur(15px);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 30px rgba(1, 198, 168, 0.4), 0 0 15px rgba(1, 198, 168, 0.2);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.hero-slider button {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: arrowPulse 3s ease-in-out infinite;
    border-radius: 50%;
    border: 2px solid rgba(1, 198, 168, 0.3);
}

@keyframes arrowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(1, 198, 168, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(1, 198, 168, 0.2);
    }
}

/* Enhanced Slider Dots with Rounded Design (solid, non-gradient) */
.slider-dot {
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid rgba(0,0,0,0.06);
}

.slider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.slider-dot.bg-opacity-100,
.slider-dot:hover {
    background-color: rgba(0,0,0,0.12) !important;
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.12);
}

.slider-dot.bg-opacity-100::before,
.slider-dot:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Hero content animations with enhanced effects */
.hero-title,
.hero-subtitle,
.hero-buttons {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-title {
    /* Static gradient: white -> green -> light blue */
    background: linear-gradient(90deg, #ffffff 0%, #01c6a8 55%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* fallback */
    text-shadow: none; /* remove glowing shadow */
    animation: none !important;
}
.hero-buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    transition: left 0.6s ease;
}

.hero-buttons a:hover::before {
    left: 100%;
}

.hero-buttons a:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Loading optimization classes */
.image-loading {
    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; }
}

/* High performance transitions */
.hero-slider .absolute.inset-0 {
    will-change: background-image;
    transform: translateZ(0);
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive image optimization with enhanced background focus and rounded edges */
@media (max-width: 768px) {
    .hero-slider {
        margin: 1rem;
        border-radius: 0 0 1.5rem 1.5rem;
        border-width: 2px;
    }
    
    .hero-slider::after {
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .hero-slider::before {
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .slide {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center !important;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .slide::before {
        animation-duration: 12s;
    }
    
    /* Smaller decorative corners on mobile */
    .hero-slider .absolute.w-20.h-20 {
        width: 3rem;
        height: 3rem;
    }
}

@media (min-width: 769px) {
    .hero-slider {
        margin: 1rem;
        border-radius: 0 0 2rem 2rem;
    }
    
    .slide {
        background-attachment: fixed;
        background-size: cover !important;
        background-position: center !important;
        border-radius: 0 0 2rem 2rem;
    }
}

/* Enhanced background image loading and transition with rounded corners */
.hero-slider {
    contain: layout style paint;
}

.slide.loading-bg {
    background-color: #1f2937;
    background-image: linear-gradient(45deg, #1f2937 25%, #374151 25%, #374151 50%, #1f2937 50%, #1f2937 75%, #374151 75%);
    background-size: 40px 40px;
    animation: loading 2s linear infinite;
    border-radius: inherit;
}

@keyframes loading {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Enhanced focus indicators for accessibility */
.hero-slider button:focus {
    outline: 2px solid #01c6a8;
    outline-offset: 4px;
    border-color: #01c6a8;
}

/* ===========================================
   Navigation Enhancements
   =========================================== */

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #01c6a8;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    transform-origin: top;
}

.mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

.mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/* ===========================================
   Card Hover Effects
   =========================================== */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Service cards specific styling */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: #01c6a8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(1, 198, 168, 0.25);
}

/* ===========================================
   Button Enhancements
   =========================================== */

.btn-primary {
    background-color: #01c6a8;
    color: #1f2937;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: #019b8b;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(1, 198, 168, 0.4);
}

.btn-secondary {
    border: 2px solid #ffffff;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* ===========================================
   Form Enhancements
   =========================================== */

.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #01c6a8;
    box-shadow: 0 0 0 3px rgba(1, 198, 168, 0.1);
    outline: none;
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

/* Loading state for forms */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===========================================
   Responsive Image Handling with Glass Effects
   =========================================== */

.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.08);
}

/* Glass effect for images */
.glass-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.glass-image:hover::before {
    opacity: 0.7;
}

.glass-image img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    border-radius: 12px;
}

.glass-image:hover img {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2);
}

.glass-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 
                0 0 30px rgba(1, 198, 168, 0.2);
    border-color: rgba(1, 198, 168, 0.3);
}

/* Equipment card glass effects */
.equipment-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.equipment-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 
                0 0 40px rgba(1, 198, 168, 0.15);
    border-color: rgba(1, 198, 168, 0.4);
}

/* Dark glass cards with white text - special hover effects */
.glass-card-dark:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(25px);
    border-color: rgba(1, 198, 168, 0.6);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(1, 198, 168, 0.2);
    transform: translateY(-8px);
}

.equipment-card .glass-image:hover {
    transform: translateY(0);
}

/* Mission/Vision card glass enhancements */
.mission-vision-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mission-vision-card:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Background equipment images with glass effect */
.equipment-bg-image {
    position: absolute;
    border-radius: 8px;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.08;
}

.equipment-bg-image:hover {
    opacity: 0.15;
    transform: scale(1.05);
    backdrop-filter: blur(4px);
}

/* Featured equipment showcase */
.featured-equipment-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-equipment-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(1, 198, 168, 0.1) 0%, 
        transparent 50%, 
        rgba(1, 198, 168, 0.05) 100%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-equipment-image:hover::before {
    opacity: 1;
}

.featured-equipment-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.featured-equipment-image:hover img {
    transform: scale(1.08);
    filter: brightness(1.1) saturate(1.1);
}

.featured-equipment-image:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), 
                0 0 50px rgba(1, 198, 168, 0.2);
    border-color: rgba(1, 198, 168, 0.3);
}

/* Enhanced hover effects for cards with background images */
.card-with-bg-image {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-with-bg-image:hover .equipment-bg-image {
    opacity: 0.12;
    transform: scale(1.1) rotate(2deg);
    filter: blur(1px);
}

.img-placeholder {
    background-color: #f3f4f6;
    background-image: linear-gradient(45deg, #f9fafb 25%, transparent 25%),
                      linear-gradient(-45deg, #f9fafb 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f9fafb 75%),
                      linear-gradient(-45deg, transparent 75%, #f9fafb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: pulse 2s infinite;
}

/* ===========================================
   Testimonial and Quote Styles
   =========================================== */

.testimonial {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #f7f7f7 0%, #ffffff 100%);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #01c6a8;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ===========================================
   Loading Spinner
   =========================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #01c6a8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===========================================
   Scrollbar Styling
   =========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #01c6a8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #019b8b;
}

/* ===========================================
   Print Styles
   =========================================== */

@media print {
    .no-print,
    nav,
    footer,
    .hero-slider,
    button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        font-weight: bold;
    }
    
    p, li {
        orphans: 2;
        widows: 2;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* ===========================================
   Accessibility Improvements
   =========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #01c6a8;
    color: #000;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Focus indicators */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #01c6a8;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000 !important;
    }
    
    .bg-light-grey {
        background-color: #fff !important;
    }
    
    .border-gray-300 {
        border-color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slider {
        background-attachment: scroll;
    }
}

/* ===========================================
   Responsive Design Enhancements
   =========================================== */

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .hero-slider {
        background-attachment: scroll;
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .container-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .hero-title {
        font-size: 3rem;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .hero-slider {
        background-attachment: fixed;
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .container-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* ===========================================
   Utility Classes
   =========================================== */

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-shadow-sm {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-primary {
    background: linear-gradient(135deg, #01c6a8 0%, #019b8b 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #01c6a8 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===========================================
   Dark Mode Support (Future Enhancement)
   =========================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here for future enhancement */
}

/* ===========================================
   Nav stacking and sticky safeguard
   Ensure the navigation bar stays above hero/header images and remains sticky
   =========================================== */
nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important; /* very high to overlay hero and other elements */
    backface-visibility: hidden; /* avoid creating new stacking context issues */
}

/* Make sure hero and slide pseudo elements don't overlap nav
   by lowering their z-index when the nav is sticky */
.hero-slider, .hero-slider::before, .hero-slider::after, .slide, .slide::before {
    z-index: 1 !important;
}

/* Ensure the contact form toast floats above the sticky navigation and
   is not clipped or hidden. We set a very large z-index and move the
   toast below the nav on larger screens. On small screens keep it near
   the top but inset from the edges. */
#contact-toast {
    position: fixed !important; /* reinforce fixed positioning */
    z-index: 100000 !important; /* must be greater than nav's 9999 */
    top: 4.5rem !important; /* sit below the sticky nav */
    right: 1.25rem !important;
    left: auto !important;
    pointer-events: auto !important;
}

/* Small animation helper applied by JS when showing the toast. This
   ensures the toast becomes visible even if previous hide used an
   inline style (display:none). We set display:block !important so
   JS-driven show always overrides inline hiding. */
#contact-toast.animate-fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.35s ease, transform 0.35s ease;
    display: block !important;
}

/* Make the inner toast responsive on small viewports */
@media (max-width: 768px) {
    #contact-toast {
        top: 4rem !important; /* keep some space below small header */
        right: 0.75rem !important;
        left: 0.75rem !important;
    }
    #contact-toast-inner {
        width: auto !important;
        max-width: calc(100% - 1.5rem) !important;
    }
}

/* WhatsApp floating label styling */
.whatsapp-label {
    display: inline-block;
    background: linear-gradient(90deg, #10b981, #01c6a8);
    color: #fff;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    box-shadow: 0 8px 20px rgba(1, 198, 168, 0.18);
    transform-origin: bottom center;
    transition: transform 200ms ease, opacity 200ms ease;
    opacity: 1;
}

.whatsapp-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #01c6a8;
}

/* Slight lift on hover of the button group */
.fixed.right-6 .relative:hover .whatsapp-label {
    transform: translateY(-4px) scale(1.02);
}

/* Favicon watermark across all pages: centered, semi-transparent, covers ~40% of viewport */
body::before {
    content: '';
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50vw; /* about 50% of viewport width */
    height: 50vw; /* keep it square */
    max-width: 1000px;
    max-height: 1000px;
    background-image: url('../images/util/favicon.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.12; /* increased visibility */
    pointer-events: none; /* don't block interactions */
    z-index: 0; /* behind all content */
    mix-blend-mode: lighten; /* subtle blending with backgrounds */
}

/* Ensure the watermark doesn't overlap fixed nav or popups visually; place content above it */
header, nav, .hero-slider, .slide, .site-content, main, footer, .modal, .fixed, .sticky {
    position: relative;
    z-index: 1;
}
