
:root {
    --bg: #fff;
    --fg: #111;
    --muted: #666;
    --accent: rgb(0, 187, 84);
}

:root[data-theme="dark"] {
    --bg: #0b0b0f;
    --fg: #e6e6e6;
    --muted: #9a9a9a;
    --accent: rgb(170, 238, 185);

}

:root { --header-height: 4rem; }

:root[data-theme="dark"] .invert {
    filter: invert(1) hue-rotate(180deg) saturate(90%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
}

html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    margin: 1rem;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--header-height);
}

main {
    flex: 1 0 auto;
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer
}

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

p {
    margin-bottom: 1rem
}

h2,
h3 {
    margin-bottom: 1rem;
    color: var(--fg)
}

h1 {
    margin-bottom: 0.5rem;
}

.tema {
    background: none;
    border: none;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 1rem auto; 
    padding: 0 1rem;
}
.rrss-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}
.site-header {
    background-color: var(--bg);
      position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06)
}

.brand {
    font-weight: 700;
    text-decoration: none;
    color: var(--fg)
}
.brand-row {
    display: flex;
    height: 2rem;
    align-items: center;
    gap: 0.6rem;
}

.brand-row .brand {
    font-size: 1.15rem;
    line-height: 1;
}

.tema {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tema .icono {
    width: 2rem;
    height: auto;
    display: block;
}

.nav {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    transition: text-decoration 0.3s cubic-bezier(0.3, 0, 0.2, 1), color 0.3s cubic-bezier(0.3, 0, 0.2, 1);
}

.nav a:hover {
    color: var(--fg);
    text-decoration: underline;
}
.hero {
    background: linear-gradient(90deg, rgba(11, 119, 102, 0.06), transparent);
    padding: 3rem 0
}

.cta {
    display: inline-block;
    margin-top: 1rem;
    padding: .6rem 1rem;
    background: var(--accent);
    color: #002;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600
}

.panel {
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04)
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem
}

.card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02)
}

.card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px
}

.meta {
    color: var(--muted);
    font-size: .85rem
}

.site-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
    font-size: .9rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.icono {
    width: 2rem;
    height: 2rem;
}

.invert {
    transition: filter .18s ease;
}

/* evitar que imágenes ensanchen la página en móviles */
img, picture, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.compensacion {
    width: 10rem;
    height: auto;
}

.rrss {
    width: 3rem;
    height: auto;
    margin: 0.5rem;
    transition: transform 0.3s ease;
}

.rrss:hover {
    transform: scale(1.1);
}

.contenedor-fitxas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.fitxa {
    flex: 1 1 220px;
    border: 1px solid var(--accent);
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.3, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.3, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.3, 0, 0.2, 1);
    cursor: pointer;
}

.fitxa:hover {
    border-color: var(--fg);
    transform: scale(1.01);
    box-shadow: 0px 0px 12px 0 rgb(70, 153, 77), 0px 0px 6px 0 rgb(198, 255, 203), 0px 0px 8px 2px rgb(116, 221, 102);
}

.fitxa:focus {
    outline: 3px solid rgba(var(--accent-rgb), 0.25);
    outline-offset: 3px;
}

.imagenes-proyecto {
    border-radius: 8px;
}

.vertical {
    width: 100%;
    display: flex;
    flex-direction: column;
    max-width: 30rem;
    gap: 1rem;
    margin: 0 auto 1rem;
}

/* Scroll to top button */
#scrollTopBtn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1000;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 50%;
    transition: opacity 0.2s;
    opacity: 0.85;
}
#scrollTopBtn:hover {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
@media (max-width: 600px) {
    #scrollTopBtn {
        right: 1rem;
        bottom: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    #scrollTopBtn svg {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}