/* 1. Reinicio Universal & Variables */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --gray-dark: #333333;
    --gray-text: #525252;
    --gray-muted: #aaa;
    --font-primary: 'Raleway', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
}

/* 2. Contenedores Estructurales */
.contenedor {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.service-container {
    width: 100%;
    padding: 70px 15px 30px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .contenedor {
        padding: 0 20px;
    }
    .service-container {
        padding: 80px 20px 30px;
    }
}

@media (min-width: 768px) {
    .contenedor {
        max-width: 720px;
    }
    .service-container {
        padding: 90px 30px 40px;
    }
}

@media (min-width: 992px) {
    .contenedor {
        max-width: 1024px;
    }
    .service-container {
        max-width: 1024px;
        padding: 100px 40px 40px;
    }
}

@media (min-width: 1024px) {
    .contenedor,
    .service-container,
    .footer-content {
        max-width: 1200px;
        margin: 0 auto;
    }
    .contenedor {
        padding: 0 30px;
    }
    .service-container {
        padding: 100px 45px 40px;
    }
}

@media (min-width: 1200px) {
    .contenedor,
    .service-container {
        max-width: 1200px;
    }
    .service-container {
        padding: 110px 50px 40px;
    }
}

/* 3. Tipografía Global */
.titulo {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    font-family: var(--font-primary);
}

.titulo::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--black);
    margin: 12px auto 0;
}

@media (min-width: 768px) {
    .titulo {
        font-size: 2.2rem;
        margin-bottom: 40px;
        letter-spacing: 2px;
    }
    .titulo::after {
        width: 80px;
        margin: 15px auto 0;
    }
}

@media (min-width: 992px) {
    .titulo {
        font-size: 2.5rem;
        margin-bottom: 60px;
    }
}

@media (min-width: 1024px) {
    .titulo {
        font-size: 2.8rem;
    }
    p {
        max-width: 70ch;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1200px) {
    .titulo {
        font-size: 3rem;
    }
}

/* 4. Header Páginas Internas */
.textos-header {
    padding: 35px 15px 25px;
    color: var(--white);
    text-align: center;
}

.textos-header h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-family: var(--font-secondary);
    line-height: 1.3;
}

.textos-header h2 {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
}

@media (min-width: 480px) {
    .textos-header {
        padding: 40px 20px 30px;
    }
    .textos-header h1 {
        font-size: 1.8rem;
    }
}

@media (min-width: 768px) {
    .textos-header {
        padding: 50px 30px 35px;
    }
    .textos-header h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .textos-header h2 {
        font-size: 1.3rem;
    }
}

@media (min-width: 992px) {
    .textos-header {
        padding: 60px 40px 40px;
    }
    .textos-header h1 {
        font-size: 2.5rem;
    }
    .textos-header h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .textos-header {
        padding: 100px 40px 60px;
    }
    .textos-header h1 {
        font-size: 3rem;
    }
    .textos-header h2 {
        font-size: 1.7rem;
    }
}

@media (min-width: 1200px) {
    .textos-header {
        padding: 130px 40px 80px;
    }
    .textos-header h1 {
        font-size: 3.5rem;
    }
    .textos-header h2 {
        font-size: 2rem;
    }
}

/* 5. Cabecera y Navegación */
header {
    background-color: var(--black);
    padding: 10px 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

header.header-relative {
    position: relative;
}

main.has-fixed-header {
    padding-top: 70px;
}

@media (min-width: 768px) {
    header {
        padding: 15px 0;
    }
    main.has-fixed-header {
        padding-top: 80px;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5px 15px;
    position: relative;
}

@media (min-width: 480px) {
    nav {
        padding: 5px 20px;
    }
}

@media (min-width: 1024px) {
    nav {
        justify-content: center;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 30px;
    }
}

@media (min-width: 992px) {
    nav {
        padding: 0 40px;
    }
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin: 0;
    padding: 10px 0;
    width: 100%;
    text-align: center;
    position: relative;
}

.nav-menu a::after {
    display: none;
}

.nav-menu a:hover {
    color: var(--gray-medium);
}

@media (min-width: 1024px) {
    .nav-menu {
        position: static;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        gap: 0;
    }

    .nav-menu a {
        margin: 0 25px;
        padding: 8px 0;
        font-size: 0.9rem;
        width: auto;
    }

    .nav-menu a::after {
        content: '';
        display: block;
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--white);
        transition: width 0.3s;
    }

    .nav-menu a:hover::after {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .nav-menu a {
        margin: 0 30px;
        font-size: 0.95rem;
        letter-spacing: 1.5px;
    }
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-desktop {
    display: none;
}

.logo-mobile {
    display: block;
}

@media (min-width: 1024px) {
    .logo img {
        height: 50px;
    }
    .logo-desktop {
        display: block;
    }
    .logo-desktop img {
        margin: 0 40px;
    }
    .logo-mobile {
        display: none;
    }
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }
}

/* 6. Botones Globales */
.btn-primary {
    display: inline-block;
    background-color: var(--black);
    color: var(--white);
    padding: 10px 24px;
    border: 2px solid var(--black);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--black);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--black);
    padding: 10px 24px;
    border: 2px solid var(--black);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--black);
    color: var(--white);
}

