/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Updated Primary Colors */
    --primary-color: #0033cc;      /* main corporate colour */
    --secondary-color: #009688;    /* Teal instead of green */
    --accent-color: #e67c73;       /* Coral instead of orange */
    --neutral-dark: #424242;       /* For text */
    --neutral-light: #f5f7fa;      /* For backgrounds */
    --neutral-mid: #e0e0e0;        /* For borders, etc. */
    --white: #ffffff;
    --light-gray: #f0f2f5;
    --medium-gray: #a0a0a0;
    --dark-gray: #606060;
    
    --header-gradient: linear-gradient(to right, rgba(0, 0, 255, 0.1), var(--white));
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    color: var(--neutral-dark);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
}

/* Header styling */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, rgba(0, 51, 204, 0.05), white);
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 6px 6px 0 0;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Title area styling */
.title-area {
    flex: 1;
}

.site-title {
    font-size: 2.25rem;
    letter-spacing: 0.02em;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.1rem;
}

.site-subtitle {
    font-family: 'Roboto', sans-serif;
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-top: 0.1rem;
    font-weight: 500;
}

/* Logo area stays fixed size */
.logo-area {
    flex: 0 0 auto;
    max-width: 150px;
    margin-left: 20px;
}

/* Logo image sizing */
.logo-image {
    max-width: 100%;
    max-height: 150px;
    height: auto;
}

/* Navigation Bar Styles */
.nav-bar {
    background: linear-gradient(135deg, #0033cc, #0000ff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 1000px;
    margin: 0 auto;
}

.nav-container {
    width: 100%;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-item a {
    display: block;
    padding: 18px 25px;
    color: var(--white);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.nav-item.current a {
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.nav-item.current a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
}

/* Main Content Area Styles */
.main-content {
    display: flex;
    max-width: 1000px;
    margin: 1.5rem auto 0;  /* Top, horizontal auto, bottom */
    background: var(--neutral-light);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    min-height: calc(100vh - 250px);
}

.side-image {
    flex: 0 0 200px;
    padding: 20px 0 20px 20px;
}

.portrait {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

figure.image-container {
    margin: 1.5rem 0;
}

figure.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}
  
figcaption {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.5;
    max-width: 95%;
}

/* Breadcrumbs and Timestamp container */
.page-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--dark-gray);
    background-color: rgba(0, 51, 204, 0.03);
    padding: 0.7rem 1rem;
    border-radius: 4px;
}

/* Breadcrumbs styling */
.breadcrumbs {
    flex: 1;
    min-width: 200px;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: inline;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--medium-gray);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.breadcrumbs .current {
    color: var(--dark-gray);
}

/* Timestamp styling */
.timestamp {
    text-align: right;
    white-space: nowrap;
    position: relative;
}

.timestamp .date {
    display: inline-block;
}

.timestamp .time {
    display: none;
}

.timestamp:hover .time,
.timestamp:active .time {
    display: inline-block;
}

.content-wrapper {
    display: flex;
    flex-direction: column; /* Stack form and results vertically */
    flex: 1;
}

.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden; /* prevent horizontal overflow */
    max-width: calc(100% - 150px); /* account for side menu width */
}

.content-area h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.content-area h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.content-area h2, .content-area h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
}

.content-area h2:after, .content-area h3:after {
    content: '';
    position: relative;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    margin-top: 5px;
    background-color: var(--accent-color);
    display: block; /* Add this to make it visible */
}

.content-area p {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 70ch;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

.highlight {
    background-color: rgba(0, 51, 204, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-weight: 500;
}

.content-area a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.content-area a:hover {
    border-color: var(--accent-color);
}

/* Add proper indentation for lists in content area */
.content-area ul,
.content-area ol {
    margin-left: 1.5rem;
    margin-bottom: 0.2rem;
}

.content-area li {
    margin-bottom: 0;
}

/* Ensure nested lists have proper spacing */
.content-area li > ul,
.content-area li > ol {
    margin-top: 0.2rem;
    margin-bottom: 0;
}

/* Article Cards with Language Indication */
.related-articles {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgba(0, 51, 204, 0.03);
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
}
  
.related-articles h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}
  
.language-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}
  
.technical-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}
  
.article-meta {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}
  
.article-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
  
.article-card {
    display: block;
    padding: 1rem;
    background-color: var(--white);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    border-bottom: none;
}
  
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-bottom: none;
}
  
.article-title {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}
  
.article-preview {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.certificate-gallery {
    padding: 15px;
    background-color: white;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.certificate-card {
    border: 1px solid var(--neutral-mid);
    border-radius: 5px;
    overflow: hidden;
}

.certificate-card img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    border-bottom: 1px solid var(--neutral-mid);
}

.certificate-info {
    padding: 10px;
}

/* MacOS Form Styling */
.macos-form-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: rgba(245, 245, 247, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.macos-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--neutral-dark);
    font-size: 0.95rem;
}

/* Textarea styling */
.text-input-area {
    position: relative;
    margin: 0.5rem 0;
}

.text-input-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    background-color: white;
    font-family: 'Roboto', sans-serif;
    color: var(--neutral-dark);
    resize: vertical;
    min-height: 200px;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 51, 204, 0.1);
}

.character-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.85rem;
    color: var(--medium-gray);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Checkbox Styling */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.macos-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #d2d2d2;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    margin-top: 3px;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s;
}

.macos-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.macos-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.macos-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 51, 204, 0.25);
}

