@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

header {
    background: white;
    color: white;
    padding: 0;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo {
    height: 350px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: -42px auto -72px;
}

header h1 {
    margin: 0;
}

nav {
    background: linear-gradient(90deg, #0a0a0a 0%, #1f1f1f 25%, #0f0f0f 50%, #1f1f1f 75%, #0a0a0a 100%);
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 -2px 0 rgba(230, 57, 70, 0.45);
    display: flex;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
}

nav a {
    color: white;
    margin-right: 1.5rem;
    text-decoration: none;
    transition: color 0.25s ease;
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    caret-color: transparent;
}

nav a:hover {
    text-decoration: underline;
    text-decoration-color: #e63946;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.28rem;
}

.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.5rem;
    z-index: 1000;
}

.hamburger span {
    width: 20px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
    display: block;
    transform-origin: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.nav-menu li {
    list-style: none;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    margin-right: 0;
}

.page-intro-title {
    max-width: 1200px;
    margin: 4.5rem auto 0.7rem;
    padding: 0 2rem;
    text-align: center;
}

.page-intro-title h1 {
    margin: 0;
    font-size: clamp(1.2rem, 2.25vw, 2rem);
    line-height: 1.25;
    color: #111111;
    padding: 0.25rem 0;
}

.page-intro-line {
    border: 0;
    height: 1px;
    width: min(760px, 100%);
    margin: 0.7rem auto;
    background: linear-gradient(90deg, rgba(230, 57, 70, 0) 0%, rgba(230, 57, 70, 0.75) 50%, rgba(230, 57, 70, 0) 100%);
}

/* Galería Hero - Responsive */
.hero-gallery {
    position: relative;
    width: 70%;
    max-width: 1000px;
    margin: 2rem auto 0;
    overflow: hidden;
    background: #000;
}

.gallery-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* Aspect ratio 3:2 */
    overflow: hidden;
}

.gallery-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 2;
}

