@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --bg-surface: rgba(30, 30, 30, 0.6);
    --primary-red: #d32f2f;
    --primary-red-glow: rgba(211, 47, 47, 0.4);
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --whatsapp-green: #25D366;
    --border-color: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(211, 47, 47, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(211, 47, 47, 0.05), transparent 25%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 25px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: inline-block;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 25px rgba(220, 60, 20, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.logo-container:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 35px rgba(220, 60, 20, 0.4);
}

.main-logo {
    display: block;
    max-height: 110px;
    width: auto;
    border-radius: 8px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 40px;
    width: 100%;
}

.hero {
    text-align: center;
    max-width: 800px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #fff, var(--text-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 300;
}

.services {
    width: 100%;
    max-width: 1100px;
}

.services h2, .tiktok-section h2, .gallery-section h2, .contact-card h2 {
    text-align: center;
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 40px;
    font-weight: 800;
    position: relative;
    padding-bottom: 15px;
}

.services h2::after, .tiktok-section h2::after, .gallery-section h2::after, .contact-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 35px 25px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(211,47,47,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(211, 47, 47, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(211, 47, 47, 0.15);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.4s ease;
}

.service-card:hover i {
    transform: scale(1.1);
}

.service-card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    font-weight: 300;
}

.presupuesto-banner {
    background: linear-gradient(135deg, var(--primary-red) 0%, #8a1c1c 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 40px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px var(--primary-red-glow);
    position: relative;
    overflow: hidden;
}

.presupuesto-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: shine 6s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    20% { transform: translateX(100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* --- ESTILOS DEL CARRUSEL Y RECORTE AUTOMÁTICO DE fotosobras.jpg --- */
.gallery-section {
    width: 100%;
    max-width: 800px;
}

.carousel {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.crop-slide {
    min-width: 100%;
    height: 480px;
    overflow: hidden;
    position: relative;
}

.sliced-img {
    width: 100%;
    height: 100%;
    background-image: url('Imagenes/fotosobras.jpg');
    background-size: 200% 400%; /* Amplía la foto en una cuadrícula de 2 columnas x 4 filas */
    background-repeat: no-repeat;
}

/* Coordenadas automáticas para cada una de las 8 fotos del collage */
.photo-1 { background-position: 0% 0%; }     /* Arriba izquierda */
.photo-2 { background-position: 100% 0%; }   /* Arriba derecha */
.photo-3 { background-position: 0% 33.3%; }  /* Segunda fila izq */
.photo-4 { background-position: 100% 33.3%; }/* Segunda fila der */
.photo-5 { background-position: 0% 66.6%; }  /* Tercera fila izq */
.photo-6 { background-position: 100% 66.6%; }/* Tercera fila der */
.photo-7 { background-position: 0% 100%; }   /* Abajo izquierda */
.photo-8 { background-position: 100% 100%; } /* Abajo derecha */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 10, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

.tiktok-section {
    width: 100%;
    max-width: 800px;
}

.tiktok-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.contact-card {
    background: var(--bg-surface);
    padding: 50px 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 120px;
    height: 120px;
    background-color: var(--primary-red);
    transform: rotate(45deg);
    box-shadow: 0 0 30px var(--primary-red);
    z-index: 0;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.info-item i {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin-right: 20px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn i {
    margin-right: 12px;
    font-size: 1.4rem;
}

.btn-call {
    background: linear-gradient(135deg, #f03e3e 0%, var(--primary-red) 100%);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #2fe073 0%, var(--whatsapp-green) 100%);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

footer {
    text-align: center;
    padding: 30px 20px 100px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid var(--border-color);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999; 
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.float-whatsapp {
    background: linear-gradient(135deg, #2fe073 0%, var(--whatsapp-green) 100%);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.float-call {
    background: linear-gradient(135deg, #f03e3e 0%, var(--primary-red) 100%);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* --- OPTIMIZACIONES PARA MÓVIL --- */
@media (max-width: 768px) {
    header { padding: 10px 15px; }
    .main-logo { max-height: 75px; }
    main { padding: 30px 15px; gap: 30px; }
    .hero h1 { font-size: 2rem; line-height: 1.2; }
    .hero p { font-size: 1rem; }
    .services h2, .tiktok-section h2, .gallery-section h2, .contact-card h2 { font-size: 1.6rem; margin-bottom: 25px; }
    .services-grid { grid-template-columns: 1fr; gap: 15px; }
    .service-card { padding: 25px 20px; }
    .crop-slide { height: 320px; } /* Altura del carrusel adaptada a móvil */
    .presupuesto-banner { font-size: 1.05rem; padding: 15px; }
    .contact-card { padding: 30px 20px; }
    .contact-card::before { top: -70px; right: -70px; }
    .info-item { font-size: 0.95rem; }
    .tiktok-container { padding: 10px; }
    .floating-buttons { bottom: 15px; right: 15px; gap: 10px; }
    .float-btn { width: 50px; height: 50px; font-size: 1.5rem; }
}