/* Original styles */
/* :where([class^="ri-"])::before { content: "\f3c2"; } */
body {
  font-family: Arial, Helvetica, sans-serif;
}
mark {
  background-color: #C41E3A; /* Red color matching the primary color used in titles */
  color: white; /* White text for better contrast on red background */
  padding: 2px 4px; /* Optional: adds a bit of spacing around the marked text */
  border-radius: 2px; /* Optional: gives slightly rounded corners */
}
.service-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.service-card {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  text-align: justify;
}
.certification-badge:hover {
  transform: scale(1.05);
}
/* Hero background positioning for subpages */
.hero-background {
  background-position: right top;
}
/* Move background image up on larger screens */
@media (min-width: 1800px) {
  .hero-background {
    background-position: right -60px !important;
  }
}
/* Responsive improvements */
@media (min-width: 2000px) {
  .container {
    max-width: 1600px;
  }
  body {
    font-size: 18px;
  }
  h1 {
    font-size: 4.5rem;
  }
  h2 {
    font-size: 3rem;
  }
}
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  .py-16 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .mb-16 {
    margin-bottom: 2rem;
  }
}

/* Fix for responsive menu between mobile and desktop (below 1200px) */
@media (max-width: 1200px) and (min-width: 769px) {
  /* Reduce logo size */
  .navbar-brand img {
    max-height: 40px; /* Adjust based on your actual logo height */
    width: auto;
  }
  
  /* Reduce font size in navigation */
  .navbar-nav .nav-link {
    font-size: 0.9rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Add more space between nav items if needed */
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Fix for icon display on mobile devices */
/* Ensure Remix Icons font is properly loaded on all devices */
@font-face {
  font-family: 'remixicon';
  src: url('../fonts/remixicon.eot');
  src: url('../fonts/remixicon.eot?#iefix') format('embedded-opentype'),
       url('../fonts/remixicon.woff2') format('woff2'),
       url('../fonts/remixicon.woff') format('woff'),
       url('../fonts/remixicon.ttf') format('truetype'),
       url('../fonts/remixicon.svg#remixicon') format('svg');
  font-display: swap;
}

/* Ensure icons display properly */
[class^="ri-"], 
[class*=" ri-"] {
  font-family: 'remixicon' !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block; /* Ensure icons are displayed as inline-block */
}

/* Explicitly set content for menu icon to ensure it's the correct one */
.ri-menu-line::before {
  content: "\ef3e" !important; /* This is the correct hamburger icon code */
}

/* Additional mobile optimization */
@media (max-width: 768px) {
  /* Further optimize icons for mobile */
  [class^="ri-"], 
  [class*=" ri-"] {
    display: inline-block !important;
    line-height: 1;
  }
}

/* Increase size of top corner menu button */
#mobile-menu-button .ri-menu-line {
  font-size: 2.25rem !important; /* 50% larger than 1.5rem (text-2xl) */
}

/* Certification styles - override cursor for no-url items */
.certification-badge.no-url {
  cursor: default;
}

/* Only apply hover effect to certifications with URLs */
.certification-badge:not(.no-url):hover {
  transform: scale(1.05);
}

.certification-badge.no-url:hover {
  transform: none;
}

.certification-year {
  display: block;
  padding-top: 9px;
}

/* AI-Powered Section Responsive Styles */

/* Smallest screens (< 768px) */
@media (max-width: 767px) {
  .ai-powered-image-container {
    display: flex !important; /* Ensure image is visible */
    width: 100% !important; /* Make image take full width */
    margin-top: 1.5rem; /* Add some space above the image */
    order: 2; /* Place image after boxes */
  }

  .ai-powered-boxes-container {
     width: 100% !important; /* Make the boxes container take full width */
     flex-direction: column !important; /* Stack boxes vertically */
     gap: 1.5rem; /* Match the existing gap */
     order: 1; /* Place boxes before image */
  }

  /* Ensure the parent container is a column on small screens */
  #ai-powered .container > .flex {
    flex-direction: column !important;
  }
}

