*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #0068ff;
    --color-primary-dark: #061328;
    --color-accent: #0068ff;
    --color-accent-dark: #0055d9;
    --color-text: #071323;
    --color-muted: #647184;
    --color-border: #d8e5f7;
    --color-icon-muted: #9aabc1;
    --color-card-placeholder: #e7eef8;
    --color-surface: #ffffff;
    --color-page: #ffffff;
    --color-soft-surface: #edf4ff;
    --shadow-soft: 0 16px 32px rgba(6, 19, 40, 0.12);
    --card-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0) 42%, rgba(6, 19, 40, 0.78) 100%);
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 2px 0 rgba(6, 19, 40, 0.12);
    min-height: 72px;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 500;
}

header img {
    height: 60px;
    margin-right: 12px;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

ul li a {
    display: block;
    color: var(--color-text);
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 1.06rem;
    font-weight: 500;
}

ul li a:hover {
    color: var(--color-primary);
    background-color: var(--color-soft-surface);
}

#link-registrarse {
    background-color: var(--color-accent);
    color: var(--color-surface);
    border-radius: 999px;
    font-weight: 800;
}

#link-registrarse:hover,
.hero-search button:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-surface);
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-page);
    color: var(--color-text);
}

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: calc(100vh - 72px);
    min-height: 690px;
    padding: clamp(64px, 9vh, 96px) 24px 42vh;
    text-align: center;
    background-color: var(--color-page);
    overflow: hidden;
}

.hero h1 {
    position: relative;
    z-index: 1;
    max-width: 620px;
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    line-height: 1.12;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
}

.hero p,
.hero-search {
    position: relative;
    z-index: 1;
}

.hero p {
    max-width: 650px;
    margin-bottom: 28px;
    color: var(--color-muted);
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    line-height: 1.5;
}

.profession-rotator {
    display: inline-block;
    height: 1.5em;
    overflow: hidden;
    color: var(--color-primary);
    font-weight: 800;
    vertical-align: bottom;
}

.profession-rotator__words {
    display: flex;
    flex-direction: column;
    animation: rotate-professions 12s ease-in-out infinite;
}

.profession-rotator__words span {
    height: 1.5em;
    line-height: 1.5;
}

@keyframes rotate-professions {
    0%, 12% {
        transform: translateY(0);
    }

    16%, 28% {
        transform: translateY(-1.5em);
    }

    32%, 44% {
        transform: translateY(-3em);
    }

    48%, 60% {
        transform: translateY(-4.5em);
    }

    64%, 76% {
        transform: translateY(-6em);
    }

    80%, 92% {
        transform: translateY(-7.5em);
    }

    96%, 100% {
        transform: translateY(-9em);
    }
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) 112px;
    align-items: center;
    width: min(860px, 90vw);
    min-height: 64px;
    margin-bottom: 18px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background-color: var(--color-surface);
    box-shadow: 0 18px 40px rgba(6, 19, 40, 0.12);
    overflow: hidden;
}

.search-field,
.address-field {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.address-field {
    border-left: 1px solid var(--color-border);
}

.address-field__icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-left: 18px;
    border: 3px solid var(--color-icon-muted);
    border-radius: 50%;
}

.address-field__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -11px;
    width: 10px;
    height: 10px;
    border-right: 3px solid var(--color-icon-muted);
    border-bottom: 3px solid var(--color-icon-muted);
    transform: translateX(-50%) rotate(45deg);
    background-color: var(--color-surface);
}

.hero-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 24px;
    border: 0;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.98rem;
    outline: 0;
}

.address-field input {
    padding-left: 16px;
}

.hero-search input::placeholder {
    color: var(--color-muted);
}

.hero-search button {
    align-self: stretch;
    border: 0;
    border-radius: 999px;
    background-color: var(--color-accent);
    color: var(--color-surface);
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 820px) {
    .hero-search {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 24px;
    }

    .search-field,
    .address-field {
        min-height: 58px;
    }

    .address-field {
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }

    .hero-search button {
        min-height: 58px;
    }
}

.services {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 84px 24px 96px;
    background-color: var(--color-page);
}

.services-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.services h2 {
    max-width: 620px;
    margin: 0 auto 54px;
    color: var(--color-text);
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    line-height: 1.12;
    font-weight: 900;
    text-align: center;
}

.services h2 span {
    display: block;
    color: var(--color-primary);
}

.service-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
}

.service-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 12px 20px;
    border: 0;
    background: transparent;
    color: #7b8794;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: normal;
}

.service-tab.active {
    color: var(--color-primary);
    font-weight: 800;
}

.service-tab.active::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: -1px;
    left: 24px;
    height: 5px;
    background-color: currentColor;
}

.service-tab__icon {
    font-size: 1.55rem;
    line-height: 1;
    color: currentColor;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    position: relative;
    min-height: 285px;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--color-card-placeholder);
    box-shadow: 0 10px 22px rgba(40, 49, 66, 0.08);
}

.service-card__image {
    position: absolute;
    inset: 0;
    transition: transform 220ms ease;
    background:
        var(--card-overlay),
        linear-gradient(135deg, var(--color-soft-surface), var(--color-border));
}

.service-card:hover .service-card__image {
    transform: scale(1.06);
}

.service-card__image--electric {
    background:
        var(--card-overlay),
        url("src/servicio-electricistas.jpg") center / cover,
        linear-gradient(135deg, #edf2f8, #8ea4bf);
}

.service-card__image--sanitary {
    background:
        var(--card-overlay),
        url("src/servicio-sanitarios.jpg") center / cover,
        linear-gradient(135deg, #eef3f7, #9fb3c8);
}

.service-card__image--gas {
    background:
        var(--card-overlay),
        url("src/servicio-gasistas.jpg") center / cover,
        linear-gradient(135deg, #eaf2ff, var(--color-accent));
}

.service-card__image--paint {
    background:
        var(--card-overlay),
        url("src/servicio-pintores.jpg") center / cover,
        linear-gradient(135deg, #f2f4f7, #b9c4d0);
}

.service-card h3 {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 1;
    color: var(--color-surface);
    font-size: 1.22rem;
    line-height: 1.2;
    font-weight: 800;
}

@media (max-width: 980px) {
    .service-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .services {
        padding: 64px 18px 72px;
    }

    .services h2 {
        margin-bottom: 36px;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }

    .service-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 18px;
    }

    .service-card {
        min-height: 240px;
    }
}

.hero-image {
    position: absolute;
    z-index: 0;
    bottom: 0;
    width: min(780px, 76vw);
    height: 34vh;
    object-fit: cover;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
