/* ======================
   Responsive Base Styles
   ====================== */

/* Base Typography */
body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Responsive Container */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Embeds */
iframe,
embed,
object,
video {
    max-width: 100%;
    height: auto;
}

/* Touch Target Sizes */
a,
button,
input,
select,
textarea,
[role="button"],
[role="menuitem"] {
    min-height: 44px;
    min-width: 44px;
}

/* Remove 300ms delay on touch devices */
a,
button,
input,
select,
textarea,
label,
[role="button"] {
    touch-action: manipulation;
}

/* Responsive Typography */
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Responsive Spacing */
section {
    padding: 3rem 0;
}

/* ======================
   Responsive Grid System
   ====================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

[class*="col-"] {
    width: 100%;
    padding: 0 15px;
    margin-bottom: 30px;
}

/* ======================
   Responsive Utilities
   ====================== */
.hide-on-mobile {
    display: none;
}

.show-on-mobile {
    display: block;
}

/* ======================
   Responsive Navigation
   ====================== */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

/* ======================
   Responsive Forms
   ====================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* ======================
   Responsive Tables
   ====================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    text-align: left;
    padding: 12px;
}

/* ======================
   Media Queries
   ====================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .hide-on-mobile {
        display: block;
    }
    
    .show-on-mobile {
        display: none;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    .no-print {
        display: none !important;
    }
}
