/* 
 * Responsive CSS for public-facing pages
 * This file contains responsive design styles for tablet and mobile devices
 * It excludes admin panel pages
 */

/* Common responsive adjustments */
@media (max-width: 1200px) {
    .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Adjust section padding */
    .section {
        padding: 70px 0;
    }
    
    /* Adjust heading sizes */
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    /* Hero slider adjustments */
    .hero-slider, .slide {
        height: 550px;
    }
    
    .slide-title {
        font-size: 2.8rem;
    }
}

/* Tablet devices (landscape) */
@media (max-width: 992px) {
    /* Header adjustments */
    .page-header {
        padding: 80px 0;
    }
    
    .page-title h1 {
        font-size: 2.3rem;
    }
    
    /* Hero slider adjustments */
    .hero-slider, .slide {
        height: 500px;
    }
    
    .slide-title {
        font-size: 2.3rem;
    }
    
    .slide-text {
        font-size: 1.1rem;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        left: 40px;
    }
    
    .timeline-badge {
        left: 40px;
        margin-left: 0;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        float: right;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before {
        right: auto;
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
    
    /* Service boxes */
    .service-box {
        height: calc(100% - 30px);
    }
    
    /* Team section */
    .team-member {
        margin-bottom: 40px;
    }
    
    /* Contact page */
    .contact-info {
        margin-bottom: 30px;
    }
    
    .map-container {
        height: 350px;
    }
    
    /* Office cards */
    .office-card {
        height: calc(100% - 30px);
    }
}

/* Tablet devices (portrait) */
@media (max-width: 768px) {
    /* Header adjustments */
    .top-bar {
        /* Instead of hiding, adjust for mobile */
        padding: 8px 0;
        font-size: 0.85rem;
    }
    
    /* Create alternative for top bar on mobile */
    .mobile-contact-bar {
        display: flex;
        justify-content: center;
        padding: 10px 0;
        background-color: var(--primary-color);
        color: white;
    }
    
    .mobile-contact-bar a {
        color: var(--background-color);
        margin: 0 10px;
        font-size: 1rem;
    }
    
    /* Navbar adjustments */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand img {
        height: 45px;
    }
    
    /* Header padding */
    .page-header {
        padding: 60px 0;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    /* Section adjustments */
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    /* Hero slider adjustments */
    .hero-slider, .slide {
        height: 450px;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    /* About page adjustments */
    .mission-vision {
        padding: 25px;
    }
    
    .contact-info, .contact-form {
        padding: 25px;
    }
    
    /* Map container */
    .map-container {
        height: 300px;
    }
    
    /* Office cards */
    .office-card {
        padding: 25px;
    }
    
    /* Footer adjustments */
    footer {
        padding: 50px 0 0;
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}

/* Mobile devices (landscape) */
@media (max-width: 576px) {
    /* Header adjustments */
    .page-title h1 {
        font-size: 1.8rem;
    }
    
    /* Hero slider adjustments */
    .hero-slider, .slide {
        height: 400px;
    }
    
    .slide-title {
        font-size: 1.7rem;
        margin-bottom: 10px;
    }
    
    .slide-text {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    /* Section adjustments */
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
        padding-bottom: 15px;
    }
    
    /* Contact info adjustments */
    .contact-info-item {
        flex-direction: column;
    }
    
    .contact-info-icon {
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    /* Map container */
    .map-container {
        height: 250px;
    }
    
    /* Form adjustments */
    .contact-form {
        padding: 20px 15px;
    }
    
    .form-title, .contact-info-title, .office-card-title {
        font-size: 1.3rem;
    }
    
    /* Office cards */
    .office-card {
        padding: 20px 15px;
    }
    
    /* Department cards */
    .department-card {
        padding: 20px 15px;
    }
    
    /* CTA Section */
    .cta-title {
        font-size: 1.7rem;
    }
    
    .cta-text {
        font-size: 1rem;
    }
}

/* Mobile devices (portrait) */
@media (max-width: 480px) {
    /* Top bar */
    .top-bar {
        text-align: center;
    }
    
    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 5px;
    }
    
    /* Navbar brand */
    .navbar-brand img {
        height: 40px;
    }
    
    /* Hero slider */
    .hero-slider, .slide {
        height: 350px;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    /* Section adjustments */
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    /* Service box */
    .service-box {
        padding: 20px 15px;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    /* Counter box */
    .counter-box {
        padding: 20px 15px;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    /* Contact form */
    .form-control {
        padding: 10px;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    /* Footer adjustments */
    .footer-social a {
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
    
    /* Ensure form inputs are touch-friendly */
    input, select, textarea, button {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
}

/* Fix for specific elements */

/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix iframe responsiveness */
iframe {
    max-width: 100%;
    border: 0;
}

/* Ensure buttons are touch-friendly on mobile */
button, .btn, .submit-btn, [type="button"], [type="submit"] {
    min-height: 44px;
}

/* Fix for tables on mobile */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

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

/* Add zebra-striping to make tables more readable on small screens */
@media (max-width: 768px) {
    table tr:nth-child(even) {
        background-color: rgba(0,0,0,0.05);
    }
}

/* Improve touch targets for navigation */
@media (max-width: 768px) {
    .navbar .nav-link {
        padding: 10px 15px;
    }
    
    .footer-links li {
        padding: 8px 0;
    }
    
    .footer-links a {
        display: block;
    }
}

/* Make the collapsed navbar full width on mobile */
@media (max-width: 576px) {
    .navbar-collapse {
        background-color: var(--background-color);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 10px;
        margin: 0 -15px;
    }
}

/* Fix for timeline on mobile */
@media (max-width: 576px) {
    .timeline-content {
        padding: 20px 15px;
    }
}

/* Fix for team members on mobile */
@media (max-width: 576px) {
    .team-member {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Fix for contact info alignment on mobile */
@media (max-width: 576px) {
    .contact-info-content {
        text-align: center;
    }
    
    .contact-info-icon {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Fix for social links on mobile */
@media (max-width: 576px) {
    .social-links {
        justify-content: center;
    }
}