/* ======================================
   GLOBAL
====================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Stem', sans-serif;
  background: #fafafa;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ======================================
   LAYOUT
====================================== */

header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  z-index: 1000;
}

main {
  flex: 1;
  overflow: visible;
}

footer {
  width: 100%;
  position: static;
  margin-top: auto;
}

.text-body-intro-text {
  max-width: 700px; margin: 0 auto 60px; text-align: center;
}

/* ======================================
   CONTAINER
====================================== */

.container {
  max-width: 1300px;
  margin: 0 auto;
}

/* ======================================
   HEADER + NAVBAR
====================================== */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  position: relative;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 300px;
  height: auto;
  padding-left: 10px;
}

.NICEIC {
  width: 130px;
  height: auto;
  border-radius: 8px;
  padding-right: 10px;
}

.company-name {
  font-size: 24px;
  font-weight: 700;
  color: #051d35;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #051d35;
  transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: #6b1727;
  color: #fff;
}

/* ======================================
   CONTACT INFO BAR
====================================== */

.contact-info {
  font-size: 14px;
  color: #fff;
  background-color: #6b1727;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
}

.contact-info a {
  text-decoration: none;
  color: #fff;
  padding: 8px 16px;
}

/* ======================================
   HAMBURGER
====================================== */

.menu-toggle {
  display: none;
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  left: 1rem;
}

/* ======================================
   CONTENT
====================================== */

.container.content-block {
  padding: 90px 0;
}

.content-block {
  text-align: center;
  padding: 40px 0;
}

.text-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
  color: #333;
}

.responsive-img {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #fafafa;
  border-radius: 8px;
  margin: 0 auto 24px;
}

.slide-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* ======================================
   ABOUT PAGE — IMAGE ANIMATION
====================================== */

@keyframes aboutImageReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(1.03);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-img {
  animation: aboutImageReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(5, 29, 53, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .about-img {
    animation: none;
  }
  .about-img:hover {
    transform: none;
  }
}

/* ======================================
   PROJECT GALLERY / TRANSITION
====================================== */

.project-gallery {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
  margin: 0 auto 24px;
}

.project-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease-in-out, transform 3s ease;
}

.project-gallery img.active {
  opacity: 1;
  transform: scale(1);
}

/* ======================================
   SERVICES PAGE
====================================== */

.services-header-section {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 40px 0 60px 0;
}

.services-header-section .slideshow-container {
  flex: 1;
  max-width: 500px;
  margin: 0;
}

.services-header-content {
  flex: 1;
}

.page-title {
  font-size: 42px;
  font-weight: 700;
  color: #051d35;
  margin: 0 0 20px 0;
  text-align: left;
}

.intro-text {
  margin: 0 0 20px 0;
  text-align: left;
}

.services-header-section .dots-container {
  text-align: left;
  margin-top: 15px;
}

.accent-divider {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #051d35 0%, #6b1727 50%, #051d35 100%);
  margin: 0 0 60px 0;
  border-radius: 2px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.service-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.service-content {
  padding: 30px;
}

.service-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: #051d35;
  margin: 0 0 15px 0;
}

.service-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

.cta-section {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #051d35 0%, #6b1727 100%);
  border-radius: 12px;
  color: #fff;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 15px 0;
}