.gallery-caption {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: clamp(1.2rem, 3.2vw, 2.1rem);
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(1.5px);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gallery-caption.active {
    opacity: 1;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.gallery-item.active {
    opacity: 1;
}

video.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controles de navegación */
.gallery-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
    box-sizing: border-box;
    z-index: 10;
}

.prev,
.next {
    background: rgba(255, 255, 255, 0.5);
    color: #000;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.prev:hover,
.next:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Indicadores de slides */
.gallery-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive: Ajustes para móvil */
@media (max-width: 768px) {
    .gallery-controls {
        padding: 0 0.5rem;
    }
    
    .prev,
    .next {
        font-size: 1.25rem;
        padding: 0.25rem 0.75rem;
    }
    
    .gallery-indicators {
        bottom: 0.75rem;
        gap: 0.4rem;
    }
    
    .indicator {
        width: 0.6rem;
        height: 0.6rem;
    }
}

/* Página de Servicios */
.services-page main {
    max-width: 1500px;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.8rem;
    padding: 2rem 0;
    align-items: start;
}

.service-item {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #ededed;
    border-top: 2px solid rgba(230, 57, 70, 0.62);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.service-summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.8rem;
    aspect-ratio: 1 / 1;
    user-select: none;
    -webkit-user-select: none;
    caret-color: transparent;
}

.service-summary::-webkit-details-marker {
    display: none;
}

.service-item h2 {
    color: #c73a45;
    margin: 0;
    font-size: clamp(0.98rem, 1.1vw, 1.15rem);
    line-height: 1.3;
}

.service-media {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f2f2;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 1px solid #e4e4e4;
}

.service-content {
    max-height: 0;
    overflow: hidden;
    color: #555;
    line-height: 1.65;
    transition: max-height 0.35s ease, padding-top 0.35s ease;
}

.service-content p {
    margin: 0 0 0.9rem;
}

.service-content p:last-child {
    margin-bottom: 0;
}

.service-close-wrap {
    margin-top: 1rem;
    text-align: center;
}

.service-close-btn {
    background: transparent;
    border: none;
    color: #b71c1c;
    font-size: 0.86rem;
    line-height: 1;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(183, 28, 28, 0.55);
    text-underline-offset: 0.2rem;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.service-close-btn:hover {
    color: #8b0000;
    text-decoration-color: rgba(139, 0, 0, 0.9);
}

.service-content strong {
    color: #111111;
}

.service-item[open] .service-content {
    max-height: 1200px;
    padding-top: 0.35rem;
}

/* Página de Contacto */
.services-back-wrap {
    margin-top: 2.2rem;
    text-align: center;
}

.services-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(1.05rem, 1.9vw, 1.45rem);
    line-height: 1.15;
    color: #b71c1c;
    transition: color 0.2s ease, gap 0.2s ease;
}

.services-back-link::before {
    content: "\2190";
    font-weight: 700;
    font-size: 1.35em;
    line-height: 1;
}

.services-back-link:hover {
    color: #8b0000;
    gap: 0.65rem;
}

.about-contact-block {
    padding: 0;
    margin: 2.4rem 0 3.6rem;
}

.contact-page .about-contact-block {
    margin: 2.8rem 0 4rem;
}

.about-image-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.about-image-item {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.about-contact-block p {
    margin: 0 0 0.9rem;
    color: #4b4b4b;
}

.about-contact-block p:last-child {
    margin-bottom: 0;
}

.contact-section {
    display: grid;
    grid-template-columns: minmax(380px, 1.25fr) minmax(280px, 0.85fr);
    gap: 3rem;
    padding: 2rem 0;
    align-items: start;
}

.contact-info,
.contact-form {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #ececec;
    border-top: 2px solid rgba(230, 57, 70, 0.8);
    box-shadow: 0 10px 26px rgba(20, 20, 20, 0.06);
}

.contact-info h3,
.contact-form h3 {
    color: #c62828;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.85rem;
    color: #555;
}

.contact-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.42rem;
    border-radius: 50%;
    vertical-align: -0.2rem;
}

.contact-inline-icon svg {
    width: 0.9rem;
    height: 0.9rem;
}

.contact-inline-whatsapp {
    color: #25d366;
    background: rgba(37, 211, 102, 0.12);
}

.contact-inline-email {
    color: #e63946;
    background: rgba(230, 57, 70, 0.12);
}

.contact-map-wrap {
    margin-top: 0.9rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.contact-map {
    width: 100%;
    height: 250px;
    border: 0;
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.78rem 0.8rem;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 4px rgba(230, 57, 70, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #ff1744 0%, #d32f2f 50%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 50%, #8b0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.4);
}

/* Responsive para contacto */
@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
}

.main-feature {
    display: grid;
    grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.main-flow {
    max-width: 980px;
    margin: 0 auto;
    padding-top: 0.8rem;
    display: grid;
    gap: 1rem;
}

.main-text-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.main-text-card h2 {
    margin: 3rem 0 1.2rem;
    font-size: clamp(1.35rem, 2.1vw, 1.9rem);
    line-height: 1.2;
    color: #1d1d1d;
}

.main-text-card p {
    margin: 0 0 0.7rem;
    color: #474747;
}

.main-text-card p:last-child {
    margin-bottom: 0;
}

.main-text-card .key-highlight {
    margin: 1.1rem 0 1.25rem;
    padding: 0.75rem 0 0.75rem 0.95rem;
    border-left: 4px solid #e63946;
    font-size: clamp(1rem, 1.55vw, 1.12rem);
    line-height: 1.45;
    font-weight: 600;
    color: #2b2b2b;
}

.main-text-card .main-cta-wrap {
    display: block;
    margin-top: 4.2rem;
    margin-bottom: 1.4rem;
    text-align: center;
}

.main-text-card p.main-cta-wrap:last-child {
    margin-bottom: 1.4rem;
}

.main-cta-link {
    display: inline;
    text-decoration: underline;
    text-decoration-color: rgba(230, 57, 70, 0.5);
    text-underline-offset: 0.2rem;
    font-weight: 600;
    color: #b71c1c;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.main-cta-link:hover {
    color: #8b0000;
    text-decoration-color: rgba(139, 0, 0, 0.9);
}

.service-inline-nav {
    text-align: center;
    margin-top: 1.7rem;
    margin-bottom: 1.7rem;
    line-height: 1.95;
}

.main-services-cta-wrap {
    margin: 1.6rem 0 0.6rem;
    text-align: center;
}

.main-services-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.15;
    color: #b71c1c;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.main-services-cta-link:hover {
    color: #8b0000;
    gap: 0.65rem;
}

.main-services-cta-link::after {
    content: "\2192";
    font-weight: 700;
    font-size: 1.45em;
    line-height: 1;
}

.main-inline-image {
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.8rem;
    margin-bottom: 1.2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-top: 3px solid rgba(230, 57, 70, 0.6);
    background: #fff;
}

.main-inline-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
}

.main-image-block {
    width: 100%;
    max-width: 620px;
    margin: 1.8rem auto 1.8rem;
    height: 360px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-top: 3px solid rgba(230, 57, 70, 0.6);
    background: #fff;
}

.main-text-card + .main-image-block,
.main-image-block + .main-text-card {
    margin-top: 0.6rem;
}

.main-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
}

.main-feature-text {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-left: 4px solid rgba(230, 57, 70, 0.7);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-feature-text h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    line-height: 1.2;
    color: #1d1d1d;
}

.main-feature-text h2 {
    margin: 1.15rem 0 0.7rem;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    line-height: 1.25;
    color: #222;
}

.main-feature-text p {
    margin: 0 0 0.75rem;
    color: #474747;
}

.main-feature-text ul {
    margin: 0 0 0.9rem 1.2rem;
    padding: 0;
}

.main-feature-text li {
    margin-bottom: 0.35rem;
    color: #3f3f3f;
}

footer {
    background: linear-gradient(180deg, #1f1f1f 0%, #0a0a0a 50%, #000000 100%);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
}

/* Botones Flotantes de Contacto */
.floating-buttons {
    position: fixed;
    bottom: 2.8rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    color: white;
}

.floating-btn svg {
    width: 32px;
    height: 32px;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #20ba5c 100%);
}

.floating-btn.email {
    background: linear-gradient(135deg, #e63946 0%, #b71c1c 100%);
}

/* Responsive botones flotantes */
@media (max-width: 768px) {
    nav {
        padding: 0.4rem 0.6rem;
        justify-content: flex-start;
    }
    
    .hamburger {
        display: flex;
        gap: 0.3rem;
    }

    .hamburger span {
        width: 18px;
        height: 2px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.3rem);
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #0a0a0a 0%, #1f1f1f 100%);
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
        gap: 0;
        z-index: 999;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    
    .menu-toggle:checked ~ .nav-menu {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    .nav-menu li a {
        display: block;
        padding: 0.75rem 1rem;
        margin: 0;
        border-bottom: 1px solid #333;
        text-decoration: none;
        color: white;
        font-size: 0.9rem;
    }
    
    .menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .logo {
        height: 220px;
        margin: -8px auto -18px;
    }
    
    .gallery-controls {
        padding: 0 0.5rem;
    }

    .hero-gallery {
        width: 92%;
        margin-top: 1.25rem;
    }

    .page-intro-title {
        padding: 0 1.25rem;
        margin-top: 1.25rem;
    }

    .page-intro-title h1 {
        font-size: clamp(1rem, 5vw, 1.3rem);
        padding: 0.2rem 0;
    }
    
    .prev,
    .next {
        font-size: 1.25rem;
        padding: 0.25rem 0.75rem;
    }
    
    .gallery-indicators {
        bottom: 0.75rem;
        gap: 0.4rem;
    }
    
    .indicator {
        width: 0.6rem;
        height: 0.6rem;
    }
    
    .contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-image-item {
        height: 145px;
    }

    .contact-page .about-contact-block {
        margin: 2rem 0 2.8rem;
    }

    main {
        padding: 1.25rem;
    }

    .main-feature {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .services-page .services-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .services-page .service-summary {
        aspect-ratio: 1 / 1;
    }

    .services-page .service-media {
        height: auto;
    }

    .main-image-block {
        max-width: 100%;
        margin: 0 auto;
        height: auto;
    }


    .main-image {
        height: auto;
        max-height: 300px;
    }

    .main-text-card h2 {
        font-size: clamp(1.12rem, 4.8vw, 1.35rem);
        line-height: 1.25;
    }

    .main-text-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .main-cta-link {
        font-size: 0.92rem;
    }

    .service-inline-nav {
        margin-top: 1.2rem;
        margin-bottom: 1.2rem;
        line-height: 1.8;
    }

    .main-services-cta-link {
        font-size: 0.92rem;
        padding: 0.65rem 1.2rem;
    }

    .gallery-caption {
        font-size: clamp(1rem, 4vw, 1.35rem);
        padding: 0.65rem 0.9rem;
    }
    
    .floating-buttons {
        bottom: 1.6rem;
        right: 1rem;
        gap: 0.8rem;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
