/* Optimized CSS for Header, Sidebar, and Footer Components */
/* Based on style.css with only necessary styles for these components */

/* CSS Custom Properties for theming */

/* Toast Notifications */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.toast-show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.toast-message {
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  margin-left: 1rem;
}

.toast-close:hover {
  color: #374151;
}


:root {
  /* Light mode colors */
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #6c757d;
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --text-color: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --sidebar-width: 200px;
  --header-height: 120px;
  --footer-height: 60px;
  --sidebar-background: #f7f9fc;
  --sidebar-foreground: #475569;
  --sidebar-primary: #91a8ce;
  --sidebar-primary-foreground: #1b1919;
  --sidebar-accent: #f1f5f9;
  --sidebar-accent-foreground: #1e293b;
  --sidebar-border: #e2e8f0;
  --sidebar-ring: #3b82f6;
  --logout-color: #ef4444;
  --border: #e5e7eb;
  --foreground: #111827;
}


/* Dark mode colors */
/* @media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #adb5bd;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #ffffff;
    --text-muted: #adb5bd;
    --border-color: #343a40;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --sidebar-background: #1e293b;
    --sidebar-foreground: #475569;
    --sidebar-primary: #1e293b;
    --sidebar-primary-foreground: #fafafa;
    --sidebar-accent: #f1f5f9;
    --sidebar-accent-foreground: #1e293b;
    --sidebar-border: #e2e8f0;
    --sidebar-ring: #3b82f6;
    --logout-color: #742020;
    --border: #374151;
    --foreground: #f1f5f9;
  }
  .universal-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top-color: #334155;
  }
  .sidebar {
    background-color: var(--sidebar-background);
    border-right-color: var(--sidebar-border);
  }

  .sidebar-menu a:hover {
    background-color: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
  }
} */

  .universal-footer {
    background: linear-gradient(135deg, #7f719e 0%, #4970a5 100%);
  }



/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0; 
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* padding-top: var(--header-height); */
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.has-sidebar {
  padding-left: 0;
}

/* Universal Header Styles */
.universal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}
.header-title {
  display: flex;
  align-items: center;   /* vertically centers logo with text */
  gap: 0.75rem;
  text-align: center;
  justify-content: center;
  color: white;          
}

.header-logo {
  height: 5rem;        /* match h2 size (adjust as needed) */
  width: auto;           /* keep proportions */
}

.header-title h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@media (max-width: 1023px) {
  .header-title {
    padding-top: 30px;
    align-items: center;      
    text-align: center;       
  }

  /* .header-logo {
    margin-bottom: 0.5rem; 
    height: 3.8rem;         
  }

  .header-text{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  } */

}

.universal-subtitle {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 300;
  letter-spacing: 1px;
  color: white;
}

@keyframes titleGlow {
  0% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }
  100% {
    text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.5);
  }
}

.universal-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  position: relative;
}

.universal-header .nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.universal-header .nav-links a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.universal-header .nav-links a:hover {
  background-color: var(--border-color);
}

/* Sidebar open button */

/* Sidebar */

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  bottom: 0;
  background-color: var(--sidebar-background);
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom, 1rem); /* For iOS devices with notches */
  margin-top:auto;
  height: 50px;
  margin-bottom: 50px;
  margin:0;
  box-sizing: border-box;
}

.sidebar {
  background-color: var(--sidebar-background);
  border-right-color: var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* sidebar itself doesn't scroll */
  border-right: 1px solid var(--border-color);
  
}

.sidebar-menu a:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: var(--sidebar-background);
  z-index: 5;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: bold;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--sidebar-foreground);
}

