/* Brightstead - Modern Grid Layout with Tailwind CSS */

/* ==========================================================================
   CSS Grid Layout Enhancements
   ========================================================================== */

/* Ensure full height layout */
html, body {
    height: 100%;
}

/* Grid container with proper row sizing */
.grid-layout {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* ==========================================================================
   Header Enhancements
   ========================================================================== */

/* Sticky header with backdrop blur */
.sticky-header {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Logo hover effects */
.logo-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-hover:hover {
    transform: scale(1.05);
}

/* Navigation underline animation */
.nav-underline {
    position: relative;
}

.nav-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0d9488, #0f766e);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   Message System Enhancements
   ========================================================================== */

/* Enhanced message animations */
.message-enter {
    animation: slideInDown 0.3s ease-out;
}

.message-exit {
    animation: slideOutUp 0.3s ease-in;
}

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

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

/* ==========================================================================
   Footer Enhancements
   ========================================================================== */

/* Footer link hover effects */
.footer-link {
    position: relative;
    transition: color 0.2s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #0d9488;
    transition: width 0.2s ease;
}

.footer-link:hover::after {
    width: 100%;
}



/* ==========================================================================
   Modern Animations & Transitions
   ========================================================================== */

/* Smooth fade-in animation for content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Staggered animation for multiple elements */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* Enhanced hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* ==========================================================================
   Enhanced Focus States
   ========================================================================== */

/* Modern focus ring */
.focus-ring:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* Button focus states */
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
    }
}

/* ==========================================================================
   High Contrast Mode Support
   ========================================================================== */

@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #1f2937 !important;
    }
    
    .text-gray-500 {
        color: #374151 !important;
    }
    
    .border-gray-200 {
        border-color: #6b7280 !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;
    }
    
    .hover-lift:hover {
        transform: none;
    }
    
    .nav-underline::after {
        transition: none;
    }
}

/* ==========================================================================
   Custom Brand Elements
   ========================================================================== */

/* Custom gradient text for brand elements */
.brand-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom button styles that extend Tailwind */
.btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-200 shadow-lg hover:shadow-xl transform hover:-translate-y-1;
}

.btn-secondary {
    @apply bg-gray-200 hover:bg-gray-300 text-gray-800 font-semibold py-3 px-6 rounded-lg transition-all duration-200 border-2 border-gray-300 hover:border-gray-400;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

/* Custom breakpoint for very large screens */
@media (min-width: 1400px) {
    .container-2xl {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Grid Layout Utilities
   ========================================================================== */

/* Modern card grid layouts */
.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Feature grid for homepage */
.feature-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==========================================================================
   Enhanced Typography
   ========================================================================== */

/* Modern heading styles */
.heading-xl {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.heading-lg {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Interactive Elements
   ========================================================================== */

/* Enhanced button interactions */
.interactive-btn {
    position: relative;
    overflow: hidden;
}

.interactive-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;
}

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