/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  overflow-y: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', sans-serif;
}

p, span, div, a, button, input, textarea {
  font-family: 'Lato', sans-serif;
}

/* Letter spacing for paragraphs */
.contact-section p {
  letter-spacing: 0.04em;
}

.card p {
  letter-spacing: 0.04em;
}

/* Header styling */
header {
  box-shadow: 0px 0.5px 5px #5555559e;
  transition: box-shadow 0.3s ease-in-out;
}

header.dark-theme {
  border-bottom-color: #222222;
}

/* Remove header shadow when mobile menu is open */
header.menu-open {
  box-shadow: none !important;
}

/* Contact button positioning - sliding approach */
#contact-button {
  width: 60px; /* Only wide enough for mailbox initially - no text visible */
  transition: width 0.4s ease-in-out, opacity 0.3s ease-in-out; /* Smooth width and opacity transitions */
  height: 60px; /* Fixed height */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align content to left */
  right: 20px; /* Give some space from the edge */
  overflow: hidden; /* Hide text that's off-screen */
}

#contact-text {
  white-space: nowrap; /* Prevent text wrapping */
  margin-left: 20px; /* Space between mailbox and text */
  opacity: 0; /* Start invisible */
  transition: opacity 0.4s ease-in-out; /* Smooth opacity transition */
}

/* On hover, expand button to show text */
#contact-button:hover {
  width: 200px; /* Expand to show text */
}

/* On hover, fade in the text */
#contact-button:hover #contact-text {
  opacity: 1; /* Fade in the text */
}

/* Mobile menu open state */
#mobile-menu.open {
  transform: translateX(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* Footer - solid background, above orbs */
#site-footer {
  position: relative;
  z-index: 10;
  background-color: #111111 !important;
  isolation: isolate; /* Create new stacking context */
}

/* Footer menu item color transition */
footer a {
  transition: color 0.3s ease;
  color: white;
}

footer a:hover {
  color: aquamarine;
}

/* Ensure header border is visible */
header .backdrop-blur {
  border-bottom: inherit;
}

/* Nav item transitions */
#nav-esileht, #nav-teenused, #nav-kontakt, #nav-blog {
  transition: color 0.2s ease-in-out, transform 0.3s ease;
  transform: translateY(0);
}

#nav-esileht:hover, #nav-teenused:hover, #nav-kontakt:hover, #nav-blog:hover {
  transform: translateY(-2px);
}

/* Logo styling */
#header-logo-light, #header-logo-dark {
  width: 200px !important;
  height: auto;
  max-width: 200px;
}

/* Show text boxes */
.container {
  opacity: 1;
  transform: translateY(0);
}

