/* =================================================================
   Theme23 - Clean Minimal Layout
   ================================================================= */
:root {
  /* Dynamic CSS variables are loaded from manifest.json via layout.tpl */
  /* Static layout variables */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 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);
  --navbar-height: 80px;
  --breadcrumb-height: 50px;
}

/* =================================================================
   Base Styles
   ================================================================= */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-light-color);
  line-height: 1.6;
  margin: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Inter', serif;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; font-weight: 600; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; font-weight: 500; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-color-hover);
  text-decoration: none;
}

/* =================================================================
   Layout Structure
   ================================================================= */
.clean-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--navbar-height);
}

/* =================================================================
   Navigation
   ================================================================= */
.clean-navbar {
  background-color: var(--background-color);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light-color);
  height: var(--navbar-height);
  transition: all 0.3s ease;
}

.clean-navbar.scrolled {
  background-color: var(--background-color);
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--primary-color);
}

.navbar-logo {
  height: 40px;
  width: auto;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-light-color);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  border-radius: var(--border-radius);
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--primary-color);
  background-color: var(--primary-light-color);
}

.navbar-toggler {
  padding: 0.5rem;
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Search Form */
.search-form .input-group {
  width: 300px;
}

.search-input {
  border-right: none;
  border-color: var(--border-color);
  background-color: var(--background-light-color);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: none;
  background-color: var(--background-color);
}

.btn-outline-primary {
  border-left: none;
  border-color: var(--border-color) !important;
  color: var(--primary-color) !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: var(--primary-color-hover) !important;
  border-color: var(--primary-color-hover) !important;
  color: white !important;
}

/* =================================================================
   Breadcrumbs
   ================================================================= */
.breadcrumb-bar {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-light-color);
  padding: 1rem 0;
  min-height: var(--breadcrumb-height);
  display: flex;
  align-items: center;
}

.breadcrumb {
  background-color: transparent;
  margin-bottom: 0;
  padding: 0;
  font-size: 0.9rem;
}

.breadcrumb-item {
  color: var(--text-muted-color);
}

.breadcrumb-item.active {
  color: var(--text-color);
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-muted-color);
}

.breadcrumb-item a {
  color: var(--text-light-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

/* =================================================================
   Main Content
   ================================================================= */
.main-content {
  flex: 1;
  padding: 2rem 0;
  min-height: calc(100vh - var(--navbar-height) - var(--breadcrumb-height) - 200px);
}

/* =================================================================
   Cards & Components
   ================================================================= */
.card {
  background: var(--background-card-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color);
}

.card-img-top {
  transition: all 0.3s ease;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.card:hover .card-img-top {
  transform: scale(1.02);
}

.card-title {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--primary-color);
}

.card-text {
  color: var(--text-light-color);
  line-height: 1.6;
}

/* =================================================================
   Buttons
   ================================================================= */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.btn-primary-custom {
  background-color: var(--primary-color);
  color: var(--text-inverse-color);
  box-shadow: var(--shadow-sm);
}

.btn-primary-custom:hover {
  background-color: var(--primary-color-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-inverse-color);
}

/* Badge styles */
.bg-primary-custom {
  background-color: var(--primary-color) !important;
  color: var(--text-inverse-color) !important;
}

.btn-outline-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-light-color);
}

