/**
 * Bootstrap TCOM Theme - Custom Styles
 * Migrated from Drupal 7 to Drupal 11
 */

/* Screen Reader Only - Accessibility */
.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:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

body {
	font-size: 18px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background-color: #fafafa;
	color: #2c3e50;
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.01em;
}

/* Global link styling */
a {
    color: #d9230f;
    text-decoration: none;
}

h1, h2, h3, h4, h5, p, ul {
    margin-bottom: 0px;
}

/* Navigation Styling */
.navbar-default .navbar-text {
  color: #495057;
  font-weight: 500;
}
.navbar-default .navbar-nav > li > a {
  color: #495057;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.navbar-default .navbar-nav > li > a:hover {
  background-color: #f8f9fa;
  color: #2c3e50;
  transform: translateY(-1px);
}

.navbar-default .navbar-brand {
  color: #2c3e50;
  font-weight: 600;
}

/* Text align middle - Updated for unified header */
@media (min-width: 510px) {
	.unified-header .navbar-nav {
		padding-top: 8px;
	}
	.unified-header .navbar-brand {
		padding-top: 15px;
		font-size: 19px;
	}
}

/* Updated menu selectors for Drupal 11 */
.region-navigation ul.menu.nav > li { display: -webkit-inline-box;}
.region-navigation ul.menu.nav > li > a { padding: 10px 10px;}
.region-footer ul.menu.nav > li { display: -webkit-inline-box;}

/* PEM (Psychoeducation Module) Styling */
.pem-pager {
    text-align: center;
    border-top: 1px solid #E5E5E5;
    padding: 0.5em;
    margin: 0.5em;
}

.pem-next, .pem-back { margin: 1px; font-size: 1.1em;}

#therapy-standard-pem-finished-form { 
    margin: 1em 0;
    text-align: center;
    width: 100%;
}
#therapy-standard-pem-finished-form input[type="button"] {
	color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.view-standard-pem .views-row { 
    position: relative; 
    display: inline-block; 
    font-size: 0.1em;
}
.view-standard-pem .views-field-max-page, 
.view-standard-pem .views-field-page-count { 
    display: none; 
}
.progress-wrapper { 
    position: relative; 
    width:100%; 
    bottom: 30px;
}

/* Progress Bar Styling */
.progress {
    overflow:initial;
    margin-bottom: 3em;
}

/* Collapsible Text Styling */
.collapse-text-fieldset > br { display: none ;}

/* Google reCAPTCHA spacing */
.grecaptcha-badge { margin-bottom: 1em;}

/* Form progress bar styling */
.progress .message {display: none;}
.progress .filled {background-color: #337ab7;}

/* Login form customizations */
.user-login-form li:first-child {display:none;}

/* Entity form styling */
.entity-entityform-type > h2 { display: none; }

/* Hide finish session button */
#therapy-standard-pem-finished-form {display: none; }

/* Print styles */
@media print {
  a[href]:after {
    content: none;
  }
}

/* ========================================
   RESPONSIVE TABLE STYLING
   Enhanced table display for mobile devices
   ======================================== */

/* Base table styling */
table {
    width: 100%;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 1rem;
    line-height: 1.6;
    table-layout: auto;
}

.table {
    width: 100%;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    border-collapse: collapse;
    table-layout: auto;
}

/* Ensure content containers can handle overflow */
.field--type-text-with-summary,
.modulecontent,
.selge-content,
.node__content,
.clearfix.text-formatted {
    overflow-x: hidden;
    position: relative;
}

/* Table headers */
table th,
.table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    vertical-align: top;
    font-size: 0.95rem;
}

/* Table cells */
table td,
.table td {
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    vertical-align: top;
    color: #495057;
    line-height: 1.6;
}

/* Striped rows */
.table-striped > tbody > tr:nth-of-type(odd),
table.table > tbody > tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}

/* Hover effect for table rows */
.table-hover > tbody > tr:hover,
table.table > tbody > tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Table links styling */
table a,
.table a {
    color: #d9230f;
    text-decoration: none;
    font-weight: 500;
}

table a:hover,
.table a:hover {
    color: #b71c1c;
    text-decoration: underline;
}

/* Responsive table wrapper */
.table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    display: block;
    contain: layout;
}

