:root {
    --color-primary: #1a4b4c;
    --color-primary-dark: #1d5354;
    --color-primary-light: #4d9394;
    --color-secondary: #5da8a9;
    --color-accent: #6cb0b1;
    --color-light: #f5f9f9;
    --color-white: #ffffff;
    --color-dark: #1c2b2b;
    --color-gray: #6c7a7a;
    --color-light-gray: #ecf0f0;
    --color-border: #dde5e5;
    --color-success: #27ae60;
    --color-success-bg: rgba(39, 174, 96, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --highlight-color: rgba(26, 75, 76, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =========== HEADER STYLING =========== */
.header {
  background-color: var(--color-primary);
  color: white;
  padding: 1rem 0;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background-color: rgba(26, 75, 76, 0.95);
  backdrop-filter: blur(5px);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  flex: 1;
  min-width: 180px;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
}

.logo img {
  height: 40px;
  margin-right: 10px;
  background-color: white;
  border-radius: var(--radius-sm);
  padding: 3px;
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.central-title {
  flex: 2;
  text-align: center;
}

.central-title h1 {
  margin: 0;
  color: white;
  font-size: 1.6rem;
  font-weight: 600;
  white-space: nowrap;
}

.header-space {
  flex: 1;
  min-width: 180px;
}

#main {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  flex: 1;
}


/* Footer styling */
#footer, .simplified-footer {
  background-color: var(--color-primary-dark);
  color: white;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  margin-top: auto;
  width: 100%;
}

#footer a, .simplified-footer a {
  color: white;
  text-decoration: none;
}

#footer a:hover, .simplified-footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}


.sysinfo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 10px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.sysinfo.develop {
  background-color: #e74c3c;
  color: var(--color-light-gray);
}

.sysinfo.demo {
  background-color: var(--color-primary-light);
  color: white;
}


/* Page header */
.terms-header {
    padding: 2rem 0;
    text-align: center;
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.terms-header h1 {
    color: var(--color-primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.print-container {
    margin-bottom: 0.5rem;
}

/* Content area */
.terms-content {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Or for even narrower text in paragraphs only */
.terms-content p {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* First paragraph special margin */
.first-paragraph {
    margin-bottom: 2.5rem;
}

/* Paragraph styling */
p {
    margin-bottom: 1rem;
}

/* Important note styling */
.important-note {
    background-color: var(--highlight-color);
    padding: 1rem;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 1.5rem;
}

/* Section styling */
.terms-section {
    margin-bottom: 2.5rem;
}

/* Collapsible headers */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-secondary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: left;
}

.collapsible-header::after {
    content: '+';
    font-size: 1.5rem;
    margin-left: auto;
}

.collapsible-header.active::after {
    content: '−';
}

.collapsible-header i {
    margin-right: 15px;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.collapsible-content.active {
    max-height: 2000px;
}

/* Expand all button */
.expand-all-container {
    text-align: right;
    margin-bottom: 2rem;
}

.expand-all-button {
    display: inline-block;
    background-color: white;
    color: var(--color-primary);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.expand-all-button:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Lists */
.letter-list {
    list-style-type: lower-alpha;
    padding-left: 25px;
    margin: 15px 0;
}

.number-list {
    list-style-type: decimal;
    padding-left: 25px;
    margin: 10px 0 20px 20px;
}

.bullet-list {
    list-style-type: disc;
    padding-left: 25px;
    margin: 15px 0;
}

.letter-list > li,
.number-list > li,
.bullet-list > li {
    margin-bottom: 10px;
}

/* External links */
a[target="_blank"]:after {
    content: " \f08e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8em;
    vertical-align: super;
    opacity: 0.7;
}

/* Fade-in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Print button */
.print-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.6rem 1.2rem;
    margin-top: 0.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.print-button:hover {
    background-color: var(--color-secondary);
}

/* Back link */
.back-link {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    transition: all 0.2s;
}

.back-link a i {
    margin-right: 0.5rem;
}

.back-link a:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Info links section (for main info page) */
.info-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-link-item {
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 1.5rem;
}

.info-link-item:last-child {
    border-bottom: none;
}

.info-link-item h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.info-link-item h3 a {
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.info-link-item h3 a:hover {
    color: var(--color-secondary);
}

.info-link-item h3 i {
    margin-right: 10px;
}

.info-container {
    padding: 1rem 0;
}

/* Table container and styling */
.table-container {
    margin-bottom: 1rem;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    border: 1px solid #dee2e6;
}

.info-table th, 
.info-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.info-table th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    border-color: #2a3d7a;
}

.info-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.info-table tr:hover {
    background-color: #f1f3f5;
}

.info-table a {
    color: var(--color-primary);
    text-decoration: none;
}

.info-table a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media screen and (max-width: 900px) {
  .header-wrapper {
    flex-direction: column;
    gap: 0.7rem;
  }

  .logo {
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .central-title h1 {
    font-size: 1.4rem;
  }

  .header-space {
    display: none;
  }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .terms-header h1 {
        font-size: 1.8rem;
    }
    
    .collapsible-header {
        font-size: 1.3rem;
    }
}

/* Print settings */
@media print {
    .print-button, .expand-all-container, .header, .simplified-footer, .back-link {
        display: none !important;
    }
    
    .container {
        padding: 0;
        width: 100%;
    }
    
    .terms-section {
        break-inside: avoid;
    }
    
    .collapsible-content {
        max-height: none;
        display: block !important;
    }
    
    .collapsible-header::after {
        display: none;
    }
    
    body {
        padding: 0;
        margin: 0;
        font-size: 12pt;
    }
}
