/* ===== PANAPANÁ - RESPONSIVIDADE ===== */

/* ===== BREAKPOINTS ===== */
/* 
  xs: 0px - 575px (mobile pequeno)
  sm: 576px - 767px (mobile grande)
  md: 768px - 991px (tablet)
  lg: 992px - 1199px (desktop pequeno)
  xl: 1200px - 1399px (desktop)
  xxl: 1400px+ (desktop grande)
*/

/* ===== CONTAINERS RESPONSIVOS ===== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== GRID RESPONSIVO ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Extra Small devices (portrait phones, less than 576px) */
.col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-12 { flex: 0 0 100%; max-width: 100%; }

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

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

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

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

/* ===== DISPLAY RESPONSIVO ===== */
.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; }

@media (min-width: 576px) {
    .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; }
}

@media (min-width: 768px) {
    .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; }
}

@media (min-width: 992px) {
    .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; }
}

@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; }
}

/* ===== FLEXBOX RESPONSIVO ===== */
.flex-xs-row { flex-direction: row !important; }
.flex-xs-column { flex-direction: column !important; }
.flex-xs-row-reverse { flex-direction: row-reverse !important; }
.flex-xs-column-reverse { flex-direction: column-reverse !important; }

.flex-xs-wrap { flex-wrap: wrap !important; }
.flex-xs-nowrap { flex-wrap: nowrap !important; }
.flex-xs-wrap-reverse { flex-wrap: wrap-reverse !important; }

.justify-xs-start { justify-content: flex-start !important; }
.justify-xs-end { justify-content: flex-end !important; }
.justify-xs-center { justify-content: center !important; }
.justify-xs-between { justify-content: space-between !important; }
.justify-xs-around { justify-content: space-around !important; }

.align-xs-start { align-items: flex-start !important; }
.align-xs-end { align-items: flex-end !important; }
.align-xs-center { align-items: center !important; }
.align-xs-baseline { align-items: baseline !important; }
.align-xs-stretch { align-items: stretch !important; }

@media (min-width: 576px) {
    .flex-sm-row { flex-direction: row !important; }
    .flex-sm-column { flex-direction: column !important; }
    .flex-sm-row-reverse { flex-direction: row-reverse !important; }
    .flex-sm-column-reverse { flex-direction: column-reverse !important; }
    
    .flex-sm-wrap { flex-wrap: wrap !important; }
    .flex-sm-nowrap { flex-wrap: nowrap !important; }
    .flex-sm-wrap-reverse { flex-wrap: wrap-reverse !important; }
    
    .justify-sm-start { justify-content: flex-start !important; }
    .justify-sm-end { justify-content: flex-end !important; }
    .justify-sm-center { justify-content: center !important; }
    .justify-sm-between { justify-content: space-between !important; }
    .justify-sm-around { justify-content: space-around !important; }
    
    .align-sm-start { align-items: flex-start !important; }
    .align-sm-end { align-items: flex-end !important; }
    .align-sm-center { align-items: center !important; }
    .align-sm-baseline { align-items: baseline !important; }
    .align-sm-stretch { align-items: stretch !important; }
}

@media (min-width: 768px) {
    .flex-md-row { flex-direction: row !important; }
    .flex-md-column { flex-direction: column !important; }
    .flex-md-row-reverse { flex-direction: row-reverse !important; }
    .flex-md-column-reverse { flex-direction: column-reverse !important; }
    
    .flex-md-wrap { flex-wrap: wrap !important; }
    .flex-md-nowrap { flex-wrap: nowrap !important; }
    .flex-md-wrap-reverse { flex-wrap: wrap-reverse !important; }
    
    .justify-md-start { justify-content: flex-start !important; }
    .justify-md-end { justify-content: flex-end !important; }
    .justify-md-center { justify-content: center !important; }
    .justify-md-between { justify-content: space-between !important; }
    .justify-md-around { justify-content: space-around !important; }
    
    .align-md-start { align-items: flex-start !important; }
    .align-md-end { align-items: flex-end !important; }
    .align-md-center { align-items: center !important; }
    .align-md-baseline { align-items: baseline !important; }
    .align-md-stretch { align-items: stretch !important; }
}

@media (min-width: 992px) {
    .flex-lg-row { flex-direction: row !important; }
    .flex-lg-column { flex-direction: column !important; }
    .flex-lg-row-reverse { flex-direction: row-reverse !important; }
    .flex-lg-column-reverse { flex-direction: column-reverse !important; }
    
    .flex-lg-wrap { flex-wrap: wrap !important; }
    .flex-lg-nowrap { flex-wrap: nowrap !important; }
    .flex-lg-wrap-reverse { flex-wrap: wrap-reverse !important; }
    
    .justify-lg-start { justify-content: flex-start !important; }
    .justify-lg-end { justify-content: flex-end !important; }
    .justify-lg-center { justify-content: center !important; }
    .justify-lg-between { justify-content: space-between !important; }
    .justify-lg-around { justify-content: space-around !important; }
    
    .align-lg-start { align-items: flex-start !important; }
    .align-lg-end { align-items: flex-end !important; }
    .align-lg-center { align-items: center !important; }
    .align-lg-baseline { align-items: baseline !important; }
    .align-lg-stretch { align-items: stretch !important; }
}

