/* Variables de Color Ajustadas */
:root {
    --color-primary: #333333; 
    --color-secondary: #ff7f00; 
    --color-text-dark: #333;
    --color-background-light: #ffffff;
    --color-background-dark: #f0f0f0; 
    --color-background-hero: #444; 
}

/* --- Base --- */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--color-text-dark);
    line-height: 1.6;
    background-color: var(--color-background-light); 
}

a {
    color: var(--color-secondary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- Header y Navegación --- */
header {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 20px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Contenido del lado izquierdo (H1 + Nav) */
.header-left-content {
    display: flex;
    align-items: center;
    flex-grow: 1; 
}

header h1 {
    font-size: 1.8em;
    margin: 0;
    display: flex; 
    align-items: center;
    white-space: nowrap; 
    padding-right: 20px; 
}

/* Animación de los Iconos en el Header */
.logo-animation .rotating-wrench,
.logo-animation .rotating-cog {
    margin-right: 10px;
    color: var(--color-secondary); 
}

.rotating-wrench {
    animation: rotateWrench 4s linear infinite; 
}
.rotating-cog {
    animation: rotateCog 5s linear infinite reverse; 
}

@keyframes rotateWrench {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCog {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); } 
}

nav {
    margin-left: 20px; 
}
nav a {
    color: white;
    margin-left: 20px;
    font-size: 0.9em;
}
nav a:hover {
    color: var(--color-secondary);
    text-decoration: none;
}

/* Logo en la Esquina Derecha */
.header-right-logo {
    display: flex; 
    align-items: center;
    margin-left: 20px; 
}
.corner-logo {
    height: 50px; 
    width: auto;
}


/* --- Sección Hero (Inicio) --- */
.hero {
    background: var(--color-background-hero) url('https://via.placeholder.com/1500x300/333333/ffffff?text=Fondo+Caballe') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 80px 20px;
}
.hero h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.2em;
    font-weight: bold; 
    color: var(--color-secondary); 
}

/* --- Ajuste de Iconos Generales --- */
.servicio-item i, .contacto-info i {
    font-size: 3em; 
    color: var(--color-secondary); 
    margin-bottom: 15px;
}
.email-contacto i {
    font-size: 1.5em; 
    margin-right: 10px;
    color: var(--color-primary); 
}

/* --- Sección Servicios (Ajuste para Item Único) --- */
.servicios {
    padding: 60px 20px;
    text-align: center; 
    background-color: var(--color-background-dark); 
}

.servicio-item {
    max-width: 350px; 
    margin: 0 auto; 
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.servicio-item i {
    display: block;
    margin: 0 auto 15px;
}
.servicio-item h3 {
    margin-bottom: 0; 
    color: var(--color-primary);
}


/* --- Sección Contacto --- */
.contacto {
    padding: 40px 20px;
    text-align: center;
    background-color: var(--color-background-light);
}

.contacto h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.contacto-info {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.email-contacto a {
    color: var(--color-primary); 
    font-weight: bold;
}
.contacto p {
    color: var(--color-text-dark);
}

/* --- Footer --- */
footer {
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 0.8em;
}

/* --- Media Queries (Responsive) --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        /* Aumentamos el padding inferior para dar espacio al logo si se mueve mucho */
        padding-bottom: 65px; 
    }
    .header-left-content {
        flex-direction: column;
        width: 100%;
        margin-bottom: 10px; 
    }
    nav {
        margin: 10px 0 0 0;
    }
    nav a {
        margin: 0 5px;
    }
    .hero h2 {
        font-size: 2em;
    }
    
    /* CAMBIO CLAVE: Bajar la posición del logo a 60px */
    .header-right-logo {
        position: absolute; 
        top: 60px; /* NUEVO VALOR: 35px + 25px */
        right: 10px;
        margin-left: 0; 
    }
    .corner-logo {
        height: 40px; 
    }
}