/* 
 * Modern Layout Styles - Inspired by OpenTofu.org
 * Clean, minimal, tech-focused design with improved spacing
 */

/* ===== Modern Color Palette - OpenTofu Dark Theme ===== */
:root {
  --primary-color: rgb(240, 205, 20);
  --primary-dark: rgb(220, 185, 0);
  --dark-bg: #0c192b;
  --darker-bg: #0a1420;
  --light-bg: #162c47;
  --card-bg: #162c47;
  --text-primary: #ffffff;
  --text-secondary: #d0d0d0;
  --text-light-grey: #f0f0f0;
  --icon-text-color: #000000;
  --border-color: #2a4060;
  --overlay-dark: rgba(12, 25, 43, 0.92);
  --overlay-card: rgba(22, 44, 71, 0.6);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* ===== Global Improvements ===== */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--dark-bg);
}

/* Better container max-width for modern screens */
.container {
  max-width: 1200px;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ===== Modern Navigation ===== */
.navbar {
  background: rgba(3, 30, 57, 1) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
  min-height: 60px;
  border-bottom: 1px solid var(--border-color);
}

.navbar-transparent {
  background: rgba(3, 30, 57, 0.5) !important;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-color-on-scroll {
  transition: all 0.3s ease;
}

.navbar .navbar-brand img {
  height: 40px;
  width: auto;
}

.navbar .navbar-nav > li > a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary) !important;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease;
}

.navbar .navbar-nav > li > a:hover {
  color: var(--primary-color) !important;
}

/* ===== Modern Hero Section ===== */
.page-header {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 4rem 0;
}

.page-header .header-filter {
  background-size: cover;
  background-position: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.page-header .header-filter::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.85) 0%, rgba(15, 15, 15, 0.9) 100%);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.hestia-big-title-content {
  text-align: center;
  padding: 3rem 0;
}

.hestia-big-title-content img {
  max-width: 450px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.hestia-big-title-content .sub-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin: 2rem 0;
  display: block;
  line-height: 1.5;
}

/* ===== Modern Buttons ===== */
.btn-primary,
.btn.btn-primary,
a.btn-primary {
  background: var(--primary-color) !important;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: none;
  box-shadow: 0 4px 6px -1px rgba(240, 205, 20, 0.4), 0 2px 4px -1px rgba(240, 205, 20, 0.3);
  transition: all 0.2s ease;
  color: var(--icon-text-color) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus {
  background: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(240, 205, 20, 0.5), 0 4px 6px -2px rgba(240, 205, 20, 0.4);
  color: var(--icon-text-color) !important;
}

/* ===== Modern Sections ===== */
.main-raised {
  margin: -60px 2rem 0;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  background: var(--dark-bg);
  position: relative;
  z-index: 3;
}

section {
  padding: 5rem 0;
}

section .hestia-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

section .description,
section h5.description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ===== Modern Feature Cards ===== */
.hestia-features {
  background: var(--dark-bg);
}

.feature-box {
  margin-bottom: 2rem;
}

.hestia-info {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-color);
}

.hestia-info:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.hestia-info .icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 2.5rem;
  /* Using magenta/pink for OpenTofu-style design */
  background: var(--primary-color);
}

.hestia-info .icon i {
  color: var(--icon-text-color) !important;
  /* Ensure icon has good contrast with yellow background */
}

.hestia-info .info-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hestia-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ===== About Section ===== */
.hestia-about {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #ffffff;
  background-color: var(--dark-bg);
}

.hestia-about::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: var(--dark-bg);
}

.hestia-about .container {
  position: relative;
  z-index: 1;
}

.hestia-about h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.hestia-about ul {
  font-size: 1.125rem;
  line-height: 1.8;
  list-style-type: none;
  padding-left: 0;
}

.hestia-about ul li {
  margin-bottom: 1rem;
  padding-left: 2rem;
  position: relative;
  color: var(--text-light-grey);
}

.hestia-about ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.25rem;
}

/* ===== Modern Team/Solution Cards ===== */
.hestia-team .card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  align-items: center;
}

.hestia-team .card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.hestia-team .card-image {
  flex-shrink: 0;
}

.hestia-team .card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0;
}

.hestia-team .card .content {
  padding: 1.5rem;
  flex-grow: 1;
}

