#mainNav {
  min-height: 56px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#mainNav .navbar-toggler {
  font-size: 80%;
  padding: 0.75rem;
  color: #3c93b6;
  border: 1px solid #3c93b6;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#mainNav .navbar-toggler:hover {
  background-color: #3c93b6;
  color: white;
}

#mainNav .navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 147, 182, 0.3);
}

#mainNav .navbar-brand {
  color: #161616;
  font-weight: 700;
  padding: .9rem 0 0;
  transition: all 0.3s ease;
}

#mainNav .navbar-brand:hover {
  transform: scale(1.05);
}

#mainNav .navbar-nav .nav-item:hover {
  color: fade(white, 80%);
  outline: none;
  background-color: transparent;
}

#mainNav .navbar-nav .nav-item:active, #mainNav .navbar-nav .nav-item:focus {
  outline: none;
  background-color: transparent;
}

@media (min-width: 992px) {
  #mainNav {
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease-in-out;
  }
  #mainNav .navbar-brand {
    padding: .5rem 0;
    color: rgba(255, 255, 255, 0.9);
  }
  #mainNav .nav-link {
    transition: all 0.3s ease;
    padding: 2rem 1.5rem;
    color: #FFF;
    position: relative;
    font-weight: 500;
  }
  #mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3c93b6, #64b5f6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
  }
  #mainNav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
  }
  #mainNav .nav-link:hover::after {
    width: 80%;
  }
  #mainNav .nav-link:active {
    color: white;
  }
  #mainNav.navbar-shrink {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  #mainNav.navbar-shrink .navbar-brand {
    color: #161616;
  }
  #mainNav.navbar-shrink .nav-link {
    color: #161616;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 0.25rem solid transparent;
  }
  #mainNav.navbar-shrink .nav-link:hover {
    color: #3c93b6;
  }
  #mainNav.navbar-shrink .nav-link:active {
    color: #29657c;
  }
  #mainNav.navbar-shrink .nav-link.active {
    color: #3c93b6;
    outline: none;
    border-bottom: 0.25rem solid #3c93b6;
  }
}

/* Window Opening Effect */
.window-effect {
  position: relative;
  overflow: hidden;
}

.window-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.window-effect.active::before {
  transform: scale(1);
}

.window-effect > * {
  position: relative;
  z-index: 2;
}

/* Section Transitions */
section {
  position: relative;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}