/* Disable animations for debugging */
.no-animations * {
  animation: none !important;
  transition: none !important;
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradient-move {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

@keyframes breatheIn {
  0% {
    opacity: 0.1;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.1;
    transform: scale(0.8);
  }
}

@keyframes breatheOut {
  0% {
    opacity: 0.8;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.1;
    transform: scale(0.8);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

@keyframes glowPulse {
  0% {
    filter: drop-shadow(0 0 2px rgba(0, 128, 128, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(0, 128, 128, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 2px rgba(0, 128, 128, 0.3));
  }
}

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

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

@keyframes subtlePulse {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.gear-spin {
  transform-origin: center;
  transition: transform 0.1s linear;
}

.gear-spinning {
  animation: spin 3s linear infinite;
}

.gear-stopping {
  animation: none;
  transition: transform 0.5s ease-out;
}

.gear-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-height: 71px; /* Match other card image heights */
}

.animate-gradient-move {
  background-size: 200% auto;
  animation: gradient-move 8s ease infinite;
}

.animated-bg {
  display: none;
}

.gradient-circle {
  display: none;
}

/* First section circles - closer to hero content */
.circle-1 {
  top: 30%;
  left: 15%;
  width: 400px;
  height: 400px;
  background: rgba(14, 165, 233, 0.4); /* primary-500 */
  animation: breatheIn 8s ease-in-out infinite;
}

.circle-2 {
  top: 40%;
  right: 20%;
  width: 450px;
  height: 450px;
  background: rgba(20, 184, 166, 0.4); /* accent-500 */
  animation: breatheOut 10s ease-in-out infinite;
}

.circle-3 {
  top: 50%;
  left: 25%;
  width: 350px;
  height: 350px;
  background: rgba(14, 165, 233, 0.35); /* primary-500 */
  animation: breatheIn 12s ease-in-out infinite;
}

.circle-4 {
  top: 35%;
  left: 45%;
  width: 300px;
  height: 300px;
  background: rgba(30, 41, 59, 0.4); /* dark-800 */
  animation: breatheOut 9s ease-in-out infinite;
}

/* Second section circles - closer to services content */
.circle-5 {
  top: 110%;
  left: 25%;
  width: 400px;
  height: 400px;
  background: rgba(20, 184, 166, 0.5); /* accent-500 */
  animation: breatheOut 11s ease-in-out infinite;
}

.circle-6 {
  top: 130%;
  right: 30%;
  width: 350px;
  height: 350px;
  background: rgba(14, 165, 233, 0.5); /* primary-500 */
  animation: breatheIn 13s ease-in-out infinite;
}

.circle-7 {
  top: 150%;
  left: 35%;
  width: 300px;
  height: 300px;
  background: rgba(20, 184, 166, 0.45); /* accent-500 */
  animation: breatheOut 14s ease-in-out infinite;
}

.circle-8 {
  top: 170%;
  left: 55%;
  width: 250px;
  height: 250px;
  background: rgba(30, 41, 59, 0.5); /* dark-800 */
  animation: breatheIn 10s ease-in-out infinite;
}

/* Services section circles */
.circle-9 {
  top: 200%;
  left: 15%;
  width: 400px;
  height: 400px;
  background: rgba(14, 165, 233, 0.5); /* primary-500 */
  animation: breatheIn 8s ease-in-out infinite;
}

.circle-10 {
  top: 220%;
  right: 20%;
  width: 450px;
  height: 450px;
  background: rgba(20, 184, 166, 0.5); /* accent-500 */
  animation: breatheOut 10s ease-in-out infinite;
}

.circle-11 {
  top: 240%;
  left: 25%;
  width: 350px;
  height: 350px;
  background: rgba(14, 165, 233, 0.45); /* primary-500 */
  animation: breatheIn 12s ease-in-out infinite;
}

.circle-12 {
  top: 260%;
  left: 45%;
  width: 300px;
  height: 300px;
  background: rgba(30, 41, 59, 0.5); /* dark-800 */
  animation: breatheOut 9s ease-in-out infinite;
}

.blur-overlay {
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.card-container {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem !important;
  background: transparent;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem !important;
  }
}

@media (min-width: 1024px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem !important;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  width: 100%;
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
  overflow: visible;
  cursor: pointer;
  min-height: auto;
}

/* Blog cards need overflow visible for the read more button */
.card.blog-card {
  overflow: visible !important;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0;
}

/* Desktop hover effect removed - no positioning on hover */

.card h2 {
  font-size: 1.5rem;
  text-align: left;
  color: white;
  margin: 0;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  top: 0;
  flex: 1;
}

.card-image {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  margin: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Mobile hero heading */
@media (max-width: 767px) {
  .hero h1,
  .main-container h1 {
    font-size: 3rem !important;
    line-height: 1.1 !important;
  }
}

/* Desktop hero heading */
@media (min-width: 1024px) {
  .hero h1,
  .main-container h1 {
    font-size: 4rem !important;
    line-height: 1.1 !important;
  }
}

/* Mobile service card layout */
@media (max-width: 767px) {
  .card-container {
    background: transparent;
    border-radius: 0;
    gap: 1rem !important;
    padding: 0;
  }
  
  .card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 1rem;
    min-height: auto;
    background: transparent;
    border: 1px solid #5555559e;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }
  
  /* Disable hover effects on mobile - they interfere with touch */
  .card:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    transform: none;
  }
  
  .card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: flex-start;
    padding: 0;
  }
  
  .card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
  }
  
  .card-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .card h2 {
    font-size: 1.4rem;
    margin-bottom: 0;
    text-align: left;
    font-weight: 300;
    color: white;
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  
  .card p {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    margin-top: 0;
    width: 100%;
    padding: 0 !important;
    box-sizing: border-box;
  }
  
  .card:hover .card-image,
  .card:hover h2 {
    opacity: 1;
    transform: none;
  }
  
  /* Disable desktop hover effects on mobile */
  .card:hover p {
    opacity: 1;
    transform: none;
  }
}

/* Card image styling - no special styling needed, images display as-is */

/* Desktop card styles - simplified, no hover reveal */
@media (min-width: 1024px) {
  .card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
    opacity: 1;
    position: static;
    transform: none;
    width: 100%;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
    margin-top: 0.5rem;
  }
  
  .card-image, .card h2 {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  /* Simple hover effect - subtle color change */
  .card:not(.blog-card):hover h2 {
    color: rgba(127, 255, 212, 0.9);
  }
  
  .blog-card:hover {
    border-color: rgba(127, 255, 212, 0.4);
  }
  
  .card-image, .card h2, .card p {
    transition: none;
  }
}


/* Tablet card styles - similar to mobile */
@media (min-width: 768px) and (max-width: 1023px) {
  .card-container {
    background: transparent;
    border-radius: 0;
    gap: 1rem !important;
    padding: 0;
  }
  
  .card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 1rem;
    min-height: auto;
    background: transparent;
    border: 1px solid #5555559e;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }
  
  /* Disable hover effects on mobile - they interfere with touch */
  .card:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    transform: none;
  }
  
  .card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: flex-start;
    padding: 0;
  }
  
  .card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
  }
  
  .card-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .card h2 {
    font-size: 1.4rem;
    margin-bottom: 0;
    text-align: left;
    font-weight: 300;
    color: white;
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  
  .card p {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    margin-top: 0;
    width: 100%;
  }
  
  .card:hover .card-image,
  .card:hover h2 {
    opacity: 1;
    transform: none;
  }
  
  .card:hover p {
    opacity: 1;
    transform: none;
  }
}

/* Desktop card styles - icon and title on same line */
@media (min-width: 1024px) {
  .card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 0;
  }
  
  .card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0;
  }
  
  .card-image {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .card h2 {
    font-size: 1.75rem;
    text-align: left;
    color: white;
    margin: 0;
    font-weight: 500;
    display: block;
    flex: 1;
  }
  
  /* Description below icon and title */
  .card p {
    padding: 0 !important;
    line-height: 1.7;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    margin-top: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.8);
  }
}

.card p {
  color: white; /* white text for dark background */
  font-size: 1.125rem;
  line-height: 1.6;
  text-align: left;
}

@media (min-width: 768px) {
  .card-image {
    width: 20%;
  }
  .card h2 {
    font-size: 1.2rem;
  }
  .card p {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .card {
    min-height: 240px; /* More space for large screens */
  }
  .card-image {
    width: 15%;
  }
  .card h2 {
    font-size: 1.2rem;
  }
  .card p {
    font-size: 0.85rem;
  }
}

.fade-in-box {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.box-1.visible { transition-delay: 0.1s; }
.box-2.visible { transition-delay: 0.2s; }
.box-3.visible { transition-delay: 0.3s; }
.box-4.visible { transition-delay: 0.4s; }
.box-5.visible { transition-delay: 0.5s; }

.svg-box {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.svg-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.glow-effect {
  animation: glowPulse 3s ease-in-out infinite;
}

.tech-animation-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 2rem 0;
  mask: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.tech-animation-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: tech-scroll 40s linear infinite;
  white-space: nowrap;
  will-change: transform;
  width: fit-content;
}

/* Faster tech animation on small screens */
@media (max-width: 1023px) {
  .tech-animation-track {
    animation: tech-scroll 25s linear infinite;
  }
}

.tech-animation-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  flex-shrink: 0;
}

.tech-animation-item img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

@keyframes tech-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Move exactly one set (9 items) - since we have 3 identical sets, move 1/3 of total width */
    transform: translateX(calc(-100% / 3));
  }
}

