/* Global Mobile-First CSS Optimizations with Soft Pastel Colors */

/* CSS Custom Properties - Soft Pastel Color Palette */
:root {
    --peach-light: #FFE5D4;
    --peach-main: #FFCDB2;
    --cream-light: #FFF8F0;
    --cream-main: #F7F3E9;
    --teal-light: #E0F7FA;
    --teal-main: #B2DFDB;
    --lavender-light: #F3E5F5;
    --lavender-main: #E1BEE7;
    --coral-light: #FFE0DD;
    --coral-main: #FFAB91;
    --sage-light: #F1F8E9;
    --sage-main: #DCEDC1;
    
    /* Text Colors */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    
    /* Shadow and Border */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: clamp(0.75rem, 2vw, 1rem);
}

/* Base Mobile-First Styles */
* {
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.6;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, var(--cream-light) 0%, var(--peach-light) 100%);
    color: var(--text-primary);
}

/* Container Responsive Updates */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(1rem, 4vw, 2rem);
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 48rem) {
    .container {
        max-width: 48rem;
    }
}

@media (min-width: 64rem) {
    .container {
        max-width: 64rem;
    }
}

@media (min-width: 75rem) {
    .container {
        max-width: 75rem;
    }
}

/* Typography Mobile-First - Poppins for Headers, Roboto for Body */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.25rem, 4vw, 1.5rem); font-weight: 500; }
h5 { font-size: clamp(1.1rem, 3vw, 1.25rem); font-weight: 500; }
h6 { font-size: clamp(1rem, 2.5vw, 1.1rem); font-weight: 500; }

p, .lead {
    font-size: clamp(1rem, 3vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.small {
    font-size: clamp(0.875rem, 2.5vw, 0.9rem);
}

/* Button Mobile-First Optimizations with Soft Pastels */
.btn {
    min-height: 2.75rem; /* 44px minimum touch target */
    padding: clamp(0.75rem, 3vw, 1rem) clamp(1rem, 4vw, 1.5rem);
    font-size: clamp(0.9rem, 3vw, 1rem);
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border: none;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--peach-main), var(--coral-main));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--coral-main), var(--peach-main));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 171, 145, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--teal-main), var(--sage-main));
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--sage-main), var(--teal-main));
    transform: translateY(-2px);
}

@media (min-width: 48rem) {
    .btn {
        width: auto;
        min-width: 8rem;
    }
}

/* Form Controls Mobile-First */
.form-control, .form-select {
    min-height: 2.75rem; /* 44px touch target */
    font-size: clamp(1rem, 3vw, 1rem);
    padding: clamp(0.75rem, 3vw, 1rem);
    border-radius: clamp(0.5rem, 2vw, 0.75rem);
}

/* Card Components Mobile-First with Soft Pastels */
.card {
    width: 100%;
    margin-bottom: clamp(1rem, 4vw, 2rem);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Service Cards with Pastel Backgrounds */
.service-card {
    background: linear-gradient(135deg, var(--cream-main), rgba(255, 255, 255, 0.9));
    border-radius: var(--border-radius);
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 205, 178, 0.3);
}

.service-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 205, 178, 0.2);
}

.card-body {
    padding: clamp(1rem, 4vw, 2rem);
}

/* Navigation Mobile-First */
.navbar {
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem);
}

.navbar-brand {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
}

.nav-link {
    font-size: clamp(1rem, 3vw, 1rem);
    padding: 0.75rem 1rem;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
}

/* Grid System Mobile-First */
.row {
    margin: 0;
    width: 100%;
}

.col, [class*="col-"] {
    padding: 0 clamp(0.5rem, 2vw, 1rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

/* Image Responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Section Spacing Mobile-First */
section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

/* Modal Mobile-First */
.modal-dialog {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
}

.modal-content {
    border-radius: clamp(1rem, 3vw, 1.5rem);
}

.modal-body {
    padding: clamp(1rem, 4vw, 2rem);
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/* Zoom Safety - Prevent Layout Breaks */
@supports (zoom: 50%) {
    body {
        min-width: 320px; /* Minimum supported width */
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn, .card, .form-control {
        border-width: 0.5px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover, .card:hover {
        transform: none;
    }
    
    /* Add touch feedback */
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .card:active {
        transform: scale(0.99);
        transition: transform 0.1s ease;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Indicators for Keyboard Navigation */
.btn:focus, .form-control:focus, .nav-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Large Text Support */
@media (min-resolution: 120dpi) {
    body {
        text-rendering: optimizeReadability;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape Mobile Adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .btn, .nav, .navbar, .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}