/* ========================================
   Responsive Styles
   Tablet and Mobile Breakpoints
   ======================================== */

/* ========================================
   Large Desktop (1400px and above)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   Desktop (1200px - 1399px)
   ======================================== */
@media (max-width: 1399px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: var(--spacing-lg);
    }
}

/* ========================================
   Small Desktop (992px - 1199px)
   ======================================== */
@media (max-width: 1199px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 4rem;
    }
    
    .nav-list {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .hero-content {
        padding: var(--spacing-md);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-image {
        order: -1;
    }
    
    .about-features {
        grid-template-columns: 1fr 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-app-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .mobile-app-image {
        order: -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
    }
}

/* ========================================
   Tablet Portrait (768px - 991px)
   ======================================== */
@media (max-width: 991px) {
    :root {
        --spacing-sm: 0.8rem;
        --spacing-md: 1.2rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    /* Navigation */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(10, 22, 40, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition-smooth);
        box-shadow: var(--shadow-dark);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: var(--spacing-sm);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    /* About */
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: var(--spacing-sm);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .service-card {
        padding: var(--spacing-md);
    }
    
    /* Mobile App */
    .app-features {
        gap: var(--spacing-sm);
    }
    
    .app-feature {
        padding: var(--spacing-sm);
    }
    
    .app-stores {
        flex-direction: column;
        align-items: stretch;
    }
    
    .store-badge {
        justify-content: center;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-avatar {
        width: 120px;
        height: 120px;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card {
        margin-bottom: var(--spacing-md);
    }
    
    /* Contact */
    .contact-info,
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Page Header */
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Legal Content */
    .legal-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.2rem;
    }
}

/* ========================================
   Mobile Landscape (600px - 767px)
   ======================================== */
@media (max-width: 767px) {
    :root {
        --spacing-xs: 0.4rem;
        --spacing-sm: 0.6rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Logo */
    .logo svg {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-member {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Contact Form */
    .form-group {
        margin-bottom: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-logo span {
        font-size: 1.2rem;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ========================================
   Mobile Portrait (320px - 599px)
   ======================================== */
@media (max-width: 599px) {
    :root {
        --spacing-xs: 0.3rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 0.8rem;
        --spacing-lg: 1.2rem;
        --spacing-xl: 2rem;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-title {
        margin-bottom: var(--spacing-md);
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title h2::after {
        width: 60px;
        height: 2px;
    }
    
    .section-title p {
        font-size: 0.9rem;
        margin-top: var(--spacing-sm);
    }
    
    /* About */
    .about-image {
        border-radius: 15px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto;
    }
    
    /* Services */
    .service-card {
        padding: var(--spacing-sm);
        border-radius: 15px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Mobile App */
    .app-feature {
        flex-direction: column;
        text-align: center;
    }
    
    .app-feature-icon {
        margin: 0 auto;
    }
    
    .store-badge {
        padding: 0.8rem 1.5rem;
    }
    
    .store-badge svg {
        width: 30px;
        height: 30px;
    }
    
    .store-badge-text p {
        font-size: 0.9rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Team */
    .team-avatar {
        width: 100px;
        height: 100px;
    }
    
    .team-avatar svg {
        width: 50px;
        height: 50px;
    }
    
    /* News */
    .news-image {
        height: 150px;
    }
    
    .news-content {
        padding: var(--spacing-sm);
    }
    
    .news-card h3 {
        font-size: 1rem;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-logo svg {
        width: 40px;
        height: 40px;
    }
    
    .footer-logo span {
        font-size: 1rem;
    }
    
    .footer-brand p {
        font-size: 0.85rem;
    }
    
    .footer-column h4 {
        font-size: 1rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    /* Legal Content */
    .legal-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .legal-section {
        margin-bottom: var(--spacing-lg);
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
        margin-top: var(--spacing-md);
    }
    
    .legal-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .legal-section ul {
        padding-left: var(--spacing-md);
    }
    
    .legal-section ul li {
        font-size: 0.9rem;
    }
}

/* ========================================
   Small Mobile (320px and below)
   ======================================== */
@media (max-width: 374px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .team-avatar {
        width: 80px;
        height: 80px;
    }
    
    .team-avatar svg {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .footer,
    .hero-buttons,
    .contact-form,
    .social-link,
    .menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* ========================================
   Accessibility - Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-animate,
    .scroll-animate-left,
    .scroll-animate-right,
    .scroll-animate-scale {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-dark: #000000;
        --primary-blue: #003366;
        --accent-gold: #ffd700;
        --text-light: #ffffff;
        --text-muted: #cccccc;
    }
    
    .service-card,
    .team-member,
    .news-card,
    .feature-item {
        border: 2px solid var(--accent-gold);
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}
