/* ==================================
   SCROLL-REVEAL ANIMATIONS
================================== */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation-fill-mode: backwards;
}
.reveal.active {
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) var(--delay) forwards;
}

/* ==================================
   PORTFOLIO SEKCIU (hlavný obsah s kartami)
   UPRAVENÝ PADDING
================================== */
.portfolio-section {
  /* margin-top je presunutý do global.css pre main element */
  padding: 2.5rem 0 5rem; /* Zmenšený padding zhora, ale margin-top sa rieši inde */
  background-color: var(--light); /* Používa premennú z global.css */
}

/* ==================================
   Nadpisy sekcií (section-subtitle)
   Používajú sa globálne premenné
================================== */
.section-subtitle {
    text-align: center;
    font-family: var(--font-heading); /* Používa premennú z global.css */
    font-size: clamp(4rem, 5vw, 3rem);
    margin: 4rem auto 3rem; /* Zostáva rovnaká medzera pod nadpisom */
    font-weight: 700;
    color: var(--dark); /* Používa premennú z global.css */
    letter-spacing: -0.03em;
    position: relative;
}

/* ==================================
   PROJECTS GRID
================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

/* ==================================
   CARD STYLES
================================= */
.card {
  background: #fff;
  border-radius: var(--radius); /* Používa premennú z global.css */
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: var(--shadow-light); /* Používa premennú z global.css */
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover); /* Používa premennú z global.css */
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #f0f0f0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-image img {
  transform: scale(1.07);
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.card-body h3 {
  margin: 0 0 .5rem;
  font-size: 1.45rem;
  font-weight: 700;
  transition: color .3s ease;
  color: var(--dark); /* Používa premennú z global.css */
}
.card:hover .card-body h3 {
  color: var(--accent); /* Používa premennú z global.css */
}
.project-tagline {
  margin: 0 0 1.2rem;
  color: var(--text-muted); /* Používa premennú z global.css */
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}
.project-details {
  font-size: 0.9rem;
  color: var(--text-muted); /* Používa premennú z global.css */
  margin-bottom: 1.5rem;
}
.project-details p {
  margin-bottom: 0.5rem;
}
.project-details strong {
  color: var(--dark); /* Používa premennú z global.css */
  font-weight: 600;
}

.card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}
.btn-live-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  /* UPRAVENÉ: Rovnaký gradient ako na kontaktnom tlačidle */
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  /* UPRAVENÉ: Prechody pre gradient a tieň */
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  /* UPRAVENÉ: Rovnaký tieň ako na kontaktnom tlačidle */
  box-shadow: 0 4px 16px rgba(28, 181, 224, 0.3);
  border: none;
  cursor: pointer;
  /* PRIDANÉ: Font-family pre konzistentnosť s kontaktným tlačidlom */
  font-family: var(--font-heading);
}
.btn-live-preview:hover {
  /* UPRAVENÉ: Reverzný gradient pri hoveri */
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  /* UPRAVENÉ: Silnejší tieň pri hoveri */
  box-shadow: 0 6px 24px rgba(28, 181, 224, 0.4);
  /* Zachované transform translateY, ak to chcete */
  transform: translateY(-2px);
}
/* PRIDANÉ: Active stav pre konzistentnosť */
.btn-live-preview:active {
    box-shadow: 0 4px 16px rgba(28, 181, 224, 0.3); /* Vrátenie tieňa pri aktívnom stave */
}


/* ==================================
   MODAL STYLES
================================== */
.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,0.85) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  z-index: 99999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}
.modal.open {
  opacity: 1 !important;
  visibility: visible !important;
  animation: modalShow 0.4s ease-out forwards !important;
}

@keyframes modalShow {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.5rem !important;
  color: #fff !important;
  cursor: pointer !important;
  z-index: 100000 !important;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) scale(1.05) !important;
}