/* Intermediate screens (768px to 1279px) */
@media (min-width: 768px) and (max-width: 1279px) {
  .ai-powered-image-container {
    display: none !important; /* Hide the image */
  }

  .ai-powered-boxes-container {
    width: 100% !important; /* Make the boxes container take full width */
    display: grid; /* Use grid for 2x2 layout */
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    gap: 1.5rem; /* Match the existing gap */
  }

   /* Ensure the parent container is a row on intermediate screens */
  #ai-powered .container > .flex {
    flex-direction: row !important;
  }
}

/* Highest screens (>= 1280px) */
@media (min-width: 1280px) {
  .ai-powered-image-container {
    display: flex !important; /* Ensure image is visible */
    width: 50% !important; /* Set width for large screens */
    order: 2; /* Place image on the right */
  }

  .ai-powered-boxes-container {
     width: 50% !important; /* Set width for large screens */
     flex-direction: column !important; /* Stack boxes vertically */
     order: 1; /* Place boxes on the left */
  }

  .ai-powered-boxes-container > div:not(:last-child) {
    margin-bottom: 1.5rem; /* Add space between boxes */
  }

  /* Ensure the parent container uses flex and aligns items for equal height */
  #ai-powered .container > .flex {
    display: flex;
    flex-direction: row !important;
    align-items: stretch; /* Stretch items to equal height */
  }
}

/* AI-Powered Section Specific Adjustments for XL Resolution */
@media (min-width: 1280px) and (max-width: 1535px) {
  .ai-powered-boxes-container > div {
    padding: 0.6rem 1rem; /* Reduced padding by 1px on top and bottom (from 0.7rem to 0.6rem) */
    font-size: 0.95rem; /* Smaller font size */
  }
}

/* AI-Powered Section Specific Adjustments for 2XL Resolution */
@media (min-width: 1536px) {
  /* Make the boxes container have the same height as the image container */
  .ai-powered-boxes-container {
    display: flex;
    flex-direction: column;
    height: 730px !important; /* Adjusted height based on feedback */
  }
  
  /* Ensure the boxes take up the full height */
  .ai-powered-boxes-container > div {
    flex: 1; /* Each box takes equal space */
    margin-bottom: 0 !important; /* Remove default margin */
    display: flex;
    flex-direction: column;
  }
  
  /* Add a small gap between boxes */
  .ai-powered-boxes-container > div:not(:last-child) {
    margin-bottom: 8px !important; /* Small consistent gap */
  }
  
  /* Ensure the image container maintains aspect ratio */
  .ai-powered-image-container {
    height: 730px !important; /* Adjusted height based on feedback */
  }
  
  /* Ensure the image fills the container properly */
  .ai-powered-image-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  /* Ensure the parent container aligns items properly */
  #ai-powered .flex.flex-col.md\:flex-row {
    align-items: flex-start !important; /* Align to the top */
  }
}

.service-card ul li span {
  text-align: left;
}