.services {
  position: relative;
  overflow: hidden;
  padding: 2rem 1rem;
  margin: 2rem auto;
  width: 100%;
  max-width: 1200px;
  border-radius: 1.5rem;
  background: transparent !important;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1.5rem;
  z-index: 0;
}

.services::after,
.services-gradient,
.services-blur {
  display: none;
}

.services-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.services h1 {
  margin-bottom: 3rem;
  max-width: 800px;
}

.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .main-container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .main-container {
    padding: 0;
  }
}

@media (min-width: 768px) {
  .services {
    border-radius: 1.5rem;
  }
}

.floating-element {
  display: none;
}

/* Canvas styles */
#animationCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Contact Section Styles */
.contact-section {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 4rem 1rem;
  margin: 0 auto;
  max-width: 1200px;
  border-radius: 1.5rem;
}

.contact-gradient,
.contact-blur {
  display: none;
}

.contact-content {
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .contact-section {
    border-radius: 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
  }
}

/* Improved Contact Form Styles */
.contact-section input,
.contact-section textarea {
  color: white;
  background: transparent;
  backdrop-filter: blur(10px);
  border: 1px solid #555;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 1.1rem;
  transition: all 0.2s;
  outline: none;
  width: 100%;
}
.contact-section input:focus,
.contact-section textarea:focus {
  box-shadow: 0px 0.5px 5px #5555559e;
  border: 1px solid #555;
  outline: none;
}
.contact-section input::placeholder,
.contact-section textarea::placeholder {
  color: white;
  opacity: 1;
}
.contact-section form {
  gap: 1.5rem !important;
  border-radius: 1.5rem;
}
.contact-section button[type="submit"] {
  color: white;
  background: transparent;
  backdrop-filter: blur(10px);
  border: 1px solid #555;
  border-radius: 1rem;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  box-shadow: none;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  transition: all 0.2s;
}
.contact-section button[type="submit"]:hover {
  transform: scale(1.04);
  box-shadow: none;
}