.sidebar-toggle {
  all: unset; 
  position: fixed;
  top: 1rem;
  left: 10%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: block;
  z-index: 40;
  display: none;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  padding: 10px;
  color: white;
  transition: all 0.3s ease;
  opacity: 1;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.sidebar-toggle.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

body.sidebar-open .sidebar-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.sidebar-toggle i {
  font-size: 20px;
}

.sidebar-menu {
  overflow-y: auto;
  padding: 1rem 0;
  flex: 1;
  margin-bottom: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem; /* Add some padding at the bottom */
}

.sidebar-menu ul {
  list-style: none;
  height:auto;
}

.sidebar-menu li {
  margin-bottom: 0.25rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border-radius: 0.25rem;
  margin: 0 0.5rem;
  transition: background-color 0.2s;
  cursor: pointer;
}

.sidebar-menu a:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.sidebar-menu li.active a {
  background-color: var(--sidebar-accent);
  color: var(--primary);
  font-weight: 500;
}

h1 {
  font-size: 1.875rem;
  font-weight: bold;
  line-height: 1.2;
}

/* Universal Footer Styles */


.footer-links {
  margin: 0.75rem 0;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.footer-link i {
  font-size: 1rem;
  opacity: 0.8;
}

.copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.universal-footer {
  color: #f8fafc;
  margin-top: auto;
  border-top: 1px solid #334155;
  width:auto;
}

.footer-container {
  max-width: auto;
  margin: 0 auto;
  flex: 1;
  margin-left: 0px;
  padding: 2rem;
  transition: transform 0.3s ease, margin-left 0.3s ease;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 3rem 0 2rem;
}

/* .footer-section h4 {
  color: #f1f5f9;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.5rem;
  display: inline-block;
} */

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  /* color: #3b82f6; */
}

.footer-logo i {
  font-size: 1.5rem;
}

.footer-description {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-links a:hover {
  color: #ffffff;
  transform: translateX(4px);
} */


.footer-section h4 {
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.5rem;
  display: inline-block;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
}

.footer-links .icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.contact-name {
  color: #bfccdd;
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.whatsapp-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #25D366;
  color: #fff;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.whatsapp-btn:hover {
  background: #28e272;
  transform: scale(1.05);
}


.footer-bottom {
  border-top: 1px solid #475569;
  padding: 1.5rem 0;
  text-align: center;
}

.footer-copyright {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Main content adjustments */
main, .content {
  flex: 1;
  margin-bottom: 0;
  min-height: calc(100vh - var(--header-height));
  transition: margin-left 0.3s ease;
}

.button.outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.button.outline:hover {
  background-color: var(--logout-color);
}

.button.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.auth-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.auth-btn i {
  font-size: 2rem;
}

.button.outline.auth-btn {
  background: transparent;
  color: #85898f;
  border-color: #3b82f6;
}

.button.outline.auth-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.login-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}


.main-content {
  flex: 1;
  margin-bottom: 0;
  margin-top: var(--header-height);
  margin-left: 0px;
  min-height: calc(100vh - var(--header-height));
  transition: transform 0.3s ease, margin-left 0.3s ease;
}


/* Responsive Design */
@media (min-width: 1024px) {
  /* Desktop: sidebar can be persistent */
  .sidebar.open + * .main-content,
  .sidebar.open ~ .main-content
   {
    margin-left: var(--sidebar-width);
  }

  body.has-sidebar {
    padding-left: 250px;
  }

  .sidebar {
    margin-top: var(--header-height);
    width: 200px;
    position: fixed;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    height:100%;
    border-right: 1px solid var(--border-color);
  }

  .sidebar.open {
      transform: translateX(0);
  }

  .sidebar-close {
      display: block;
  }

  .sidebar-toggle {
    display: flex;
    position: absolute;
    top: 30px; /* Moved down slightly for better spacing */
    left: 15px;
    z-index: 4;
  }

  main, .main-content, .content {
      min-height: calc(100vh - 120px); 
    }

  .main-content.pushed {
    transform: translateX(200px);
  }

  .universal-footer.pushed {
    transform: translateX(200px);
  }

  .header-content::before {
    content: "";
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    order: -1;
  }

  .sidebar-toggle {
    display: flex;
    position: absolute;
    top: 30px; /* Moved down slightly for better spacing */
    left:25px;
    z-index: 4;
  }

  .auth-buttons {
    position: absolute;
    top: 30px; /* Moved down slightly for better spacing */
    right: 25px;
    z-index: 4;
    gap: 8px; /* Increased gap for better vertical spacing */
    flex-direction: column; /* Stack buttons vertically */
  }

  .header-title {
    text-align: center;
    padding-top: 30px; /* Increased to center title in taller header */
  }

  .header-title h1 {
    font-size: 1.8rem;
    margin: 0;
  }

  .universal-subtitle {
    font-size: 0.8rem;
    margin-top: 2px;
  }

  .shape {
    display: none;
  }

  .sidebar-menu ul {
    list-style: none;
    height:fit-content;
  }



  .sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 150px;
  }

  .auth-btn {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .universal-header{
    position:fixed;
  }
}

@media (max-width: 1023px) {
  .footer-links li{
    justify-content: center;
  }
  /* Tablet and mobile: overlay sidebar */

  .button.small{
    min-height: 36px;
  }
  .sidebar {
    width: 100%;
    position: fixed;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    height: 100%;
  }

  .sidebar.open {
      transform: translateX(0);
  }

  .sidebar-close {
      display: block;
  }

  .sidebar-toggle {
      display: block;
      left:25px;
  }

  .main-content {
      margin-left: 0;
      width: 100%;
  }

  body.sidebar-open {
    overflow: hidden;
    padding-top: 120px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 0 1.5rem;
  }

  .footer-container {
    max-width: auto;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 50px;
  }

  .universal-header {
    position:fixed;
    height: 120px; /* Increased from 70px to 120px */
    min-height: 120px;
    width: 100%;
    max-width: auto;
  }

  .header-container {
    padding: 0 12px; /* Reduced padding for more space */
    width: 100%;
    max-width: auto;
  }

  .header-content {
    flex-direction: column; /* Stack elements vertically */
    justify-content: center;
    gap: 8px;
  }

  /* Top row with sidebar toggle and auth buttons */
  .header-content::before {
    content: "";
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    order: -1;
  }

  .sidebar-toggle {
    display: flex;
    position: absolute;
    top: 30px; /* Moved down slightly for better spacing */
    /* left: 15px; */
    z-index: 4;
  }


  .auth-buttons {
    position: absolute;
    top: 30px; /* Moved down slightly for better spacing */
    right: 15px;
    z-index: 4;
    gap: 8px; /* Increased gap for better vertical spacing */
    flex-direction: column; /* Stack buttons vertically */
  }

  .header-title {
    text-align: center;
  }

  .header-title h1 {
    font-size: 1.8rem;
    margin: 0;
  }

  .universal-subtitle {
    font-size: 0.8rem;
    margin-top: 2px;
  }

  .shape {
    display: none;
  }

  .sidebar-menu ul {
    list-style: none;
    height:auto;
  }

  .sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 150px;
  }

  .universal-footer {
    width: 100%;
  }

}


.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    background: linear-gradient(45deg, #5cfd1dc7, #3ab61b);
    color: #1f3337;
    box-shadow: 0 10px 25px rgba(36, 251, 143, 0.3);
}
.whatsapp-btn:hover {
    background-color: #1DA851;
}


.sidebar .private {
  display: none;
}



/* inter-300 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  src: url('../style/fonts/inter-v20-latin-300.woff2') format('woff2'); 
}
/* inter-regular - latin */
@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../style/fonts/inter-v20-latin-regular.woff2') format('woff2'); 
}
/* inter-500 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('../style/fonts/inter-v20-latin-500.woff2') format('woff2'); 
}
/* inter-600 - latin */
@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('../style/fonts/inter-v20-latin-600.woff2') format('woff2'); 
}

@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('../style/fonts/inter-v20-latin-700.woff2') format('woff2'); 
}


