/* Cloudgap Custom Styles - Supplementing Tailwind CSS */

/* CSS Custom Properties for Brand Colors */
:root {
    --cloudgap-blue: #1976D2;
    --cloudgap-dark: #263238;
    --cloudgap-light: #F5F5F5;
    --spacing-unit: 8px;
}

/* Base Reset and Typography Enhancement */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'system-ui', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'system-ui', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Focus States for Accessibility */
*:focus {
    outline: 2px solid var(--cloudgap-blue);
    outline-offset: 2px;
}

/* Button Focus Enhancement */
button:focus,
a:focus {
    outline: 2px solid var(--cloudgap-blue);
    outline-offset: 2px;
}

/* Custom Component Utilities */

/* Image Container for Consistent Sizing */
.image-container {
    overflow: hidden;
    border-radius: 8px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Gradient Backgrounds */
.gradient-hero {
    background: linear-gradient(135deg, var(--cloudgap-light) 0%, #ffffff 50%, var(--cloudgap-light) 100%);
}

/* Logo Image Filter for Dark Backgrounds */
.logo-invert {
    filter: brightness(0) invert(1);
}

/* Service Number Styling */
.service-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--cloudgap-blue);
    line-height: 1;
}

/* Mobile Menu Animation */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.show {
    max-height: 500px;
}

/* Form Field Enhancements */
.form-field {
    position: relative;
}

.form-field input:focus + label,
.form-field textarea:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:not(:placeholder-shown) + label {
    transform: translateY(-24px) scale(0.875);
    color: var(--cloudgap-blue);
}

.form-field label {
    position: absolute;
    top: 12px;
    left: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

/* Error States */
.error {
    border-color: #EF4444 !important;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Success States */
.success {
    border-color: #10B981 !important;
}

.success-message {
    color: #10B981;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Image Gallery */
.image-gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--cloudgap-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.gallery-item img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Sticky Header Enhancement */
.sticky-header {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 16pt; }
    
    .page-break {
        page-break-before: always;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --cloudgap-blue: #0056CC;
        --cloudgap-dark: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Preparation (if needed) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if required */
}

/* Utility Classes */
.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;
}

/* Container Max Width Override */
.container-cloudgap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container-cloudgap {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-cloudgap {
        padding: 0 2rem;
    }
}

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

/* Aspect Ratio Utilities */
.aspect-video {
    aspect-ratio: 16/9;
}

.aspect-square {
    aspect-ratio: 1/1;
}

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

::-webkit-scrollbar-track {
    background: var(--cloudgap-light);
}

::-webkit-scrollbar-thumb {
    background: var(--cloudgap-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1565C0;
}