.cta-section p {
  font-size: 18px;
  margin: 0 0 30px 0;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #fff;
  color: #051d35;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  border-radius: 50px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .services-header-section {
    flex-direction: column;
    gap: 20px;
  }

  .page-title {
    font-size: 32px;
    text-align: center;
  }

  .intro-text {
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .page-title {
    font-size: 28px;
  }

  .service-content h3 {
    font-size: 20px;
  }

  .service-content {
    padding: 20px;
  }

  .cta-section {
    padding: 40px 20px;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .page-title {
    font-size: 32px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .page-title {
    font-size: 28px;
  }

  .service-content h3 {
    font-size: 20px;
  }

  .service-content {
    padding: 20px;
  }

  .cta-section {
    padding: 40px 20px;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
}

/* ======================================
   PORTFOLIO PAGE
====================================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(415px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.portfolio-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.portfolio-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
}

.portfolio-slide {
  display: none;
  width: 100%;
  height: 100%;
}

.portfolio-slide.active {
  display: block;
}

.portfolio-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.portfolio-prev,
.portfolio-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 12px;
  font-size: 20px;
  color: white;
  background: rgba(0,0,0,0.5);
  font-weight: bold;
  user-select: none;
  transform: translateY(-50%);
  transition: background 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.portfolio-prev:hover,
.portfolio-next:hover {
  background: rgba(107, 23, 39, 0.8);
}

.portfolio-prev { 
  left: 0; 
  border-radius: 0 4px 4px 0;
}

.portfolio-next { 
  right: 0; 
  border-radius: 4px 0 0 4px;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20%;
  background: rgba(5, 29, 53, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.portfolio-slideshow:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-content {
  color: #fff;
  text-align: center;
  padding: 20px;
}

.portfolio-overlay-content p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.portfolio-card-footer {
  padding: 25px;
  text-align: center;
}

.portfolio-card-footer h3 {
  font-size: 24px;
  font-weight: 700;
  color: #051d35;
  margin: 0 0 15px 0;
}

.portfolio-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.portfolio-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #bbb;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.portfolio-dot:hover {
  background-color: #888;
  transform: scale(1.2);
}

.portfolio-dot.active {
  background-color: #6b1727;
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card-footer h3 {
    font-size: 20px;
  }

  .portfolio-overlay-content p {
    font-size: 14px;
  }
}

/* ======================================
   TESTIMONIALS PAGE
====================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.testimonial-card {
  background: #fff;
  border-radius: 8px;
  padding: 35px 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border-top: 4px solid #6b1727;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.quote-icon {
  font-size: 80px;
  color: #6b1727;
  opacity: 0.15;
  position: absolute;
  top: 10px;
  left: 20px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-content {
  position: relative;
  z-index: 1;
}

.testimonial-text {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin: 0 0 25px 0;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.author-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: #051d35;
  margin: 0 0 5px 0;
}

.author-location {
  font-size: 14px;
  color: #666;
  margin: 0 0 3px 0;
}

.author-project {
  font-size: 14px;
  color: #6b1727;
  font-weight: 600;
  margin: 0;
}

.star-rating {
  font-size: 20px;
  color: #ffa500;
  letter-spacing: 2px;
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .testimonial-card {
    padding: 30px 25px;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-text {
    font-size: 15px;
  }

  .quote-icon {
    font-size: 60px;
  }
}

/* ======================================
   SLIDESHOW
====================================== */

.slideshow-container {
  position: relative;
  margin: auto;
  max-width: 600px;
}

.slide {
  display: none;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  font-size: 24px;
  color: white;
  font-weight: bold;
  user-select: none;
  transform: translateY(-50%);
}

.prev { left: 0; }
.next { right: 0; }

.dots-container {
  text-align: center;
  margin-top: 10px;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 4px;
  border-radius: 50%;
  background-color: #bbb;
  cursor: pointer;
}

.active-dot {
  background-color: #6b1727;
}

.fade {
  animation: fadeEffect 0.8s;
}

@keyframes fadeEffect {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* ======================================
   PAGE PRELOADER
====================================== */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* Higher than header */
  pointer-events: all;
}

.preloader.hidden {
  display: none;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e0e0e0;
  border-top: 5px solid #6b1727;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ======================================
   TABLET
====================================== */

@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    background: #fff;
    width: 100%;
    padding: 16px 0;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.show {
    display: flex;
  }

  .mobile-center-badge {
    position: static;
  }

  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
  }

  .company-name {
    font-size: 20px;
    text-align: center;
  }
  .services-header-section {
    flex-direction: column;
    gap: 30px;
  }

  .services-header-section .slideshow-container {
    max-width: 100%;
  }

  .page-title {
    font-size: 32px;
    text-align: center;
  }

  .intro-text {
    text-align: center;
  }

  .services-header-section .dots-container {
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

/* ======================================
   MOBILE
====================================== */

@media (max-width: 480px) {

  .logo {
    width: 90px;
  }

  .NICEIC {
    width: 90px;
  }

  .text-body {
    font-size: 15px;
    padding: 0 10px;
  }

  .nav-links {
    width: 200px;
  }

  .project-gallery {
    max-height: 70vh;
  }

  .contact-info {
    padding-left: 10px;
    flex-direction: column;
    height: auto;
  }
  .services-header-section {
    flex-direction: column;
    gap: 30px;
  }

  .services-header-section .slideshow-container {
    max-width: 100%;
  }

  .page-title {
    font-size: 32px;
    text-align: center;
  }

  .intro-text {
    text-align: center;
  }

  .services-header-section .dots-container {
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

/* ======================================
   ULTRAWIDE
====================================== */

@media (min-width: 1440px) {

  .responsive-img {
    max-width: 1100px;
    width: 100%;
  }

  .text-body {
    font-size: 20px;
  }
}


/* ======================================
   RESPONSIVE BREAKPOINTS
====================================== */

/* Tablets */
@media (max-width: 768px) {

  html, body {
    height: 100%;
    margin: 0;
  }

  body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }

  main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    background: #fff;
    width: 100%;
    padding: 16px 0;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.show {
    display: flex;
  }

  .company-name {
    font-size: 20px;
    text-align: center;
  }

}


/* Mobile */
@media (max-width: 480px) {

  html, body {
    height: 100%;
    margin: 0;
  }

  body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }

  main {
    flex: 1;
    overflow: visible;
  }

  .logo {
    width: 90px;
  }

  .NICEIC {
    width: 90px;
    padding-top: 0;
  }

  .text-body {
    font-size: 15px;
    padding: 0 10px;
  }

  .nav-links {
    width: 200px;
  }

  .project-gallery {
    max-height: 70vh;
    width: 90%;
    height: auto;
    object-fit: contain;
  }

  .contact-info {
    padding-left: 10px;
    flex-direction: column;
    height: auto;
  }

  footer {
    width: 100%;
  }
}


/* Ultrawide */
@media (min-width: 1440px) {

  .responsive-img {
    max-width: 1100px;
    width: 100%;
  }

  .text-body {
    font-size: 20px;
  }
}