/* Contact area text styling */
.contact-section h2 {
  color: white !important;
  font-weight: 300 !important;
}

.contact-section p {
  color: white !important;
  font-weight: 300 !important;
}

/* Rocket Animation Styles */
.rocket-container {
  opacity: 1 !important;
  margin-top: 0.5rem;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  animation: none !important;
  transition: none !important;
}
.rocket-svg {
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 10;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gradient-animated {
  background: none;
  animation: none;
}

.rocket-wrapper {
  animation: float 3s ease-in-out infinite;
}

/* Contact form placeholder opacity */
#contact-form input::placeholder,
#contact-form textarea::placeholder {
  opacity: 0.4 !important;
}

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

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Latest blog images should always be visible (no lazy loading) */
.latest-blog-featured-image {
  opacity: 1 !important;
}

/* Optimize SVG animations */
.wave {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.rocket-svg {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.gear-spin {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize gradient animations */
.gradient-animated {
  will-change: background-position;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ============================================
   BLOG STYLES
   ============================================ */

/* Blog container */
/* Allow overflow for blog pages */
main:has(.blog-section) {
  overflow: visible !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
}

main:has(.blog-section) * {
  pointer-events: auto;
}

main:has(.blog-section) .blog-section::before {
  pointer-events: none !important;
}

/* Ensure main-content-container allows scrolling */
.main-content-container {
  pointer-events: auto !important;
  padding-top: 24px !important;
}

/* Ensure parent wrapper allows scrolling */
body > div.w-full {
  pointer-events: auto !important;
}

body > div.w-full > main {
  pointer-events: auto !important;
}

.blog-section {
  padding: 0 0 48px;
  min-height: 80vh;
  overflow: visible;
  position: relative;
  pointer-events: auto;
  z-index: 0;
}

.blog-section::before {
  pointer-events: none !important;
  z-index: -1 !important;
}

/* Blog page color orbs - only on listing page, not on post pages */
.blog-orb-background {
  position: fixed;
  top: 56px;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none !important;
  z-index: 0;
  background: 
    radial-gradient(circle 600px at 20% 30%, rgba(127, 255, 212, 0.06) 0%, transparent 50%),
    radial-gradient(circle 500px at 80% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    radial-gradient(circle 700px at 15% 70%, rgba(20, 184, 166, 0.04) 0%, transparent 50%),
    radial-gradient(circle 550px at 85% 80%, rgba(127, 255, 212, 0.05) 0%, transparent 50%),
    radial-gradient(circle 450px at 50% 50%, rgba(14, 165, 233, 0.03) 0%, transparent 50%);
  filter: blur(100px);
  animation: blogOrbFloat 20s ease-in-out infinite;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  will-change: transform;
}

.blog-section.showing-post ~ .blog-orb-background,
body.showing-post .blog-orb-background {
  display: none;
}

.blog-section:not(.showing-post)::before {
  display: none;
}

@keyframes blogOrbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
    opacity: 0.9;
  }
  66% {
    transform: translate(-20px, 30px) scale(0.95);
    opacity: 0.9;
  }
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
  position: relative;
  z-index: 1; /* Ensure blog content is above orbs */
}

.blog-header {
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 5rem;
  font-weight: 100;
  color: white;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .blog-header h1 {
    font-size: 2rem;
  }
}

/* Blog posts grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  overflow: visible;
  position: relative;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Blog card - matches existing card design */
.blog-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: none;
  border-radius: 1rem;
  padding: 0;
  width: 100%;
  transition: all 0.3s ease;
  overflow: visible !important;
  position: relative;
  min-height: 500px;
}

/* Removed hover effect from blog cards */

.blog-card .card-content {
  padding: 1.5rem;
  padding-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  position: relative;
  overflow: visible;
}

.blog-post-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  text-align: left !important;
  width: 100%;
}

.blog-post-title a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
  text-align: left;
}

