/* Fonts & Base */
body {
  font-family: 'IBM Plex Sans', sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  margin-top: 15px;
  margin-bottom: 10px;
  line-height: 1.2;
}

h1{
    font-size: 32px;
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h2{
    font-size: 24px;
}

h3{
    font-size: 19px;
}

.social-links {
    margin-top: 8px; /* Adds some space above the icons */
    display: flex; /* Aligns icons in a row */
    gap: 15px; /* Space between icons */
    justify-content: center; /* Centers the icons if the parent is wide */
}

.social-links a {
    color: #fff !important; /* Dark color for icons, adjust as needed */
    font-size: 14px; /* Size of the icons */
    transition: color 0.3s ease; /* Smooth transition on hover */
    text-decoration: none; /* Removes underline from links */
}

.social-links a:hover {
    color: #ccc !important; /* Change color on hover, e.g., to a brand color */
}

/* Specific color adjustments if desired */
.social-links a[aria-label="GRIP Creative on Instagram"] i {
    color: #fff !important;
}

.social-links a[aria-label="GRIP Creative on LinkedIn"] i {
    color: #fff !important;
}

div{
    box-sizing: border-box;
}

h1 .fa-circle-check{
    font-size: 24px;
    color: #3eb75b;
}

h1 .emphasis-txt{
    padding: 2px 8px 6px;
}

h1 .break{
    display: none;
    height: 10px;
}

.light-theme h1 .emphasis-txt{
    border: 1px solid #ccc;
    background-color: #fff;
}

.dark-theme h1 .emphasis-txt{
    border: 1px solid #444;
    background-color: #1a1a1a;
}

.error{
    text-align: center;
    margin-top: 1rem;
}

/* Add star rating styling */
.result-card .stars {
    color: #ffc107;
    font-size: 1.1rem;
    letter-spacing: 2px; /* Adjust if half star messes with spacing */
}

.domain-check .available {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #28a745;
    margin-right: 5px;
}

/* Add dark mode text contrast */
.dark-theme input,
.dark-theme textarea,
.dark-theme select,
.dark-theme .form-field label {
    color: #f0f0f0 !important;
}

/* Adjust form layout */
@media (min-width: 768px) {
    .form-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    /* Adjusted to make space for two fields */
    .form-field {
        width: 100% !important; /* Adjusted to fit two side-by-side */
    }
}

.no-results {
    text-align: center;
    color: var(--text);
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: 0px;
}

.result-page {
    min-height: 200px; /* Prevent layout shift */
}

/* Themes */
.light-theme { --bg: #f5f5f5; --text: #333; --card: #fff; --border: #777; --primary: #000; }
.dark-theme  { --bg: #1f1f1f; --text: #f5f5f5; --card: #2d2d2d; --border: #ccc; --primary: #000; }
a { color: var(--primary); text-decoration: none; }

/* Accessibility helper */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.pagination .ellipsis {
    display: inline-block;
    padding: 6px 4px;
    color: var(--text);
}

/* Add these styles */
.loading-text {
  margin-top: 1rem;
  color: var(--text);
  text-align: center;
}

/* Removed countdown-timer specific styles, now using progressBarText */
#progressBarText {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-top: 8px;
  font-size: 1.1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Add these styles */
@keyframes blink-warning {
    0% { color: inherit; background: transparent; }
    50% { color: #dc3545; background: rgba(220,53,69,0.1); }
    100% { color: inherit; background: transparent; }
}

.limit-exceeded {
    animation: blink-warning 0.5s ease 3;
}

.optional.limit-exceeded {
    font-weight: 500;
    color: #dc3545;
}

/* Add to existing .optional styles */
.search-container .optional {
    font-weight: 300;
    font-size: .8rem;
    color: #666;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.form-row label{
    padding-bottom: 10px;
    display: block;
}

/* Loaders */
.loader, .loader-small {
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
.loader-small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
.loading-message {
  text-align: center;
  padding: 2rem;
}
.loading-message p {
  margin-top: 1rem;
  color: var(--text);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Container */
.container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

/* Toggles */
.toggles {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.toggle-modern {
  display: flex;
  align-items: center;
  cursor: poIBM Plex Sans;
  user-select: none;
}
.toggle-modern input { display: none; }
.toggle-track {
  width: 42px;
  height: 22px;
  background: #ccc;
  border-radius: 0px;
  margin-right: 8px;
  position: relative;
  border: 1px solid #777;
  box-sizing: border-box;
  transition: background .2s;
}
.toggle-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 0px;
  position: absolute;
  top: 2px;
  left: 2px;
    border: 1px solid #777;
    box-sizing: border-box;
  transition: transform .2s;
}
.toggle-modern input:checked + .toggle-track { background: var(--primary); }
.toggle-modern input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle-label {
  font-size: .9rem;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
}

/* Logo & Headline */
.logo {
    display: flex;
    align-items: center; /* Vertically aligns the <a> tag (which contains the img) */
    height: 100%; /* Ensures the .logo div takes the full height of its parent (.header-content) */
}

.logo img { height: 100px; }

.cta-headline {
  text-align: center;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* Search Form */
.search-container {
  background: var(--card);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Form Labels & Optional text */
.search-container label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: .95rem;
}
.search-container .optional {
  font-weight: 300;
  font-size: .8rem;
  color: #666;
}

/* Textarea & Inputs */
.search-container textarea,
.search-container input[type="text"],
.search-container select {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 0px;
  padding: 12px 16px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}

/* Textarea specifics */
.search-container textarea {
  height: 120px;
  resize: none;
}

/* Focus State */
.search-container textarea:focus,
.search-container input:focus,
.search-container select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(66,133,244,0.2);
}

/* Three‑column row for desktop, stacked for tablet/mobile */
.form-row {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr; /* Two columns on desktop */
  }
}

/* Adjust form field width */
/* Removed the .form-field width adjustment as it's handled by the grid now */

/* Add spacing for tone dropdown */
#toneSelect, #charLengthSelect { 
  margin-top: 4px;
  width: 100%;
}

/* Generate Button */
#generateBtn {
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
#generateBtn:disabled {
  opacity: .6;
  cursor: wait;
}

/* Results Container */
.results-container {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0px;
  background: var(--card);
}

/* Result Grid */
.result-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .result-page {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cards */
.result-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 0px;
  background: var(--card);
  animation: fadeIn .4s;
}
.result-card h3 {
  margin: 0 0 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
}
.result-card p {
  margin: 0 0 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: .95rem;
}

/* Copy Button */
.copy-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  cursor: poIBM Plex Sans;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 0px;
  background: var(--card);
  color: var(--text);
  cursor: poIBM Plex Sans;
  font-family: 'IBM Plex Sans', sans-serif;
}
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 2rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: .9rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* New Styles for Name Definition and Phonetic Guide */
.name-definition {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 4px;
}

.phonetic-guide {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
  margin-bottom: 8px;
}

/* Speaker Button for Web Speech API */
.name-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.name-header h3 {
    margin: 0; /* Override default margin */
}

.speaker-btn {
    background: none;
    border: none;
    cursor: poIBM Plex Sans;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out;
}

.light-theme .speaker-btn {
    color: var(--primary);
}

.dark-theme .speaker-btn {
    color: #fff;
}

.speaker-btn:hover {
    transform: scale(1.1);
}

.speaker-btn svg {
    width: 100%;
    height: 20px;
}

/* General Page Styling */
.page-content {
    padding-top: 40px; /* Adjust for fixed header if needed */
    padding-bottom: 40px;
    max-width: 900px; /* Limit content width */
    margin: 0 auto;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: var(--text);
}

.content-block {
    background: #2d2d2d;
    border-radius: 0px;
    padding: 30px;
    box-shadow: var(--shadow);
    line-height: 1.4;
    margin-bottom: 20px;
}

.content-block-alt {
    padding: 30px;
    box-shadow: var(--shadow);
    line-height: 1.4;
    margin-bottom: 20px;
}

.dark-theme .content-block-alt {
    background: #2d2d2d;
    border: 1px solid #ccc;
}

.light-theme .content-block-alt {
    background: #fff;
    border: 1px solid #777;
}

.content-block h2 {
    color: #b3b3b3;
    margin-top: 0;
    font-size: 1.7rem;
}

.content-block h3 {
    color: #b3b3b3;
    margin-top: 25px;
    font-size: 1.4rem;
}

.content-block p {
    margin-bottom: 15px;
}

.content-block ul {
    list-style: disc;
    margin-left: 0px;
    margin-bottom: 30px;
}

.content-block ol {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-block li {
    margin-bottom: 8px;
    color: var(--text);
}

.content-block a {
    color: var(--primary);
    text-decoration: none;
}

.content-block a:hover {
    text-decoration: underline;
}

.button-container {
    text-align: center;
    margin-top: 30px;
}

.content-block a,
.content-block li,
.content-block p{
    color: #b3b3b3;
}

.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary);
    color: #fff;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

/* How To Use Page Specifics */
.api-doc-section .api-step {
    border-left: 2px solid;
    padding-left: 20px;
    margin-bottom: 30px;
    background: var(--bg-light); /* Lighter background for steps */
    padding: 20px;
    border-radius: 0px;
}

.light-theme .api-doc-section .api-step h3 {
    color: var(--primary);
}

.dark-theme .api-doc-section .api-step h3 {
    color: #fff;
}

.api-doc-section .api-step h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.api-doc-section .api-step p,
.api-doc-section .api-step ul {
    color: var(--text-secondary); /* Slightly lighter text for readability */
    margin-bottom: 10px;
}

.api-doc-section .api-step ul {
    list-style: none; /* Remove default list style for a cleaner look */
    padding-left: 0;
}

.tips-section ul {
    list-style: none;
    padding-left: 0;
}

.tips-section ul li {
    background: var(--card);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 0px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-section ul li:before {
    content: "💡"; /* Lightbulb emoji for tips */
    font-size: 1.2em;
    flex-shrink: 0;
}

.highlight-text {
    color: var(--primary);
    font-weight: bold;
}

.faq-section .faq-item {
    background: var(--card);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 0px;
    box-shadow: var(--shadow-sm);
}

.faq-section .faq-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text);
    cursor: poIBM Plex Sans; /* Indicate it's clickable for potential future accordion */
}

.faq-section .faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Dark mode adjustments for page content */
.dark-theme .page-title,
.dark-theme .content-block h2,
.dark-theme .content-block h3,
.dark-theme .content-block p,
.dark-theme .content-block li,
.dark-theme .api-doc-section .api-step p,
.dark-theme .api-doc-section .api-step ul li,
.dark-theme .faq-section .faq-item h3,
.dark-theme .faq-section .faq-item p {
    color: #f0f0f0; /* Lighter text for dark mode */
}

.dark-theme .api-doc-section .api-step {
    background: #2a2a2a; 
    border-left-color: #ccc;
}

.light-theme .api-doc-section .api-step {
    background: #f6f6f7; 
    border-left-color: #777;
}

.dark-theme .tips-section ul li {
    background: #2a2a2a;
    border-color: #444;
}

.light-theme .faq-section .faq-item {
    background: #f6f6f7;
    border: 1px solid #777;
}

.dark-theme .faq-section .faq-item {
    background: #2a2a2a;
    border: 1px solid #444;
}

.dark-theme .highlight-text {
    color: var(--primary-light); /* Lighter primary color for highlight in dark mode */
}

/* Main Header */
/* Existing styles for Main Header */
.main-header {
    background: var(--card);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border: 1px solid var(--border);
    border-radius: 0px;
    transition: height 0.3s ease-in-out; /* Smooth transition for height change */
    overflow: hidden; /* Hide overflow when menu is closed */
}

.header-content {
    display: flex;
    justify-content: space-between; /* Logo left, hamburger right on mobile */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-header .logo img {
    height: 65px; /* Default size for desktop */
    transition: all 0.3s ease;
}

/* Hamburger Menu Icon */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Ensure it's above other content */
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text); /* Color of the hamburger lines */
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Container */
.mobile-menu-container {
    display: flex; /* Default for desktop */
    flex-direction: row;
    align-items: center;
    gap: 25px;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Default for desktop */
    gap: 18px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 400;
    padding: 5px 0;
    position: relative;
    font-family: 'IBM Plex Sans', sans-serif;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a.active:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
}

.main-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Inherit toggle styles from existing .toggles */
.main-header .toggles {
    margin: 0; /* Remove margin from header's toggle */
}

/* Dark mode header adjustments */
.dark-theme .main-header {
    background: #1a1a1a;
    box-shadow: var(--dark-shadow-sm);
}

.dark-theme .main-nav a {
    color: #f0f0f0;
}

.dark-theme .main-nav a:hover {
    color: var(--primary-light);
}

.dark-theme .main-nav a.active {
    color: var(--primary-light);
}

.dark-theme .main-nav a.active:after {
    background-color: var(--primary-light);
}

.dark-theme .hamburger-line {
    background-color: #f0f0f0; /* White lines in dark mode */
}

/* Dark mode header adjustments */
.dark-theme .main-header {
    background: #1a1a1a;
    box-shadow: var(--dark-shadow-sm);
}

.dark-theme .main-nav a {
    color: #f0f0f0;
}

.dark-theme .main-nav a:hover {
    color: var(--primary-light);
}

.dark-theme .main-nav a.active {
    color: var(--primary-light);
}

.dark-theme .main-nav a.active:after {
    background-color: var(--primary-light);
}

/* Copied Names Counter */
.copied-names-counter-section {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding: 20px;
    border-radius: 0px;
    box-shadow: var(--shadow);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.light-theme .copied-names-counter-section{
    background: #e6e6e6;
    border: 1px solid #777;
}

.dark-theme .copied-names-counter-section{
    background: #333;
    border: 1px solid #ccc;
}

.copied-names-counter-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.copied-names-count {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    display: block;
}

/* Dark mode counter adjustments */
.dark-theme .copied-names-counter-section {
    background: var(--dark-card);
    box-shadow: var(--dark-shadow);
}

.dark-theme .copied-names-counter-section p {
    color: #b0b0b0;
}

.dark-theme .copied-names-count {
    color: var(--primary-light);
}

/* Main Footer */
.main-footer {
    background: #1a1a1a; /* Blackish background */
    color: #f0f0f0;
    padding: 0 0 30px;
    margin-top: 3rem;
    text-align: center;
    font-size: .9rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: #b3b3b3;
}

.main-footer p {
    margin: 5px 0;
}

.main-footer a {
    color: var(--primary-light); /* Lighter primary for contrast on dark background */
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* About Section */
.about-section {
    padding: 20px;
    text-align: left;
}

.about-section h5 {
    font-size: 1.2rem;
    margin-top: 10px;
    margin-bottom: 2px;
    color: #b3b3b3;
    font-weight: 400;
}

.about-section p {
    margin-bottom: 30px;
    line-height: 1.4;
    color: #b3b3b3;
}

.about-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.about-section ul li {
    margin-bottom: 10px;
    background: #333;
    padding: 12px 15px;
    border-radius: 0px;
    border-left: 3px solid #ccc;
    color: #b3b3b3;
}

.about-section ul li strong {
    color: #b3b3b3;
}

/* Dark mode about section adjustments */


/* New Styles for Name Definition and Phonetic Guide */
.name-definition {
  font-size: 0.85rem;
  color: #555; /* Default light theme color */
  margin-bottom: 4px;
}

.phonetic-guide {
  font-size: 0.85rem;
  color: #777; /* Default light theme color */
  font-style: italic;
  margin-bottom: 8px;
}

/* Dark mode adjustments for result card text */
.dark-theme .name-definition,
.dark-theme .phonetic-guide {
    color: #f0f0f0; /* White/light color in dark mode */
}

#major-tom{
    padding-top: 50px;
}

.dark-theme .main-nav a.active:after {
    background-color:#fff;
}

/* In your CSS file */
.char-count-feedback {
    font-size: 10px;
    margin-top: -10px;
}

.light-theme .char-count-feedback {
    color: #666; /* Default neutral color */
}

.dark-theme .char-count-feedback {
    color: #ccc; /* Default neutral color */
}

.char-count-feedback.char-warning {
    color: orange; /* For when chars are needed */
}

.char-count-feedback.char-over {
    color: red; /* For when chars are over limit */
    font-weight: bold;
}

.char-count-feedback.char-ok {
    color: green; /* For when chars are within range */
}





/* Responsive adjustments for header */
@media (max-width: 768px) {
    /* Header content layout for mobile/tablet */
    
    h1 .break{
        display: block;
    }
    
    .main-header:not(.menu-open) {
        position: fixed;
        top: 20px;
        width: calc(100% - 40px) !important;
        box-sizing: border-box;
        height: 90px;
    }
    
    .main-header.menu-open {
        height: 360px;
        position: fixed;
        top: 20px;
        width: calc(100% - 40px) !important;
        box-sizing: border-box;
    }
    
    #major-tom{
        padding-top: 130px;
    }
    
    .header-content {
        display: block;
        padding: 10px 20px; /* Adjust padding for smaller screens */
    }
    
    .logo {
        display: inline-block;
        height: auto;
        width: 68%;
    }

    .main-header .logo img {
        height: 40px; /* Smaller logo on mobile/tablet */
    }

    /* Show hamburger menu icon */
    .hamburger-menu {
        display: inline-block;
        width: 30%;
        top: -6px !important;
        position: relative;
    }
    
    .hamburger-menu div{
        float: right;
        margin-right: -10px;
    }

    /* Hide navigation and toggle by default on mobile/tablet */
    .mobile-menu-container {
        position: relative; /* Position relative to header */
        top: 20px; /* Start below the main header row */
        left: 0;
        width: 100%;
        background: var(--card); /* Match header background */
        box-shadow: var(--shadow-sm);
        flex-direction: column; /* Stack menu items vertically */
        align-items: flex-start; /* Left align items */
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px); /* Slight upward shift for fade-in */
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    }
    
    .light-theme .mobile-menu-container{
        border: 1px solid #777;
        background: #f6f6f7;
    }

    /* When menu is open */
    .main-header.menu-open .mobile-menu-container {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column; /* Stack links vertically */
        width: 100%; /* Take full width */
        gap: 15px; /* Spacing between links */
        align-items: flex-start; /* Left align links */
        margin-bottom: 20px; /* Space before toggle */
    }

    .main-nav ul li {
        width: auto; /* Ensure links take full width for click area */
    }

    .main-nav a {
        padding: 0; /* Larger click area */
        width: 100%;
        display: block; /* Make anchor fill list item */
    }

    .main-nav a.active:after {
        left: 0; /* Keep active indicator left aligned */
    }

    .main-header .toggles {
        width: 100%; /* Ensure toggle takes full width */
        justify-content: flex-start; /* Left align toggle */
    }

    /* Hamburger icon animation when menu is open */
    .main-header.menu-open .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .main-header.menu-open .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .main-header.menu-open .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 480px) {
    /* Header content layout for mobile/tablet */
    
    h1, .page-title{
        font-size: 30px;
    }
    
    h1 .break{
        display: block;
    }
}