.table-responsive-wrapper table {
    margin-bottom: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    white-space: normal;
    display: table !important;
    table-layout: fixed !important;
}

/* Force override any 500px width that might be applied */
.table-responsive-wrapper table[style*="500"],
.table-responsive-wrapper table[style*="width"],
table[style*="500"],
table[style*="width"],
.responsive-table-override {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
}

/* Specific override for responsive tables */
.table-responsive-wrapper .responsive-table-override {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: fixed !important;
    display: table !important;
}

/* Ensure table header and body have consistent width */
.table-responsive-wrapper table thead,
.table-responsive-wrapper table tbody,
.table-responsive-wrapper table tfoot {
    width: 100% !important;
    display: table-header-group;
}

.table-responsive-wrapper table tbody {
    display: table-row-group;
}

.table-responsive-wrapper table tfoot {
    display: table-footer-group;
}

.table-responsive-wrapper table tr {
    display: table-row;
    width: 100%;
}

.table-responsive-wrapper table td,
.table-responsive-wrapper table th {
    display: table-cell;
}

.table-responsive-wrapper table td,
.table-responsive-wrapper table th {
    padding: 8px 12px;
    white-space: normal;
    vertical-align: top;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    width: auto;
}

/* Fallback for tables not yet wrapped by JavaScript */
.field--type-text-with-summary table:not(.table-responsive-wrapper table),
.modulecontent table:not(.table-responsive-wrapper table),
.selge-content table:not(.table-responsive-wrapper table),
.node__content table:not(.table-responsive-wrapper table),
.clearfix.text-formatted table:not(.table-responsive-wrapper table) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

.field--type-text-with-summary table:not(.table-responsive-wrapper table) tbody,
.modulecontent table:not(.table-responsive-wrapper table) tbody,
.selge-content table:not(.table-responsive-wrapper table) tbody,
.node__content table:not(.table-responsive-wrapper table) tbody,
.clearfix.text-formatted table:not(.table-responsive-wrapper table) tbody {
    display: table;
    width: 100%;
}

/* Mobile-first responsive design */
@media (max-width: 767px) {
    /* Force horizontal scroll for tables on mobile */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
    }
    
    /* Responsive table sizing for mobile */
    .table-responsive-wrapper table,
    .table-responsive-wrapper .table {
        width: 100% !important;
        min-width: 100%;
        max-width: none !important;
        margin-bottom: 0;
        font-size: 0.9rem;
    }
    
    /* Adjust padding for mobile */
    .table-responsive-wrapper table th,
    .table-responsive-wrapper table td,
    .table-responsive-wrapper .table th,
    .table-responsive-wrapper .table td {
        padding: 8px 12px;
        min-width: 120px;
        max-width: 180px;
    }
    
    /* Very small screens adjustments */
    @media (max-width: 480px) {
        .table-responsive-wrapper table,
        .table-responsive-wrapper .table {
            width: 100% !important;
            min-width: 100%;
            max-width: none !important;
            font-size: 0.85rem;
        }
        
        .table-responsive-wrapper table th,
        .table-responsive-wrapper table td,
        .table-responsive-wrapper .table th,
        .table-responsive-wrapper .table td {
            padding: 6px 10px;
            min-width: 100px;
            max-width: 150px;
        }
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .table-responsive-wrapper table,
    .table-responsive-wrapper .table {
        width: 100% !important;
        min-width: 100%;
        max-width: none !important;
        font-size: 0.95rem;
    }
    
    .table-responsive-wrapper table th,
    .table-responsive-wrapper table td,
    .table-responsive-wrapper .table th,
    .table-responsive-wrapper .table td {
        padding: 10px 14px;
    }
}

/* Auto-wrap tables in content areas */
.field--type-text-with-summary table:not(.table-responsive-wrapper table),
.modulecontent table:not(.table-responsive-wrapper table),
.selge-content table:not(.table-responsive-wrapper table),
.node__content table:not(.table-responsive-wrapper table) {
    /* These tables will be automatically wrapped by JavaScript */
}

