/* Animated Background - Lebanese Cedar Theme */
body {
  background: linear-gradient(-45deg, #2d5a27, #4a7c59, #1e3a1a, #0f5132, #2d5a27);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Floating particles background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(46, 125, 50, 0.15) 2px, transparent 2px),
    radial-gradient(circle at 80% 20%, rgba(139, 195, 74, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 40% 40%, rgba(76, 175, 80, 0.12) 1px, transparent 1px);
  background-size: 100px 100px, 150px 150px, 80px 80px;
  animation: float 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Animated Cedar Trees Background */
body::after {
  content: '🌲';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 60px;
  color: rgba(46, 125, 50, 0.08);
  background-image: 
    radial-gradient(circle at 15% 85%, transparent 30px, transparent 31px),
    radial-gradient(circle at 85% 15%, transparent 30px, transparent 31px),
    radial-gradient(circle at 60% 60%, transparent 30px, transparent 31px),
    radial-gradient(circle at 25% 40%, transparent 30px, transparent 31px),
    radial-gradient(circle at 75% 80%, transparent 30px, transparent 31px);
  background-size: 300px 300px, 400px 400px, 250px 250px, 350px 350px, 200px 200px;
  background-repeat: repeat;
  animation: cedarFloat 25s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

@keyframes cedarFloat {
  0% { 
    transform: translate3d(0, 0, 0) rotate(0deg);
    background-position: 0% 0%, 100% 100%, 50% 50%, 25% 75%, 75% 25%;
  }
  25% {
    background-position: 25% 25%, 75% 75%, 75% 25%, 50% 50%, 50% 50%;
  }
  50% {
    background-position: 50% 50%, 50% 50%, 100% 0%, 75% 25%, 25% 75%;
  }
  75% {
    background-position: 75% 75%, 25% 25%, 25% 75%, 100% 0%, 0% 100%;
  }
  100% { 
    transform: translate3d(-50px, -50px, 0) rotate(360deg);
    background-position: 100% 100%, 0% 0%, 50% 50%, 25% 75%, 75% 25%;
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(-100px, -100px, 0) rotate(360deg); }
}

/* Content overlay */
.content-overlay {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  margin: 20px 0;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.content-overlay:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Header Enhancements */
header {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 20px 20px;
  position: relative;
  z-index: 10;
  border-bottom: 2px solid rgba(46, 125, 50, 0.2);
}

header h1 {
  background: linear-gradient(45deg, #2e7d32, #4caf50, #1b5e20);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}

/* Logo Animation */
img[alt="Cedars Cloud Solutions Logo"] {
  border-radius: 50%;
  transition: transform 0.3s ease;
  animation: logoFloat 6s ease-in-out infinite;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

img[alt="Cedars Cloud Solutions Logo"]:hover {
  transform: scale(1.1) rotate(5deg);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Services Cards Enhancement */
.service-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 30px;
  margin: 15px 0;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
  font-size: 3rem;
  background: linear-gradient(45deg, #2e7d32, #4caf50, #1b5e20);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Portfolio Cards */
#portfolio-list .card {
  margin-bottom: 20px;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#portfolio-list .card:hover {
  transform: translateY(-15px) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

#portfolio-list .card-img-top {
  transition: transform 0.4s ease;
}

#portfolio-list .card:hover .card-img-top {
  transform: scale(1.1);
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, 
    rgba(46, 125, 50, 0.2), 
    rgba(33, 37, 41, 0.85), 
    rgba(76, 175, 80, 0.2));
  color: white !important;
}

.contact-section h2,
.contact-section h5,
.contact-section p,
.contact-section span {
  color: white !important;
}

.contact-section .service-icon {
  background: linear-gradient(45deg, #81c784, #66bb6a, #4caf50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.5));
}

.contact-section .bi-instagram,
.contact-section .bi-whatsapp,
.contact-section .bi-telephone {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Footer Enhancement - Woody Lebanese Cedar Theme */
footer {
  background: linear-gradient(135deg, 
    rgba(62, 39, 35, 0.95) 0%,
    rgba(101, 67, 33, 0.95) 25%,
    rgba(78, 52, 46, 0.95) 50%,
    rgba(92, 64, 51, 0.95) 75%,
    rgba(62, 39, 35, 0.95) 100%) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  border-radius: 20px 20px 0 0;
  position: relative;
  z-index: 10;
  border-top: 3px solid #dc143c;
  overflow: hidden;
}

/* Woody texture overlay */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(160, 82, 45, 0.1) 1px, transparent 1px),
    linear-gradient(45deg, rgba(101, 67, 33, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(92, 64, 51, 0.05) 25%, transparent 25%);
  background-size: 30px 30px, 20px 20px, 40px 40px, 40px 40px;
  animation: woodGrain 20s linear infinite;
  pointer-events: none;
}

@keyframes woodGrain {
  0% { background-position: 0% 0%, 100% 100%, 0% 0%, 100% 0%; }
  25% { background-position: 25% 25%, 75% 75%, 10% 10%, 90% 10%; }
  50% { background-position: 50% 50%, 50% 50%, 20% 20%, 80% 20%; }
  75% { background-position: 75% 75%, 25% 25%, 30% 30%, 70% 30%; }
  100% { background-position: 100% 100%, 0% 0%, 40% 40%, 60% 40%; }
}

/* Cedar tree pattern in footer */
footer::after {
  content: '🌲';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0.1;
  animation: footerCedar 8s ease-in-out infinite;
  color: rgba(46, 125, 50, 0.3);
  text-shadow: 0 0 20px rgba(46, 125, 50, 0.2);
}

@keyframes footerCedar {
  0%, 100% { 
    opacity: 0.1; 
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 0.2; 
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Footer text styling */
footer span,
footer a,
footer button,
footer input::placeholder {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

footer .btn-light {
  background: linear-gradient(45deg, rgba(139, 69, 19, 0.8), rgba(160, 82, 45, 0.8));
  border: 1px solid rgba(222, 184, 135, 0.5);
  color: white !important;
  transition: all 0.3s ease;
}

footer .btn-light:hover {
  background: linear-gradient(45deg, rgba(160, 82, 45, 0.9), rgba(139, 69, 19, 0.9));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

footer .btn-outline-light {
  border-color: rgba(222, 184, 135, 0.5);
  color: rgba(222, 184, 135, 0.9) !important;
  transition: all 0.3s ease;
}

footer .btn-outline-light:hover {
  background: linear-gradient(45deg, rgba(139, 69, 19, 0.2), rgba(160, 82, 45, 0.2));
  border-color: rgba(222, 184, 135, 0.8);
  color: white !important;
  transform: translateY(-2px);
}

/* Admin form styling in footer */
footer .form-control {
  background: rgba(139, 69, 19, 0.3);
  border: 1px solid rgba(222, 184, 135, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

footer .form-control:focus {
  background: rgba(139, 69, 19, 0.4);
  border-color: rgba(222, 184, 135, 0.6);
  box-shadow: 0 0 10px rgba(222, 184, 135, 0.3);
  color: white;
}

footer .form-control::placeholder {
  color: rgba(222, 184, 135, 0.7) !important;
}

/* Button Enhancements */
.btn {
  border-radius: 25px;
  transition: all 0.3s ease;
  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.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .content-overlay {
    margin: 10px;
    padding: 20px;
  }
  
  body::before {
    animation-duration: 30s;
  }
}

/* Lebanese Theme Enhancements */
.lebanese-accent {
  border-left: 4px solid #dc143c;
  border-right: 4px solid #dc143c;
  background: linear-gradient(90deg, 
    rgba(220, 20, 60, 0.15) 0%, 
    rgba(46, 125, 50, 0.2) 20%,
    rgba(33, 37, 41, 0.85) 50%, 
    rgba(46, 125, 50, 0.2) 80%,
    rgba(220, 20, 60, 0.15) 100%);
  backdrop-filter: blur(15px);
  color: white !important;
}

.lebanese-accent h2,
.lebanese-accent p,
.lebanese-accent span,
.lebanese-accent .lead {
  color: white !important;
}

.lebanese-accent .service-icon {
  background: linear-gradient(45deg, #81c784, #66bb6a, #4caf50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.5));
}

.lebanese-accent .bi-check-circle-fill {
  color: #4caf50 !important;
  filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.5));
}

.cedar-pattern::after {
  content: '🌲';
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  opacity: 0.4;
  animation: fadeInOut 3s ease-in-out infinite;
  text-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

@keyframes fadeInOut {
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.6; 
    transform: scale(1.1);
  }
}

/* Lebanese Flag Colors Accent */
.lebanese-border {
  border-top: 3px solid #dc143c;
  border-bottom: 3px solid #dc143c;
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(15px);
}

.lebanese-border::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: calc(100% - 6px);
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(46, 125, 50, 0.08) 40%, 
    rgba(46, 125, 50, 0.08) 60%, 
    transparent 100%);
  z-index: -1;
}