/* ================================
   RESET & BASE STYLES
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Optional typography upgrade */
h1, h2 {
  font-family: 'Playfair Display', serif;
}

/* ================================
   NAVIGATION BAR
================================= */
#navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
  max-width: 100%;
  height: 65px;
  padding: 0 30px;
  margin: 0;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Logo */
#navbar img.logo {
  height: 45px;
  width: auto;
  margin-right: 40px;
  opacity: 0;
  animation: fadeInLogo 0.5s ease-out forwards;
  animation-delay: 0.1s;
}

/* Logo Animation */
@keyframes fadeInLogo {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

#navbar a {
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: #333;
  margin: 0 12px;
  padding: 8px 0;
  position: relative;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

#navbar a:hover {
  color: #001a4d; /* Palomera brand blue */
  transition: color 0.3s ease;
}

#navbar a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #001a4d;
  animation: slideIn 0.3s ease;
}

.instagram-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 8px !important;
  padding: 0 !important;
  color: #333 !important;
}

.instagram-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.instagram-link:hover {
  color: #c13584 !important;
}

.instagram-link:hover::after {
  display: none;
}

.instagram-link:hover svg {
  transform: scale(1.08);
}

@keyframes slideIn {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

#navbar a.active {
  color: #001a4d; /* Palomera brand blue */
}

#navbar a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #001a4d;
}

/* Hamburger Icon for Mobile */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

/* ================================
   HERO SECTION
================================= */
.hero {
  background-color: #000;
  background-image: url('images/IMG_1732.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background-image 1s ease-in-out;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  color: white;
  padding: 0 20px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 2;
}

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

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.cta-button {
  padding: 12px 30px;
  background-color: #001a4d;
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.cta-button:hover {
  background-color: #001133;
  transform: scale(1.05);
}

/* ================================
   GENERAL SECTIONS
================================= */
section {
  padding: 60px 20px;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
}

/* ================================
   ABOUT SECTION
================================= */
#about {
  background: linear-gradient(to bottom, #ffffff, #f9f9f9);
  padding: 80px 20px;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #333;
  text-align: left;
}

.about-intro {
  font-size: 1.2rem !important;
  font-weight: 500;
  color: #333 !important;
  margin-bottom: 25px !important;
}

.about-cta {
  margin-top: 30px !important;
  padding-top: 30px;
  border-top: 2px solid #001a4d;
  font-weight: 500;
  color: #333 !important;
}

.about-license {
  text-align: center !important;
  margin-top: 40px !important;
  padding: 20px;
  background: #f0f0f0;
  border-radius: 8px;
  font-size: 1.1rem !important;
}

.about-license strong {
  color: #003DA5;
  font-size: 1.2rem;
}

/* ================================
   SERVICES SECTION
================================= */
ul {
  max-width: 600px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  text-align: center;
}

ul li {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ================================
   GALLERY
================================= */
#gallery {
  padding: 80px 20px;
  background: linear-gradient(to bottom, #f9f9f9, #ffffff);
}

.gallery-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 26, 77, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

.gallery-overlay p {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Responsive Gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 15px;
  }
  
  .gallery-subtitle {
    font-size: 1rem;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  #gallery {
    padding: 60px 15px;
  }
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: 95%;
  max-height: 95%;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}

.lightbox .close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Navigation arrows for lightbox */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 40px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 30px;
}

.lightbox-nav.next {
  right: 30px;
}

@media (max-width: 768px) {
  .lightbox .close {
    top: 15px;
    right: 15px;
    font-size: 35px;
    width: 40px;
    height: 40px;
  }
  
  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
  
  .lightbox-nav.prev {
    left: 15px;
  }
  
  .lightbox-nav.next {
    right: 15px;
  }
}


/* ================================
   CONTACT FORM
================================= */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.contact-form select {
  background-color: white;
  cursor: pointer;
}

.contact-form button {
  background-color: #333;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.contact-form button:hover {
  background-color: #001a4d;
  color: white;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form Message Styles */
.form-message {
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  display: none;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

#contact a {
  color: #003DA5;
  text-decoration: none;
}

#contact a:hover {
  text-decoration: underline;
}

/* Sticky contact button for mobile */
.sticky-contact {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #001a4d;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  display: none;
}

/* ================================
   PORTFOLIO PAGE
================================= */
.portfolio-hero {
  background: linear-gradient(135deg, #001a4d 0%, #001133 100%);
  color: white;
  padding: 100px 20px 80px;
  text-align: center;
  margin-top: 70px; /* Account for navbar height */
}

.portfolio-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: white;
}

.portfolio-hero p {
  font-size: 1.4rem;
  opacity: 0.95;
}

.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 20px;
}

