/* Responsive Fixes for Index.php */

/* Base responsive setup */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Container fixes */
.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Hero section responsive */
.hero {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Mobile-friendly viewport height */
}

.hero-content {
    max-width: 100%;
    padding: 1rem;
}

/* Services grid responsive */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* About section responsive */
.about-preview .container {
    padding: 0 15px;
    max-width: 100%;
}

.about-preview .row {
    margin-left: 0;
    margin-right: 0;
}

.about-preview .col-lg-6 {
    padding-left: 15px;
    padding-right: 15px;
}

/* Contact section - fix horizontal scrolling */
.contact-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    justify-content: center !important;
    padding: 0 1rem;
    max-width: 100%;
}

.contact-section {
    flex: 1 1 300px !important;
    min-width: 280px;
    max-width: 100% !important;
}

/* Schedule form responsive */
.schedule-form {
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

.schedule-form .row {
    margin-left: 0;
    margin-right: 0;
}

.schedule-form .col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
}

/* Form elements */
.form-group input,
.form-group textarea,
.form-textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.form-textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

/* Testimonials responsive */
.testimonials {
    padding: 2rem 1rem;
    max-width: 100%;
    overflow: hidden;
}

.testimonials_container {
    max-width: 100%;
    padding: 0 1rem;
}

.testimonials_content {
    max-width: 100%;
    padding: 1rem;
}

.testimonials_text {
    padding: 2rem 1rem !important;
    max-width: 100%;
}

/* Footer responsive */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    max-width: 100%;
}

.footer-bottom-content {
    padding: 0 1rem;
    max-width: 100%;
}

/* Button fixes */
.cta-button,
.login-button {
    max-width: 100%;
    word-wrap: break-word;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.2;
}

.cta-button {
    background-color: var(--secondary-color, #3498db);
    color: white;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-color, #2c3e50);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Mobile-specific fixes */
@media screen and (max-width: 768px) {
    /* Override any fixed widths */
    * {
        max-width: 100% !important;
    }
    
    /* Services grid on mobile */
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    /* Contact section mobile */
    .contact-container {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .contact-section {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* About section mobile */
    .about-preview .row {
        flex-direction: column;
    }
    
    .about-preview .col-lg-6 {
        width: 100%;
        max-width: 100%;
    }
    
    /* Form mobile */
    .schedule-form .row {
        flex-direction: column;
    }
    
    .schedule-form .col-md-6 {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Testimonials mobile */
    .testimonials_container {
        flex-direction: column;
        padding: 0;
    }
    
    .testimonials_container_left,
    .testimonials_container_right {
        display: none; /* Hide navigation buttons on mobile */
    }
    
    .testimonials_container_center {
        width: 100%;
        padding: 0 1rem;
    }
    
    .testimonials_content {
        margin: 1rem 0;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Hero mobile */
    .hero h1 {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .hero-content {
        padding: 1rem;
        max-width: 100%;
    }
    
    /* Button mobile improvements */
    .cta-button,
    .login-button {
        min-height: 44px; /* Touch-friendly height */
        padding: 12px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: auto;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hero .cta-button {
        display: block;
        margin: 2rem auto 0;
        width: fit-content;
        max-width: 90%;
    }
}

/* Tablet responsive */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        flex-wrap: wrap !important;
    }
    
    .contact-section {
        flex: 1 1 45% !important;
        min-width: 300px;
    }
}

/* Ensure no element exceeds viewport width */
img, video, iframe, object, embed {
    max-width: 100%;
    height: auto;
}

/* Fix any potential overflow issues */
section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Additional mobile fixes for very small screens */
@media screen and (max-width: 480px) {
    /* Extra small mobile screens */
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
    }
    
    .services-grid {
        padding: 0 0.5rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .testimonials_text {
        padding: 1.5rem 0.5rem !important;
        font-size: 14px;
    }
    
    .footer-content {
        padding: 0 0.5rem;
    }
    
    .contact-container {
        padding: 0 0.5rem;
    }
    
    .schedule-form {
        padding: 0.5rem;
    }
}

/* Fix for landscape mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .hero p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem;
    }
} 