/* VARIABLES */
:root {
  --primary: #0077b6;
  --primary-dark: #023e8a;
  --accent-light: #caf0f8;
  --accent-dark: #14213d;
  --text-light: #f1f1f1;
  --text-dark: #1a1a1a;
  --gradient-primary: linear-gradient(135deg, #0077b6, #023e8a);
  --gradient-accent: linear-gradient(135deg, #caf0f8, #90e0ef);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-glow: 0 8px 32px rgba(0, 119, 182, 0.3);
  --shadow-elevation: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* GLOBAL RESET AND FONT */
* {
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
  background: linear-gradient(135deg, #C7DBE6 0%, #90e0ef 100%);
  color: var(--text-dark);
  overflow-x: hidden;
}

body.dark-mode {
  background: linear-gradient(135deg, #1F2633 0%, #14213d 100%);
  color: var(--text-light);
}

/* Animated background particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(0, 119, 182, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(202, 240, 248, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(144, 224, 239, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

/* NAVIGATION */
nav {
  height: 80px;
  width: 100%;
  background: rgba(0, 119, 182, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  padding: 0 20px;
}

nav:hover {
  background: rgba(0, 119, 182, 0.98);
}

body.dark-mode nav {
  background: rgba(20, 33, 61, 0.95);
  box-shadow: 0 8px 32px rgba(20, 33, 61, 0.4);
}

.nav-logo {
  display: flex;
  align-items: center;
  min-width: 60px;
}

.logo {
  height: 50px;
  width: auto;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
}

.nav-text {
  display: flex;
  gap: 32px;
  justify-content: center;
  position: relative;
  flex: 1;
}

.nav-text a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  position: relative;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  overflow: hidden;
  white-space: nowrap;
}

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

.nav-text a:hover::before {
  left: 100%;
}

.nav-text a:hover {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-text a.active {
  background: var(--gradient-primary);
  color: var(--text-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

body.dark-mode .nav-text a {
  color: var(--text-light);
}

body.dark-mode .nav-text a.active {
  background: var(--gradient-accent);
  color: var(--text-dark);
}

.nav-button {
  display: flex;
  gap: 12px;
}
/* ABOUT ME IMAGE */
 .profile-section {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 80px;
   gap: 40px;
   position: relative;
   opacity: 0;
   animation: slideInUp 0.8s ease-out forwards;
 }

 .profile-text {
   flex: 1;
   padding: 40px;
   background: var(--glass-bg);
   backdrop-filter: blur(15px);
   border-radius: 24px;
   border: 1px solid var(--glass-border);
   box-shadow: var(--shadow-elevation);
   position: relative;
   overflow: hidden;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
 }

 .profile-text:hover {
   transform: translateY(-10px) scale(1.02);
   box-shadow: 0 25px 50px rgba(0, 119, 182, 0.2);
 }

 .profile-text h3 {
   font-size: clamp(1.5rem, 3vw, 2.5rem);
   line-height: 1.3;
   margin-bottom: 20px;
   color: var(--text-dark);
   font-weight: 700;
   background: var(--gradient-primary);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   position: relative;
 }

 .profile-text p {
   font-size: 1.1em;
   line-height: 1.8;
   color: var(--text-dark);
   opacity: 0.9;
 }

 .profile-image {
   flex: 1;
   display: flex;
   justify-content: center;
   position: relative;
 }

 .profile-image img {
   width: 100%;
   max-width: 320px;
   max-height: 320px;
   border-radius: 24px;
   box-shadow: var(--shadow-elevation);
   transition: all 0.4s cubic-bezier(0.4, 0, 0.6, 1);
   position: relative;
   z-index: 1;
   object-fit: cover;
 }

 .profile-image:hover img {
   transform: scale(1.05) rotate(2deg);
   box-shadow: 0 30px 60px rgba(0, 119, 182, 0.3);
 }

 body.dark-mode .profile-text {
   background: rgba(20, 33, 61, 0.3);
 }

 body.dark-mode .profile-text h3 {
   background: var(--gradient-accent);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
 }

 body.dark-mode .profile-text p {
   color: var(--text-light);
 }

 @media (max-width: 900px) {
   .profile-section {
     flex-direction: column;
     text-align: center;
     gap: 30px;
   }

   .profile-image img {
     max-width: 280px;
   }
 }

 @media (max-width: 600px) {
   .profile-text {
     padding: 25px;
   }

   .profile-text h3 {
     font-size: 1.8em;
   }

   .profile-text p {
     font-size: 1em;
     line-height: 1.6;
   }
 }

 @media (max-width: 480px) {
   .profile-text {
     padding: 20px;
   }
   
   .profile-text h3 {
     font-size: 1.5em;
     margin-bottom: 15px;
   }
   
   .profile-text p {
     font-size: 0.95em;
   }
   
   .profile-image img {
     max-width: 250px;
   }
 }

/* TOGGLE BUTTONS */
.theme-toggle,
.lang {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover,
.lang:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .icon,
.lang:hover .icon {
  transform: scale(1.2);
}

/* HEADER IMAGE */
.virsraksts {
  background-image: url('https://eztf.lu.lv/fileadmin/_processed_/7/7/csm_JB__0953_Visi.fotobrencis%40inbox.lv_ca306e1c32.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.virsraksts::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.7) 0%, rgba(20, 33, 61, 0.5) 100%);
  z-index: 0;
}

.virsraksts h1 {
  color: white;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  position: relative;
  z-index: 2;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: titleFloat 3s ease-in-out infinite;
  background: linear-gradient(135deg, #ffffff, #caf0f8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 20px;
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* PAGE TITLE + SUBHEADER */
.nosaukums {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  margin: 80px auto 30px;
  position: relative;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 20px;
}

.nosaukums::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scaleX(1); }
  50% { transform: translateX(-50%) scaleX(1.2); }
}

body.dark-mode .nosaukums {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prieksvards {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
  font-size: 1.4em;
  color: var(--text-dark);
  padding: 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-elevation);
  position: relative;
  overflow: hidden;
}

.prieksvards::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

body.dark-mode .prieksvards {
  color: var(--text-light);
  background: rgba(20, 33, 61, 0.3);
}

/* PAGE STRUCTURE */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.saturs {
  flex-grow: 1;
}

/* CONTENT BASE */
.saturs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
}

/* SECTION BACKGROUNDS */
.section-block {
  position: relative;
  padding: 80px 20px;
  z-index: 1;
  background: transparent;
}

/* DYNAMIC CONTENT BLOCKS */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 80px;
  gap: 40px;
  position: relative;
  opacity: 0;
  animation: slideInUp 0.8s ease-out forwards;
}

.row:nth-child(even) {
  animation-delay: 0.2s;
}

.row:nth-child(odd) {
  animation-delay: 0.4s;
}

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

.row.reverse {
  flex-direction: row-reverse;
}

.row .text {
  flex: 1;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-elevation);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.row .text:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 119, 182, 0.2);
}

.row .text h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.row .text p {
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--text-dark);
  opacity: 0.9;
}

body.dark-mode .row .text {
  background: rgba(20, 33, 61, 0.3);
}

body.dark-mode .text h2 {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .text p {
  color: var(--text-light);
}

.row .image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.row .image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: var(--gradient-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.1;
  animation: pulse 4s ease-in-out infinite;
}

.row .image img {
  width: 100%;
  max-width: 320px;
  max-height: 320px;
  border-radius: 24px;
  box-shadow: var(--shadow-elevation);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.6, 1);
  position: relative;
  z-index: 1;
}

.row .image:hover img {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 30px 60px rgba(0, 119, 182, 0.3);
}

/* SECTION BREAK */
.section-break {
  width: 100%;
  height: 100px;
  margin: 80px 0;
  position: relative;
  overflow: hidden;
}

.section-break::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: sweep 3s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes sweep {
  0% { left: -100%; }
  50% { left: 0%; }
  100% { left: 100%; }
}

/* ARROWS */
.arrow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.side-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  border: 1px solid var(--glass-border);
  opacity: 0.7;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-glow);
}

.side-arrow img {
  width: 30px;
  height: 30px;
  filter: brightness(0) saturate(100%) invert(22%) sepia(93%) saturate(1352%) hue-rotate(195deg) brightness(99%) contrast(97%);
}

.left-arrow {
  left: 30px;
}

.right-arrow {
  right: 30px;
}

.flipped {
  transform: scaleX(-1);
}

/* FOOTER - Updated with new styling */
footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.footer-logo img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.footer-info {
  text-align: center;
  color: black;
}

.footer-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.contact-item strong {
  min-width: 80px;
  text-align: right;
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.social-text {
  color: black;
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.instagram-link {
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.instagram-link:hover {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.instagram-link img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

/* FADE-IN */
.fade-in {
  animation: fadeIn 1s ease-in-out both;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .saturs {
    padding: 40px 20px;
  }
  
  .row {
    gap: 30px;
    margin-bottom: 60px;
  }
  
  .row .text {
    padding: 30px;
  }
  
  .section-block {
    padding: 60px 20px;
  }
}

@media (max-width: 900px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 20px;
  }
  
  .nav-logo {
    margin-bottom: 15px;
  }
  
  .nav-text {
    gap: 20px;
    margin-bottom: 15px;
  }
  
  .nav-button {
    justify-content: center;
  }
  
  .row,
  .row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .row .image img {
    max-width: 280px;
  }

  .virsraksts {
    height: 70vh;
    background-attachment: scroll;
  }
  
  .prieksvards {
    margin: 0 20px 40px;
    font-size: 1.3em;
    padding: 25px;
  }
  
  .nosaukums {
    margin: 60px 20px 20px;
  }
  
  .side-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-logo img {
    height: 50px;
  }
  
  .contact-details {
    gap: 0.3rem;
  }
  
  .contact-item {
    flex-direction: column;
    gap: 0.2rem;
  }
  
  .contact-item strong {
    min-width: auto;
    text-align: center;
  }
}

@media (max-width: 600px) {
  nav {
    padding: 15px;
  }
  
  .nav-text {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  .nav-text a {
    font-size: 0.95rem;
    padding: 8px 15px;
  }
  
  .row .text {
    padding: 25px;
  }

  .row .text h2 {
    font-size: 1.8em;
  }

  .row .text p {
    font-size: 1em;
    line-height: 1.6;
  }

  .prieksvards {
    font-size: 1.2em;
    padding: 20px;
    margin: 0 15px 30px;
  }
  
  .virsraksts h1 {
    font-size: 1.8rem;
    padding: 0 15px;
  }
  
  .saturs {
    padding: 30px 15px;
  }
  
  .section-block {
    padding: 40px 15px;
  }
}

@media (max-width: 480px) {
  .nav-text a {
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  .theme-toggle,
  .lang {
    padding: 6px;
  }
  
  .icon {
    width: 20px;
    height: 20px;
  }

  .row {
    margin-bottom: 40px;
  }
  
  .row .text {
    padding: 20px;
  }
  
  .row .text h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
  }
  
  .row .text p {
    font-size: 0.95em;
  }
  
  .row .image img {
    max-width: 250px;
  }
  
  .virsraksts {
    height: 60vh;
  }
  
  .virsraksts h1 {
    font-size: 1.5rem;
  }
  
  .footer-container {
    padding: 0 1rem;
  }
  
  .footer-info h4 {
    font-size: 1rem;
  }
  
  .contact-details {
    font-size: 0.9rem;
  }
}