/* ===== Color palette ===== */
:root {
  --primary-color: #0d1f3c;
  --secondary-color: #000000;
  --text-color: #ffffff;
  --accent-color: #1e3a5f;
}

/* ===== Global ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: var(--accent-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Header ===== */
header {
  text-align: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

header img {
  max-width: 100px;
  margin-bottom: 0;
  margin-right: 20px;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

header p {
  font-size: 1rem;
  font-weight: 300;
}

.logo {
  max-width: 100px;
  width: auto;
  height: auto;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* ===== Nav ===== */
nav {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 22px 20px;
  font-weight: bold;
  text-transform: uppercase;
  background-color: rgba(13, 31, 60, 0.65);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 50;
}

nav a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* ===== Hero carousel (index only) ===== */
.hero-carousel {
  position: relative;
  height: 540px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: rgba(13, 31, 60, 0.72);
  z-index: 2;
}

.hero-overlay h2 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  font-weight: bold;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-tagline {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 18px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size: 1rem;
  opacity: 0.92;
  line-height: 1.7;
  max-width: 620px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* ===== Sections ===== */
section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

/* ===== Welcome strip (index) ===== */
.welcome-strip {
  background-color: var(--primary-color);
  text-align: center;
  padding: 52px 20px;
  width: 100%;
}

.welcome-strip h2 {
  font-size: 1.9rem;
  margin-bottom: 14px;
}

.welcome-strip p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 680px;
  margin: 0 auto;
  opacity: 0.88;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background-color: rgba(13, 31, 60, 0.8);
  padding: 20px;
  border-radius: 8px;
}

.card img {
  border-radius: 4px;
  margin-top: 15px;
}

.card p {
  font-size: 1rem;
}

/* ===== Gallery grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(13, 31, 60, 0.8);
  transition: transform 0.3s ease;
}

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

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* ===== Portfolio specifics ===== */
.card-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-description.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.expand-button {
  background-color: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 8px 12px;
  margin-top: 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.expand-button:hover {
  background-color: var(--primary-color);
  border-color: var(--accent-color);
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: rgba(13, 31, 60, 0.5);
  border-radius: 8px;
  overflow: hidden;
}

.projects-table thead {
  background-color: rgba(13, 31, 60, 0.9);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.projects-table th {
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid rgba(30, 58, 95, 0.8);
}

.projects-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}

.projects-table tbody tr:hover {
  background-color: rgba(30, 58, 95, 0.3);
}

.projects-table tbody tr:last-child td {
  border-bottom: none;
}

.table-hidden {
  display: none;
}

.table-toggle-btn {
  background-color: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 8px 12px;
  margin-left: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.table-toggle-btn:hover {
  background-color: var(--primary-color);
  border-color: var(--accent-color);
}

.table-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.year-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text-color);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: bold;
  transition: all 0.2s ease;
}

.year-btn:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

.year-btn.active {
  background: var(--text-color);
  color: var(--primary-color);
  border-color: var(--text-color);
}

/* ===== Contact ===== */
.contact-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.contact-hero img {
  width: 90%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.contact-hero img:hover {
  transform: scale(1.02);
}

.contact-whatsapp {
  text-align: center;
  margin-top: 20px;
}

.whatsapp-button {
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
}

.whatsapp-button:hover {
  background-color: #1ebe57;
}

.contact-info {
  text-align: center;
  margin-top: 20px;
  font-size: 1rem;
}

/* ===== Nav links wrapper ===== */
.nav-links {
  display: flex;
  gap: 40px;
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  nav {
    position: relative;
    justify-content: flex-end;
    padding: 14px 20px;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(13, 31, 60, 0.97);
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  section {
    padding: 30px 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    height: 280px;
  }

  .hero-overlay h2 {
    font-size: 1.6rem;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .contact-info .separator {
    display: none;
  }
}