.btn-outline-secondary:hover {
  background-color: var(--background-light-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* =================================================================
   Forms
   ================================================================= */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  background-color: var(--background-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--background-overlay-color);
  outline: none;
  background-color: var(--background-color);
}

/* =================================================================
   Footer
   ================================================================= */
.clean-footer {
  background: linear-gradient(135deg, var(--footer-background-color) 0%, #0f172a 100%);
  color: var(--footer-text-color);
  margin-top: auto;
}

.footer-content {
  padding: 3rem 0 2rem;
}

.footer-brand {
  margin-bottom: 2rem;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text-inverse-color);
  margin-bottom: 0.75rem;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.footer-nav .nav {
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.footer-nav .nav-link:hover {
  color: var(--text-inverse-color);
  padding-left: 0.5rem;
}

.footer-search h6 {
  color: var(--text-inverse-color);
  font-weight: 600;
}

.footer-search .form-control {
  background-color: var(--background-overlay-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-inverse-color);
}

.footer-search .form-control:focus {
  background-color: var(--background-overlay-color);
  border-color: var(--primary-color);
  color: var(--text-inverse-color);
}

.footer-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
}

.copyright-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-regulations .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-regulations .nav-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  padding: 0;
  transition: all 0.2s ease;
}

.footer-regulations .nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* =================================================================
   Responsive Design
   ================================================================= */
@media (max-width: 991.98px) {
  .navbar-nav {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light-color);
  }
  
  .search-form {
    margin-top: 1rem;
  }
  
  .search-form .input-group {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .brand-name {
    font-size: 1.25rem;
  }
  
  .main-content {
    padding: 1rem 0;
  }
  
  .footer-content {
    padding: 2rem 0 1.5rem;
  }
  
  .footer-regulations .nav {
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  :root {
    --navbar-height: 70px;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .brand-name {
    font-size: 1.1rem;
  }
}

/* =================================================================
   Utility Classes
   ================================================================= */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-custom {
  box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-inverse);
  padding: 4rem 0;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
  opacity: 0.3;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

/* =================================================================
   Homepage Sections
   ================================================================= */
.homepage-section {
  padding: 3rem 0;
}

.homepage-section:nth-child(even) {
  background-color: var(--background-light-color);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-light-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease-out;
}

/* =================================================================
   Company List Styles
   ================================================================= */
.company-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-light-color);
}

.company-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.company-card a {
  color: inherit;
  text-decoration: none;
}

.company-card:hover a {
  color: inherit;
}

.card-img-container {
  background-color: var(--background-light-color);
  border-bottom: 1px solid var(--border-light-color);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-logo {
  max-height: 80px;
  max-width: 120px;
  object-fit: contain;
}

/* =================================================================
   Homepage Category Cards
   ================================================================= */
.category-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-card {
  background: var(--background-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  transition: all 0.3s ease;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
}

.category-link:hover .category-card {
  transform: translateX(5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.category-link:hover {
  color: inherit;
}

.category-info h5 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.category-info small {
  color: var(--text-muted-color);
}

.category-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.category-card .fas.fa-arrow-right {
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.category-link:hover .fas.fa-arrow-right {
  transform: translateX(3px);
}

/* =================================================================
   Category and Location Badges
   ================================================================= */
.category-badge,
.location-badge {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background-color: var(--background-light-color);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.category-badge:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-color);
}

.location-badge:hover {
  background-color: var(--secondary-color) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--secondary-color);
}

/* Enhanced Location Badges with Better Styling */
.location-badge .fas {
  margin-right: 0.375rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.location-badge:hover .fas {
  opacity: 1;
}

/* Location List Wrapper */
.locations-wrapper {
  background: var(--background-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.locations-wrapper h5 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.locations-wrapper h5::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--secondary-color);
  border-radius: 2px;
  margin-right: 0.75rem;
}

.locations-wrapper h5 .fas {
  color: var(--secondary-color);
  margin-right: 0.5rem;
  margin-left: 0;
}

/* =================================================================
   Location Page Styles
   ================================================================= */
.location-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  color: var(--text-inverse);
  padding: 2rem 0;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.location-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
  opacity: 0.3;
}

.location-header .container {
  position: relative;
  z-index: 1;
}

.location-title {
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.location-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.location-icon {
  font-size: 3rem;
  opacity: 0.8;
  margin-right: 1rem;
}

/* Sub-locations section */
.sub-locations {
  background: var(--background-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.sub-locations h3 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.sub-locations h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--secondary-color);
  border-radius: 2px;
  margin-right: 0.75rem;
}

/* Companies section */
.companies-section {
  background: var(--background-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
}

.companies-section h3 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.companies-section h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 2px;
  margin-right: 0.75rem;
}

/* =================================================================
   Category Page Styles
   ================================================================= */
.category-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
  color: var(--text-inverse);
  padding: 2rem 0;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="white" opacity="0.1" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.category-header .container {
  position: relative;
  z-index: 1;
}

.category-title {
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.category-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.category-icon {
  font-size: 3rem;
  opacity: 0.8;
  margin-right: 1rem;
}

/* Sub-categories section */
.sub-categories {
  background: var(--background-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.sub-categories h3 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.sub-categories h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 2px;
  margin-right: 0.75rem;
}

/* =================================================================
   Blog Card Styles
   ================================================================= */
.blog-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-light-color);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.blog-image {
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-light-color);
}

.blog-card a {
  color: inherit;
  text-decoration: none;
}

.blog-card:hover a {
  color: inherit;
}

/* =================================================================
   Author Info Styles
   ================================================================= */
.author-info {
  background: var(--background-light-color);
  border: 1px solid var(--border-light-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-top: 3rem;
}

.author-info h4 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.author-info h4::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 2px;
  margin-right: 0.75rem;
}

.author-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
}

.author-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--background-light-color);
}

.author-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.8rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.author-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.author-bio {
  color: var(--text-light-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.author-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.author-links .btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.author-links .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--background-light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted-color);
}