.blog-post-title a:hover {
  color: aquamarine;
}

.blog-card .card-image {
  width: 100% !important;
  flex: 0 0 50% !important;
  min-height: 250px !important;
  height: 50% !important;
  max-height: none !important;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  margin: 0 !important;
  margin-bottom: 0 !important;
  position: relative;
  display: block;
}

.blog-card .card-image img,
.blog-card .card-image .blog-featured-image {
  border-radius: 1rem;
}

.blog-card .card-image img,
.blog-card .card-image .blog-featured-image,
.blog-card .card-image a {
  width: 100% !important;
  height: 100% !important;
  min-height: 250px !important;
  max-width: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.3s ease;
}

.blog-card .card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .blog-card {
    min-height: 500px;
  }
  
  .blog-card .card-image {
    flex: 0 0 50%;
    min-height: 250px;
    height: 50%;
  }
  
  .blog-card .card-image img,
  .blog-card .card-image .blog-featured-image {
    min-height: 250px !important;
  }
}

@media (min-width: 1024px) {
  .blog-card {
    min-height: 600px;
  }
  
  .blog-card .card-image {
    flex: 0 0 50%;
    min-height: 300px;
    height: 50%;
  }
  
  .blog-card .card-image img,
  .blog-card .card-image .blog-featured-image {
    min-height: 300px !important;
  }
}

/* Removed hover effect on blog card image */

.blog-excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0;
  margin-bottom: 1rem;
  text-align: left !important;
  width: 100%;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: auto;
  text-align: left;
  width: 100%;
  padding-top: 1rem;
}