/* Button Styling */
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.macos-button {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(to bottom, #2979ff, #0063da);
    color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.macos-button:hover {
    background: linear-gradient(to bottom, #4285f4, #1a73e8);
}

.macos-button:active {
    background: linear-gradient(to bottom, #0063da, #0052b5);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
    transform: translateY(1px);
}

/* Disabled button styling */
.macos-button:disabled {
    background: linear-gradient(to bottom, #a0a0a0, #7a7a7a);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.macos-button:disabled:hover {
    background: linear-gradient(to bottom, #a0a0a0, #7a7a7a);
    transform: none;
}

/* Loading state */
.macos-button.loading {
    position: relative;
    text-indent: -9999px;
    background: linear-gradient(to bottom, #a0a0a0, #7a7a7a);
}

.macos-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 0.8s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Results Container Styling */
.results-container {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light, #f8f9fa);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 0;
    padding: 20px;
}

.results-container h2, .results-container h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin: 20px 0;
}

.results-container h2:after, .results-container h3:after {
    content: '';
    position: relative;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    margin-top: 5px;
    background-color: var(--accent-color);
    display: block; /* Add this to make it visible */
}

.results-container p {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 70ch;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

/* Progress Section Headers */
.progress-section {
    margin-bottom: 24px;
}

.progress-header {
    margin-bottom: 8px;
}

.progress-header span {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    color: var(--text-primary, #333);
    display: block;
    margin-bottom: 6px;
}

/* Progress Bar Styling */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background-color: var(--bg-secondary, #e9ecef);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #007bff), var(--accent-color, #6610f2));
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Toggle Button Styling */
.toggle-button {
    background-color: var(--bg-accent, #f0f2f5);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    padding: 0;
}

.toggle-button:hover {
    background-color: var(--hover-color, #e2e6ea);
}

/* Feature Progress Styling */
.feature-progress {
    margin-left: 15px;
    border-left: 2px solid var(--border-color, #dee2e6);
    padding-left: 15px;
    margin-top: 10px;
}

.feature-description {
    color: var(--text-secondary, #6c757d);
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 8px;
    background-color: var(--bg-subtle, #f8f9fa);
    border-radius: 4px;
    border-left: 3px solid var(--accent-color, #6610f2);
}

/* Make main "total" progress bar thicker */
.progress-section > .progress-bar-container > .progress-bar {
    height: 16px;  /* Increased from 10px */
}

/* Keep feature progress bars at the original height */
.feature-progress .progress-bar {
    height: 10px;
}

/* Adjust the toggle button for the total section to match the increased height */
.progress-section > .progress-bar-container > .toggle-button {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

/* Collapsible Content Animation */
.collapsible-content {
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--dark-gray);
}

.thinking-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 200px;
    margin: 1rem 0;
}

.orbit-container {
    position: absolute;
    width: 120px;
    height: 80px;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.lightbulb {
    position: absolute;
    font-size: 2.5rem;
    width: 30px;
    height: 30px;
    text-align: center;
    left: calc(50% - 15px);
    top: calc(50% - 15px);
    animation: elliptical-orbit 4s infinite ease-in-out;
}

.main-emoji {
    position: absolute;
    bottom: 20px;
    font-size: 4.5rem;
    animation: pulsate 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes elliptical-orbit {
    0% {
        transform: translateX(-60px) translateY(0);
    }
    25% {
        transform: translateX(0) translateY(-30px);
    }
    50% {
        transform: translateX(60px) translateY(0);
    }
    75% {
        transform: translateX(0) translateY(30px);
    }
    100% {
        transform: translateX(-60px) translateY(0);
    }
}

@keyframes pulsate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Error message styling */
.error-message {
    background-color: rgba(230, 124, 115, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message h3 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.error-message p {
    margin-bottom: 1rem;
}

.warning-message {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.warning-message h3 {
    color: #ff9800;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.warning-message ul {
    margin-bottom: 0;
}

/* Side Menu Styling */
.side-menu {
    flex: 0 0 150px;
    padding: 5px 5px;
    background-color: rgba(0, 51, 204, 0.05);  /* Very light blue background */
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.text-menu {
    list-style: none;
}

.text-menu li {
    margin: 5px 0;
    padding: 0;
}

.text-menu a {
    text-decoration: none;
    color: var(--secondary-color);
    display: block;
    padding: 8px 15px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.text-menu a:hover {
    color: var(--white);
    background-color: var(--secondary-color);
}

/* Active menu item */
.text-menu a.active {
    color: var(--white);
    background-color: var(--secondary-color);
    font-weight: 500;
}

.user, .separator, .domain {
    display: inline;
}

.decoy {
    display: inline;
}

/* Optional: You can style the decoy part to be less noticeable */
.decoy {
    font-size: 0.8em;
    color: #ccc;
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.9em;
    max-width: 1000px;
    margin: 0 auto;
}

.footer a {
    color: var(--white); /* Changed from medium-gray to dark-gray for better contrast */
    font-weight: 500; /* Make the font slightly bolder */
    text-decoration: underline; /* Add underline for better visibility */
}

.footer a:hover {
    color: var(--accent-color); /* Change color on hover for better user experience */
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .title-area {
        margin-bottom: 15px;
    }
    
    .logo-area {
        margin: 0;
    }
    
    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-item a {
        padding: 12px 15px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .side-image, .side-menu {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .side-image {
        padding: 20px;
    }
    
    .side-menu {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-subtitle {
        font-size: 0.9rem;
    }
    
    .content-area {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .certificate-gallery {
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 15px;
    }
    
    .certificate-info h4 {
      font-size: 1rem;
    }
    
    .certificate-info p {
      font-size: 0.85rem;
    }
  }
  
  /* Responsive adjustments */
  @media (max-width: 600px) {
    .article-cards {
      grid-template-columns: 1fr;
    }
  }
