/* ========================================
   RESPONSIVE CSS FOR MADE TO MOVE PT
   Add this file to override Blueprint's fixed widths
   ======================================== */

/* Mobile-First Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

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

/* Viewport meta tag is required in HTML - see instructions below */

/* ========================================
   CONTAINER WIDTHS - Override Blueprint
   ======================================== */

/* Make the main container fluid instead of fixed */
.container,
.showgrid {
    width: 95% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ========================================
   RESPONSIVE GRID SYSTEM
   Override Blueprint's fixed column widths
   ======================================== */

/* For tablets and larger (768px and up) - keep some structure */
@media screen and (min-width: 768px) {
    .container {
        width: 90% !important;
    }
}

/* For mobile devices (below 768px) - stack everything */
@media screen and (max-width: 767px) {
    
    /* Make all Blueprint columns full width on mobile */
    .span-1, .span-2, .span-3, .span-4, 
    .span-5, .span-6, .span-7, .span-8,
    .span-9, .span-10, .span-11, .span-12,
    .span-13, .span-14, .span-15, .span-16,
    .span-17, .span-18, .span-19, .span-20,
    .span-21, .span-22, .span-23, .span-24 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 10px;
        float: none !important;
    }
    
    /* Remove Blueprint's last column margin */
    .last {
        margin-right: 0 !important;
    }
    
    /* Stack any floated elements */
    .column, .span {
        float: none !important;
    }
}

/* ========================================
   NAVIGATION MENU
   Make the menu mobile-friendly
   ======================================== */

@media screen and (max-width: 767px) {
    
    /* Main navigation */
    nav ul,
    .menu ul,
    ul.menu {
        padding: 0;
        margin: 0;
    }
    
    nav li,
    .menu li,
    ul.menu li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #ddd;
    }
    
    nav a,
    .menu a,
    ul.menu a {
        display: block;
        padding: 12px 15px;
        text-decoration: none;
    }
    
    /* Sub-menus */
    nav ul ul,
    .menu ul ul,
    ul.menu ul {
        position: static !important;
        width: 100% !important;
        background: #f5f5f5;
    }
    
    nav ul ul li,
    .menu ul ul li {
        padding-left: 20px;
    }
}

/* ========================================
   HEADER SECTION
   ======================================== */

@media screen and (max-width: 767px) {
    
    /* Logo/header */
    header,
    #header,
    .header {
        text-align: center;
        padding: 15px 10px;
    }
    
    header img,
    #header img,
    .header img {
        max-width: 250px;
        height: auto;
    }
    
    /* Contact info in header */
    .contact-info,
    .phone,
    .address {
        font-size: 14px;
        text-align: center;
        display: block;
        margin: 10px 0;
    }
}

/* ========================================
   IMAGE SLIDERS / CAROUSELS
   Make image rotators responsive
   ======================================== */

@media screen and (max-width: 767px) {
    
    .slider,
    .slideshow,
    .carousel,
    #slideshow {
        width: 100% !important;
        height: auto !important;
    }
    
    .slider img,
    .slideshow img,
    .carousel img {
        width: 100% !important;
        height: auto !important;
    }
}

/* ========================================
   CONTENT SECTIONS
   Service boxes, feature boxes, etc.
   ======================================== */

@media screen and (max-width: 767px) {
    
    /* Service/feature boxes */
    .service-box,
    .feature-box,
    .info-box {
        width: 100% !important;
        margin-bottom: 20px;
        padding: 15px;
    }
    
    /* Text sizing for readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    /* Make buttons/links easier to tap */
    a,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        display: inline-block;
        padding: 10px 15px;
    }
}

/* ========================================
   FORMS
   Make forms mobile-friendly
   ======================================== */

@media screen and (max-width: 767px) {
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        width: 100% !important;
        max-width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 10px;
    }
    
    label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }
}

/* ========================================
   FOOTER
   ======================================== */

@media screen and (max-width: 767px) {
    
    footer,
    #footer,
    .footer {
        padding: 20px 10px;
        text-align: center;
    }
    
    footer .column,
    #footer .column,
    .footer .column {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

/* ========================================
   TABLES
   Make tables scrollable on mobile
   ======================================== */

@media screen and (max-width: 767px) {
    
    table {
        width: 100%;
        border-collapse: collapse;
    }
    
    /* If table is too wide, make it scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Stack table cells for very narrow screens if needed */
    @media screen and (max-width: 480px) {
        table, thead, tbody, th, td, tr {
            display: block;
        }
        
        thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }
        
        td {
            position: relative;
            padding-left: 50%;
            border: none;
            border-bottom: 1px solid #eee;
        }
        
        td:before {
            position: absolute;
            left: 6px;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: bold;
        }
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Hide elements on mobile if needed */
.hide-mobile {
    display: none !important;
}

/* Show only on mobile */
.show-mobile {
    display: block !important;
}

/* For desktop */
@media screen and (min-width: 768px) {
    .hide-mobile {
        display: block !important;
    }
    
    .show-mobile {
        display: none !important;
    }
}

/* ========================================
   PRINT STYLES
   Don't break print functionality
   ======================================== */

@media print {
    * {
        width: auto !important;
        max-width: 100% !important;
    }
}

/* ========================================
   SPECIFIC FIXES FOR COMMON ISSUES
   ======================================== */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix for embedded content (videos, maps, etc.) */
.video-container,
iframe[src*="youtube"],
iframe[src*="vimeo"],
iframe[src*="google.com/maps"] {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-container iframe,
iframe[src*="youtube"],
iframe[src*="vimeo"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Google Maps responsive */
iframe[src*="google.com/maps"] {
    width: 100% !important;
    position: relative !important;
    height: 300px !important;
    padding-bottom: 0 !important;
}

@media screen and (min-width: 768px) {
    iframe[src*="google.com/maps"] {
        height: 450px !important;
    }
}