.blog-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.blog-read-more {
  color: aquamarine;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  background-color: transparent;
  border-radius: 50%;
  border: 2px solid aquamarine;
  flex-shrink: 0;
}

.blog-read-more:hover {
  color: #222222;
  background-color: aquamarine;
  transform: scale(1.1);
}

/* Blog post detail page */
.blog-post-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  width: 100%;
}

#blog-post-container {
  width: 100%;
}

#blog-post-container .blog-post-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-post-header {
  margin-bottom: 2rem;
  box-shadow: none !important;
}

.blog-post-title {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .blog-post-title {
    font-size: 2rem;
  }
}

.blog-post-meta {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.blog-featured-image-container {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
}

.blog-featured-image-large {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  color: white;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-family: 'Raleway', sans-serif;
}

.wp-block-heading {
  line-height: 1.2;
}

/* ============================================
   LATEST BLOG POSTS SECTION (Homepage)
   ============================================ */

.latest-blog-section {
  background-color: #111111;
  width: 100%;
}

.latest-blog-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.latest-blog-post-card {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
}

.latest-blog-post-image {
  flex: 0 0 300px;
  width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 1rem;
  flex-shrink: 0;
}

.latest-blog-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  transition: transform 0.3s ease;
  opacity: 1 !important;
  display: block;
}

.latest-blog-post-image:hover .latest-blog-featured-image {
  transform: scale(1.05);
}

.latest-blog-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  min-height: 200px;
}

.latest-blog-post-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.3;
  text-align: left;
}

.latest-blog-post-title a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.latest-blog-post-title a:hover {
  color: aquamarine;
}

.latest-blog-post-excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  text-align: left;
  flex-grow: 1;
}

.latest-blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

.latest-blog-post-date {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.latest-blog-read-more {
  color: aquamarine;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  background-color: transparent;
  border-radius: 50%;
  border: 2px solid aquamarine;
  flex-shrink: 0;
}

.latest-blog-read-more:hover {
  color: #222222;
  background-color: aquamarine;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .latest-blog-post-card {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .latest-blog-post-image {
    flex: 0 0 100%;
    width: 100%;
    height: 250px;
  }
  
  .latest-blog-post-content {
    min-height: auto;
  }
  
  .latest-blog-post-title {
    font-size: 1.25rem;
  }
}

.blog-post-content h2 {
  font-size: 2rem;
}

.blog-post-content h3 {
  font-size: 1.5rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content a {
  color: aquamarine;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.blog-post-content a:hover {
  color: white;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  list-style-position: outside;
}

.blog-post-content ul {
  list-style-type: disc;
}

.blog-post-content ol {
  list-style-type: decimal;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  padding-left: 0.5rem;
}

/* Nested lists */
.blog-post-content ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.blog-post-content ul ul ul {
  list-style-type: square;
}

.blog-post-content ol ol {
  list-style-type: lower-alpha;
}

.blog-post-content ol ol ol {
  list-style-type: lower-roman;
}

.blog-post-content blockquote {
  border-left: 4px solid aquamarine;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

.blog-post-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.blog-post-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
}

.blog-post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #555555;
}

.blog-back-link {
  color: aquamarine;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.blog-back-link:hover {
  color: white;
  transform: translateX(-5px);
}

/* Blog loading, error, and empty states */
.blog-loading,
.blog-error,
.blog-empty,
.blog-not-found {
  text-align: center;
  padding: 4rem 2rem;
  color: white;
}

.blog-loading p,
.blog-error p,
.blog-empty p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: aquamarine;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.blog-not-found h2 {
  font-size: 2rem;
  color: white;
  margin-bottom: 1rem;
}

/* Blog pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 2rem 0;
}

.blog-pagination button,
.blog-pagination a {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid #555555;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Lato', sans-serif;
}

.blog-pagination button:hover,
.blog-pagination a:hover {
  border-color: aquamarine;
  color: aquamarine;
}

.blog-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.blog-pagination .current-page {
  color: aquamarine;
  border-color: aquamarine;
} 