
:root {
  --primary-color: rgb(0, 76, 110);
  --accent-color: rgb(58, 170, 53);
  --text-color: #111;
  --bg-color: #fff;
  --card-bg: #f0f0f0;
}
[data-theme="dark"] {
  --text-color: #eee;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'DM Sans', sans-serif;
}
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  animation: fadeIn 0.7s ease-in;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
html {
  scroll-padding-top: 80px;
}
header.navbar {
  background-color: var(--primary-color);
  padding: 0.6rem 1rem;
  
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  transition: all 0.3s ease;
}
.navbar.shrink {
  padding: 0.5rem 1rem;
}
.navbar img {
  height: auto;
  max-height: 100px;
  transition: transform 0.3s ease-in-out;
}
.navbar img:hover {
  transform: rotate(15deg) scale(1.05);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}
.nav-links a:hover,
.btn:hover,
#toggleMode svg:hover {
  opacity: 0.85;
  transform: scale(1.05);
  transition: all 0.3s ease-in-out;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
}
.hero {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding-top: 9rem;
}
.hero-img {
  width: 200px;
}
.animated-hero-img {
  max-width: 400px;
  animation: pulse-glow 3s ease-in-out infinite;
  display: block;
  margin: 0 auto;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(58,170,53,0.5)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(0,76,110,0.9)); }
}
.typewriter-text {
  overflow: hidden;
  border-right: 0.15em solid var(--accent-color);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.05em;
  animation: typing 2.5s steps(20, end), blink-caret 0.75s step-end infinite;
  max-width: fit-content;
}
@keyframes typing { from { width: 0 } to { width: 100% }}
@keyframes blink-caret {
  0%, 100% { border-color: transparent }
  50% { border-color: var(--accent-color) }
}
.section {
  padding: 4rem 2rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.cardService1 {
  color: white;
  background-color: #0e465f;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.cardService2 {
  color: white;
  background-color: #31966d;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.cardService3 {
  color: white;
  background-color: #005266;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.cardService4 {
  color: white;
  background-color: #1f9056;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.cardPortafolio {
  background-color: rgb(252, 252, 252);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.card h3 { margin-bottom: 0.5rem; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}
.contact-form button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
}
#toggleMode {
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: white;
  position: relative;
}
#toggleMode::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}
#toggleMode:hover::after {
  opacity: 1;
}
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1001;
    margin-left: auto;
  }
  .nav-links {
    flex-direction: column;
    background-color: var(--primary-color);
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    display: none;
    text-align: center;
    padding: 1rem 0;
    z-index: 1000;
  }
  .nav-links.active {
    display: flex !important;
  }
  .nav-links li {
    margin: 0.5rem 0;
  }
  .navbar {
    flex-wrap: nowrap;
    padding: 0.5rem 1rem;
  }
  .navbar img {
    max-height: 40px;
  }
}

/* Estilo para imagen dentro de cards */
.card-img {
  text-align: left;
  margin: 0 auto 1rem auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 1rem;
}

/* Header más angosto cuando se hace scroll */
.navbar.shrink {
  padding: 0.1rem 1rem;
  transition: padding 0.3s ease;
}

/* Botón de contacto destacado en hero */
.contact-btn {
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 1.5rem;
  transition: background-color 0.3s ease;
}
.contact-btn:hover {
  background-color: rgb(48, 150, 43);
}

.hero-btn {
  background-color: white;
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  display: inline-block;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}
.hero-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}