@media (min-width: 768px) {
  .service-card {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* LinkedIn Connect Box Responsive Styles */

@media (max-width: 639px) { /* Smallest resolution (sm) */
  .linkedin-box-content {
    display: none !important; /* Hide the content of the box */
  }
  .linkedin-box {
    padding: 0 !important; /* Remove padding to make it look like only the button is there */
    box-shadow: none !important; /* Remove shadow */
    background-color: transparent !important; /* Remove background */
  }
}

@media (min-width: 640px) { /* Medium and larger resolutions */
  .linkedin-box-content {
    display: block !important; /* Show the content of the box */
  }
  .linkedin-box {
    /* Revert to original styles for larger screens */
    padding: 1.5rem !important; /* p-6 is 1.5rem */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; /* shadow-md */
    background-color: #fff !important; /* bg-white */
  }
}

/* Add spacing at the end of each post before recommended posts */
.site-main .article {
    margin-bottom: 40px;
}

/* Reduce margin before and after pictures in posts */
.gh-content figure {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.gh-content > figure + *,
.gh-content > * + figure {
    margin-top: 50px !important;
}

/* Limit header picture width to match post content */
.gh-canvas .article-image {
    grid-column: main-start / main-end !important;
}

/* Custom "See other posts" section styling */
.other-posts-section {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.other-posts-link {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.8rem;
    font-weight: 600;
    color: #C41E3A !important;
    text-decoration: none !important;
    border: 2px solid #C41E3A;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.other-posts-link:hover {
    background-color: rgba(196, 30, 58, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Custom styles for Ghost theme */
/* Removed custom height classes as we're now using the HTML template's structure */

.blog-hero-section {
    padding-top: 106px !important; /* Adjusted for new 74px header height */
}

@media (min-width: 768px) { /* md breakpoint */
    .blog-hero-section {
        padding-top: 138px !important; /* Adjusted for new 74px header height */
    }
}

/* Fix for Get in Touch and LinkedIn buttons to match HTML version */
.blog-hero-section .flex.flex-col.sm\:flex-row.gap-4 a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important; /* Match the height from HTML */
    transition: all 0.3s ease !important;
}

/* Get in Touch button */
.blog-hero-section a.bg-primary {
    background-color: #C41E3A !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.blog-hero-section a.bg-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* LinkedIn button */
.blog-hero-section a.border-2 {
    border: 2px solid #C41E3A !important;
    color: #C41E3A !important;
}

.blog-hero-section a.border-2:hover {
    background-color: rgba(196, 30, 58, 0.05) !important;
}

/* Ensure LinkedIn button has red border and correct font */
.border-primary {
    border-color: #C41E3A !important;
}

.text-primary {
    color: #C41E3A !important;
}

/* Assuming Inter is the desired font, based on html/index.php */
.font-medium {
    font-family: 'Inter', sans-serif !important;
}

/* Custom styles for URLs in blog posts */
.gh-content a {
    color: #C41E3A; /* Primary color */
    text-decoration: underline; /* Add underline for clarity */
}

.gh-content a:hover {
    color: #A0182E; /* Slightly darker shade for hover effect */
}

/* Fix for footer to match HTML version */
footer.bg-gray-900 {
    padding-top: 3rem !important; /* py-12 = 3rem */
    padding-bottom: 3rem !important;
    margin-top: 40px !important; /* Add 40px of white padding before the black section */
}

footer.bg-gray-900 .container {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem !important; /* px-6 = 1.5rem */
    padding-right: 1.5rem !important;
}

footer.bg-gray-900 .space-y-4 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important; /* space-y-4 = 1rem */
}

footer.bg-gray-900 .space-x-4 {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important; /* space-x-4 = 1rem */
}

/* Make footer menu responsive on mobile */
@media (max-width: 767px) {
    footer.bg-gray-900 .hidden.sm\:flex {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    footer.bg-gray-900 .space-x-4 {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    footer.bg-gray-900 .space-x-4 a {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

footer.bg-gray-900 .text-gray-400 {
    color: rgba(156, 163, 175, 1) !important; /* text-gray-400 */
}

/* Fix for copyright text size */
footer.bg-gray-900 p.text-gray-400.text-sm {
    font-size: 14px !important; /* Exact size to match HTML */
    line-height: 1.5 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: normal !important;
}

footer.bg-gray-900 a {
    transition: color 0.3s !important;
    font-size: 14px !important; /* Match the size of footer links */
}

footer.bg-gray-900 a:hover {
    color: white !important;
}

/* Ensure menu styling matches the HTML template */
@media (min-width: 1024px) { /* lg breakpoint */
  header nav a { /* Targeting the navigation links within the header */
    font-size: 16px !important; /* Explicit font size in px */
  }
  
  /* Use the same spacing as in the HTML template */
  header nav.lg\:space-x-8 > a {
    margin-left: 32px !important; /* Match the HTML template's spacing */
  }
  
  /* First item should not have margin */
  header nav.lg\:space-x-8 > a:first-child {
    margin-left: 0 !important;
  }
}

/* Fix mobile menu styling to match HTML template */
#mobile-menu {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#mobile-menu .container {
  padding-top: 16px;
  padding-bottom: 16px;
}

#mobile-menu a {
  display: block;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

#mobile-menu a:last-child {
  border-bottom: none;
}
