:root {
  --primary-color: #1a365d;
  --secondary-color: #c53030;
  --accent-color: #2b6cb0;
  --light-bg: #f7fafc;
  --dark-bg: #1a202c;
  --text-color: #2d3748;
  --light-text: #718096;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --max-width: 1200px;
  --header-height: 80px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  min-height: 100vh;
}

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

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--light-text);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.nav-item:hover .nav-link {
  background: var(--light-bg);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  list-style: none;
  padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.dropdown-menu a:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.dropdown-arrow::after {
  content: '';
  display: inline-block;
  margin-left: 0.5rem;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: middle;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-color);
  transition: all 0.3s ease;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: 2rem 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.content-main {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-title {
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem;
  font-size: 1rem;
  margin: 0;
}

.widget-content {
  padding: 1rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--light-bg);
  font-weight: 600;
  color: var(--primary-color);
}

tr:hover {
  background: var(--light-bg);
}

/* Footer */
.site-footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p,
.footer-section li {
  color: #a0aec0;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #a0aec0;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: #718096;
  font-size: 0.875rem;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: #718096;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--light-text);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-color);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background: #9b2c2c;
  color: var(--white);
}

/* Article/News Styling */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.article-item:hover {
  transform: translateX(4px);
}

.article-item img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.article-content h3 {
  margin-bottom: 0.5rem;
}

.article-meta {
  color: var(--light-text);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.widget-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-content ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.widget-content ul li:last-child {
  border-bottom: none;
}

.widget-content ul li a {
  color: var(--text-color);
  display: block;
  transition: color 0.2s ease;
}

.widget-content ul li a:hover {
  color: var(--primary-color);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .menu-toggle {
    display: flex;
  }
  
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--light-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .dropdown:hover .dropdown-menu {
    max-height: 500px;
  }
  
  .dropdown-arrow::after {
    margin-left: auto;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    grid-template-columns: 1fr;
  }
  
  .article-item {
    flex-direction: column;
  }
  
  .article-item img {
    width: 100%;
    height: 200px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .logo-text {
    font-size: 1rem;
  }
  
  .logo-text span {
    display: none;
  }
  
  .logo img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .content-main {
    padding: 1rem;
  }
  
  .card-image {
    height: 150px;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar {
    display: none;
  }
  
  .content-wrapper {
    display: block;
  }
  
  .main-content {
    padding: 0;
  }
}

/* Flexslider Styles */
.flex-container {
  margin: 0 0 2rem 0;
}

.flexslider {
  position: relative;
  margin: 0;
  padding: 0;
}

.flexslider .slides > li {
  display: none;
  -webkit-backface-visibility: hidden;
}

.flexslider .slides img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.flex-pauseplay span {
  text-transform: capitalize;
}

.slides:after {
  content: "\0020";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

html[xmlns] .slides {
  display: block;
}

* html .slides {
  height: 1%;
}

.no-js .slides > li:first-child {
  display: block;
}

.flex-viewport {
  max-height: 2000px;
  -webkit-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -o-transition: all 1s ease;
  transition: all 1s ease;
}

.loading .flex-viewport {
  max-height: 300px;
}

.carousel li {
  margin-right: 5px;
}

.flexslider .slides p {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 1rem;
  margin: 0;
  border-radius: 0 0 8px 8px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.flex-direction-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
  z-index: 10;
}

.flex-direction-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 50%;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.flex-direction-nav a:hover {
  background: rgba(0, 0, 0, 0.8);
}

.flex-direction-nav a::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.flex-direction-nav .flex-next::before {
  transform: rotate(45deg);
  margin-left: 3px;
}

.flex-direction-nav .flex-prev::before {
  transform: rotate(-135deg);
  margin-right: 3px;
}

.flex-control-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.flex-control-nav li {
  margin: 0;
}

.flex-control-nav a {
  display: block;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flex-control-nav a:hover {
  background: rgba(255, 255, 255, 0.8);
}

.flex-control-nav .flex-active {
  background: #fff;
}

/* Article list link styles */
.article-list p {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.article-list p:last-child {
  border-bottom: none;
}

.article-list p a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.article-list p a:hover {
  color: var(--primary-color);
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--white);
  padding: 1rem;
  font-size: 0.9rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.gallery-header p {
  color: var(--light-text);
  font-size: 1rem;
}

.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.gallery-back-link:hover {
  color: var(--secondary-color);
}

/* Gallery lightbox thumbnail grid */
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.gallery-thumbnails a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumbnails a:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.gallery-thumbnails img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .gallery-thumbnails {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-item img {
    height: 150px;
  }
}

/* Lightbox Styles */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 10000;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
  user-select: none;
  line-height: 1;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  color: #fff;
  margin-top: 15px;
  font-size: 14px;
  opacity: 0.8;
}

.lightbox-title {
  color: #fff;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
  max-width: 80%;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }
  
  .lightbox-nav {
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}
