/* ========================================
   Responsive Design for ClinicPro Website
   ======================================== */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
    .hero-container {
        gap: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .dashboard-preview {
        transform: perspective(800px) rotateY(-3deg) rotateX(3deg);
    }
    
    .preview-content {
        height: 350px;
    }
    
    .preview-sidebar {
        width: 180px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .benefits-content {
        gap: var(--spacing-2xl);
    }
    
    .stat-circle {
        width: 130px;
        height: 130px;
    }
    
    .stat-circle .stat-number {
        font-size: 1.75rem;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-xl) 0;
        gap: var(--spacing-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        justify-content: center;
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Dashboard Preview */
    .dashboard-preview {
        transform: none;
        max-width: 100%;
    }
    
    .dashboard-preview:hover {
        transform: none;
    }
    
    .preview-content {
        flex-direction: column;
        height: auto;
    }
    
    .preview-sidebar {
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .sidebar-item {
        justify-content: center;
        padding: var(--spacing-sm);
    }
    
    .preview-main {
        padding: var(--spacing-md);
    }
    
    .preview-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Sections */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .feature-card {
        padding: var(--spacing-xl);
    }
    
    /* Benefits */
    .benefits-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .benefit-icon {
        align-self: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        justify-items: center;
    }
    
    .stat-circle {
        width: 120px;
        height: 120px;
    }
    
    .stat-circle .stat-number {
        font-size: 1.5rem;
    }
    
    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: var(--spacing-xl);
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--spacing-md);
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .stat {
        padding: var(--spacing-md);
        background: var(--bg-primary);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Dashboard Preview */
    .preview-header {
        padding: var(--spacing-sm);
    }
    
    .preview-title {
        font-size: 0.875rem;
    }
    
    .preview-dots span {
        width: 8px;
        height: 8px;
    }
    
    .sidebar-item {
        font-size: 0.875rem;
        padding: var(--spacing-sm);
    }
    
    .sidebar-item i {
        font-size: 0.875rem;
    }
    
    .preview-card {
        padding: var(--spacing-md);
    }
    
    .card-icon {
        width: 36px;
        height: 36px;
    }
    
    .card-number {
        font-size: 1.25rem;
    }
    
    .card-label {
        font-size: 0.75rem;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: var(--spacing-lg) var(--spacing-xl);
        font-size: 1rem;
    }
    
    /* Features */
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
    }
    
    /* Benefits */
    .benefit-item {
        padding: var(--spacing-lg);
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
    }
    
    .benefit-icon {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }
    
    .benefit-content h3 {
        font-size: 1.125rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stat-circle {
        width: 100px;
        height: 100px;
    }
    
    .stat-circle .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-circle .stat-label {
        font-size: 0.75rem;
    }
    
    /* Pricing */
    .pricing-toggle {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .pricing-card {
        padding: var(--spacing-xl);
    }
    
    .price {
        font-size: 2.5rem;
    }
    
    .pricing-features {
        font-size: 0.875rem;
    }
    
    /* Footer */
    .footer-logo {
        font-size: 1.25rem;
    }
    
    .footer-logo i {
        font-size: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
    }
    
    /* Modal */
    .modal-content {
        margin: 5% auto;
        padding: var(--spacing-lg);
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-sm);
        font-size: 0.875rem;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 320px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.75rem;
    }
    
    .btn-large {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .feature-card,
    .pricing-card {
        padding: var(--spacing-md);
    }
    
    .price {
        font-size: 2rem;
    }
    
    .stat-circle {
        width: 80px;
        height: 80px;
    }
    
    .stat-circle .stat-number {
        font-size: 1rem;
    }
    
    .stat-circle .stat-label {
        font-size: 0.625rem;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .navbar,
    .hamburger,
    .hero-buttons,
    .cta-buttons,
    .social-links,
    .modal {
        display: none !important;
    }
    
    .hero {
        padding: 20pt 0;
    }
    
    .section-header,
    .feature-card,
    .benefit-item,
    .pricing-card {
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .hero-container,
    .benefits-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-preview {
        transform: none;
        border: 1px solid #ccc;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .dashboard-preview {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .dashboard-preview {
        transform: none !important;
    }
    
    .dashboard-preview:hover {
        transform: none !important;
    }
    
    .feature-card:hover,
    .pricing-card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-light: #374151;
        --bg-dark: #030712;
    }
    
    .navbar {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .hero {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .preview-header {
        background: var(--bg-secondary);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .preview-sidebar {
        background: var(--bg-dark);
        border-right-color: rgba(255, 255, 255, 0.1);
    }
    
    .preview-card,
    .preview-chart {
        background: var(--bg-secondary);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .feature-card,
    .pricing-card {
        background: var(--bg-secondary);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .modal-content {
        background: var(--bg-secondary);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: var(--bg-primary);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }
}

/* Accessibility Improvements */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #4338ca;
        --primary-dark: #3730a3;
        --text-primary: #000000;
        --text-secondary: #374151;
        --bg-primary: #ffffff;
        --bg-secondary: #f9fafb;
    }
    
    .btn-primary {
        background: #4338ca;
        border: 2px solid #4338ca;
    }
    
    .btn-outline,
    .btn-secondary {
        border-width: 2px;
    }
    
    .feature-card,
    .pricing-card {
        border-width: 2px;
        border-color: #d1d5db;
    }
    
    .nav-link:focus,
    .btn:focus {
        outline: 2px solid #4338ca;
        outline-offset: 2px;
    }
}

/* Animation Utilities for Responsive */
@media screen and (max-width: 768px) {
    .animate-fadeIn {
        animation: mobileSlideUp 0.4s ease-out;
    }
    
    @keyframes mobileSlideUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Focus Styles for Better Accessibility */
.nav-link:focus,
.btn:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--text-white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
} 