/* ============================================
   Comprehensive Responsive Stylesheet
   Makes entire website mobile-responsive
   Works with minimal code changes
   ============================================ */

/* Mobile First Approach - Base styles apply to all screens */
/* Breakpoints: Mobile (< 576px), Tablet (576px - 992px), Desktop (> 992px) */

/* ============================================
   GLOBAL RESPONSIVE UTILITIES
   ============================================ */

/* Make images responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Make all videos and iframes responsive */
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

/* Ensure tables are scrollable on mobile */
table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   NAVIGATION RESPONSIVE STYLES
   ============================================ */

@media (max-width: 991px) {
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .logo-img {
        height: 45px;
        max-width: 200px;
    }
    
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: var(--spacing-xs) var(--spacing-xs);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .logo-img {
        height: 40px;
        max-width: 180px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: var(--darker-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-md) 0;
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--glass-border);
        gap: 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
        width: 100%;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .btn-appointment {
        margin: var(--spacing-sm) auto;
        width: calc(100% - var(--spacing-md));
        text-align: center;
        display: block;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 35px;
        max-width: 150px;
    }
    
    .nav-toggle span {
        width: 22px;
        height: 2px;
    }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

@media (max-width: 768px) {
    .main-content {
        margin-top: 60px;
        min-height: calc(100vh - 60px);
    }
}

/* ============================================
   CONTAINER & SPACING
   ============================================ */

@media (max-width: 1200px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ============================================
   TYPOGRAPHY & SECTIONS
   ============================================ */

@media (max-width: 1200px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
        line-height: 1.3;
        padding: 0 var(--spacing-sm);
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 var(--spacing-sm);
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

@media (max-width: 768px) {
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .btn-secondary {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }
    
    .btn-secondary {
        font-size: 0.85rem;
    }
}

/* ============================================
   GRID LAYOUTS - AUTO RESPONSIVE
   ============================================ */

/* Services Grid */
.services-grid,
.features-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

@media (max-width: 768px) {
    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .services-grid,
    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* ============================================
   CARDS
   ============================================ */

@media (max-width: 768px) {
    .service-card,
    .feature-item,
    .stat-item,
    .glass-card {
        padding: var(--spacing-sm);
    }
    
    .service-icon,
    .feature-icon {
        font-size: 2rem;
    }
    
    .service-title,
    .feature-title {
        font-size: 1.2rem;
    }
    
    .service-description,
    .feature-text {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .service-card,
    .feature-item,
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .service-icon,
    .feature-icon {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-content {
        padding: var(--spacing-sm);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-indicators {
        bottom: 30px;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 400px;
        padding: var(--spacing-md) 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-nav {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ============================================
   APPROACH TIMELINE
   ============================================ */

@media (max-width: 992px) {
    .approach-timeline::before {
        left: 30px;
    }
    
    .approach-step {
        margin-left: 60px !important;
        margin-right: 0 !important;
        max-width: calc(100% - 60px);
    }
    
    .step-number {
        left: -45px;
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .approach-timeline {
        padding-left: var(--spacing-sm);
    }
    
    .approach-step {
        padding: var(--spacing-md);
        margin-left: 50px !important;
        max-width: calc(100% - 50px);
    }
    
    .step-number {
        font-size: 1.5rem;
        left: -40px;
        top: 10px;
    }
    
    .step-icon {
        font-size: 2rem;
    }
    
    .step-title {
        font-size: 1.2rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .approach-cta {
        padding: var(--spacing-md);
    }
    
    .approach-cta-title {
        font-size: 1.3rem;
    }
    
    .approach-cta-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .approach-step {
        padding: var(--spacing-sm);
        margin-left: 40px !important;
        max-width: calc(100% - 40px);
    }
    
    .step-number {
        font-size: 1.2rem;
        left: -30px;
    }
}

/* ============================================
   FOOTER
   ============================================ */

@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .footer {
        padding: var(--spacing-md) 0 var(--spacing-sm);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-title {
        font-size: 1.3rem;
    }
    
    .footer-subtitle {
        font-size: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-title {
        font-size: 1.1rem;
    }
    
    .footer-subtitle {
        font-size: 0.9rem;
    }
}

/* ============================================
   FLOATING ELEMENTS (Email, AI Chat)
   ============================================ */

@media (max-width: 768px) {
    .email-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    .ai-chat-container {
        bottom: 80px;
        right: 20px;
    }
    
    .ai-chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .ai-chat-window {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: 450px;
        right: -10px;
        bottom: 70px;
    }
    
    .ai-chat-header {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .ai-chat-header h4 {
        font-size: 1rem;
    }
    
    .ai-chat-messages {
        padding: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .email-float {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
    
    .ai-chat-container {
        bottom: 70px;
        right: 15px;
    }
    
    .ai-chat-toggle {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .ai-chat-window {
        width: calc(100vw - 30px);
        height: 400px;
        right: -7px;
    }
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

@media (max-width: 768px) {
    .flash-messages {
        top: 70px;
        right: var(--spacing-xs);
        left: var(--spacing-xs);
        width: auto;
    }
    
    .flash-message {
        min-width: auto;
        width: 100%;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
}

/* ============================================
   FORMS
   ============================================ */

@media (max-width: 768px) {
    form {
        width: 100%;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        width: 100%;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 1rem;
    }
    
    textarea {
        min-height: 120px;
    }
    
    .form-group,
    .form-row {
        margin-bottom: var(--spacing-sm);
    }
    
    .form-row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .form-row > * {
        width: 100% !important;
    }
}

/* ============================================
   PORTFOLIO & GALLERY
   ============================================ */

@media (max-width: 992px) {
    .portfolio-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item,
    .gallery-item {
        width: 100%;
    }
}

/* ============================================
   TESTIMONIALS
   ============================================ */

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: var(--spacing-sm);
    }
}

/* ============================================
   CTA SECTIONS
   ============================================ */

@media (max-width: 768px) {
    .cta-content {
        padding: var(--spacing-md);
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-text {
        font-size: 0.9rem;
    }
}

/* ============================================
   UTILITY CLASSES - RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .text-center {
        text-align: center !important;
    }
    
    .mt-1 { margin-top: var(--spacing-xs); }
    .mt-2 { margin-top: var(--spacing-sm); }
    .mt-3 { margin-top: var(--spacing-md); }
    .mb-1 { margin-bottom: var(--spacing-xs); }
    .mb-2 { margin-bottom: var(--spacing-sm); }
    .mb-3 { margin-bottom: var(--spacing-md); }
}

/* ============================================
   TABLET SPECIFIC ADJUSTMENTS (768px - 992px)
   ============================================ */

@media (min-width: 769px) and (max-width: 992px) {
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LANDSCAPE MOBILE ORIENTATION
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-md) 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section {
        padding: var(--spacing-sm) 0;
    }
}

/* ============================================
   VERY SMALL DEVICES (< 360px)
   ============================================ */

@media (max-width: 360px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: var(--spacing-xs);
    }
}

/* ============================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Optimize rendering performance */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Reduce backdrop filters on mobile */
    .glass-nav,
    .glass-footer,
    .glass-card {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    /* Optimize transitions */
    .btn,
    .nav-link,
    .social-link {
        transition: transform 0.2s ease, background-color 0.2s ease;
    }
    
    /* Improve touch scrolling */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
        max-width: 100%;
        height: auto;
    }
    
    /* Reduce box shadows on mobile */
    .btn {
        box-shadow: 0 2px 10px rgba(0, 240, 255, 0.4);
    }
    
    .btn:hover {
        box-shadow: 0 4px 15px rgba(0, 240, 255, 0.6);
    }
}

/* ============================================
   MOBILE CONTENT ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Better spacing for mobile */
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .section-title {
        margin-bottom: var(--spacing-md);
    }
    
    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* Better form inputs */
    input,
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    /* Optimize cards */
    .service-card,
    .feature-item,
    .stat-item {
        margin-bottom: var(--spacing-sm);
    }
}

/* ============================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-md) 0;
    }
    
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .main-content {
        margin-top: 50px;
    }
}

/* ============================================
   PRINT STYLES (Optional)
   ============================================ */

@media print {
    .navbar,
    .footer,
    .email-float,
    .ai-chat-container,
    .hero-nav,
    .hero-indicators,
    .scroll-indicator {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
}

