/*
===========================================
VRiba Solutions - Enhanced Responsive CSS
===========================================
This file provides comprehensive responsive design for all PHP pages.
It's designed to be easily revertible by simply removing the reference.

Version: 1.0
Date: 2024
Author: AI Assistant
===========================================
*/

/* ==========================================
   RESET AND BASE RESPONSIVE STYLES
   ========================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================
   CONTAINER AND LAYOUT SYSTEM
   ========================================== */

.container-responsive {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid-responsive {
    width: 100%;
    padding: 0 15px;
}

.row-responsive {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-responsive {
    padding: 0 15px;
    flex: 1;
    min-width: 0;
}

/* ==========================================
   RESPONSIVE GRID SYSTEM
   ========================================== */

/* Mobile First Approach */
.col-xs-12 { width: 100%; }
.col-xs-11 { width: 91.666667%; }
.col-xs-10 { width: 83.333333%; }
.col-xs-9 { width: 75%; }
.col-xs-8 { width: 66.666667%; }
.col-xs-7 { width: 58.333333%; }
.col-xs-6 { width: 50%; }
.col-xs-5 { width: 41.666667%; }
.col-xs-4 { width: 33.333333%; }
.col-xs-3 { width: 25%; }
.col-xs-2 { width: 16.666667%; }
.col-xs-1 { width: 8.333333%; }

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container-responsive {
        max-width: 540px;
    }
    
    .col-sm-12 { width: 100%; }
    .col-sm-11 { width: 91.666667%; }
    .col-sm-10 { width: 83.333333%; }
    .col-sm-9 { width: 75%; }
    .col-sm-8 { width: 66.666667%; }
    .col-sm-7 { width: 58.333333%; }
    .col-sm-6 { width: 50%; }
    .col-sm-5 { width: 41.666667%; }
    .col-sm-4 { width: 33.333333%; }
    .col-sm-3 { width: 25%; }
    .col-sm-2 { width: 16.666667%; }
    .col-sm-1 { width: 8.333333%; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container-responsive {
        max-width: 720px;
    }
    
    .col-md-12 { width: 100%; }
    .col-md-11 { width: 91.666667%; }
    .col-md-10 { width: 83.333333%; }
    .col-md-9 { width: 75%; }
    .col-md-8 { width: 66.666667%; }
    .col-md-7 { width: 58.333333%; }
    .col-md-6 { width: 50%; }
    .col-md-5 { width: 41.666667%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-3 { width: 25%; }
    .col-md-2 { width: 16.666667%; }
    .col-md-1 { width: 8.333333%; }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container-responsive {
        max-width: 960px;
    }
    
    .col-lg-12 { width: 100%; }
    .col-lg-11 { width: 91.666667%; }
    .col-lg-10 { width: 83.333333%; }
    .col-lg-9 { width: 75%; }
    .col-lg-8 { width: 66.666667%; }
    .col-lg-7 { width: 58.333333%; }
    .col-lg-6 { width: 50%; }
    .col-lg-5 { width: 41.666667%; }
    .col-lg-4 { width: 33.333333%; }
    .col-lg-3 { width: 25%; }
    .col-lg-2 { width: 16.666667%; }
    .col-lg-1 { width: 8.333333%; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-responsive {
        max-width: 1140px;
    }
    
    .col-xl-12 { width: 100%; }
    .col-xl-11 { width: 91.666667%; }
    .col-xl-10 { width: 83.333333%; }
    .col-xl-9 { width: 75%; }
    .col-xl-8 { width: 66.666667%; }
    .col-xl-7 { width: 58.333333%; }
    .col-xl-6 { width: 50%; }
    .col-xl-5 { width: 41.666667%; }
    .col-xl-4 { width: 33.333333%; }
    .col-xl-3 { width: 25%; }
    .col-xl-2 { width: 16.666667%; }
    .col-xl-1 { width: 8.333333%; }
}

/* ==========================================
   RESPONSIVE TYPOGRAPHY
   ========================================== */

h1, .h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2, .h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3, .h3 {
    font-size: 1.75rem;
    line-height: 1.4;
}

h4, .h4 {
    font-size: 1.5rem;
    line-height: 1.4;
}

h5, .h5 {
    font-size: 1.25rem;
    line-height: 1.5;
}

h6, .h6 {
    font-size: 1rem;
    line-height: 1.5;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Mobile Typography Adjustments */
@media (max-width: 767px) {
    h1, .h1 { font-size: 1.8rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.3rem; }
    h4, .h4 { font-size: 1.2rem; }
    h5, .h5 { font-size: 1.1rem; }
    h6, .h6 { font-size: 1rem; }
    
    p { font-size: 0.9rem; }
}

/* ==========================================
   RESPONSIVE NAVIGATION
   ========================================== */

.navbar-responsive {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.navbar-brand-responsive {
    display: inline-block;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    line-height: inherit;
    white-space: nowrap;
}

.navbar-nav-responsive {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.navbar-toggler-responsive {
    display: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

@media (max-width: 991px) {
    .navbar-nav-responsive {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
    }
    
    .navbar-nav-responsive.show {
        display: flex;
    }
    
    .navbar-toggler-responsive {
        display: block;
    }
}

/* ==========================================
   RESPONSIVE IMAGES
   ========================================== */

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

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   RESPONSIVE BUTTONS
   ========================================== */

.btn-responsive {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-responsive:hover {
    text-decoration: none;
}

.btn-primary-responsive {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary-responsive:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #004085;
}

@media (max-width: 767px) {
    .btn-responsive {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ==========================================
   RESPONSIVE FORMS
   ========================================== */

.form-control-responsive {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-responsive:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group-responsive {
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .form-control-responsive {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ==========================================
   RESPONSIVE CARDS
   ========================================== */

.card-responsive {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.card-body-responsive {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-title-responsive {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.2;
}

.card-text-responsive {
    margin-bottom: 1rem;
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */

/* Display utilities */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

/* Flex utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

/* Text utilities */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-justify { text-align: justify !important; }

/* Spacing utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

/* ==========================================
   RESPONSIVE BREAKPOINT SPECIFIC STYLES
   ========================================== */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container-responsive {
        padding: 0 10px;
    }
    
    .d-xs-none { display: none !important; }
    .d-xs-inline { display: inline !important; }
    .d-xs-inline-block { display: inline-block !important; }
    .d-xs-block { display: block !important; }
    .d-xs-flex { display: flex !important; }
    .d-xs-inline-flex { display: inline-flex !important; }
    
    .flex-xs-row { flex-direction: row !important; }
    .flex-xs-column { flex-direction: column !important; }
    
    .text-xs-left { text-align: left !important; }
    .text-xs-right { text-align: right !important; }
    .text-xs-center { text-align: center !important; }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .d-sm-none { display: none !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-inline-flex { display: inline-flex !important; }
    
    .flex-sm-row { flex-direction: row !important; }
    .flex-sm-column { flex-direction: column !important; }
    
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
    .text-sm-center { text-align: center !important; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .d-md-none { display: none !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-inline-flex { display: inline-flex !important; }
    
    .flex-md-row { flex-direction: row !important; }
    .flex-md-column { flex-direction: column !important; }
    
    .text-md-left { text-align: left !important; }
    .text-md-right { text-align: right !important; }
    .text-md-center { text-align: center !important; }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .d-lg-none { display: none !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-inline-flex { display: inline-flex !important; }
    
    .flex-lg-row { flex-direction: row !important; }
    .flex-lg-column { flex-direction: column !important; }
    
    .text-lg-left { text-align: left !important; }
    .text-lg-right { text-align: right !important; }
    .text-lg-center { text-align: center !important; }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-inline { display: inline !important; }
    .d-xl-inline-block { display: inline-block !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-inline-flex { display: inline-flex !important; }
    
    .flex-xl-row { flex-direction: row !important; }
    .flex-xl-column { flex-direction: column !important; }
    
    .text-xl-left { text-align: left !important; }
    .text-xl-right { text-align: right !important; }
    .text-xl-center { text-align: center !important; }
}

/* ==========================================
   RESPONSIVE HERO SECTIONS
   ========================================== */

.hero-responsive {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content-responsive {
    max-width: 800px;
    padding: 0 20px;
    color: #fff;
}

@media (max-width: 767px) {
    .hero-responsive {
        min-height: 300px;
        padding: 20px 0;
    }
    
    .hero-content-responsive {
        padding: 0 15px;
    }
}

/* ==========================================
   RESPONSIVE SECTIONS
   ========================================== */

.section-responsive {
    padding: 60px 0;
}

@media (max-width: 767px) {
    .section-responsive {
        padding: 40px 0;
    }
}

/* ==========================================
   RESPONSIVE TABLES
   ========================================== */

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .table-responsive {
        border: 0;
    }
    
    .table-responsive > table {
        width: 100%;
        margin-bottom: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: -ms-autohiding-scrollbar;
    }
    
    .table-responsive > table > thead > tr > th,
    .table-responsive > table > tbody > tr > th,
    .table-responsive > table > tfoot > tr > th,
    .table-responsive > table > thead > tr > td,
    .table-responsive > table > tbody > tr > td,
    .table-responsive > table > tfoot > tr > td {
        white-space: nowrap;
    }
}

/* ==========================================
   RESPONSIVE MODALS
   ========================================== */

.modal-responsive {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    outline: 0;
}

.modal-dialog-responsive {
    position: relative;
    width: auto;
    margin: 10px;
    pointer-events: none;
}

.modal-content-responsive {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

@media (min-width: 576px) {
    .modal-dialog-responsive {
        max-width: 500px;
        margin: 30px auto;
    }
}

@media (min-width: 992px) {
    .modal-dialog-responsive {
        max-width: 800px;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Focus indicators */
*:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* ==========================================
   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) ")";
    }
    
    abbr[title]::after {
        content: " (" attr(title) ")";
    }
    
    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }
    
    pre {
        white-space: pre-wrap !important;
    }
    
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr,
    img {
        page-break-inside: avoid;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}

/* ==========================================
   END OF RESPONSIVE ENHANCED CSS
   ========================================== */

/* Page transition support */
html.js-page-transition body {
    opacity: 0;
    transition: opacity 300ms ease;
}

html.js-page-transition body.page-transition-ready {
    opacity: 1;
}

html.js-page-transition body.page-transition-leave {
    opacity: 0;
}

html.js-page-transition body.page-transition-init {
    opacity: 0;
}

