:root {
  --primary-color: #643d02;
  --secondary-color: rgba(146, 138, 90, 0.993);
  --accent-color: #7a5a13;
  --light-color: #f8f6f6;
  --dark-color: #212529;
  --text-color: rgba(0, 43, 54, 0.9);
  --text-color-light: rgba(0, 43, 54, 0.7);
  --hover-color: #eec231fd;
  --font-family: "Garamond", serif;

  --max-width: 1100px;
  --radius: 12px;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
  --border: 1px solid rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-family);
  margin: 0;
  background-color: #c9b351;
  color: var(--text-color);
  line-height: 1.45;
}

/* Accesibilidad */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
}
.skip-link:focus{
  left: 12px;
  top: 12px;
  background:#fff;
  padding:10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Focus visible para teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(238, 194, 49, 0.9);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 16px;
}

/* Header */
.site-header {
  background-color: var(--primary-color);
  color: var(--light-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 50px;
  height: auto;
}

.company-name {
  font-size: 1.4rem;
  font-weight: bold;
}

.company-tag {
  opacity: .9;
  font-weight: 700;
}

/* Search */
.search-bar{
  display:flex;
  gap: 8px;
  align-items:center;
}

.search-bar input{
  padding: 10px 12px;
  border-radius: 10px;
  border: var(--border);
  min-width: 220px;
}

.search-bar button{
  padding: 10px 12px;
  border-radius: 10px;
  border: var(--border);
  background: var(--hover-color);
  cursor: pointer;
}

/* Nav */
.nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.nav a {
  color: var(--light-color);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.nav a:hover {
  background-color: var(--hover-color);
  color: var(--dark-color);
}

/* Botón menú mobile */
.menu-btn{
  display:none;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: var(--light-color);
  padding: 10px 12px;
  border-radius: 10px;
  cursor:pointer;
}

/* Hero */
.hero h1{
  margin: 0 0 6px 0;
}
.hero p{
  margin: 0;
  opacity: .9;
}

/* Grid de herramientas */
.tools-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* Card */
.metodologia-card{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: center;

  background: rgba(253, 252, 252, 0.973);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  padding: 16px;
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

.metodologia-card:hover{
  transform: translateY(-2px);
}

.metodologia-card img{
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
}

.card-body h2{
  margin: 0 0 6px 0;
  font-size: 1.35rem;
  color: var(--primary-color);
}

.card-body p{
  margin: 6px 0;
  color: var(--text-color-light);
}

.btn-link{
  display: inline-block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: var(--border);
  background: rgba(238, 194, 49, 0.35);
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 700;
}

.btn-link:hover{
  background: rgba(238, 194, 49, 0.55);
}

/* No results */
.no-results{
  margin-top: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.65);
  border: var(--border);
  border-radius: 12px;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 14px 10px;
}

.site-footer a{
  color: var(--hover-color);
}

/* Responsive */
@media (max-width: 900px) {
  .tools-grid{
    grid-template-columns: 1fr;
  }

  .metodologia-card{
    grid-template-columns: 1fr;
  }

  .metodologia-card img{
    height: 180px;
  }

  .search-bar input{
    min-width: 160px;
  }

  .menu-btn{
    display:inline-flex;
    align-items:center;
    gap: 8px;
  }

  .nav{
    display:none;
    width: 100%;
  }
  .nav.open{
    display:block;
  }
  .nav ul{
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
  }

  .site-header{
    flex-wrap: wrap;
    justify-content: center;
  }
}
