/* Responsive CSS for Raccoon Gang OÜ Website */

/* Large screens (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-xxl {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .display-4 {
        font-size: 3.5rem;
    }
    
    .display-5 {
        font-size: 3rem;
    }
    
    .service-card {
        padding: 2.5rem;
    }
    
    .legal-content {
        padding: 4rem;
    }
}

/* Medium screens (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 120px 0 80px;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .contact-info {
        padding: 1.5rem;
    }
    
    .legal-content {
        padding: 2rem;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Small screens (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 1rem 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .service-card {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-info {
        padding: 1.25rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .legal-content {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .cookie-consent .row {
        text-align: center;
    }
    
    .cookie-consent .col-lg-4 {
        margin-top: 1rem;
    }
}

/* Extra small screens (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        margin: 0;
    }
    
    .hero-section {
        padding: 0.5rem 0;
        text-align: center;
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-section .btn {
        width: 100%;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .page-header {
        padding: 80px 0 40px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header .lead {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .service-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
    
    .service-features {
        font-size: 0.9rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 35px;
        height: 35px;
    }
    
    .contact-item h5 {
        font-size: 1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .legal-content {
        padding: 1rem;
    }
    
    .legal-content h2 {
        font-size: 1.25rem;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
    }
    
    .legal-content p,
    .legal-content li {
        font-size: 0.9rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .process-step {
        padding: 1rem 0.5rem;
    }
    
    .tech-category {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .tech-category h5 {
        font-size: 1rem;
    }
    
    .tech-list li {
        font-size: 0.9rem;
    }
    
    .company-info {
        padding: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }
    
    .info-item strong {
        min-width: auto;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .info-item span {
        font-size: 0.85rem;
    }
    
    .cookie-consent {
        padding: 0.75rem 0;
    }
    
    .cookie-consent p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .cookie-consent .row {
        text-align: center;
    }
    
    .cookie-consent .btn {
        margin: 0.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    footer {
        padding: 2rem 0 !important;
    }
    
    footer h5 {
        font-size: 1rem;
    }
    
    footer p,
    footer li {
        font-size: 0.85rem;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 60px 0 30px;
    }
    
    .navbar-collapse {
        background: rgba(52, 58, 64, 0.95);
        padding: 1rem;
        border-radius: 0.375rem;
        margin-top: 0.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section,
    .page-header {
        background-attachment: scroll;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .tech-category {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .contact-info {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .legal-content {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .company-info {
        background-color: #2d3748;
        color: #e2e8f0;
    }
}

/* Focus styles for accessibility */
@media (any-hover: none) {
    .btn:focus,
    .form-control:focus,
    .form-select:focus,
    .nav-link:focus {
        outline: 3px solid #007bff;
        outline-offset: 2px;
    }
}

/* Touch device optimizations */
@media (any-hover: none) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cookie-consent .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
}

/* Print optimizations */
@media print {
    .hero-section,
    .page-header {
        background: none !important;
        color: #000 !important;
        padding: 1rem 0 !important;
    }
    
    .display-4,
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .btn,
    .cookie-consent,
    .navbar,
    footer {
        display: none !important;
    }
    
    .service-card,
    .contact-info,
    .legal-content {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    h1, h2, h3 {
        break-after: avoid;
    }
    
    .row {
        break-inside: avoid;
    }
}

/* Container responsive adjustments */
@media (max-width: 575px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Navigation responsive improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
}

/* Form responsive improvements */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn[type="submit"] {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Image responsive behavior */
@media (max-width: 767px) {
    .hero-section .col-lg-6:last-child,
    .services-section .col-lg-6:last-child {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .hero-section img,
    .services-section img {
        max-width: 100%;
        height: auto;
    }
}

/* Sticky elements responsive behavior */
@media (max-width: 767px) {
    .navbar {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }
    
    body {
        padding-top: 76px;
    }
}

/* Loading states for slow connections */
@media (max-width: 767px) {
    .loading-skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
    }
}

/* Optimizations for very small screens */
@media (max-width: 320px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .service-card {
        padding: 0.75rem;
    }
    
    .contact-info {
        padding: 0.75rem;
    }
    
    .legal-content {
        padding: 0.75rem;
    }
}
