/*
  Custom Enhancements for Commons Studio LLC
  Additional styles and animations to elevate the design
*/

/* ===== Enhanced Typography ===== */
body {
  font-family: 'Open Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
}

/* ===== Enhanced Logo Animation ===== */
.logo img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ===== Enhanced Header/Navigation ===== */
.header-area {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.header-area.background-header {
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

/* Ensure navigation text is visible against white background */
.header-area .main-nav .nav li a {
  color: #2a2a2a !important;
}

.header-area .main-nav .nav li a:hover,
.header-area .main-nav .nav li a.active {
  color: #03a4ed !important;
}

/* Ensure navigation is always visible on desktop */
@media (min-width: 768px) {
  .header-area .main-nav .nav {
    display: flex !important;
    align-items: center;
  }
}

.main-nav ul.nav li a {
  position: relative;
  transition: color 0.3s ease;
}

.main-nav ul.nav li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #03a4ed;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav ul.nav li a:hover::after,
.main-nav ul.nav li a.active::after {
  width: 80%;
}

/* ===== Enhanced Buttons ===== */
.main-blue-button a,
.main-green-button a,
.main-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(3, 164, 237, 0.2);
}

.main-blue-button a::before,
.main-green-button a::before,
.main-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.main-blue-button a:hover::before,
.main-green-button a:hover::before,
.main-button:hover::before {
  width: 300px;
  height: 300px;
}

.main-blue-button a:hover,
.main-green-button a:hover,
.main-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(3, 164, 237, 0.3);
}

/* ===== Enhanced Hero Section ===== */
.main-banner {
  position: relative;
  overflow: hidden;
}

.main-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, rgba(3, 164, 237, 0.1) 0%, rgba(2, 132, 199, 0.05) 100%);
  border-radius: 50%;
  animation: floatAnimation 20s ease-in-out infinite;
}

.main-banner .right-image img {
  animation: floatImage 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

@keyframes floatAnimation {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -20px) rotate(5deg); }
  50% { transform: translate(-20px, 20px) rotate(-5deg); }
  75% { transform: translate(20px, 20px) rotate(5deg); }
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ===== Enhanced Feature Cards ===== */
.features-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 15px;
  overflow: hidden;
}

.features-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.features-item .number {
  transition: all 0.3s ease;
}

.features-item:hover .number {
  transform: scale(1.1) rotate(5deg);
}

.features-item .line-dec {
  transition: width 0.5s ease;
}

.features-item:hover .line-dec {
  width: 100% !important;
}

/* ===== Modern Process Cards ===== */
.process-card {
  cursor: default;
}

.process-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 40px rgba(3, 164, 237, 0.25) !important;
}

.process-card:hover > div:first-of-type {
  transform: scale(1.1) rotate(5deg);
}

.process-card > div:first-of-type {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-card i {
  transition: all 0.3s ease;
}

.process-card:hover i {
  transform: scale(1.1);
}

/* ===== Modern Icon Styling ===== */
.icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.icon-box i {
  color: #2a2a2a;
  transition: all 0.5s ease;
}

.features-item:hover .icon-box i {
  color: #fff;
  transform: scale(1.15) rotateY(360deg);
}

.first-feature .icon-box i {
  color: #03a4ed;
}

.second-feature .icon-box i {
  color: #0284c7;
}

.features-item:hover .icon-box i {
  color: #fff;
}

/* ===== Enhanced About Section ===== */
.about-us {
  position: relative;
  z-index: 1;
}

.about-us .left-image img {
  transition: transform 0.5s ease;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.about-us:hover .left-image img {
  transform: scale(1.02);
}

/* ===== Enhanced Service Items ===== */
.service-item {
  transition: all 0.4s ease;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(3, 164, 237, 0.1), transparent);
  transition: left 0.5s ease;
}

.service-item:hover::before {
  left: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-item .icon img {
  transition: transform 0.3s ease;
}

.service-item:hover .icon img {
  transform: rotate(360deg) scale(1.1);
}

/* ===== Capability Cards (for new Expertise section) ===== */
.capability-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.capability-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(3, 164, 237, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.capability-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(3, 164, 237, 0.2) !important;
}

.capability-card:hover::before {
  opacity: 1;
}

.capability-card i {
  transition: transform 0.3s ease;
}

.capability-card:hover i {
  transform: scale(1.1) rotate(5deg);
}

.our-capabilities {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* ===== Enhanced Portfolio Section ===== */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.portfolio-item:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item .thumb img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.portfolio-item:hover .thumb img {
  transform: scale(1.1);
  filter: brightness(0.8);
}

.portfolio-item .hover-content {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .hover-content {
  backdrop-filter: blur(5px);
}

/* ===== Enhanced Contact Section ===== */
.contact-us form input,
.contact-us form textarea {
  transition: all 0.3s ease;
  border: 2px solid #e0e0e0;
}

.contact-us form input:focus,
.contact-us form textarea:focus {
  border-color: #03a4ed;
  box-shadow: 0 0 15px rgba(3, 164, 237, 0.2);
  transform: translateY(-2px);
}

.contact-info ul li {
  transition: all 0.3s ease;
  border-radius: 10px;
  padding: 15px;
}

.contact-info ul li:hover {
  background: rgba(3, 164, 237, 0.05);
  transform: translateX(5px);
}

.contact-info .icon {
  transition: transform 0.3s ease;
}

.contact-info ul li:hover .icon {
  transform: scale(1.1) rotate(5deg);
}

/* ===== Enhanced Footer ===== */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #03a4ed, transparent);
}

footer a {
  transition: all 0.3s ease;
  position: relative;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #03a4ed;
  transition: width 0.3s ease;
}

footer a:hover::after {
  width: 100%;
}

/* ===== Preloader Enhancement ===== */
.js-preloader .preloader-inner {
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ===== Smooth Scroll Enhancement ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Section Reveal Animation ===== */
.section {
  opacity: 0;
  animation: sectionReveal 0.8s ease forwards;
}

@keyframes sectionReveal {
  to {
    opacity: 1;
  }
}

/* ===== Gradient Text Effect ===== */
.gradient-text {
  background: linear-gradient(135deg, #03a4ed 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Enhanced Section Headings ===== */
.section-heading {
  position: relative;
}

.section-heading h2 em {
  position: relative;
  font-style: normal;
  color: #03a4ed;
}

.section-heading h2 span {
  position: relative;
  background: linear-gradient(135deg, #03a4ed 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Parallax Effect for Background Elements ===== */
.parallax-element {
  transition: transform 0.3s ease-out;
}

/* ===== Mobile Responsiveness Enhancements ===== */
@media (max-width: 992px) {
  .main-banner::before {
    width: 400px;
    height: 400px;
  }
  
  .features-item:hover,
  .service-item:hover,
  .portfolio-item:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .main-banner::before {
    display: none;
  }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #03a4ed 0%, #0284c7 100%);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* ===== Loading Animation for Images ===== */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ===== Accessibility Enhancements ===== */
*:focus {
  outline: 2px solid #03a4ed;
  outline-offset: 2px;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(3, 164, 237, 0.3);
}

/* ===== Print Styles ===== */
@media print {
  .header-area,
  .main-blue-button,
  .main-green-button,
  footer {
    display: none;
  }
}
