
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Responsive Typography */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Fluid Typography Scale */
.text-responsive {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
    line-height: 1.6;
}

.heading-responsive-xl {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
}

.heading-responsive-lg {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
}

.heading-responsive-md {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.4;
}

.heading-responsive-sm {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.4;
}

/* Container Responsive System */
.container-responsive {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 40px);
}

/* Responsive Grid System */
.grid-responsive {
    display: grid;
    gap: clamp(20px, 4vw, 60px);
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.grid-2-col {
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.grid-3-col {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.grid-4-col {
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

/* Flexible Layout Utilities */
.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(15px, 3vw, 30px);
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

.flex-column-mobile {
    flex-direction: row;
}

/* Responsive Spacing */
.padding-responsive {
    padding: clamp(20px, 5vw, 80px) clamp(15px, 3vw, 40px);
}

.margin-responsive {
    margin: clamp(20px, 5vw, 80px) auto;
}

.gap-responsive {
    gap: clamp(15px, 3vw, 40px);
}

/* Responsive Images */
.img-responsive {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.img-hero {
    width: 100%;
    height: clamp(200px, 50vh, 600px);
    object-fit: cover;
}

/* Responsive Navigation Utilities */
.nav-responsive {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2vw, 20px) clamp(15px, 3vw, 40px);
}

.nav-menu-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 30px);
    list-style: none;
}

/* Button Responsive Utilities */
.btn-responsive {
    padding: clamp(10px, 2vw, 16px) clamp(20px, 4vw, 32px);
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    border-radius: clamp(6px, 1vw, 12px);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-responsive:hover {
    transform: translateY(-2px);
}

/* Card Responsive Utilities */
.card-responsive {
    background: white;
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(20px, 4vw, 40px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card-responsive:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Form Responsive Utilities */
.form-responsive {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 3vw, 25px);
    width: 100%;
}

.input-responsive {
    padding: clamp(12px, 2.5vw, 16px);
    font-size: clamp(0.875rem, 2vw, 1rem);
    border-radius: clamp(6px, 1vw, 12px);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    width: 100%;
}

.input-responsive:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive Breakpoint Classes */

/* Extra Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .xs-hide { display: none !important; }
    .xs-show { display: block !important; }
    .xs-text-center { text-align: center !important; }
    .xs-full-width { width: 100% !important; }
    .xs-padding-sm { padding: 15px !important; }
    .xs-margin-sm { margin: 10px 0 !important; }
    
    .flex-column-mobile {
        flex-direction: column;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-menu-responsive {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
}

/* Mobile Phones (up to 767px) */
@media (max-width: 767px) {
    .sm-hide { display: none !important; }
    .sm-show { display: block !important; }
    .sm-text-center { text-align: center !important; }
    .sm-full-width { width: 100% !important; }
    .sm-padding-md { padding: 20px !important; }
    .sm-margin-md { margin: 15px 0 !important; }
    
    .container-responsive {
        padding: 0 15px;
    }
    
    .grid-2-col,
    .grid-3-col,
    .grid-4-col {
        grid-template-columns: 1fr;
    }
}

/* Tablets & Small Laptops (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
    .md-hide { display: none !important; }
    .md-show { display: block !important; }
    .md-text-center { text-align: center !important; }
    .md-half-width { width: 50% !important; }
    
    .grid-3-col,
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Laptops (993px - 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
    .lg-hide { display: none !important; }
    .lg-show { display: block !important; }
    .lg-text-left { text-align: left !important; }
    
    .container-responsive {
        max-width: 960px;
        padding: 0 30px;
    }
}

/* Large Laptops (1200px - 1500px) */
@media (min-width: 1200px) and (max-width: 1500px) {
    .xl-hide { display: none !important; }
    .xl-show { display: block !important; }
    
    .container-responsive {
        max-width: 1140px;
        padding: 0 35px;
    }
}

/* Desktop (1500px+) */
@media (min-width: 1500px) {
    .xxl-hide { display: none !important; }
    .xxl-show { display: block !important; }
    
    .container-responsive {
        max-width: 1400px;
        padding: 0 40px;
    }
}

/* Touch-friendly Interface Enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn-responsive,
    .card-responsive,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .input-responsive {
        min-height: 44px;
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .img-responsive {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .container-responsive { max-width: none !important; }
    .card-responsive { box-shadow: none !important; }
    a[href]:after { content: " (" attr(href) ")"; }
}

/* Accessibility Enhancements */
@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 */
@media (prefers-color-scheme: dark) {
    .card-responsive {
        background: #2d2d2d;
        color: #e9ecef;
        border: 1px solid #404040;
    }
    
    .input-responsive {
        background: #3d3d3d;
        border-color: #4d4d4d;
        color: #e9ecef;
    }
    
    .input-responsive:focus {
        border-color: #667eea;
        background: #4d4d4d;
    }
}

/* Utility Classes for Quick Responsive Adjustments */
.responsive-hide-mobile {
    display: block;
}

.responsive-show-mobile {
    display: none;
}

@media (max-width: 767px) {
    .responsive-hide-mobile {
        display: none !important;
    }
    
    .responsive-show-mobile {
        display: block !important;
    }
}

/* Responsive Text Alignment */
.text-center-mobile {
    text-align: left;
}

@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Responsive Margins and Padding */
.responsive-spacing {
    margin: clamp(20px, 4vw, 60px) 0;
    padding: clamp(15px, 3vw, 40px);
}

/* Enhanced Hover Effects for Desktop */
@media (hover: hover) and (pointer: fine) {
    .hover-lift:hover {
        transform: translateY(-3px);
        transition: transform 0.3s ease;
    }
    
    .hover-scale:hover {
        transform: scale(1.02);
        transition: transform 0.3s ease;
    }
    
    .hover-shadow:hover {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        transition: box-shadow 0.3s ease;
    }
}

/* Performance Optimizations */
.will-change {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive Navigation Helper */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: transparent;
}

.mobile-nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

@media (max-width: 767px) {
    .mobile-nav-toggle {
        display: flex;
    }
}

/* Focus Management for Accessibility */
.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;
}

.focus-visible:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}