.swiper-container.modal-gallery {
  width: 95% !important;
  max-width: 1400px !important;
  height: 90% !important;
  background: #111 !important;
  border-radius: var(--radius) !important; /* Používa premennú z global.css */
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4) !important;
}

.swiper-slide {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  background-color: #fff !important;
}

.swiper-slide img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.swiper-slide.iframe-slide {
  padding: 0 !important;
  background-color: #fff !important;
}

.swiper-slide.iframe-slide iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

.swiper-pagination-bullet {
  background: #fff !important;
  opacity: 0.8 !important;
}

.swiper-pagination-bullet-active {
  background: var(--accent) !important; /* Používa premennú z global.css */
  opacity: 1 !important;
}

/* ==================================
   MEDIA QUERIES PRE PORTFÓLIO ŠPECIFICKÉ SEKCIE (aktualizované)
================================== */
@media (max-width: 992px) {
  /* Portfolio Sekcia */
  .portfolio-section { padding: 2rem 0 4rem; } /* Zmenšený padding zhora */
  .section-subtitle { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 2rem; }
  .projects-grid { gap: 2rem; }
  .card-body h3 { font-size: 1.3rem; }
  .project-tagline { font-size: 0.95rem; }
  .project-details { font-size: 0.85rem; }

  /* Modal */
  .swiper-container.modal-gallery { width: 95% !important; height: 85% !important; }
  .modal-close { font-size: 2rem !important; width: 40px !important; height: 40px !important; top: 0.8rem !important; right: 0.8rem !important; }
}

@media (max-width: 768px) {
  /* Portfolio Sekcia */
  .portfolio-section { padding: 1.5rem 0 3rem; } /* Zmenšený padding zhora */
  .section-subtitle { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-bottom: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
  .card-body { padding: 1.5rem; }
  .card-body h3 { font-size: 1.25rem; }
  .project-tagline { font-size: 0.9rem; }
  .project-details { font-size: 0.85rem; } /* Opravené z 0.8rem na 0.85rem pre konzistentnosť */
  .btn-live-preview { padding: 0.7rem 1.2rem; font-size: 0.85rem; }

  /* Modal */
  .swiper-container.modal-gallery { width: 95% !important; height: 85% !important; }
  .modal-close { font-size: 2rem !important; width: 40px !important; height: 40px !important; top: 0.8rem !important; right: 0.8rem !important; }
}

@media (max-width: 480px) {
  /* Portfolio Sekcia */
  .portfolio-section { padding: 1rem 0 2rem; } /* Zmenšený padding zhora */
  .container { padding: 0 1rem; }
  .section-subtitle { font-size: clamp(1.6rem, 8vw, 2.2rem); margin-bottom: 1rem; }
  .projects-grid { gap: 1rem; }
  .card-body { padding: 1rem; }
  .card-body h3 { font-size: 1.15rem; }
  .project-tagline { font-size: 0.85rem; }
  .project-details { font-size: 0.75rem; }
  .btn-live-preview { width: 100%; justify-content: center; }

  /* Modal */
  .modal { padding: 0.5rem !important; }
  .modal-close { font-size: 1.8rem !important; width: 35px !important; height: 35px !important; top: 0.5rem !important; right: 0.5rem !important; }
  .swiper-container.modal-gallery { width: 98% !important; height: 80% !important; }
}


/* ==================================
   VARIABLES (Z global.css, alebo tam, kde sú definované globálne)
================================== */
:root {
  --bg-page:      #f8f9fa;
  --bg-card:      #ffffff;

  --text:         #4a5568;
  --text-dark:    #2d3748;
  --accent:       #1CB5E0;
  --accent-dark:  #0093E9;
  --icon-bg:      #e0efff;

  --border:       #e2e8f0;
  --radius:       0.6rem;
  --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);

  --max-width-main: 1100px;
  --max-width-form: 600px;

  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;
}

/* ==================================
   ENHANCED SCROLL-REVEAL (Ponechané, ak sa používa aj tu)
================================== */
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  --delay: 0s;
}
.reveal.active {
  animation: fadeSlide 0.6s cubic-bezier(0.25,0.8,0.25,1) var(--delay) both;
}