.btn-tertiary {
    display: inline-block;
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--black);
    padding-bottom: 2px;
    transition: all 0.3s;
}

.btn-tertiary:hover {
    color: #555;
    border-color: #555;
}

@media (min-width: 768px) {
    .btn-primary,
    .btn-secondary {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

.text-center {
    text-align: center;
}

/* 7. Secciones */
section {
    padding: 40px 0;
}

@media (min-width: 480px) {
    section {
        padding: 50px 0;
    }
}

@media (min-width: 768px) {
    section {
        padding: 60px 0;
    }
}

@media (min-width: 992px) {
    section {
        padding: 80px 0;
    }
}

@media (min-width: 1200px) {
    section {
        padding: 100px 0;
    }
}

/* 8. Pie de Página */
footer {
    background-color: #111;
    color: var(--white);
    padding: 40px 0 0;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 480px) {
    .footer-content {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    footer {
        padding: 60px 0 0;
    }
}

@media (min-width: 992px) {
    .footer-content {
        padding: 0 40px;
    }
}

@media (min-width: 1200px) {
    footer {
        padding: 80px 0 0;
    }
    .footer-content {
        max-width: 1200px;
        padding: 0 30px;
    }
}

.footer-brand {
    margin-bottom: 25px;
}

.footer-logo {
    height: 45px;
    margin-bottom: 15px;
    display: block;
}

@media (min-width: 768px) {
    .footer-logo {
        height: 50px;
        margin-bottom: 20px;
    }
    .footer-brand {
        margin-bottom: 30px;
    }
}

.footer-description {
    color: var(--gray-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-description {
        margin-bottom: 20px;
        font-size: 1rem;
    }
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links img {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s, transform 0.3s;
}

.social-links img:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
    font-family: var(--font-secondary);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--white);
}

@media (min-width: 768px) {
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .footer-links li,
    .footer-contact li {
        margin-bottom: 12px;
    }
}

.footer-links a,
.footer-contact a {
    color: var(--gray-muted);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact img {
    width: 16px;
    height: 16px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-muted);
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 20px 0;
        gap: 15px;
    }
    .footer-bottom p {
        font-size: 0.9rem;
    }
}

.legal-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.legal-links a {
    color: var(--gray-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--white);
}

.legal-links span {
    color: #555;
}

@media (min-width: 768px) {
    .legal-links a {
        font-size: 0.8rem;
    }
}

/* 9. Cuadrículas Responsivas */
.footer-grid,
.services-grid,
.servicio-cont,
.service-grid,
.work-features,
.experience-grid,
.custom-grid,
.related-grid,
.contenedor-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

.contenedor-sobre-nostros,
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

@media (min-width: 480px) {
    .contenedor-footer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-grid,
    .experience-grid,
    .custom-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .service-gallery {
        grid-column: 1;
        grid-row: 1;
    }

    .service-details {
        grid-column: 2;
        grid-row: 1;
    }

    .servicio-cont {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 25px;
    }

    .work-features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }

    .contenedor-footer {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .contenedor-sobre-nostros {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .contact-wrapper {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .servicio-cont {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .work-features {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .service-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .service-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }

    .experience-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .custom-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .contenedor-footer {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .experience-grid,
    .custom-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
    }
}

/* 10. Utilidades */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
