/* Responsive Styles for 01bits OÜ Website */

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .service-card {
        min-height: 320px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .service-card {
        min-height: 280px;
        margin-bottom: 2rem;
    }
    
    .contact-form-wrapper {
        margin-top: 2rem;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        margin-bottom: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-item i {
        margin-bottom: 0.5rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .hero {
        height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .section-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        text-align: center;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-detail-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-item i {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .contact-form-wrapper {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .legal-document {
        padding: 2rem 1rem;
    }
    
    .legal-document h2 {
        font-size: 1.5rem;
    }
    
    .legal-document h3 {
        font-size: 1.3rem;
    }
    
    .cookie-consent {
        padding: 1rem 0.5rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .value-card {
        margin-bottom: 1.5rem;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .hours-table {
        font-size: 0.9rem;
    }
    
    .hours-row {
        padding: 0.75rem 1rem;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
    
    .company-details {
        padding: 1.5rem;
    }
    
    .mission-card,
    .vision-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .business-hours .col-lg-6 {
        padding: 0 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Landscape orientation adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .page-header {
        padding: 5rem 0 2rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

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

/* Print styles for mobile */
@media print {
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .service-card {
        break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    
    .legal-document {
        padding: 1rem !important;
    }
    
    .contact-item {
        margin-bottom: 1rem !important;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background-color: var(--white);
        color: var(--dark-color) !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-color: #2d2d2d;
        --dark-color: #ffffff;
        --secondary-color: #b0b0b0;
    }
    
    body {
        background-color: var(--white);
        color: var(--dark-color);
    }
    
    .service-card,
    .contact-form-wrapper,
    .legal-document {
        background-color: var(--light-color);
        border: 1px solid #404040;
    }
    
    .form-control,
    .form-select {
        background-color: var(--light-color);
        border-color: #404040;
        color: var(--dark-color);
    }
    
    .accordion-button {
        background-color: var(--light-color);
        color: var(--dark-color);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem !important;
    }
    
    .cookie-buttons .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .value-card:hover {
        transform: none;
    }
}

/* Focus visible for better accessibility */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus-visible,
    .form-control:focus-visible,
    .form-select:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Specific breakpoint adjustments */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .service-card {
        min-height: 300px;
    }
    
    .contact-form-wrapper {
        margin-top: 0;
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .contact-form-wrapper {
        padding: 1rem;
    }
    
    .legal-document {
        padding: 1rem;
    }
    
    .cookie-consent {
        padding: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Tablet landscape specific */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .service-card {
        min-height: 250px;
    }
    
    .contact-item {
        flex-direction: row;
        align-items: center;
    }
}

/* iPhone specific optimizations */
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
    .hero {
        height: 100vh;
        padding-top: env(safe-area-inset-top);
    }
    
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .cookie-consent {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