.portfolio-item {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 100px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 500px;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.portfolio-image {
  flex: 0 0 50%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.portfolio-image::after {
  content: '🔍 Click to enlarge';
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.portfolio-image:hover::after {
  opacity: 1;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
  cursor: pointer !important;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-image img:hover {
  opacity: 0.9;
}

.portfolio-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #000;
}

.portfolio-image-grid img:nth-child(3) {
  grid-column: 1 / -1;
}

.portfolio-image-grid img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 500px;
  object-fit: cover;
  display: block;
  cursor: pointer !important;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.portfolio-image-grid img:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.portfolio-content {
  flex: 1;
  padding: 50px 40px;
  min-width: 0;
}

.portfolio-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #333;
}

.portfolio-type {
  display: inline-block;
  background-color: #001a4d;
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
}

.portfolio-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portfolio-features li {
  padding: 12px 0;
  padding-left: 30px;
  position: relative;
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}

.portfolio-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #003DA5;
  font-weight: bold;
  font-size: 1.2rem;
}

.portfolio-cta {
  background: linear-gradient(to bottom, #f9f9f9, #ffffff);
  padding: 80px 20px;
  text-align: center;
}

.portfolio-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

.portfolio-cta p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================
   FOOTER
================================= */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* ================================
   RESPONSIVE
================================= */
@media (max-width: 768px) {
  .sticky-contact {
    display: block;
  }

  #navbar {
    height: 74px;
    padding: 0 14px;
  }

  #navbar img.logo {
    height: 42px;
    margin-right: 0;
  }

  .hamburger {
    display: block;
    margin: 0;
    font-size: 1.75rem;
    line-height: 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 13px;
    right: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 46px;
    min-height: 46px;
    overflow: hidden;
    z-index: 1001;
  }

  .nav-links a {
    display: none;
    width: 100%;
    margin: 4px 0;
    font-size: 14px;
    padding: 10px 4px;
  }

  .nav-links.active a {
    display: block;
  }

  .nav-links .instagram-link {
    display: none !important;
  }

  .nav-links.active {
    top: 74px;
    width: 200px;
    padding: 10px 12px;
  }

  .nav-links.active .instagram-link {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
    margin-top: 8px;
  }

  .hero {
    min-height: 78vh;
    background-attachment: scroll;
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 2.15rem;
    line-height: 1.18;
    max-width: 12ch;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .hero p {
    font-size: 1.05rem;
    margin-bottom: 1.6rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .cta-button {
    padding: 12px 26px;
    font-size: 0.95rem;
  }

  .portfolio-hero {
    padding: 60px 20px 50px;
    margin-top: 80px;
  }

  .portfolio-hero h1 {
    font-size: 2.5rem;
  }

  .portfolio-hero p {
    font-size: 1.1rem;
  }

  .portfolio-container {
    padding: 50px 15px;
  }

  .portfolio-item {
    flex-direction: column !important;
    gap: 0;
    margin-bottom: 60px;
  }

  .portfolio-item.reverse {
    flex-direction: column !important;
  }

  .portfolio-image {
    width: 100%;
  }

  .portfolio-image img {
    min-height: 300px;
  }

  .portfolio-image-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-image-grid img {
    min-height: 300px;
  }
  
  .portfolio-image::after {
    display: none;
  }

  .portfolio-content {
    padding: 30px 25px;
  }

  .portfolio-content h3 {
    font-size: 2rem;
  }

  .portfolio-description {
    font-size: 1rem;
  }

  .portfolio-cta {
    padding: 60px 20px;
  }

  .portfolio-cta h2 {
    font-size: 2rem;
  }

  .portfolio-cta p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #navbar {
    height: 70px;
  }

  .nav-links {
    top: 11px;
    right: 12px;
    width: 44px;
    min-height: 44px;
  }

  .nav-links.active {
    top: 70px;
    width: 188px;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .instagram-link {
    width: 34px;
    height: 34px;
  }

  .instagram-link svg {
    width: 22px;
    height: 22px;
  }
}