/* ===== TIPOGRAFIA RESPONSIVA ===== */
@media (max-width: 575px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.875rem; }
    
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .display-4 { font-size: 1.5rem; }
}

@media (min-width: 576px) and (max-width: 767px) {
    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; }
    
    .display-1 { font-size: 3rem; }
    .display-2 { font-size: 2.5rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
}

@media (min-width: 768px) and (max-width: 991px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    h5 { font-size: 1.25rem; }
    h6 { font-size: 1.125rem; }
    
    .display-1 { font-size: 3.5rem; }
    .display-2 { font-size: 3rem; }
    .display-3 { font-size: 2.5rem; }
    .display-4 { font-size: 2rem; }
}

/* ===== ESPAÇAMENTOS RESPONSIVOS ===== */
@media (max-width: 575px) {
    .p-xs-0 { padding: 0 !important; }
    .p-xs-1 { padding: 0.25rem !important; }
    .p-xs-2 { padding: 0.5rem !important; }
    .p-xs-3 { padding: 1rem !important; }
    .p-xs-4 { padding: 1.5rem !important; }
    .p-xs-5 { padding: 3rem !important; }
    
    .m-xs-0 { margin: 0 !important; }
    .m-xs-1 { margin: 0.25rem !important; }
    .m-xs-2 { margin: 0.5rem !important; }
    .m-xs-3 { margin: 1rem !important; }
    .m-xs-4 { margin: 1.5rem !important; }
    .m-xs-5 { margin: 3rem !important; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .p-sm-0 { padding: 0 !important; }
    .p-sm-1 { padding: 0.25rem !important; }
    .p-sm-2 { padding: 0.5rem !important; }
    .p-sm-3 { padding: 1rem !important; }
    .p-sm-4 { padding: 1.5rem !important; }
    .p-sm-5 { padding: 3rem !important; }
    
    .m-sm-0 { margin: 0 !important; }
    .m-sm-1 { margin: 0.25rem !important; }
    .m-sm-2 { margin: 0.5rem !important; }
    .m-sm-3 { margin: 1rem !important; }
    .m-sm-4 { margin: 1.5rem !important; }
    .m-sm-5 { margin: 3rem !important; }
}

/* ===== NAVEGAÇÃO RESPONSIVA ===== */
@media (max-width: 767px) {
    .navbar-mobile {
        flex-direction: column;
        align-items: stretch;
    }
    
    .navbar-mobile .nav-brand {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .navbar-mobile .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-mobile .nav-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== CARDS RESPONSIVOS ===== */
@media (max-width: 575px) {
    .card-mobile {
        margin-bottom: 1rem;
    }
    
    .card-mobile .card-body {
        padding: 1rem;
    }
    
    .card-mobile .card-header,
    .card-mobile .card-footer {
        padding: 0.75rem 1rem;
    }
}

/* ===== TABELAS RESPONSIVAS ===== */
@media (max-width: 767px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-mobile {
        font-size: 0.875rem;
    }
    
    .table-mobile th,
    .table-mobile td {
        padding: 0.5rem;
    }
}

/* ===== FORMULÁRIOS RESPONSIVOS ===== */
@media (max-width: 575px) {
    .form-mobile .form-control {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .form-mobile .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .form-mobile .form-group {
        margin-bottom: 1rem;
    }
}

/* ===== MODAIS RESPONSIVOS ===== */
@media (max-width: 575px) {
    .modal-mobile {
        margin: 0.5rem;
    }
    
    .modal-mobile .modal-content {
        width: 100%;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-mobile .modal-header,
    .modal-mobile .modal-body,
    .modal-mobile .modal-footer {
        padding: 1rem;
    }
}

/* ===== UTILITÁRIOS RESPONSIVOS ===== */
.text-xs-left { text-align: left !important; }
.text-xs-center { text-align: center !important; }
.text-xs-right { text-align: right !important; }

@media (min-width: 576px) {
    .text-sm-left { text-align: left !important; }
    .text-sm-center { text-align: center !important; }
    .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) {
    .text-md-left { text-align: left !important; }
    .text-md-center { text-align: center !important; }
    .text-md-right { text-align: right !important; }
}

@media (min-width: 992px) {
    .text-lg-left { text-align: left !important; }
    .text-lg-center { text-align: center !important; }
    .text-lg-right { text-align: right !important; }
}

/* ===== ORIENTAÇÃO ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .landscape-hide {
        display: none !important;
    }
}

@media (orientation: portrait) {
    .portrait-only {
        display: block !important;
    }
    
    .landscape-only {
        display: none !important;
    }
}

@media (orientation: landscape) {
    .portrait-only {
        display: none !important;
    }
    
    .landscape-only {
        display: block !important;
    }
}