/* ==================================
   BASE STYLES for Contact Page (Ponechané, ak je to súčasť tohto súboru)
================================== */
body[data-page="contact"] {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  scroll-behavior: smooth;
}
.container {
  max-width: var(--max-width-main);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==================================
   CONTACT SECTION (Adjusted padding as header is removed) (Ponechané, ak je to súčasť tohto súboru)
================================== */
.contact-section {
  padding: 8rem 0 4rem;
  text-align: center;
}

/* ==================================
   CONTACT CONTENT GRID (MAIN LAYOUT) (Ponechané, ak je to súčasť tohto súboru)
================================= */
.contact-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  padding: 3rem;
  transition: box-shadow 0.3s ease-in-out;
  align-items: flex-start;
  text-align: left;
  margin: 0 auto;
  max-width: 900px;
}

.contact-content-grid:hover {
  box-shadow: var(--shadow-hover);
}

.contact-info h3,
.contact-form-wrapper h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

/* ==================================
   CONTACT INFO SECTION (LEFT COLUMN) (Ponechané, ak je to súčasť tohto súboru)
================================== */
.contact-info p {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.contact-info .info-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.contact-info .info-item .icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--icon-bg);
  flex-shrink: 0;
}

.contact-info .info-item i {
  font-size: 1.3rem;
  color: var(--accent);
  text-align: center;
}

.contact-info .info-item strong {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.contact-info .info-item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.contact-info .info-item a:hover {
  color: var(--accent);
}

.contact-info .social-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: flex-start;
}

.contact-info .social-links a {
  color: var(--text);
  font-size: 1.8rem;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.contact-info .social-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-info .response-time-info {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}

/* ==================================
   CONTACT FORM WRAPPER (RIGHT COLUMN) (Ponechané, ak je to súčasť tohto súboru)
================================== */
.contact-form-wrapper {
  padding: 0;
}

.contact-form-wrapper .form-intro-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* ==================================
   FORM STYLES (Ponechané, ak je to súčasť tohto súboru)
================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
  margin-bottom: 0;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
  display: block;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-page);
  color: var(--text-dark);
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background 0.2s ease-in-out;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #a0aec0;
  opacity: 0.9;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
  background: #ffffff;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.7;
}

/* ==================================
   SUBMIT BUTTON - NEW STYLES (MATCHING btn-hero) (Ponechané, ak je to súčasť tohto súboru)
================================== */
.submit-group {
  text-align: center;
  margin-top: 1rem;
}

.btn-submit {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: .75rem 1.75rem;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  box-shadow: 0 4px 16px rgba(28, 181, 224, 0.3);
  transition: box-shadow .2s, background .3s;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 6px 24px rgba(28, 181, 224, 0.4);
}
.btn-submit:active {
  box-shadow: 0 4px 16px rgba(28, 181, 224, 0.3);
}


/* ==================================
   MEDIA QUERIES FOR RESPONSIVENESS (Ponechané, ak je to súčasť tohto súboru)
================================== */

@media (max-width: 768px) {
  .contact-section {
    padding: 5rem 0 3rem;
  }
  .contact-content-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    max-width: 100%;
  }
  .contact-form-wrapper {
    order: 1;
  }
  .contact-info {
    order: 2;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
  }
  .contact-info .social-links {
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 4rem 0 2rem;
  }
  .container {
    padding: 0 1rem;
  }
  .contact-content-grid {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .contact-info .info-item {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .contact-info .info-item .icon-wrapper {
    width: 35px;
    height: 35px;
  }
  .contact-info .info-item i {
    font-size: 1.2rem;
  }
  .btn-submit {
    width: 100%;
    font-size: 1rem;
    padding: 0.8rem 2rem;
  }
  .contact-info .social-links a {
    font-size: 1.6rem;
  }
}