/* Updated Root Variables */
:root {
    --primary-dark: #0c4a9e;  /* Dark blue instead of red */
    --primary-blue: #3b82f6;  /* Medium blue */
    --secondary-blue: #1e40af; /* Darker blue for accents */
    --light-blue: #dbeafe;    /* Light blue for backgrounds */
    --dark: #222;
    --light: #fff;
    --off-white: #f5f5f5;
}

.contact-button {
    background-color: var(--primary-dark);
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Jost', serif;
}

.section {
    opacity: 0;
}

/* Base header styles */
#header {
    transition: all 0.3s ease-in-out;
}

/* Home page - transparent header */
#header.transparent-header {
    background-color: transparent;
    backdrop-filter: blur(0px);
}

#header.transparent-header.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Other pages - always white header */
#header.white-header {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Text colors for transparent header */
#header.transparent-header .nav-link {
    color: white;
}

#header.transparent-header .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

#header.transparent-header h1 {
    color: white;
}

#header.transparent-header p {
    color: rgba(255, 255, 255, 0.8);
}

#header.transparent-header #menuButton svg {
    color: white;
    stroke: white;
}

/* Underline color for nav links */
#header.transparent-header .nav-link::after {
    background-color: white;
}

/* Text colors for white header */
#header.white-header .nav-link {
    color: #1f2937; /* gray-800 */
}

#header.white-header .nav-link:hover {
    color: #4b5563; /* gray-600 */
}

/* Modified hero styles to ensure visibility */
#home {
    opacity: 1 !important;
    padding-top: 0; /* Remove padding since header is transparent */
}

/* Hero diagonal styling */
.hero-diagonal {
    position: relative;
    overflow: hidden;
    height: 100vh;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 1 !important;
    margin-top: 0;
}

/* Video element styling */
.hero-diagonal video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Ensure content stays above video */
.hero-content {
    position: relative;
    z-index: 10;
}

/* Fix for elements that should be initially visible */
#heroContent {
    opacity: 1 !important;
}

/* Ensure video loads gracefully */
.hero-diagonal video::-webkit-media-controls {
    display: none !important;
}

/* Fallback background if video fails to load */
.hero-diagonal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, var(--primary-blue), var(--secondary-blue));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.hero-diagonal.video-error::before {
    opacity: 1;
}

