/* Global Responsive Styles */

/* Base responsive adjustments for all pages */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Reduce padding on smaller screens */
    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .pt-32 {
        padding-top: 6rem;
    }
    
    /* Text size adjustments */
    h1.text-4xl, .text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    h2.text-3xl, .text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    p.text-lg, .text-lg {
        font-size: 1rem;
        line-height: 1.5rem;
    }
    
    /* Card adjustments */
    .card, .service-card {
        margin-bottom: 1.5rem;
    }
    
    .card:hover, .service-card:hover {
        transform: translateY(-5px) !important;
    }
    
    /* Adjust animation effects */
    .service-card:hover, .bento-item:hover, .card-hover:hover {
        transform: translateY(-5px) !important;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    h3.text-2xl, .text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .p-6 {
        padding: 1.25rem;
    }
    
    .mb-12 {
        margin-bottom: 2rem;
    }
    
    .mb-6 {
        margin-bottom: 1rem;
    }
    
    /* Reduce spacing */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Better button sizing */
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-3 {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Reduce gaps in flexbox and grid layouts */
    .gap-6, .gap-8 {
        gap: 1rem;
    }
    
    /* Badge adjustments */
    .badge-pulse {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Tiny screens */
@media (max-width: 390px) {
    .gap-4 {
        gap: 0.75rem;
    }
    
    h2.text-3xl, .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    /* Reduce all font sizes slightly */
    body {
        font-size: 0.9375rem;
    }
    
    /* Adjust buttons for very small screens */
    .inline-flex {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Flex adjustments for tiny screens */
    .flex-col-xs {
        flex-direction: column;
    }
    
    .items-center-xs {
        align-items: center;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1023px) {
    /* Adjust grid layouts for tablets */
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    /* Better spacing on tablets */
    .p-6.md\:p-8 {
        padding: 1.5rem;
    }
    
    /* Timeline adjustments for tablets */
    .timeline-item {
        padding-left: 2.5rem;
    }
}

/* Improved form controls responsiveness */
@media (max-width: 640px) {
    input, textarea, select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Better button touch targets */
    button, .button, a.button, .btn, a.btn {
        min-height: 44px;
    }
    
    /* Form layout adjustments */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Fix input padding */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    textarea {
        padding: 0.75rem;
    }
}

/* Enhanced focus for accessibility */
@media (max-width: 640px) {
    a:focus, button:focus, input:focus, textarea:focus, select:focus {
        outline: 2px solid rgba(139, 92, 246, 0.5) !important;
    }
}

/* Hero section and CTA improvements */
@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* CTA section improvements */
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-section h2 {
        font-size: 1.75rem;
    }
    
    /* Button layout for mobile */
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Navigation menu adjustments */
@media (max-width: 640px) {
    .nav-link {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Logo sizing */
    .logo-img {
        height: 2rem;
        width: auto;
    }
}

/* Fix overflow issues */
@media (max-width: 640px) {
    .overflow-hidden-mobile {
        overflow: hidden;
    }
    
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* Better image handling */
@media (max-width: 640px) {
    img.responsive {
        max-width: 100%;
        height: auto;
    }
    
    .object-cover img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

/* Footer adjustments */
@media (max-width: 640px) {
    footer {
        text-align: center;
    }
    
    footer .flex {
        flex-direction: column;
    }
    
    footer .space-x-4 {
        margin-top: 1rem;
    }
    
    footer .text-right {
        text-align: center;
    }
}

/* Project/blog card responsive adjustments */
@media (max-width: 640px) {
    .project-card, .blog-card {
        flex-direction: column;
    }
    
    .project-card img, .blog-card img {
        width: 100%;
        height: auto;
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    .project-content, .blog-content {
        padding: 1rem;
    }
    
    .project-tags, .blog-tags {
        flex-wrap: wrap;
    }
    
    .project-tag, .blog-tag {
        margin-bottom: 0.5rem;
    }
}

/* Contact form field fixes for all devices to prevent overlapping */
/* Fix form field icon padding to prevent overlapping text */
.form-input[placeholder],
input.form-input[placeholder] {
    padding-left: 2.5rem !important;
}

/* Adjust placeholder text to prevent overlap */
input::placeholder,
textarea::placeholder {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Ensure icons in form fields don't overlap with text */
.relative .absolute.inset-y-0.left-0.pl-3 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
} 