/* Optimized font loading with font-display: swap for better performance */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap');

/* 
 * IMAGE OPTIMIZATION RECOMMENDATIONS:
 * 
 * 1. Hero image (home_reflection.jpg - 435KB): 
 *    - Consider compressing to WebP format (60-80% size reduction)
 *    - Create responsive versions (mobile: 800px width, desktop: 1920px width)
 *    - Use lazy loading for non-critical images
 * 
 * 2. Logo images: 
 *    - Convert BCE_Logo_Square_NoText.jpg (242KB) to SVG for crisp scaling
 *    - Use WebP format for photos with JPEG fallback
 * 
 * 3. Case study images:
 *    - Implement lazy loading with Intersection Observer
 *    - Use srcset for responsive images
 *    - Consider image CDN for automatic optimization
 * 
 * 4. General optimizations:
 *    - Add width/height attributes to prevent layout shift
 *    - Use aspect-ratio CSS property for consistent sizing
 *    - Implement blur-up technique for better perceived performance
 */

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

body {
    font-family: 'Open Sans', sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
}

ul {
    list-style: none;
}

a {
    color: #333;
    text-decoration: none;
}

h1, h2 {
    font-weight: 300;
    line-height: 1.2;
}

p {
    margin: 10px 0;
}

img {
    width: 100%;
    height: auto;
    /* Optimize image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

/* Lazy loading animation */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].fade-in {
    opacity: 1;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff00;
    color: #fff;
    opacity: 0.8;
    width: 100%;
    height: 70px;
    position: fixed;
    top: 0px;
    padding: 0 30px;
    /* Use transform instead of transition for better performance */
    transition: transform 0.3s ease, background-color 0.3s ease;
    /* Add will-change for performance optimization */
    will-change: transform, background-color;
    /* Use GPU acceleration */
    transform: translateZ(0);
}

.navbar.top {
    background: transparent;
}

.navbar a {
    color: #fff;
    padding: 10px 20px;
    margin: 0 5px;
}

.navbar a:hover {
    border-bottom: #2831a7 5px solid;
}

.navbar ul {
    display: flex;
}

.navbar .logo {
    font-weight: 400;
}

/* Header */
.hero {
    background: url('../images/home/home_reflection.jpg') no-repeat center center/cover;
    height: 100vh;
    position: relative;
    color: #fff;
    /* Optimize background image loading */
    background-attachment: scroll;
    /* Add image loading optimization */
    will-change: transform;
}

/* Responsive background images for different screen sizes */
@media (max-width: 768px) {
    .hero {
        /* Consider using a smaller mobile-optimized version */
        background-size: cover;
        background-position: center center;
        height: 80vh;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 70vh;
    }
}

.hero .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 0 20px;
}

.hero .content h1 {
    font-size: 55px;
}

.hero .content p {
    font-size: 23px;
    max-width: 600px;
    margin: 20px 0 30px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.hero * {
    z-index: 10;
}

.hero.blog {
    background: url('../images/home/blog.jpg') no-repeat center center/cover;
    height: 30vh;
}

/* Icons */
.icons {
    padding: 30px;
}

.icons h3 {
    font-weight: bold;
    margin-bottom: 15px;
}

.icons i {
    color: #2831a7;
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}


.cases img:hover {
    opacity: 0.7;
}

.team img {
    border-radius: 50%;
}

/* Callback form */
.callback-form {
    width: 100%;
    padding: 20px 0;
}

.callback-form label {
    display: block;
    margin-bottom: 5px;
}

.callback-form .form-control {
    margin-bottom: 15px;
}

.callback-form input {
    width: 100%;
    padding: 4px;
    height: 40px;
    border: #f5f5f5 1px solid;
}

.callback-form input:focus {
    outline-color: #2831a7;
}

.callback-form .btn {
    padding: 12px 0;
    margin-top: 20px;
}

/* Post */
.post {
    padding: 50px 30px;
}

.post h2 {
    font-size: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: #ccc solid 1px;
}

.post .meta {
    margin-bottom: 30px;
}

.post img {
    width: 300px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 30px;
}

/* Footer */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 200px;
}

.footer a {
    color: #fff;
}

.footer a:hover {
    color: #2831a7;
}

.footer .social > * {
    margin-right: 30px;
}

/* Mobile */
@media(max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: 120px;
        padding: 20px;
    }

    .navbar a {
        padding: 10px 10px;
        margin: 0 3px;
    }

    .flex-items {
        flex-direction: column;
    }

    .flex-columns .column, .flex-grid .column {
        flex: 100%;
        max-width: 100%;
    }

    .team img {
        width: 70%;
    }
}
/* Icon Grid - Custom 3-per-row layout */
.icon-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 40px;
}

.icon-box {
  flex: 1 1 calc(33.333% - 30px);
  background-color: #fff;
  border-radius: 10px;
  text-align: center;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.icon-box i {
  color: #2831a7;
  margin-bottom: 15px;
  font-size: 32px;
}

.icon-box h3 {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.icon-box p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.navbar .logo {
    color: white;
    transition: color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .logo {
    color: #2831a7;  /* or black, #000 */
}

.navbar.scrolled a {
    color: #333;
}

.contact-hover {
  position: relative;
}

.contact-hover {
  position: relative;
}

.contact-tooltip {
  display: none;
  position: absolute;
  top: 120%; /* Slightly lower to prevent overlap */
  left: 10%;
  transform: translateX(-50%);
  background-color: white;
  color: #333;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  font-size: 14px;
  z-index: 9999; /* Make sure it's on top */
  min-width: max-content; /* Ensure content fits */
}
.contact-hover:hover .contact-tooltip {
  display: block;
}

.contact-tooltip {
  margin-top: 8px;
}