/* ========================================
   APEX-GRID MARITIME - Custom Styles
   ======================================== */

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    display: none;
}

.modal.active {
    display: flex;
}

/* Testimonial Slides */
.testimonial-slide {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-slide.hidden {
    display: none;
}

/* Testimonial Dots */
.testimonial-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot:hover {
    transform: scale(1.2);
}

/* Toast Notification */
#toast {
    transition: all 0.3s ease-out;
}

#toast.translate-y-20 {
    transform: translateY(5rem);
}

#toast.opacity-0 {
    opacity: 0;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Active Navigation Link */
.nav-link.active {
    color: #f97316;
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #f97316;
}

/* Button Hover Effects */
button,
a.button {
    transition: all 0.3s ease;
}

button:hover,
a.button:hover {
    transform: scale(1.05);
}

/* Service Card Hover */
.group:hover .group-hover\:bg-accent {
    background-color: #f97316;
}

.group:hover .group-hover\:text-white {
    color: #ffffff;
}

/* Mobile Menu Transitions */
#mobileMenu {
    transition: all 0.3s ease-in-out;
}

/* Image Loading */
img {
    loading: lazy;
}

/* Accessibility - Focus Visible */
*:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    .modal,
    #toast {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-gray-300,
    .text-gray-400,
    .text-gray-600 {
        color: #000000;
    }
}

/* 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;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme by default */
}

/* Tablet Breakpoint Adjustments */
@media (max-width: 1024px) {
    .text-5xl {
        font-size: 2.5rem;
    }
}

/* Mobile Breakpoint Adjustments */
@media (max-width: 768px) {
    .text-5xl {
        font-size: 2rem;
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .px-8 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .gap-4 {
        gap: 1rem;
    }
}

/* Loading Spinner */
.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e3a5f;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Selection Color */
::selection {
    background: #f97316;
    color: #ffffff;
}

/* Smooth Image Transitions */
img {
    transition: opacity 0.3s ease;
}

img.loading {
    opacity: 0.5;
}

/* Card Shadow Enhancements */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient Text (Optional) */
.gradient-text {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Underline Animation */
.underline-animate {
    position: relative;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f97316;
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* Background Pattern (Optional) */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f97316' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

/* Container Max Width */
.container {
    max-width: 1280px;
}

/* Line Height Adjustments */
.leading-relaxed {
    line-height: 1.625;
}

.leading-tight {
    line-height: 1.25;
}

/* Font Weight Utilities */
.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Border Radius */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Transition Utilities */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transform {
    transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);
}

/* Hover Scale */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

/* Translate Y on Hover */
.hover\:-translate-y-2:hover {
    transform: translateY(-0.5rem);
}

/* Opacity Transitions */
.opacity-0 {
    opacity: 0;
}

.opacity-40 {
    opacity: 0.4;
}

/* Z-Index Utilities */
.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

/* Position Utilities */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Display Utilities */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

/* Flexbox Utilities */
.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

/* Grid Utilities */
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Spacing Utilities */
.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Margin Utilities */
.m-0 {
    margin: 0;
}

.m-2 {
    margin: 0.5rem;
}

.m-4 {
    margin: 1rem;
}

.m-6 {
    margin: 1.5rem;
}

.m-8 {
    margin: 2rem;
}

.m-12 {
    margin: 3rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Width & Height */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

/* Text Colors */
.text-white {
    color: #ffffff;
}

.text-primary {
    color: #0f172a;
}

.text-accent {
    color: #f97316;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

/* Background Colors */
.bg-white {
    background-color: #ffffff;
}

.bg-primary {
    background-color: #0f172a;
}

.bg-secondary {
    background-color: #1e3a5f;
}

.bg-accent {
    background-color: #f97316;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-black\/70 {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Border Utilities */
.border-2 {
    border-width: 2px;
}

.border-t {
    border-top-width: 1px;
}

.border-white {
    border-color: #ffffff;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-gray-700 {
    border-color: #374151;
}

.border-gray-800 {
    border-color: #1f2937;
}

/* Border Radius */
.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadow Utilities */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Pointer Events */
.pointer-events-none {
    pointer-events: none;
}

/* User Select */
.select-none {
    user-select: none;
}

/* Vertical Align */
.align-middle {
    vertical-align: middle;
}

/* Word Break */
.break-words {
    overflow-wrap: break-word;
}

/* Resize */
.resize-none {
    resize: none;
}

/* Appearance */
.appearance-none {
    appearance: none;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Not Sr Only */
.not-sr-only {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}