/* Value cards */
.value-card {
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Service cards */
.service-card {
    transition: transform 0.3s ease;
    height: 100%;  /* Ensure consistent height */
    display: flex;
    flex-direction: column;
}

.service-card .h-64 {
    flex-shrink: 0;  /* Prevent the image area from shrinking */
}

.service-card > div:last-child {
    flex-grow: 1;   /* Allow the content area to grow */
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: scale(1.03);
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Testimonial slider */
.testimonial-slider {
    overflow: hidden;
    position: relative;
}

/* Contact diagonal */
.contact-diagonal {
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%);
}

/* Navigation links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-dark);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Logo container */
.logo-container {
    position: relative;
    z-index: 100;
}

/* CTA buttons */
.cta-button {
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Scroll down indicator */
.scroll-down {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Responsive fixes */
@media (max-width: 768px) {
    #header.transparent-header.scrolled {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .hero-diagonal {
        height: calc(100vh - 60px);
        margin-top: 60px;
    }
    
    .hero-content {
        padding-top: 2rem;
    }
    
    /* If the grid is causing issues, ensure the grid container has proper settings */
    #services .grid {
        grid-auto-rows: 1fr;  /* Make all rows the same height */
    }
}

/* Color Overrides - Blue and White Scheme */

/* Replace all red gradients with blue gradients */
.bg-gradient-to-r.from-red-800.to-red-900,
.bg-gradient-to-r.from-red-900.to-red-800,
.cta-button.bg-gradient-to-r.from-red-800.to-red-900 {
    background-image: linear-gradient(to right, var(--primary-dark), var(--secondary-blue));
}

.hover\:from-red-900.hover\:to-red-800:hover,
.hover\:from-red-800.hover\:to-red-900:hover {
    background-image: linear-gradient(to right, var(--secondary-blue), var(--primary-dark));
}

/* Replace all border colors */
.border-t-4.border-red-800,
.border-red-800 {
    border-color: var(--primary-dark);
}

.border-t-4.border-blue-800,
.border-blue-800 {
    border-color: var(--secondary-blue);
}

/* Replace all background colors */
.bg-red-800,
.bg-red-900 {
    background-color: var(--primary-dark);
}

.bg-red-100 {
    background-color: var(--light-blue);
}

.bg-red-600 {
    background-color: var(--primary-blue);
}

/* Replace all text colors */
.text-red-800,
.text-red-700,
.text-red-600 {
    color: var(--primary-dark);
}

/* Replace mixed gradients */
.from-red-800.to-blue-800,
.from-red-800.to-blue-900,
.from-red-900.to-blue-900 {
    background-image: linear-gradient(to right, var(--primary-blue), var(--secondary-blue));
}

.from-red-50.to-blue-50 {
    background-image: linear-gradient(to right, #f0f9ff, #dbeafe);
}

/* Update section dividers */
.w-24.h-1.bg-red-800,
.w-20.h-1.bg-red-800,
.w-16.h-1.bg-red-800 {
    background-color: var(--primary-dark);
}

/* Making sure BB3030 color (used in footer) is updated */
[fill="#bb3030"] {
    fill: var(--primary-dark);
}

/* Update polygon colors in any remaining SVGs */
[fill="#722121"],
[fill="#465a89"] {
    fill: var(--primary-dark);
}

/* Ensure CTA buttons have correct styling */
.cta-button.bg-primary-dark {
    background-color: var(--primary-dark);
}

/* Footer special styling */
footer .text-red-600 {
    color: var(--primary-blue);
}
/* Add these to your style.css file */

/* General mobile responsiveness */
@media (max-width: 768px) {
  /* Fix container padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Adjust section padding */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  /* Reduce heading sizes */
  h2.text-3xl.md\:text-5xl {
    font-size: 2rem;
  }
  
  /* Adjust grid layouts */
  .grid {
    grid-gap: 1.5rem;
  }
  
  /* Ensure proper padding in cards */
  .p-8 {
    padding: 1.25rem;
  }
  
  /* Footer adjustments */
  footer .grid {
    grid-row-gap: 2rem;
  }
  
  /* Fix service cards height */
  .service-card .h-64 {
    height: 12rem;
  }
}

/* Fix for team page */
@media (max-width: 768px) {
  #team .bg-white {
    padding: 1.25rem;
  }
}

/* Fix for clients page */
@media (max-width: 768px) {
  #clients .rounded-full {
    width: 5rem;
    height: 5rem;
  }
}

/* Fix for contact page */
@media (max-width: 768px) {
  #contact .p-8, 
  #contact .p-12 {
    padding: 1.25rem;
  }
  
  .contact-diagonal {
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
  }
}
/* Fix header positioning on mobile */
@media (max-width: 768px) {
  /* Remove white space above header */
  #header {
    top: 0;
    margin-top: 0;
    position: fixed;
    width: 100%;
    z-index: 50;
  }
  
  /* Ensure content doesn't overlap with fixed header */
  body {
    padding-top: 70px; /* Adjust based on your header height */
  }
  
  /* Home page special case */
  body.home-page {
    padding-top: 0;
  }
  
  #home {
    margin-top: 0;
  }
  
  /* Make sure header stays above content */
  #header.scrolled {
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  /* Ensure correct z-index layering */
  .section {
    position: relative;
    z-index: 1;
  }
}

/* Homepage-specific header fixes for mobile */
@media (max-width: 768px) {
  /* Special case for homepage only */
  body.home-page {
    padding-top: 0 !important; /* Remove any body padding on homepage */
  }
  
  /* Transparent header treatment for homepage */
  body.home-page #header {
    position: absolute !important; /* Use absolute instead of fixed for initial state */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    z-index: 1000 !important;
  }
  
  /* Fix hero section positioning */
  body.home-page .hero-diagonal {
    height: 100vh !important;
    margin-top: 0 !important;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%) !important;
  }
  
  /* Fix hero content positioning */
  body.home-page .hero-content {
    padding-top: 80px !important; /* Give space for the header */
  }
  
  /* Header behavior when scrolled */
  body.home-page #header.scrolled {
    position: fixed !important; /* Change to fixed when scrolled */
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
  }
  
  /* Override any competing styles */
  body.home-page #header.transparent-header {
    margin-top: 0 !important;
    padding: 0.5rem 1rem !important;
  }
}