:root {
    --bg-dark: #050a15;
    --bg-card: #0f172a;
    --accent-main: #0077ff;
    --accent-dark: #0056b3;
    --accent-light: #7dd3fc;
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --text-muted: #64748b;
    --border-gray: #1e293b;
}

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

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
}

/* --- UTILIDADES --- */
.transition-blue:hover { color: var(--accent-light); }
.link-white { color: white; text-decoration: none; font-weight: 500; }

/* NAVEGACIÓN */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    background-color: #0f172a;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-gray);
}

.top-bar-contact { display: flex; gap: 1rem; }
.contact-item { display: flex; align-items: center; }
.icon { width: 1rem; height: 1rem; margin-right: 0.5rem; color: var(--accent-main); }

.main-nav {
    position: sticky;
    top: 34px;
    width: 100%;
    z-index: 50;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glass {
    background: rgba(5, 10, 21, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-img { height: 2.5rem; transition: transform 0.2s; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link { color: white; text-decoration: none; font-weight: 500; transition: 0.2s; }

/* HERO SECTION & BG CHANGER */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 4rem;
    text-align: center;
    overflow: hidden;
}

.photo-container { position: absolute; inset: 0; z-index: 0; }
.hero-photo { 
    position: absolute;
    inset: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero-photo.active { opacity: 1; }

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(5,10,21,0.6), var(--bg-dark));
    z-index: 10;
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: 800px;
}
.hero-subtitle {
    color: var(--accent-light);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}
.hero-logo-img {
    width: 60%;
    max-width: 280px;
    height: auto;
    margin: 2rem 0;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}
.hero-description { 
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* BOTONES */
.btn-primary {
    background-color: var(--accent-main);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    display: inline-block;
}
.btn-primary:hover { background-color: var(--accent-dark); transform: translateY(-2px); }
.btn-large { width: 100%; max-width: 300px; padding: 1.1rem; font-size: 1rem; }
.shadow-blue { box-shadow: 0 10px 20px -5px rgba(0, 119, 255, 0.4); }

/* SERVICIOS */
.services-section { padding: 5rem 1.5rem; background-color: var(--bg-dark); }
.services-grid { max-width: 1100px; margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1fr; }
.service-card { 
    padding: 2rem; 
    border-radius: 1.25rem; 
    background-color: var(--bg-card); 
    border: 1px solid var(--border-gray); 
    transition: 0.3s; 
    display: flex;
    flex-direction: column;
}
.service-card:hover { border-color: var(--accent-main); transform: scale(1.03); }
.service-icon { width: 2.5rem; height: 2.5rem; color: var(--accent-main); margin-bottom: 1.25rem; }
.service-title { font-size: 1.3rem; margin-bottom: 0.75rem; text-transform: uppercase; }
.service-text { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }

.service-img-container {
    width: 100%;
    height: 300px;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: auto;
}
.service-img { width: 100%; height: 100%; object-fit: cover; }

/* REVIEWS */
.reviews-section { padding: 5rem 1.5rem; background-color: #080f1e; }
.reviews-title { text-align: center; margin-bottom: 3rem; font-size: 2rem; color: var(--accent-light); }
.reviews-grid { max-width: 1100px; margin: 0 auto; display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.review-card { background: var(--bg-card); padding: 2rem; border-radius: 1rem; border: 1px solid var(--border-gray); }
.review-stars { color: #fbbf24; margin-bottom: 1rem; }
.review-author { display: block; margin-top: 1rem; font-weight: 700; color: var(--accent-main); font-size: 0.9rem; }

/* FOOTER */
.main-footer { padding: 3rem 1rem; border-top: 1px solid var(--border-gray); text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* MEDIA QUERIES */
@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-actions { flex-direction: row; justify-content: center; }
    .btn-large { width: auto; }
    .hero-subtitle { font-size: 2.5rem; }
    .hero-logo-img { width: 35%; }
    .main-nav { top: 36px; padding: 1.25rem 3rem; }
}

@media (max-width: 600px) {
    .top-bar { flex-direction: column; height: auto; padding: 0.75rem; text-align: center; }
    .top-bar-contact { flex-direction: column; gap: 0.4rem; }
    .main-nav { top: 0; }
    .nav-link { display: none; }
}

/* Posicionamiento para las imágenes rotativas de servicios */
.service-img-container {
    position: relative; /* Necesario para el posicionamiento absoluto de los hijos */
    height: 300px;
}

.service-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.service-img.active {
    opacity: 1;
}

/* ESTILOS PARA AVATARES DE CLIENTES */

.review-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-main);
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-card {
    text-align: center; /* Centra el contenido para que el avatar y el texto luzcan equilibrados */
}