/* Responsive Styles for Legal Connection Website */

/* Base responsive settings */
html {
    font-size: 16px;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Container adjustments */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Typography responsive adjustments */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

p,
li {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Button responsive adjustments */
.btn-primary,
.btn-secondary {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Header and Navigation responsive improvements */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1.5rem;
    }

    header {
        padding: 0.5rem 0;
    }

    #mobile-menu {
        max-height: 80vh;
        overflow-y: auto;
    }

    #mobile-menu a {
        padding: 0.75rem 0;
    }
}

/* Hero section responsive improvements */
.hero-section {
    min-height: 50vh;
}

.hero-content {
    padding-top: clamp(2rem, 10vh, 4rem);
    padding-bottom: clamp(2rem, 10vh, 4rem);
}

/* Hero background image responsive adjustments */
@media (max-width: 768px) {
    .hero-gradient-bg::before {
        background-size: cover;
        background-position: center center;
        opacity: 0.6;
    }
}

@media (max-width: 480px) {
    .hero-gradient-bg::before {
        background-size: cover;
        background-position: center;
        opacity: 0.55;
    }
}

/* Card grid responsive adjustments */
.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card p {
    flex-grow: 1;
}

/* Footer responsive improvements */
@media (max-width: 768px) {
    footer h3 {
        margin-top: 1.5rem;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* Service filter buttons responsive */
@media (max-width: 640px) {
    .service-filter-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
}

/* Blog cards responsive */
.blog-card-img {
    height: clamp(150px, 30vw, 200px);
}

/* Team cards responsive */
.team-img {
    height: clamp(200px, 40vw, 300px);
}

/* Form elements responsive */
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Testimonial responsive */
.testimonial-card {
    padding: clamp(1rem, 3vw, 2rem);
}

/* Utility classes for responsive spacing */
.responsive-mt {
    margin-top: clamp(1rem, 3vw, 2rem);
}

.responsive-mb {
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.responsive-py {
    padding-top: clamp(2rem, 5vw, 4rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

.responsive-px {
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

/* Fix for horizontal scrolling issues */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Additional responsive breakpoints */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-content p {
        font-size: clamp(0.875rem, 4vw, 1.25rem);
    }

    .py-32 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .py-12 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Tablet-specific adjustments */
@media (min-width: 481px) and (max-width: 1024px) {
    .py-32 {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Fix for mobile menu button */
#mobile-menu-button {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Fix for service cards on mobile */
@media (max-width: 640px) {
    .service-card {
        padding: 1.25rem !important;
    }

    .service-card h3 {
        font-size: 1.25rem;
    }

    .service-card svg {
        width: 3rem;
        height: 3rem;
    }
}

/* Fix for contact form on mobile */
@media (max-width: 640px) {

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        margin-bottom: 0.75rem;
    }
}

/* Google Map responsive styles */
.w-full.h-80.rounded-lg.overflow-hidden.shadow-md.relative {
    min-height: 300px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .w-full.h-80.rounded-lg.overflow-hidden.shadow-md.relative {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .w-full.h-80.rounded-lg.overflow-hidden.shadow-md.relative {
        min-height: 200px;
    }
}

/* Responsive table styles */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

@media (min-width: 768px) {
    table {
        display: table;
    }
}

/* Ensure proper spacing in grid layouts */
.grid {
    gap: clamp(1rem, 3vw, 2rem);
}