/* DoCam.io Page Styles */

body { margin: 0; padding: 0; }

.fade-in { animation: fadeIn .6s ease forwards; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dropdown styles */
.dropdown { position: relative; }
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  margin-top: 8px;
  z-index: 100;
  padding-top: 0;
  /* Reset border/background when dropdown-content-inner is used */
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.dropdown-content-inner {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 8px;
  min-width: 260px;
}
.dropdown.open .dropdown-content { display: block !important; }
/* Hover and focus-within only on devices that support it (not touch) */
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-content,
  .dropdown-content:hover { display: block; }
  .dropdown:focus-within .dropdown-content { display: block; }
}
.dropdown-content::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  top: -10px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.2s;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}
.dropdown-item:hover { background: #f3f4f6; color: #1f2937; }
.dropdown-item.active { background: #3b82f6; color: #fff; }
.dropdown-item.active:hover { background: #2563eb; color: #fff; }
.dropdown-item svg { width: 18px !important; height: 18px !important; min-width: 18px; max-width: 18px; margin-right: 10px; flex-shrink: 0; }

/* Header navigation icons */
header nav a svg, header nav button svg { width: 16px !important; height: 16px !important; min-width: 16px; flex-shrink: 0; }
header nav .dropdown-content svg { width: 18px !important; height: 18px !important; min-width: 18px; }

/* Language switcher active state */
.lang-switch.active { background: #3b82f6; color: #fff; }
.lang-switch.active:hover { background: #2563eb; color: #fff; }

/* Mobile submenu */
.mobile-submenu { display: none; padding-left: 20px; margin-top: 8px; gap: 8px; }
.mobile-submenu.open { display: flex; flex-direction: column; }

/* Mobile navigation icons */
#mobileNav svg { flex-shrink: 0; }
#mobileNav .mobile-link svg { width: 20px !important; height: 20px !important; min-width: 20px; }
#mobileNav .mobile-submenu a svg { width: 16px !important; height: 16px !important; min-width: 16px; }

/* Widgets */
.widget-compact {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.widget-compact:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.widget-expanded { display: none; }
.widget-expanded.open { display: block; }

/* Mobile widget layout */
@media (max-width: 768px) {
  .widget-compact {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px;
    padding: 1.25rem 1.5rem;
  }
  .widget-compact > .flex.items-start {
    flex-direction: row !important;
    width: 100%;
  }
  .widget-compact > .flex.items-start > .flex-1 {
    min-width: 0;
    word-break: break-word;
  }
  .widget-compact > .flex.items-start > .flex-1 h3 {
    font-size: 1rem;
    line-height: 1.4;
  }
  .widget-compact button { width: 100%; }
}

/* Accordion */
.accordion-section {
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  cursor: pointer;
  transition: background .2s;
}
.accordion-header:hover { background: #f9fafb; }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 2rem;
  transition: max-height 0.35s ease, padding-bottom 0.35s ease;
}
.accordion-content.open {
  padding-bottom: 2rem;
}
.accordion-content > *:last-child {
  margin-bottom: 1.5rem;
}
.accordion-icon { transition: transform .3s; flex-shrink: 0; }
.accordion-icon.open { transform: rotate(180deg); }

/* Article styles */
.docam-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: system-ui, sans-serif;
  color: #1a1a1a;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.docam-article h1 { font-size: 32px; font-weight: 700; margin-bottom: 24px; text-align: center; }
.docam-article h2 { font-size: 26px; font-weight: 600; margin-top: 40px; margin-bottom: 16px; }
.docam-article h3 { font-size: 22px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.docam-article p { margin-bottom: 16px; font-size: 17px; }
.docam-article ul, .docam-article ol { margin: 16px 0; padding-left: 20px; }
.docam-article li { margin-bottom: 10px; }
.docam-article table { width: 100%; border-collapse: collapse; margin: 24px 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.docam-article th, .docam-article td { border: 1px solid #ddd; padding: 10px; }
.docam-article th { background: #f7f7f7; font-weight: 600; }
.docam-article img, .docam-article video, .docam-article iframe { max-width: 100%; height: auto; }
.docam-article img { border-radius: 12px; margin: 24px 0; box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.docam-article hr { border: 0; border-top: 1px solid #e5e5e5; margin: 32px 0; }
.docam-article a { color: #3b82f6; text-decoration: none; }
.docam-article a:hover { text-decoration: underline; }

/* Article gallery */
.docam-gallery { margin: 24px 0; }
.docam-gallery img { width: 100%; max-width: 600px; display: block; margin: 0 auto; }

/* Mobile article styles */
@media (max-width: 480px) {
  .docam-article { padding: 24px 14px; }
  .docam-article h1 { font-size: 26px; }
  .docam-article h2 { font-size: 22px; }
}