section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.masthead {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 35rem;
  padding: 10rem 0;
  background: linear-gradient(135deg, rgba(22, 22, 22, 0.3) 0%, rgba(22, 22, 22, 0.7) 75%, #161616 100%), url("../img/bg-masthead.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.masthead::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(60, 147, 182, 0.1), rgba(100, 181, 246, 0.1));
  z-index: 1;
}

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

.masthead h1 {
  font-family: 'Varela Round';
  font-size: 3.5rem;
  line-height: 3.5rem;
  letter-spacing: 0.8rem;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.masthead h2 {
  max-width: 30rem;
  font-size: 1.5rem;
  line-height: 2rem;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .masthead h1 {
    font-size: 4rem;
    line-height: 4rem;
  }
}

@media (min-width: 992px) {
  .masthead {
    height: 100vh;
    padding: 0;
  }
  .masthead h1 {
    font-size: 6.5rem;
    line-height: 6.5rem;
    letter-spacing: 0.8rem;
  }
  .masthead h2 {
    max-width: 50rem;
    font-size: 1.25rem;
  }
}

.btn {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 1.25rem 2rem;
  font-family: 'Varela Round';
  font-size: 80%;
  text-transform: uppercase;
  letter-spacing: .15rem;
  border: 0;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-adjust {
  font-size: 50% !important;
  padding: 0.5rem 0.75rem !important;
}

.btn-primary {
  background: linear-gradient(135deg, #3c93b6, #64b5f6);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2f7490, #42a5f5);
  transform: translateY(-2px);
}

.btn-primary:focus {
  background: linear-gradient(135deg, #2f7490, #42a5f5);
  color: white;
  box-shadow: 0 0 0 3px rgba(60, 147, 182, 0.3);
}

.btn-primary:active {
  background: linear-gradient(135deg, #29657c, #1976d2) !important;
  transform: translateY(0);
}

.about-section {
  padding-top: 3rem;
  background: linear-gradient(135deg, #161616 0%, rgba(22, 22, 22, 0.9) 50%, rgba(22, 22, 22, 0.8) 100%);
  position: relative;
}

.about-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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.about-section p {
  margin-bottom: 5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.projects-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.projects-section .featured-text {
  padding: 2rem;
}

@media (min-width: 992px) {
  .projects-section .featured-text {
    padding: 0 0 0 2rem;
  }
}

.projects-section .project-text {
  padding: 2rem;
}

@media (min-width: 992px) {
  .projects-section .project-text {
    padding: 3rem;
  }
  .projects-section .project-text hr {
    border-color: #3c93b6;
    border-width: 0.25rem;
    width: 50px;
  }
}

.signup-section {
  position: relative;
  padding: 7rem 0;
  background: linear-gradient(to bottom, rgba(22, 22, 22, 0.1) 0%, rgba(22, 22, 22, 0.5) 75%, #161616 100%), url("../img/bg-signup.jpg");
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
}

.signup-section .form-inline input {
  box-shadow: 0 0.1875rem 0.1875rem 0 rgba(0, 0, 0, 0.1) !important;
  padding: 1.25rem 2rem;
  height: auto;
  font-family: 'Varela Round';
  font-size: 80%;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  border: 0;
  border-radius: 50px;
}

.contact-section {
  padding-top: 5rem;
}

.contact-section .card {
  border: 0;
  border-bottom: 0.25rem solid #3c93b6;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.contact-section .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-section .card h4 {
  font-size: 0.8rem;
  font-family: 'Varela Round';
  text-transform: uppercase;
  letter-spacing: 0.15rem;
}

.contact-section .card hr {
  border-color: #3c93b6;
  border-width: 0.25rem;
  width: 3rem;
}

.contact-section .social {
  margin-top: 5rem;
}

.contact-section .social a {
  display: inline-block;
  height: 3rem;
  width: 3rem;
  background-color: #3c93b6;
  border-radius: 100%;
  text-align: center;
  font-size: 1.5rem;
  line-height: 3rem;
  transition: all 0.3s ease;
}

.contact-section .social a:hover {
  background-color: #2f7490;
  transform: scale(1.1) rotate(5deg);
}

.contact-section .social a:active {
  background-color: #29657c;
}

.col-md-5 {
  margin-bottom: 3rem;
}

body {
  font-family: 'Nunito';
  letter-spacing: 0.0625em;
}

a {
  color: #3c93b6;
}

a:focus, a:hover {
  text-decoration: none;
  color: #2f7490;
}

.bg-black {
  background-color: #161616 !important;
}

.bg-primary {
  background-color: #3c93b6 !important;
}

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

footer {
  padding: 2rem 0;
}

.faFix {
  color: #3c93b6;
}

/* Modern Gallery Styles */
#gallery {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 0;
  position: relative;
}

#gallery::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="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  pointer-events: none;
}

.carousel {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.carousel-item img {
  transition: transform 0.3s ease;
}

.carousel:hover .carousel-item img {
  transform: scale(1.02);
}

.carousel-control-prev,
.carousel-control-next {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 20px;
}

/* Enhanced Modal Styles */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #3c93b6, #64b5f6);
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  border-radius: 0 0 15px 15px;
}

/* Scroll Animations */
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .masthead h1 {
    font-size: 2.5rem;
    line-height: 2.5rem;
    letter-spacing: 0.5rem;
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 70%;
  }
  
  .contact-section .card {
    margin-bottom: 2rem;
  }
}

/* Loading animation for sections */
.section-loading {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Additional modern styles */
.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 1);
  color: white;
  transform: translateY(-2px);
}

.video-container {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-container video {
  border-radius: 15px;
}

/* Enhanced image animations */
img {
  transition: all 0.3s ease;
}

img.fade-in {
  opacity: 0;
  transform: scale(0.95);
}

img.loaded {
  opacity: 1;
  transform: scale(1);
}

/* Smooth transitions for all elements */
.transition-active {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Enhanced text styling */
h2 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Improved spacing */
.container {
  position: relative;
  z-index: 2;
}

/* Enhanced shadows */
.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
.btn:focus,
.nav-link:focus,
a:focus {
  outline: 2px solid rgba(60, 147, 182, 0.5);
  outline-offset: 2px;
}

/* Loading spinner for better UX */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
  .masthead h1 {
    font-size: 2rem;
    line-height: 2rem;
    letter-spacing: 0.3rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 65%;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 10px;
  }
}