/* Accessibility improvements */
table caption {
    padding: 12px 16px;
    color: #6c757d;
    text-align: left;
    caption-side: top;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Focus styles for keyboard navigation */
table th:focus,
table td:focus,
.table th:focus,
.table td:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background-color: #e3f2fd;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    table,
    .table {
        border: 2px solid #000;
    }
    
    table th,
    table td,
    .table th,
    .table td {
        border: 1px solid #000;
    }
    
    .table-striped > tbody > tr:nth-of-type(odd) {
        background-color: #f0f0f0;
    }
}

/* Print styles for tables */
@media print {
    .table-responsive-wrapper {
        overflow: visible !important;
        border: none;
        box-shadow: none;
    }
    
    table,
    .table {
        border-collapse: collapse;
        font-size: 10pt;
    }
    
    table th,
    table td,
    .table th,
    .table td {
        border: 1pt solid #000;
        padding: 4pt 6pt;
    }
    
    table th {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* Fade-in animation for conditional webform content */
.fadein {
    -webkit-animation-name: hideatfirst;
    -webkit-animation-duration: 2s;
    animation-name: hideatfirst;
    animation-duration: 2s;
}

@-webkit-keyframes hideatfirst {
    from {opacity: 0;visibility: hidden;}
    to {opacity: 1;visibility: visible;}
}

@keyframes hideatfirst {
    from {opacity: 0;visibility: hidden;}
    to {opacity: 1;visibility: visible;}
}

/* Field styling for activity steps */
.field--name-field-s2-activityhardsteps > div > .field__item {
	margin-left: 40px;
	display: list-item;
}
.field--name-field-s2-activityhardsteps > div  {
	-webkit-margin-after: 0.9em;
}

/* Theme color emphasis text */
.emphtext {
	color: #495057;
	font-weight: 600;
	background-color: #f8f9fa;
	padding: 2px 6px;
	border-radius: 3px;
	border-left: 3px solid #6c757d;
}

.group-activity {
	display: inline;
}

.group-activity > .panel-heading {
	line-height: 2em;
}

.group-activity  .form-group {
	background-color: #f5f5f5;
	border-radius: 10px;
	padding: 5px;
}

/* Module content column layout - Changed to single column */
.modulecontent {
  /* Removed column layout to display content in single column */
  /* -webkit-column-count: 2;
     -moz-column-count: 2;
          column-count: 2;
  -webkit-column-width: 350px;
     -moz-column-width: 350px;
          column-width: 350px;
	   column-rule: 3px dotted #eee;
	   column-gap: 5em; */
}
.modulecontent > h1,h2,h3,h4 {
 /* column-break-before: column; */
}

.field--type-text-with-summary .modulecontent {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
    -webkit-column-gap: 40px;
    -moz-column-gap: 40px;
    column-gap: 40px;
}
.field--type-text-with-summary .modulecontent .collapse-text-wrapper {
    width: 100%;
    -webkit-column-span: all;
    column-span: all;
}

.field--type-text-with-summary .modulecontent p {
    margin-bottom: 0.5rem;
}

.modulecontent > p > img:not(.not-full) {
	width: 95%;
}

.exercise {
	max-width: 400px;
	margin-top: 1em;
}

/* ========================================
   BEGLEITER CONTAINER TABBED INTERFACE
   Enhanced styling for bottom-positioned tabs
   ======================================== */

/* Begleiter Container - Main wrapper */
.node--type-begleiter-container {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin: 2rem 0;
    overflow: hidden;
}

.node--type-begleiter-container .panel-heading {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    margin: 0;
}

.node--type-begleiter-container .panel-heading h2 {
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    border: none;
    padding: 0;
}

/* Tabbable container - reverse order for bottom tabs */
.node--type-begleiter-container .tabbable {
    display: flex;
    flex-direction: column;
}

/* Tab content area - positioned above tabs */
.node--type-begleiter-container .tab-content {
    order: 1;
    background-color: #ffffff;
    padding: 2rem;
    min-height: 400px;
    border-bottom: 1px solid #e9ecef;
}

/* Tab navigation - positioned at bottom */
.node--type-begleiter-container .nav-tabs {
    order: 2;
    border-top: 2px solid #e9ecef;
    border-bottom: none;
    background-color: #f8f9fa;
    margin: 0;
    padding: 1rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.node--type-begleiter-container .nav-tabs li {
    margin: 0;
}

.node--type-begleiter-container .nav-tabs .nav-tab-link {
    background-color: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    position: relative;
}

.node--type-begleiter-container .nav-tabs .nav-tab-link:hover {
    background-color: #e9ecef;
    color: #2c3e50;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.node--type-begleiter-container .nav-tabs .nav-tab-link.active,
.node--type-begleiter-container .nav-tabs .nav-tab-link[aria-selected="true"] {
    background-color: #495057;
    color: #ffffff;
    border-color: #495057;
    font-weight: 600;
}

/* Two-column layout within tab content */
.node--type-begleiter-text .row {
    margin: 0;
    align-items: flex-start;
}

.node--type-begleiter-text .begleiter-image {
    margin-bottom: 1.5rem;
}

.node--type-begleiter-text .begleiter-image img {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    width: 100%;
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.node--type-begleiter-text .begleiter-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.node--type-begleiter-text .begleiter-content {
    padding-left: 1.5rem;
}

.node--type-begleiter-text .begleiter-content p {
    font-style: italic;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1.25rem;
}

.node--type-begleiter-text header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Tab pane styling */
.node--type-begleiter-text.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.node--type-begleiter-text.tab-pane.active {
    display: block;
    opacity: 1;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    .node--type-begleiter-container .tab-content {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .node--type-begleiter-container .nav-tabs {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .node--type-begleiter-container .nav-tabs .nav-tab-link {
        padding: 0.75rem;
        text-align: center;
        margin-bottom: 0.25rem;
    }
    
    .node--type-begleiter-text .begleiter-content {
        padding-left: 0;
        margin-top: 1rem;
    }
    
    .node--type-begleiter-text .begleiter-image {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .node--type-begleiter-text .begleiter-image img {
        max-width: 150px;
    }
    
    .node--type-begleiter-text .begleiter-content p {
        font-size: 1rem;
        text-align: left;
    }
    
    .node--type-begleiter-text header h3 {
        font-size: 1.25rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .node--type-begleiter-container .panel-heading {
        padding: 1rem;
    }
    
    .node--type-begleiter-container .panel-heading h2 {
        font-size: 1.5rem;
    }
    
    .node--type-begleiter-container .tab-content {
        padding: 1rem;
    }
    
    .node--type-begleiter-text .begleiter-image img {
        max-width: 120px;
    }
}

/* Legacy begleiter styling - preserved for compatibility */
.field--name-field-begleiter {
    padding-top: 1em;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 0px;
	color: #2c3e50;
}

h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
}

h2 {
	font-size: 2rem;
	color: #34495e;
    margin-top: 1.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 2px solid #ecf0f1;
	padding-bottom: 0.5rem;
}

/* Language switcher styling for top position */
.language-switcher-top {
	padding: 0.5rem;
}

.language-switcher-top .block-language-interface {
	margin: 0;
}

.language-switcher-top .language-switcher-language-url ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.5rem;
}

.language-switcher-top .language-switcher-language-url li {
	margin: 0;
}

.language-switcher-top .language-switcher-language-url a {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 0.25rem;
	text-decoration: none;
	color: #495057;
	font-size: 0.875rem;
	transition: all 0.2s ease;
}

.language-switcher-top .language-switcher-language-url a:hover {
	background-color: #e9ecef;
	border-color: #adb5bd;
	text-decoration: none;
}

.language-switcher-top .language-switcher-language-url .is-active a {
	background-color: #007bff;
	border-color: #007bff;
	color: white;
}

h3 {
	font-size: 1.5rem;
	color: #34495e;
	margin-bottom: 1rem;
}

h4 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #34495e;
	margin-bottom: 0.75rem;
}

blockquote > p {
	font-style: italic;
	font-size: 1.2em;
	font-family: Georgia, "Times New Roman", Times, serif;
	margin-bottom: 0;
	color: #34495e;
}

blockquote {
    background-color: #f8f9fa;
    border-radius: 8px;
	border-left: 4px solid #6c757d;
	padding: 1.5rem 2rem;
	margin: 1.5rem 0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
	position: relative;
}

blockquote::before {
	content: '"';
	font-size: 3rem;
	color: #6c757d;
	position: absolute;
	top: 0.5rem;
	left: 1rem;
	font-family: Georgia, serif;
	opacity: 0.3;
}

/* Form element styling */
.checkbox input[type="checkbox"], 
.checkbox-inline input[type="checkbox"] {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  margin-left: -25px;
}
.checkbox label {
 padding-left: 25px;
}

/* List field styling */
.field--type-list-text > .field__items > .field__item{
	display: list-item;
	margin-left: 25px;
	line-height: 1.8;
	margin-bottom: 0.75rem;
	padding-left: 0.5rem;
	color: #495057;
	font-size: 1.05rem;
}

.field--type-list-text > .field__items > .field__item::marker {
	color: #6c757d;
	font-weight: bold;
}

/* Modern bullet points for content lists */
ul li {
	margin-bottom: 0.75rem;
	line-height: 1.7;
	color: #495057;
	position: relative;
	padding-left: 0.5rem;
}

ul li::marker {
	color: #6c757d;
	font-weight: bold;
}

/* Enhanced list styling for main content */
.modulecontent ul li,
.selge-content ul li {
	font-size: 1.05rem;
	margin-bottom: 0px;
	line-height: 1.7;
	color: #495057;
}

/* E-coach styling */
.img-ecoach {
	width: 100px;
	float: left;
	margin-right: 15px;
}

.body-ecoach {
	font-style: italic;
	font-family: Georgia, "Times New Roman", Times, serif;
	float: left;
}

/* Webform grid styling */
th.checkbox.webform-grid-option {
    width: 110px;
}

/* Bootstrap Icons positioning */
.pem-back > .bi, .pem-next > .bi  {
	top: 3px;
}

/* Form checkboxes layout */
.form-checkboxes {
    margin-bottom: 15px;
    column-count: 3;
    -webkit-column-width: 250px;
    -moz-column-width: 250px;
    column-width: 250px;
    column-gap: 1em;
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Collapsible text styling */
.collapse-text-fieldset > .panel-heading{
    line-height:  15px;
    font-weight: bold;
    font-size: 1.4em;
}
.collapse-text-text > .panel{
    margin-bottom: 0px!important;
}

.help-block {
 font-size: 0.8em;
 color: #888;
 font-style: italic;
}

/* Collapsible text icons */
.collapse-text-fieldset .panel-heading a {
    display: inline-block;
    background-color: #495057;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.collapse-text-fieldset .panel-heading a:hover {
    background-color: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.collapse-text-fieldset .panel-heading a:before {
    content: '📄 ';
    font-family: sans-serif;
}

.collapse-text-fieldset .panel-heading a.collapsed:before {
    content: '📄 ';
     font-family: sans-serif;
}

/* User registration form styling */
.user-register-form  .form-control {
	width:initial;
}

.user-register-form  .panel-title {
	color:#e95420;
	font-size:23px;
}

.form-control {
	font-size: 16px;
	border: 1px solid #ced4da;
	border-radius: 6px;
	padding: 12px 16px;
	line-height: 1.5;
	color: #495057;
	background-color: #ffffff;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
	border-color: #80bdff;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Page header navigation */
.region-header > div > section > .nav > li  {
    float: right;
}

.region-header > div > section > .nav > li > a {
    padding-top: 0px;
    padding-bottom: 0px;
}

/* Specific webform styling */
.webform-submission-form-1154 .webform-button--submit{
	background: #d9230f!important;
	color: #ffffff;
}
/* ========================================
   UNIFIED HEADER DESIGN (D7 Style)
   ======================================== */

/* Unified Header - Single header combining all elements */
.unified-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    min-height: 70px;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: relative;
}

.unified-header .navbar-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Container layout for space-between logo and menu */
.unified-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.unified-header .navbar-collapse {
    flex: 0 0 auto;
}

/* Site Logo and Brand - Enhanced for D7 migration */
.unified-header .logo {
    margin-right: 15px;
    display: inline-block;
}

.unified-header .site-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    transition: transform 0.2s ease;
}

.unified-header .site-logo:hover {
    transform: scale(1.05);
}

.unified-header .navbar-brand {
    color: #444;
    font-size: 19px;
    padding-top: 15px;
    margin-right: 20px;
}

/* Language Switcher in Navigation */
.language-switcher-nav {
    margin-left: auto;
    text-align: right;
}

.language-switcher-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}

.language-switcher-nav li {
    margin: 0;
}

.language-switcher-nav a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    transition: all 0.3s ease;
    display: block;
}

.language-switcher-nav a:hover {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
    text-decoration: none;
}

.language-switcher-nav a.active {
    background-color: #495057;
    color: #ffffff;
    border-color: #495057;
}

.page-header-region {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: flex-end;
}

.page-header-region .region-header {
    position: absolute;
}

/* Custom Language Switcher Block Styling */
.language-switcher-custom {
    display: inline-block;
    text-align: right;
    margin-left: auto;
}

.language-switcher-custom .language-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-switcher-custom .language-link-item {
    margin: 0;
}

.language-switcher-custom .language-link {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-switcher-custom .language-link:hover {
    color: #b71c1c;
    text-decoration: underline;
    background-color: rgba(211, 47, 47, 0.1);
}

.language-switcher-custom .language-link:focus {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

/* Hide the block title if present */
.language-switcher-custom h2 {
    display: none;
}

/* Style the default language block structure */
.block-language {
    text-align: right;
    margin-left: auto;
}

.block-language ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.block-language li {
    margin: 0;
}

.block-language a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.block-language a:hover {
    color: #b71c1c;
    text-decoration: underline;
    background-color: rgba(211, 47, 47, 0.1);
}

.block-language a:focus {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

/* Hide active language (current page language) */
.block-language li.is-active,
.block-language a.is-active,
.block-language a[aria-current="page"] {
    display: none !important;
}

/* Convert language names to 3-letter codes */
.block-language a[hreflang="et"]:after {
    content: "EST";
}

.block-language a[hreflang="ru"]:after {
    content: "RUS";
}

.block-language a[hreflang="en"]:after {
    content: "ENG";
}

/* Hide original text when showing 3-letter codes */
.block-language a[hreflang="et"],
.block-language a[hreflang="ru"],
.block-language a[hreflang="en"] {
    font-size: 0;
}

.block-language a[hreflang="et"]:after,
.block-language a[hreflang="ru"]:after,
.block-language a[hreflang="en"]:after {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile Toggle Button */
.unified-header .navbar-toggle {
    margin-left: auto;
    border: 1px solid #ddd;
    background-color: transparent;
    padding: 4px 6px;
}

.unified-header .navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #888;
    margin: 4px 0;
}

/* Navigation Styling Updates for Unified Header */
.unified-header .navbar-collapse {
    border-top: none;
}

.unified-header .navbar-nav {
    margin: 0;
}

.unified-header .navbar-nav > li > a {
    color: #444;
    font-size: 17px;
    padding: 15px 10px;
}

.unified-header .navbar-nav > li > a:hover {
    color: #333;
    background-color: #f8f9fa;
}

/* Dropdown Menu Styles - Hide by default, show on hover */
.unified-header .dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    padding: 5px 0;
    margin: 2px 0 0;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.175);
}

.unified-header .dropdown:hover .dropdown-menu,
.unified-header .nav-item.dropdown:hover .dropdown-menu {
    display: block !important;
}

.unified-header .dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 20px;
    clear: both;
    font-weight: normal;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
    background-color: transparent;
    border: 0;
}

.unified-header .dropdown-menu .dropdown-item:hover,
.unified-header .dropdown-menu .dropdown-item:focus {
    color: #262626;
    text-decoration: none;
    background-color: #f5f5f5;
}

/* Bootstrap 5 specific dropdown styles */
.unified-header .nav-item.dropdown .dropdown-menu {
    display: none !important;
}

.unified-header .nav-item.dropdown:hover .dropdown-menu {
    display: block !important;
}

/* Main Content */
.selge-main {
    background-color: #ffffff;
    padding: 2rem 0;
    position: relative;
    margin-top: 2rem;
}

.selge-content {
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.selge-title {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: left;
    letter-spacing: -0.02em;
}

/* Content sections */
.content-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f1f3f4;
}

.content-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

/* Footer */
.selge-footer {
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
    margin-top: 2rem;
    position: relative;
    clear: both;
}

.selge-footer-nav {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Footer menu horizontal layout */
.selge-footer-nav .nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: row;
}

.selge-footer-nav .nav-item {
    margin: 0;
}

.selge-footer-nav .nav-link,
.footer-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    margin: 0 1.5rem;
    font-size: 16px;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.selge-footer-nav .nav-link:hover,
.footer-link:hover {
    background-color: #e9ecef;
    color: #2c3e50;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive footer menu */
@media (max-width: 768px) {
    .selge-footer-nav .nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .selge-footer-nav .nav-link,
    .footer-link {
        margin: 0.25rem 0;
        display: block;
        text-align: center;
    }
}

/* Responsive Design for Unified Header */

/* Desktop: Hide toggle button, show navigation */
@media (min-width: 768px) {
    .unified-header .navbar-toggle {
        display: none !important;
    }
    
    .unified-header .navbar-collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        float: right;
    }
    
    .unified-header .navbar-header {
        display: flex;
        align-items: center;
        width: auto;
    }
}

/* Mobile: Show toggle button, hide navigation by default */
@media (max-width: 767px) {
    .unified-header .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .unified-header .navbar-header {
        display: flex;
        align-items: center;
        width: 100%;
        position: relative;
        justify-content: space-between;
    }
    
    .unified-header .logo {
        margin-right: 10px;
    }
    
    .unified-header .site-logo {
        height: 40px;
    }
    
    .unified-header .navbar-brand {
        padding-top: 10px;
        font-size: 16px;
        margin-right: auto;
    }
    
    .unified-header .navbar-toggle {
        display: block;
        position: absolute;
        top: 10px;
        right: 15px;
        margin: 0;
        border: 1px solid #ddd;
        background-color: transparent;
        padding: 4px 6px;
        cursor: pointer;
    }
    
    .unified-header .navbar-collapse {
        display: none !important;
        width: 100%;
        clear: both;
        margin-top: 15px;
        border-top: 1px solid #e5e5e5;
        padding-top: 15px;
        visibility: hidden;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .unified-header .navbar-collapse.in {
        display: block !important;
        visibility: visible;
        opacity: 1;
        max-height: 500px;
    }
    
    /* Force hide all navigation elements on mobile by default */
    .unified-header .navbar-collapse:not(.in) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Hide language switcher and navigation on mobile by default */
    .unified-header .language-switcher-nav,
    .unified-header .navbar-nav {
        display: none !important;
    }
    
    /* Hide the entire navbar-collapse by default on mobile */
    .unified-header .navbar-collapse:not(.in) .language-switcher-nav,
    .unified-header .navbar-collapse:not(.in) .navbar-nav,
    .unified-header .navbar-collapse:not(.in) nav {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show language switcher and navigation when collapsed menu is open */
    .unified-header .navbar-collapse.in .language-switcher-nav,
    .unified-header .navbar-collapse.in .navbar-nav {
        display: block !important;
        visibility: visible !important;
    }
    
    .language-switcher-nav {
        float: none;
        margin-left: 0;
        text-align: center;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .unified-header .navbar-nav {
        margin: 0;
        padding: 0;
    }
    
    .unified-header .navbar-nav > li {
        display: block;
        width: 100%;
    }
    
    .unified-header .navbar-nav > li > a {
        display: block;
        padding: 10px 15px;
        border-bottom: 1px solid #f5f5f5;
    }
    
    /* Mobile dropdown styles */
    .unified-header .dropdown-menu {
        position: static !important;
        display: none !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    .unified-header .dropdown:hover .dropdown-menu,
    .unified-header .nav-item.dropdown:hover .dropdown-menu {
        display: block !important;
    }
    
    .unified-header .dropdown-menu .dropdown-item {
        padding: 8px 25px;
        color: #495057;
        background-color: transparent;
    }
    
    .unified-header .dropdown-menu .dropdown-item:hover {
        background-color: #e9ecef;
        color: #2c3e50;
    }
}

/* ========================================
   COMPANION STATEMENT TAB INTERFACE
   Updated for new bottom-tab design
   ======================================== */

/* Legacy companion image styling - updated for consistency */
.companion-image {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.companion-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Tab interface enhancements */
.tab-pane {
    /* display: none; */
}

.tab-pane.active {
    display: block;
}

/* Animation for tab transitions */
.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-pane.fade.active {
    opacity: 1;
}

/* RTL support for Arabic language */
[dir="rtl"] .node--type-begleiter-text .begleiter-content {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .node--type-begleiter-text .begleiter-image img {
    margin-left: 0;
    margin-right: 0;
}

/* Print styles */
@media print {
    .node--type-begleiter-container .nav-tabs {
        display: none;
    }
    
    .node--type-begleiter-text.tab-pane {
        display: block !important;
        opacity: 1 !important;
        border: none !important;
        page-break-inside: avoid;
    }
    
    .node--type-begleiter-text .begleiter-image img {
        max-width: 100px;
        border: 1px solid #000;
    }
}

/* Accessibility improvements */
.node--type-begleiter-container .nav-tabs .nav-tab-link:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
    border-radius: 6px;
}

.node--type-begleiter-text .begleiter-image img:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .node--type-begleiter-container {
        border: 2px solid #000;
    }
    
    .node--type-begleiter-container .nav-tabs .nav-tab-link {
        border: 2px solid #000;
    }
    
    .node--type-begleiter-text .begleiter-image img {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .node--type-begleiter-text .begleiter-image img,
    .companion-image {
        transition: none;
    }
    
    .tab-pane.fade {
        transition: none;
    }
    
    .node--type-begleiter-container .nav-tabs .nav-tab-link {
        transition: none;
    }
}

/* ========================================
   MODERN VIDEO AND MEDIA STYLING
   ======================================== */

/* Video container styling */
iframe[src*="youtube"],
iframe[src*="vimeo"],
.video-container {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
    overflow: hidden;
    background: #000;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video text link styling */
a[href*="video"],
.video-text-link {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    color: #495057;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    margin: 1rem 0;
    font-size: 16px;
}

a[href*="video"]:hover,
.video-text-link:hover {
    background-color: #e9ecef;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

a[href*="video"]::before,
.video-text-link::before {
    content: "📄";
    margin-right: 8px;
    font-size: 18px;
}

/* ========================================
   MODERN BUTTON AND FORM STYLING
   ======================================== */

/* Enhanced button styling */
.btn,
button,
input[type="submit"],
input[type="button"] {
    background-color: #495057;
    color: #ffffff;
    border: 1px solid #495057;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #343a40;
    border-color: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: #ffffff;
    text-decoration: none;
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Primary button variant */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

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

/* Success button variant */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

/* ========================================
   ENHANCED CONTENT STYLING
   ======================================== */

/* Modern paragraph styling */
p {
    line-height: 1.7;
    margin-bottom: 0px;
    color: #495057;
    font-size: 1.05rem;
}

/* Enhanced emphasis text */
.emphtext {
    color: #495057;
    font-weight: 600;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 3px solid #6c757d;
}

/* Modern panel styling */
.panel {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.panel:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.panel-heading {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #495057;
}

.panel-body {
    padding: 1.25rem;
}

/* Modern form styling */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Enhanced checkbox styling */
.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #495057;
    cursor: pointer;
}

.checkbox label {
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

/* ========================================
   MODULE SEITE BLOCK STYLING
   Custom block for node 1155
   ======================================== */

/* Module Seite Block Wrapper */
.module-seite-block-wrapper {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

.module-seite-block-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.module-seite-block-wrapper h2 {
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Module Seite Content */
.module-seite-content {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1.5rem;
    border: 1px solid #f1f3f4;
}

/* Module Seite Block */
.module-seite-block {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
}

.module-seite-block .node__content {
    margin: 0;
}

.module-seite-block .node__content h1,
.module-seite-block .node__content h2,
.module-seite-block .node__content h3,
.module-seite-block .node__content h4 {
    color: #34495e;
    margin-bottom: 1rem;
}

.module-seite-block .node__content p {
    margin-bottom: 1rem;
    color: #495057;
}

.module-seite-block .node__content ul,
.module-seite-block .node__content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.module-seite-block .node__content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .module-seite-block-wrapper {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .module-seite-content {
        padding: 1rem;
    }
    
    .module-seite-block-wrapper h2 {
        font-size: 1.5rem;
    }
}
