:root {
    --primary: #003931;
    --primary-dark: #002F2A;
    --primary-hover: #00574D;
    --accent: #0A7F6D;
    --bg-page: #F9F9F9;
    --bg-card: #FFFFFF;
    --border: #DDDDDD;
    --text-main: #161A1D;
    --text-soft: #555555;
    --text-muted: #6B6B6B;
    --radius-lg: 20px;
    --radius-md: 16px;
}

body {
    background: #f8faf9;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    margin: 0;
}

@media (min-width: 1033px) {
    /* Apply margin only to main content, not to header or footer, and skip if in lite-mode (iframe) */
    body:not(.lite-mode) > *:not(#global-header):not(#global-footer):not(#subenlaces):not(script):not(style):not(.fixed-action-btn):not(.sidebar):not(.flyout-panel) {
        margin-left: 140px !important;
        width: calc(100% - 140px) !important;
    }
}

/* Removed zoom hack for 1400px to fix 90% browser zoom overflow */

#global-footer {
    margin-top: auto !important;
    width: 100% !important;
}

/* Hide duplicate footers injected by framework outside our container */
footer.main-footer:not(#global-footer footer) {
    display: none !important;
}

.tramite-page-header {
    margin: 0 0 18px;
    padding-top: 6px;
}

.tramite-page-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;
    color: #3f4a4a;
    letter-spacing: -0.02em;
}

.tramite-divider {
    position: relative;
    margin-top: 14px;
    height: 2px;
    background: #e1e4e5;
}

.tramite-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    width: 34px;
    height: 4px;
    background: linear-gradient(90deg, #a8863b 0%, #c7a55a 100%);
    border-radius: 999px;
}

.panel-group .panel {
    border: 1px solid #d6e1de;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 47, 42, 0.08);
    margin-bottom: 14px;
    background: #fff;
}

.panel-group .panel-heading {
    background: #fff;
    border-bottom: 1px solid #d6e1de;
    padding: 0;
    position: relative;
}

.panel-group .panel-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #dfe7e4;
}

.panel-group .panel-title > a {
    display: block;
    padding: 14px 16px;
    padding-right: 54px;
    color: #1f3431;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.panel-group .panel-title > a:hover,
.panel-group .panel-title > a:focus {
    color: #0b5b4f;
    text-decoration: none;
}

/* .panel-group .panel-title > a[data-toggle="collapse"]::after {
    content: "+";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid #7f8e8a;
    background: #fff;
    color: #2e4c47;
    box-shadow: 0 2px 6px rgba(0, 47, 42, 0.08);
    font-size: 22px;
    font-weight: 300;
    line-height: 28px;
    text-align: center;
}

.panel-group .panel-title > a[data-toggle="collapse"][aria-expanded="true"]::after {
    content: "−";
} */

.panel-group .panel-body {
    background: #fff;
    padding: 16px 18px 8px;
}

.panel-group .panel-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.panel-group .panel-body li {
    margin-bottom: 10px;
    line-height: 1.45;
    padding: 8px 10px;
    border: 1px solid #dceae5;
    border-radius: 8px;
    background: linear-gradient(90deg, #f7fbf9 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0, 47, 42, 0.05);
    border-left: 3px solid #0a7f6d;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.panel-group .panel-body li:hover {
    transform: translateY(-1px);
    border-color: #c4dbd5;
    box-shadow: 0 6px 14px rgba(0, 47, 42, 0.08);
    background: linear-gradient(90deg, #f2faf7 0%, #ffffff 100%);
}

.panel-group .panel-body a {
    color: #2d4e49;
    text-decoration: none;
}

.panel-group .panel-body a:hover,
.panel-group .panel-body a:focus {
    text-decoration: underline;
}

.panel-group .panel-body > .panel-heading {
    position: relative;
    padding: 0 52px 0 12px;
    margin: 4px 0 0;
    border: 0;
    border-bottom: 1px solid #d6e1de;
    background: transparent;
}

.panel-group .panel-body > .panel-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: #d6e6e1;
}

.panel-group .panel-body > .panel-heading .panel-title > a {
    padding: 14px 0 12px 12px;
    padding-right: 54px;
    font-weight: 700;
    color: #20453f;
}

.panel-group .panel-body .panel-collapse > .panel-body {
    padding: 8px 0 2px;
    background: transparent;
}

/* Lite Mode cleanup - Hide everything but the content */
body.lite-mode #global-header,
body.lite-mode #global-footer,
body.lite-mode #subenlaces,
body.lite-mode header,
body.lite-mode footer,
body.lite-mode .navbar,
body.lite-mode .main-footer {
    display: none !important;
}

body.lite-mode {
    background-color: white !important;
    padding-top: 0 !important;
}

body.lite-mode .page-shell,
body.lite-mode .container {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.lite-mode .tramite-page-header {
    margin-top: 0 !important;
    padding: 20px !important;
}

/* Adjust Search Bar width */
/* Global Back Button for dependency pages */
.btn-vucem-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--primary);
    color: white !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 57, 49, 0.15);
    margin-bottom: 20px;
}

.btn-vucem-back:hover {
    background: var(--primary-dark);
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0, 57, 49, 0.25);
}

.btn-vucem-back i {
    font-size: 18px;
}