.hestia-team .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hestia-team .category {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Testimonials Section ===== */
.hestia-testimonials {
  background: var(--light-bg);
}

.card-testimonial {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.card-testimonial .card-avatar {
  margin-bottom: 1.5rem;
}

.card-testimonial .card-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.card-testimonial .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-testimonial .category {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-testimonial .card-description {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Contact Section ===== */
.hestia-contact {
  background-size: cover;
  background-position: center;
  position: relative;
  color: #ffffff;
  background-color: var(--dark-bg);
}

.hestia-contact::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: var(--dark-bg);
}

.hestia-contact .container {
  position: relative;
  z-index: 1;
}

.hestia-contact h5 img {
  max-width: 350px;
  width: 100%;
  filter: brightness(0) invert(1);
  margin-bottom: 1.5rem;
}

.hestia-contact .description {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  color: var(--text-light-grey);
}

.hestia-contact .hestia-info {
  background: var(--overlay-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
  text-align: left;
  padding: 1.5rem;
}

.hestia-contact .hestia-info .icon {
  background: var(--primary-color);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  margin-right: 1em;
  padding: 1rem;
}

.hestia-contact .hestia-info .icon i {
  color: var(--icon-text-color);
}

.hestia-contact .hestia-info .info-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.hestia-contact .hestia-info p,
.hestia-contact .hestia-info a {
  color: var(--text-light-grey);
  font-size: 1rem;
}

.hestia-contact .hestia-info a {
  position: relative;
  z-index: 10;
  cursor: pointer;
}

.hestia-contact .hestia-info a:hover {
  color: var(--primary-color);
}

/* ===== Responsive Improvements ===== */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .main-raised {
    margin: -30px 1rem 0;
  }
  
  section {
    padding: 3rem 0;
  }
  
  section .hestia-title {
    font-size: 2rem;
  }
  
  .page-header {
    min-height: 70vh;
  }
  
  .hestia-big-title-content img {
    max-width: 300px;
  }
  
  .hestia-big-title-content .sub-title {
    font-size: 1.125rem;
  }
  
  .hestia-team .card {
    flex-direction: column;
  }
  
  .hestia-team .card-image img {
    height: 200px;
    border-radius: 0;
  }
}

@media (max-width: 576px) {
  section .hestia-title {
    font-size: 1.75rem;
  }
  
  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* ===== Smooth Scrolling ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Improved Accessibility ===== */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== Animation Utilities ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== Additional Modern Improvements ===== */
/* Better section title styling */
.hestia-features-title-area,
.hestia-team-title-area,
.hestia-testimonials-title-area,
.hestia-contact-title-area {
  margin-bottom: 3rem;
}

/* Improve row spacing */
.hestia-features-content .row,
.hestia-team-content .row {
  margin-left: -1rem;
  margin-right: -1rem;
}

.hestia-features-content .col-md-4,
.hestia-team-content .col-sm-6 {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Better link styling */
a {
  text-decoration: none;
  transition: color 0.2s ease;
  color: var(--primary-color);
}

a:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

/* Ensure icons have consistent sizing */
.fa {
  display: inline-block;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

/* Better visual hierarchy for headings */
h2.hestia-title {
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Improve list item spacing in about section */
.hestia-about ul li {
  padding: 0.5rem 0 0.5rem 2rem;
}

/* Better hover state for navigation links */
.navbar .navbar-nav > li > a {
  position: relative;
}

.navbar .navbar-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar .navbar-nav > li > a:hover::after,
.navbar .navbar-nav > li.active > a::after {
  width: 80%;
}

/* Modern hamburger menu button */
.navbar-toggle {
  background: var(--primary-color) !important;
  border: none !important;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.navbar-toggle .icon-bar {
  background-color: var(--icon-text-color) !important;
  border-radius: 2px;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .navbar-collapse {
    background: rgba(3, 30, 57, 0.98) !important;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding: 1rem 0 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    max-height: none !important;
    overflow: visible !important;
    display: none;
  }
  
  .navbar-collapse.collapse.in,
  .navbar-collapse.collapsing {
    background: rgba(3, 30, 57, 0.98) !important;
    display: block !important;
    max-height: 1000px !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .navbar-collapse.collapse.in {
    opacity: 1 !important;
  }
  
  .navbar .navbar-nav {
    margin: 0 !important;
    float: none !important;
  }
  
  .navbar .navbar-nav > li {
    margin: 0 !important;
    float: none !important;
    display: block !important;
  }
  
  .navbar .navbar-nav > li > a {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
    display: block !important;
    line-height: 1.5 !important;
  }
  
  .navbar .navbar-nav > li:last-child > a {
    border-bottom: none;
  }
  
  .navbar .navbar-nav > li > a::after {
    display: none !important;
  }
  
  .navbar .navbar-nav > li > a:hover {
    background: rgba(240, 205, 20, 0.1) !important;
    color: var(--primary-color) !important;
  }
}

/* Better button group spacing */
.buttons {
  margin-top: 2rem;
}

/* Improve form elements if any */
/* Note: These styles should be used with proper HTML label elements 
   or aria-label attributes for screen reader accessibility */
input,
textarea,
select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Override base theme section-image overlay to prevent text readability issues */
body .section-image:after {
  background-color: transparent;
  z-index: -1 !important;
}

/* Make the entire email contact section clickable */
.hestia-info-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.hestia-info-link .hestia-info {
  cursor: pointer;
  transition: all 0.3s ease;
}

.hestia-info-link:hover .hestia-info {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(240, 205, 20, 0.2);
}

.hestia-info-link:hover .icon {
  background-color: var(--primary-color) !important;
  color: var(--icon-text-color) !important;
}

.hestia-info-link:hover .info-title,
.hestia-info-link:hover p {
  color: var(--primary-color);
}
